changeset 3:8741c342e8af draft

Uploaded MrBayes wrapper for dynamic commands.
author anngomez
date Thu, 08 Nov 2012 11:29:57 -0500
parents 8ad0d20c9654
children ad8b097df80a
files mrbayes.xml
diffstat 1 files changed, 141 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mrbayes.xml	Thu Nov 08 11:29:57 2012 -0500
@@ -0,0 +1,141 @@
+<?xml version="1.0"?>
+<tool id="mrbayes" name="MrBayes">
+  <description>with options and commands</description>
+  <command> mb $command_file > $outfile</command>
+  <inputs>
+    <param name="data" type="data" format="nex" label="Nexus input file"/>
+    
+    <param name="outgroup" type="text" label="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" />
+      <option value="lset nst=6"                                >GRT</option>
+      <option value="lset nst=6; prset statefreqpr=fixed(equal)">SYM</option>
+      <option value="lset nst=2"                                >HKY</option>
+      <option value="lset nst=2; prset statefreqpr=fixed(equal)">K2P</option>
+      <option value="lset nst=1"                                >F81</option>
+      <option value="lset nst=1; prset statefreqpr=fixed(equal)">JC </option>
+      <option value="lset nst=mixed"                            >Mixed </option>
+      <help>Models are defined below and are only valid for nucleotide data.</help>
+    </param>
+    <param name="rates" type="select" label="Choose rates">
+      <option value="equal"/>
+      <option value="gamma"/>
+      <option value="propinv"/>
+      <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. 
+             You can continue an analysis from a checkpoint with 'mcmc append=yes'."</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"/>
+       <help>Frequency with which output it written to files." </help>
+    </param>
+    <param name="printfreq" type="integer" label="Print 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 is printed to the screen.</help>
+    </param>
+    <param name="burninfrac" type="float" label="Burn-in fraction" value="0.25">
+      <validator type="in_range" min="0.01" max=".50" message="Must be between 0.01 and .50"/>
+      <help>Fraction of samples to discard when summarizing. </help>
+    </param>
+    <param name="stoprule" type="select" label="Stop rule?" >
+      <option value="no">No</option> 
+      <option value="yes">Yes</option> 
+    </param>
+
+    <param name="sump" type="boolean" truevalue="sump;" falsevalue="" label="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?"
+        help="Creates an x-y graph of the parameter over the course of the chain."/>
+    
+          <!--
+        </when>
+    </conditional> --> 
+
+  </inputs>
+
+  <configfiles>
+    <configfile name="command_file">
+        begin mrbayes;
+        set quitonerror=no;
+        execute $data;
+        outgroup $outgroup;
+        $model;
+        lset rates=$rates;
+        mcmcp ngen=$ngen nrun=$nrun nchain=$nchain checkfreq=$checkfreq samplefreq=$samplefreq printfreq=$printfreq stoprule=$stoprule burninfrac=$burninfrac;
+        mcmc;
+        $sump
+        $sumt
+        $plot
+        end;    
+    </configfile>
+  </configfiles>
+
+  <outputs>
+    <data name="outfile" format="txt"/>
+  </outputs>
+
+  <requirements>
+    <requirement version="3.2.1" type="binary">mb</requirement>
+  </requirements>
+<help>
+
+.. class:: warningmark
+
+This tool takes as input a Nexus file (.nex), described here_, that should only contain a data block, without commands. 
+
+.. _here: http://en.wikipedia.org/wiki/Nexus_file. 
+
+-----
+
+**What it does**
+
+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.
+
+-----
+
+**Model Definitions**
+
+Models are defined by the following MrBayes options::
+
+ GRT: lset nst=6;
+ SYM: lset nst=6; prset statefreqpr=fixed(equal);
+ HKY: lset nst=2;
+ K2P: lset nst=2; prset statefreqpr=fixed(equal);
+ F81: lset nst=1;
+ JC: lset nst=1; prset statefreqpr=fixed(equal);
+ Mixed: lset nst=mixed;
+
+Each model makes different assumptions about nucelotide substitution rates and state frequencies. 
+
+The mixed model performs Markov chain sampling over the space of all possible reversible substitution models, by grouping the six rates in various combinations. 
+ 
+-----
+
+.. class:: infomark
+
+**TIP**
+
+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
+
+</help>
+</tool>
+