changeset 3:a396ccf6079c draft default tip

"planemo upload for repository https://github.com/quadram-institute-bioscience/galaxy-tools/tree/master/tools/iqtree"
author leomrtns
date Wed, 18 Dec 2019 13:46:22 +0000
parents 87daf702e477
children
files iqtree.xml readme.txt
diffstat 2 files changed, 107 insertions(+), 43 deletions(-) [+]
line wrap: on
line diff
--- a/iqtree.xml	Thu Sep 05 13:14:43 2019 -0400
+++ b/iqtree.xml	Wed Dec 18 13:46:22 2019 +0000
@@ -16,8 +16,8 @@
 #end if
 
 ## file
-#if $general_options.t
-    -t '$general_options.t'
+#if str($initial_tree.mode.tree) == "file"
+    -t '$initial_tree.mode.t'
     $tree_parameters.constructing_consensus.con
     $tree_parameters.constructing_consensus.net
     #if str($tree_parameters.constructing_consensus.bi) != ''
@@ -39,11 +39,27 @@
         $tree_parameters.computing_robinson_foulds.rf_all
         $tree_parameters.computing_robinson_foulds.rf_adj
     #end if
-#end if
+#else if str($initial_tree.mode.tree) == "fixed"
+    -te '$initial_tree.mode.te'
+#else if str($initial_tree.mode.tree) == "default"
+  #if str($initial_tree.mode.ninit) != ''
+      -ninit '$initial_tree.mode.ninit'
+  #end if
+  #if str($initial_tree.mode.sprrad) != ''
+      -sprrad '$initial_tree.mode.sprrad'
+  #end if
+#else if str($initial_tree.mode.tree) == "fast"
+  -fast -nbest 1 
+#else if str($initial_tree.mode.tree) == "pars"
+  -t PARS -ninit 2 -nbest 1 
+#else 
+  -t BIONJ -ninit 2 -nbest 1
+#end if 
 
-## file
-#if $general_options.te
-    -te '$general_options.te'
+#if str($initial_tree.mode.tree) in ["fixed", "default", "file"]:
+  #if str($tree_parameters.tree_search.nbest) != ''
+    -nbest '$tree_parameters.tree_search.nbest'
+  #end if
 #end if
 
 #if str($general_options.st) != ''
@@ -154,18 +170,11 @@
 $modelling_parameters.site_specific_frequency.fmax
 
 
-
-#if str($tree_parameters.tree_search.ninit) != ''
-    -ninit '$tree_parameters.tree_search.ninit'
-#end if
-
 #if str($tree_parameters.tree_search.ntop) != ''
     -ntop '$tree_parameters.tree_search.ntop'
 #end if
 
-#if str($tree_parameters.tree_search.nbest) != ''
-    -nbest '$tree_parameters.tree_search.nbest'
-#end if
+
 
 #if str($tree_parameters.tree_search.nstop) != ''
     -nstop '$tree_parameters.tree_search.nstop'
@@ -175,17 +184,12 @@
     -n '$tree_parameters.tree_search.n'
 #end if
 
-#if str($tree_parameters.tree_search.sprrad) != ''
-    -sprrad '$tree_parameters.tree_search.sprrad'
-#end if
-
 #if str($tree_parameters.tree_search.pers) != ''
     -pers '$tree_parameters.tree_search.pers'
 #end if
 
 $tree_parameters.tree_search.allnni
 $tree_parameters.tree_search.djc
-$tree_parameters.tree_search.fast
 
 ## file
 #if $tree_parameters.tree_search.g
@@ -278,23 +282,77 @@
         <section name="general_options" expanded="True" title="General options">
             <param argument="-s" type="data" format="txt" optional="true" label="Specify input alignment file in PHYLIP, FASTA, NEXUS, CLUSTAL or MSF format."/>
             <param argument="-st" type="select" label="Specify sequence type as either of DNA, AA, BIN, MORPH, CODON or NT2AA for DNA, amino-acid, binary, morphological, codon or DNA-to-AA-translated sequences">
-                <help><![CDATA[
-Note that -st CODON is always necessary when using codon models and you also need to specify a genetic code like this if differed from the standard genetic code.
-<br/><i>-st</i> NT2AA tells IQ-TREE to translate protein-coding DNA into AA sequences and then subsequent analysis will work on the AA sequences. You can also use a genetic code like -st NT2AA5 for the Invertebrate Mitochondrial Code (see genetic code table).]]>
-                </help>
                 <option value="DNA">DNA</option>
                 <option value="AA">AA</option>
                 <option value="BIN">BIN</option>
                 <option value="MORPH">MORPH</option>
                 <option value="CODON">CODON</option>
                 <option value="NT2AA">NT2AA</option>
