changeset 4:ad8b097df80a draft

Added crude append functionality!
author anngomez
date Wed, 21 Nov 2012 11:27:56 -0500
parents 8741c342e8af
children ed4fcc8c453a
files mrbayes.xml
diffstat 1 files changed, 22 insertions(+), 14 deletions(-) [+]
line wrap: on
line diff
--- a/mrbayes.xml	Thu Nov 08 11:29:57 2012 -0500
+++ b/mrbayes.xml	Wed Nov 21 11:27:56 2012 -0500
@@ -1,7 +1,13 @@
 <?xml version="1.0"?>
 <tool id="mrbayes" name="MrBayes">
   <description>with options and commands</description>
-  <command> mb $command_file > $outfile</command>
+  <command> mb $command_file > $outfile
+#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") 
+  </command>
   <inputs>
     <param name="data" type="data" format="nex" label="Nexus input file"/>
     
@@ -36,8 +42,7 @@
     </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. 
-             You can continue an analysis from a checkpoint with 'mcmc append=yes'."</help>
+       <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" >
        <validator type="in_range" min="1" max="inf" message="Must be greater than or equal to 1"/>
@@ -62,11 +67,10 @@
         help="Summarizes the trees."/>
     <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."/>
-    
-          <!--
-        </when>
-    </conditional> --> 
 
+    <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)." />   
+  
   </inputs>
 
   <configfiles>
@@ -78,6 +82,9 @@
         $model;
         lset rates=$rates;
         mcmcp ngen=$ngen nrun=$nrun nchain=$nchain checkfreq=$checkfreq samplefreq=$samplefreq printfreq=$printfreq stoprule=$stoprule burninfrac=$burninfrac;
+#if int($ngen) >= int($checkfreq)
+        $append;
+#end if#       
         mcmc;
         $sump
         $sumt
@@ -97,7 +104,7 @@
 
 .. class:: warningmark
 
-This tool takes as input a Nexus file (.nex), described here_, that should only contain a data block, without commands. 
+This tool takes as input a Nexus file (.nex), described here_, that should only contain a data block, without commands. If a command block exists in the file, it will be executed first, followed by the ones specified above. 
 
 .. _here: http://en.wikipedia.org/wiki/Nexus_file. 
 
@@ -107,6 +114,11 @@
 
 MrBayes is a program for Bayesian inference and model choice across a wide range of phylogenetic and evolutionary models. MrBayes uses Markov chain Monte Carlo (MCMC) methods to estimate the posterior distribution of model parameters.
 
+See the manual_ or the `command reference`_ for more information.  
+
+.. _manual: http://mrbayes.sourceforge.net/manual.php
+.. _command reference: http://mrbayes.sourceforge.net/commref_mb3.2.pdf
+
 -----
 
 **Model Definitions**
@@ -129,13 +141,9 @@
 
 .. class:: infomark
 
-**TIP**
-
-See the manual_ or the `command reference`_ for more information.  
+**Tip for using append**
 
-.. _manual: http://mrbayes.sourceforge.net/manual.php
-.. _command reference: http://mrbayes.sourceforge.net/commref_mb3.2.pdf
-
+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. 
 </help>
 </tool>