changeset 5:ed4fcc8c453a draft default tip

Uploaded
author anngomez
date Mon, 10 Dec 2012 09:27:00 -0500
parents ad8b097df80a
children
files mrbayes.xml
diffstat 1 files changed, 38 insertions(+), 22 deletions(-) [+]
line wrap: on
line diff
--- a/mrbayes.xml	Wed Nov 21 11:27:56 2012 -0500
+++ b/mrbayes.xml	Mon Dec 10 09:27:00 2012 -0500
@@ -2,16 +2,30 @@
 <tool id="mrbayes" name="MrBayes">
   <description>with options and commands</description>
   <command> mb $command_file > $outfile
-#silent sys.stderr.write("\n \n \n !!!! Cheetah Template Variables !!!!\n") 
+## print list of avaialble variables
+#silent sys.stderr.write("\n \n \n ======== Cheetah template variables ========\n") 
 #for k,v in $searchList[2].items() 
 #silent   sys.stderr.write(" %s = %s\n" % (str(k), str(v) )) 
 #end for 
-#silent sys.stderr.write("!!!! end-of-list !!!!\n \n \n") 
+#silent sys.stderr.write("======== End of Cheetah template variables ========\n \n \n") 
   </command>
   <inputs>
     <param name="data" type="data" format="nex" label="Nexus input file"/>
     
-    <param name="outgroup" type="text" label="Outgroup" size="10" value="1"
+    <param name="filename" type="text" label="Output filename" size="10" value=""
+      help="Output files will be named this with .p, .t, .mcmc extensions. Use to avoid overwriting files when running repeated analyses on the same dataset." />
+    
+    <param name="ngen" type="integer" label="&lt;hr&gt;Number of generations" value="10000" >
+      <validator type="in_range" min="1" max="inf" message="Must be greater than or equal to 1"/>
+    </param>
+    <param name="nchain" type="integer" label="Number of chains" value="2" >
+       <validator type="in_range" min="1" max="inf" message="Must be greater than or equal to 1"/>
+    </param>
+    <param name="nrun" type="integer" label="Number of runs" value="2" >    
+      <validator type="in_range" min="1" max="inf" message="Must be greater than or equal to 1"/>
+    </param>
+    
+    <param name="outgroup" type="text" label="&lt;hr&gt;Outgroup" size="10" value="1"
       help="The name or number identifying one taxon from the data." />
     <param name="model" type="select" label="Choose model">
       <sanitizer sanitize="False" />
@@ -31,20 +45,7 @@
       <option value="invgamma"/>
       <option value="adgamma"/>
     </param>
-    <param name="ngen" type="integer" label="Number of generations" value="1000" >
-      <validator type="in_range" min="1" max="inf" message="Must be greater than or equal to 1"/>
-    </param>
-    <param name="nchain" type="integer" label="Number of chains" value="2" >
-       <validator type="in_range" min="1" max="inf" message="Must be greater than or equal to 1"/>
-    </param>
-    <param name="nrun" type="integer" label="Number of runs" value="2" >    
-      <validator type="in_range" min="1" max="inf" message="Must be greater than or equal to 1"/>
-    </param>
-    <param name="checkfreq" type="integer" label="Checkpoint frequency" value="100000" >
-       <validator type="in_range" min="100" max="inf" message="Must be greater than or equal to 100"/>
-       <help>Frequency with which checkpoints are written. Used for continuing analysis with append.</help>
-    </param>
-    <param name="samplefreq" type="integer" label="Sample frequency" value="500" >
+    <param name="samplefreq" type="integer" label="&lt;hr&gt;Sample frequency" value="500" >
        <validator type="in_range" min="1" max="inf" message="Must be greater than or equal to 1"/>
        <help>Frequency with which output it written to files." </help>
     </param>
@@ -61,15 +62,19 @@
       <option value="yes">Yes</option> 
     </param>
 
-    <param name="sump" type="boolean" truevalue="sump;" falsevalue="" label="Include sump?"
+    <param name="sump" type="boolean" truevalue="sump;" falsevalue="" label="&lt;hr&gt;Include sump?"
         help="Summarizes sampled parameter value."/>
     <param name="sumt" type="boolean" truevalue="sumt;" falsevalue="" label="Include sumt?" 
         help="Summarizes the trees."/>
-    <param name="plot" type="boolean" truevalue="plot;" falsevalue="" label="Include plot?"
+    <param name="plot" type="boolean" truevalue="plot" falsevalue="" label="Include plot?"
         help="Creates an x-y graph of the parameter over the course of the chain."/>
 
+    <param name="checkfreq" type="integer" label="&lt;hr&gt;Checkpoint frequency" value="100000" >
+       <validator type="in_range" min="100" max="inf" message="Must be greater than or equal to 100"/>
+       <help>Frequency with which checkpoints are written. Used for continuing analysis with append.</help>
+    </param>
     <param name="append" type="boolean" truevalue="mcmcp append=yes" falsevalue="mcmcp append=no" label="Append to last checkpoint?"
-        help="Requires .ckp file (i.e. that ngen > checkfreq)." />   
+        help="Requires .ckp file (i.e. that number of generations > checkpoint frequency for previous analysis)." />   
   
   </inputs>
 
@@ -81,14 +86,19 @@
         outgroup $outgroup;
         $model;
         lset rates=$rates;
+#if str($filename) != ""
+    mcmcp filename=$filename;
+#end if#
         mcmcp ngen=$ngen nrun=$nrun nchain=$nchain checkfreq=$checkfreq samplefreq=$samplefreq printfreq=$printfreq stoprule=$stoprule burninfrac=$burninfrac;
 #if int($ngen) >= int($checkfreq)
-        $append;
+    $append;
 #end if#       
         mcmc;
         $sump
         $sumt
-        $plot
+#if str($plot) == "plot"
+    plot;  
+#end if#
         end;    
     </configfile>
   </configfiles>
@@ -141,6 +151,12 @@
 
 .. class:: infomark
 
+**Tip for repetitive analyses**
+
+Note that running the same analysis  on the same dataset in Galaxy will overwrite .p, .t, and .mcmc files for that dataset. This can be avoided by copying the dataset or re-uploading it, or by specifying a new filename. 
+
+.. class:: infomark
+
 **Tip for using append**
 
 If you want to use the append functionality, all parameters will have to be identical to your initial analysis. The easiest way to ensure this is by using the blue "Run this job again" arrow on the dataset, and checking the additional append box. Note also that ngen will be the total number of generations, not the number of generations to add, so you should increase this value except if a run was interrupted. Selecting append while checkfreq > ngen will have no effect.