+                <help><![CDATA[
+  Note that -st CODON is always necessary when using codon models and you also need to specify a genetic code like this if differed from the standard genetic code.
+  <br/><i>-st</i> NT2AA tells IQ-TREE to translate protein-coding DNA into AA sequences and then subsequent analysis will work on the AA sequences. 
+  You can also use a genetic code like -st NT2AA5 for the Invertebrate Mitochondrial Code (see genetic code table).
+                  ]]>
+                </help>
             </param>
-            <param argument="-t" type="data" format="nhx" optional="true" label="Specify a file containing starting tree for tree search"/>
-            <param argument="-te" type="data" format="nhx" optional="true" label="Like -t but fixing user tree" help="That means, no tree search is performed and IQ-TREE computes the log-likelihood of the fixed user tree."/>
             <param argument="-seed" type="integer" optional="true" label="Specify a random number seed to reproduce a previous run (leave blank to randomize)"/>
             <param argument="-keep_ident" type="boolean" truevalue="-keep-ident" falsevalue="" checked="false" label="Keep identical sequences in the alignment" help="By default: IQ-TREE will remove them during the analysis and add them in the end."/>
             <param argument="-safe" type="boolean" truevalue="-safe" falsevalue="" checked="false" label="Turn on safe numerical mode to avoid numerical underflow for large data sets with many sequences (typically in the order of thousands)" help="This mode is automatically turned on when having more than 2000 sequences."/>
         </section>
+            
+        <section name="initial_tree" expanded="True" title="Input and initial trees">
+              <conditional name="mode"> 
+                <param name="tree" type="select" label="Initial tree search">
+                  <option value="default" selected="true">parsimony using PLL library (default) </option>
+                  <option value="fast">fasttree emulation (option "-fast")</option>
+                  <option value="pars">fast parsimony, using IQTREE internal algorithm (option "-t PARS")</option>
+                  <option value="bionj">bioNJ tree (option "-t BIONJ")</option>
+                  <option value="fixed">fixed tree, no optimisation (option "-te"). Used in e.g. ancestral reconstruction</option>
+                  <option value="file">initial trees from file (option "-t"). Also used for consensus and for tree distance calculations</option>
+                  <help><![CDATA[
+  The options for the initial tree estimation are parsimony (default), fast parsimony, fasttree emulation, bioNJ, fixed (no optimisation), and from file. <br/>
+  The default parsimony estimation is through the PLL library, which is linear on the number of <i>sites</i> and not <i>patterns</i> (so slower than other algorithms). 
+  Notice that this library is also used to populate the "initial parsimony trees" set ("<i>-ninit</i>" below), so keep that in mind. <br/>
+
+  <br/>According to the documentation (see http://www.iqtree.org/doc/Command-Reference#tree-search-parameters), the option "-fast" 
+  "Turn on the fast tree search mode, where IQ-TREE will just construct two starting trees: maximum parsimony and BIONJ, which are then optimized 
+  by nearest neighbor interchange (NNI)."
+  If you chose fast parsimony, fasttree, or bioNJ, it is assumed that the initial set of trees is two ("-ninit 2") since doing otherwise would defeat the purpose 
+  of avoiding the default PLL.<br/>
+  <br/>You can also select a tree file as input to IQ_TREE. In most cases this tree file is used as 
+  initial state for optimisation (or as a fixed topology). But in some cases it is used for consensus tree calculation or Robinson-Foulds distances. 
+  There are a few reasons why you should provide trees to IQ-TREE:
+  <ul>
+    <li>Through a <b>constrained tree search</b>, where you give a (potentially small, multifurcating) tree which should be respected when searching for optimal trees. 
+      This is given through option <i>"-g"</i>. You use this option when you "know" or want to test a specific grouping of taxa. (Section "Tree search parameters")</li>
+    <li>Input trees for <b>tree fit comparison</b>, as in section "Tree topology tests" below. IQ-TREE may still do model optimisation, initial tree search, etc. since 
+      it compares the user-provided trees assuming a common model. </li>
+    <li>Suggest the <b>initial trees</b> (option "<i>-t</i>"). From these, IQ-TREE will start exploring trees (to speed up the tree search in case you already have 
+      good candidate trees). This same command (i.e. same tree file) can also be used for calculating consensus trees or distances between trees. The other options will 
+    inform IQ-TREE how it should use this file (here, the default is to use it as starting tree). </li>
+  <li>By <b>fixing the tree</b> (option "<i>-te</i>"). This means that IQ-TREE will not try any optimisation with other topologies, and can be used e.g. in ancestral reconstruction. </li>
+  </ul>
+                    ]]></help>
+                  </param>
+                <when value="default">
+                  <param argument="-ninit" type="integer" value="100" optional="true" label="Specify number of initial parsimony trees (default=100)"
+                    help="This value must be strictly higher than the number of best trees to maintain (i.e. higher than 5 under default settings)."/>
+                  <param argument="-sprrad" type="integer" value="6" optional="true" label="Specify SPR radius for the initial parsimony tree search"/>
+                </when>
+                <when value="file">
+                  <param argument="-t" type="data" format="nhx" optional="false" label="Specify a file containing the starting tree for tree search"  
+                    help="also used by consensus or distance calculations, if you set the appropriate variables in 'Tree Parameters' below"/>
+                </when>
+                <when value="fixed">
+                  <param argument="-te" type="data" format="nhx" optional="false" label="file with fixed user tree" help="No tree search is performed and IQ-TREE 
+                    computes the log-likelihood of the fixed user tree."/>
+                </when>
+                <when value="fast"/>
+                <when value="pars"/>
+                <when value="bionj"/>
+              </conditional>
+        </section>
+
         <section name="likelihood_mapping" expanded="False" title="Likelihood mapping analysis">
             <param argument="-lmap" type="integer" optional="true" label="Specify the number of quartets to be randomly drawn" help="If you specify -lmap ALL, all unique quartets will be drawn, instead."/>
             <param argument="-lmclust" type="data" format="txt" optional="true" label="Specify a NEXUS file containing taxon clusters (see below for example) for quartet mapping analysis."/>
@@ -303,7 +361,12 @@
         <section name="modelling_parameters" title="Modelling Parameters">
             <section name="automatic_model" expanded="False" title="Automatic model selection">
                 <conditional name="cond_model" >
-                    <param name="opt_custommodel" type="boolean" checked="false" label="Use Custom Model" help="See http://www.iqtree.org/doc/Substitution-Models"/>
+                  <param name="opt_custommodel" type="boolean" checked="false" label="Use Custom Model"> 
+                    <help><![CDATA[
+                      With this option, you can restrict the analysis to a fixed model instead of letting iq-tree select the best one (slow  model selection). 
+                      Suggestions include "HKY+G" (good compromise speed-performance) or "GTR+G+I" (parameter-rich model). 
+                      <br>See http://www.iqtree.org/doc/Substitution-Models for a full list]]>
+                    </help></param>
                     <when value="true">
                         <param argument="-m" type="text" label="Model">
                             <sanitizer>
@@ -426,25 +489,18 @@
         </section>
         <section name="tree_parameters" title="Tree Parameters">
             <section name="tree_search" expanded="False" title="Tree search parameters">
-              <param argument="-fast" type="boolean" truevalue="-fast" falsevalue="" checked="false" label="fast tree search mode">
-                <help><![CDATA[
-                  <br/>Emulates fasttree. According to the documentation (see http://www.iqtree.org/doc/Command-Reference#tree-search-parameters):
-                  <br/>"Turn on the fast tree search mode, where IQ-TREE will just construct two starting trees: maximum parsimony and BIONJ, which are then optimized 
-                  by nearest neighbor interchange (NNI). Introduced in version 1.6."
-                  <br/> Some options below may therefore be unused (e.g. the initial number of parsimony trees...)
-                  ]]>
-                </help>
-              </param>
+              <param argument="-nstop" type="integer" value="100" optional="true" label="Specify number of unsuccessful iterations to stop 
+                (-nstop and -pers are the most relevant when increasing exploration space, according to IQ_TREE reference manual)"/>
+              <param argument="-pers" type="float" value="0.5" optional="true" label="Specify perturbation strength (between 0 and 1) for randomized NNI
+                (-nstop and -pers are the most relevant when increasing exploration space, according to IQ_TREE reference manual)"/>
               <param argument="-n" type="integer" optional="true" label="Skip subsequent tree search (n = 0), useful when you only want to assess the phylogenetic information of the alignment. Otherwise specify number of iterations to stop (this option overrides -nstop criterion)." />
-              <param argument="-ninit" type="integer" value="100" optional="true" label="Specify number of initial parsimony trees"/>
+              <param argument="-nbest" type="integer" value="5" optional="true" label="Specify number of trees in the candidate set to maintain during ML tree search (default=5)"
+                help="This value must be strictly smaller than the number of initial pasimony trees (i.e. less than 100 for default settings)"/>
               <param argument="-ntop" type="integer" value="20" optional="true" label="Specify number of top initial parsimony trees to optimize with ML nearest neighbor interchange (NNI) search to initialize the candidate set"/>
-              <param argument="-nbest" type="integer" value="5" optional="true" label="Specify number of trees in the candidate set to maintain during ML tree search"/>
-              <param argument="-nstop" type="integer" value="100" optional="true" label="Specify number of unsuccessful iterations to stop"/>
-              <param argument="-sprrad" type="integer" value="6" optional="true" label="Specify SPR radius for the initial parsimony tree search"/>
-              <param argument="-pers" type="float" value="0.5" optional="true" label="Specify perturbation strength (between 0 and 1) for randomized NNI"/>
               <param argument="-allnni" type="boolean" truevalue="-allnni" falsevalue="" checked="false" label="Turn on more thorough and slower NNI search"/>
-              <param argument="-djc" type="boolean" truevalue="-djc" falsevalue="" checked="false" label="Avoid computing ML pairwise distances and BIONJ tree."/>
-              <param argument="-g" type="data" format="txt" optional="true" label="Specify a topological constraint tree file in NEWICK format" help="The constraint tree can be a multifurcating tree and need not to include all taxa."/>
+              <param argument="-djc" type="boolean" truevalue="-djc" falsevalue="" checked="false" label="Avoid computing ML pairwise distances and BIONJ tree (when generating tree set)"
+                help="This is independent on how the initial tree/trees were found, and is added to set of initial trees (since it was estimated using likelihood parameters) "/>
+              <param argument="-g" type="data" format="txt" optional="true" label="Specify a topological constraint tree file in NEWICK format" help="The constraint tree can be a multifurcating tree and need not to include all taxa. (see https://github.com/Cibiv/IQ-TREE/wiki/Advanced-Tutorial#constrained-tree-search)"/>
             </section>
             <section name="single_branch" expanded="False" title="Single branch tests">
                 <param argument="-alrt" type="integer" optional="true" label="Specify number of replicates (&gt;=1000) to perform SH-like approximate likelihood ratio test (SH-aLRT) (Guindon et al., 2010)" help="If number of replicates is set to 0 (-alrt 0), then the parametric aLRT test (Anisimova and Gascuel 2006) is performed, instead of SH-aLRT."/>
@@ -452,7 +508,14 @@
                 <param argument="-lbp" type="integer" optional="true" label="Specify number of replicates (&gt;=1000) to perform fast local bootstrap probability method (Adachi and Hasegawa, 1996)."/>
             </section>
             <section name="tree_topology" expanded="False" title="Tree topology tests">
-                <param argument="-z" type="data" format="txt" optional="true" label="Specify a file containing a set of trees" help="IQ-TREE will compute the log-likelihoods of all trees."/>
+              <param argument="-z" type="data" format="txt" optional="true" label="Specify a file containing a set of trees">
+                <help><![CDATA[
+                  IQ-TREE will compute and compare the log-likelihoods of all trees in this file. It may still search for an optimal tree, in order to find best model and parameters 
+                  (unless you fixed those as well). It is strongly suggested to also perform some tests below (like RELL, AU, etc.). See more info at 
+                  https://github.com/Cibiv/IQ-TREE/wiki/Advanced-Tutorial#tree-topology-tests
+                  ]]>
+                </help>
+              </param>
                 <param argument="-zb" type="integer" optional="true" label="Specify the number of RELL (Kishino et al., 1990) replicates (&gt;=1000) to perform several tree topology tests for all trees passed via -z" help="The tests include bootstrap proportion (BP), KH test (Kishino and Hasegawa, 1989), SH test (Shimodaira and Hasegawa, 1999) and expected likelihood weights (ELW) (Strimmer and Rambaut, 2002)."/>
                 <param argument="-zw" type="boolean" truevalue="-zw" falsevalue="" checked="false" label="Used together with -zb to additionally perform the weighted-KH and weighted-SH tests."/>
                 <param argument="-au" type="boolean" truevalue="-au" falsevalue="" checked="false" label="Used together with -zb to additionally perform the approximately unbiased (AU) test (Shimodaira, 2002)" help="Note that you have to specify the number of replicates for the AU test via -zb."/>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/readme.txt	Wed Dec 18 13:46:22 2019 +0000
@@ -0,0 +1,1 @@
+ninit > nbest+1 always