Skip to content

Commit c3ca985

Browse files
committed
show/hide command lines to accommodate advanced users
1 parent 3855bc7 commit c3ca985

1 file changed

Lines changed: 123 additions & 43 deletions

File tree

doc/workshop/molevol2023.md

Lines changed: 123 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -93,21 +93,48 @@ This folder contains two input files (which can also be downloaded from the foll
9393

9494
You can now start to reconstruct a maximum-likelihood (ML) tree
9595
for the Turtle data set (assuming that you are in the same folder where the alignment is
96-
stored):
97-
98-
iqtree2 -s turtle.fa -B 1000 -T AUTO
96+
stored).
97+
98+
> What is the command line to run `iqtree2` that takes
99+
> the alignment file `turtle.fa` as input, performs 1000 ultrafast bootstrap replicates,
100+
> and automatically determines the best number of cores to use (`-T AUTO` option)?
101+
102+
<script type="text/javascript">
103+
function myFunction(buttonid, commandid) {
104+
var x = document.getElementById(commandid);
105+
var y = document.getElementById(buttonid);
106+
if (x.style.display === "none") {
107+
x.style.display = "block";
108+
y.innerText = "Hide the command line";
109+
} else {
110+
x.style.display = "none";
111+
y.innerText = "Show me the command line";
112+
}
113+
}
114+
</script>
115+
116+
<button type="button" class="btn btn-primary" id="button2" onclick="myFunction('button2','command2')">
117+
Show me the command line</button>
118+
<div id="command2" style="display: none; border:1px solid gray;">
119+
120+
<pre><code>iqtree2 -s turtle.fa -B 1000 -T AUTO</code></pre>
99121

100122
Options explained:
101-
102-
* `-s turtle.fa` to specify the input alignment as `turtle.fa`.
103-
* `-B 1000` to specify 1000 replicates for the ultrafast bootstrap ([Minh et al., 2013]).
104-
* `-T AUTO` to determine the best number of CPU cores to speed up the analysis.
123+
<ul>
124+
<li>`-s turtle.fa` to specify the input alignment as `turtle.fa`.</li>
125+
<li>`-B 1000` to specify 1000 replicates for the ultrafast bootstrap ([Minh et al., 2013]).</li>
126+
<li>`-T AUTO` to determine the best number of CPU cores to speed up the analysis.</li>
127+
</ul>
105128

106129
This simple command will perform three important steps in one go:
107130

108-
1. Select best-fit model using ModelFinder ([Kalyaanamoorthy et al., 2017]).
109-
2. Reconstruct the ML tree using the IQ-TREE search algorithm ([Nguyen et al., 2015]).
110-
3. Assess branch supports using the ultrafast bootstrap - UFBoot ([Minh et al., 2013]).
131+
<ol>
132+
<li>Select best-fit model using ModelFinder ([Kalyaanamoorthy et al., 2017]).</li>
133+
<li>Reconstruct the ML tree using the IQ-TREE search algorithm ([Nguyen et al., 2015]).</li>
134+
<li>Assess branch supports using the ultrafast bootstrap - UFBoot ([Minh et al., 2013]).</li>
135+
</ol>
136+
137+
</div>
111138

112139
Once the run is done, IQ-TREE will write several output files including:
113140

@@ -142,16 +169,29 @@ Once the run is done, IQ-TREE will write several output files including:
142169

143170

144171
We now perform a partition model analysis ([Chernomor et al., 2016]), where one allows
145-
each partition to have its own model:
172+
each partition to have its own model.
146173

147-
iqtree2 -s turtle.fa -p turtle.nex -B 1000 -T AUTO
174+
> What is the command line to run `iqtree2` that takes `turtle.fa` as input alignment,
175+
> `turtle.nex` as input partition file, performs 1000 ultrafast bootstrap replicates,
176+
> and automatically determines the best number of cores?
177+
178+
<button type="button" class="btn btn-primary" id="button3" onclick="myFunction('button3','command3')">
179+
Show me the command line</button>
180+
<div id="command3" style="display: none; border:1px solid gray;">
181+
182+
<pre><code>iqtree2 -s turtle.fa -p turtle.nex -B 1000 -T AUTO</code></pre>
148183

149184
Options explained:
150185

151-
* `-p turtle.nex` to specify an *edge-linked proportional* partition model
186+
<ul>
187+
<li>`-p turtle.nex` to specify an *edge-linked proportional* partition model
152188
([Chernomor et al., 2016]). That means, there is one set of branch lengths.
153189
But each partition can have proportionally shorter or longer tree length,
154-
representing slow or fast evolutionary rate, respectively.
190+
representing slow or fast evolutionary rate, respectively.</li>
191+
</ul>
192+
193+
</div>
194+
155195

156196
> **QUESTIONS:**
157197
>
@@ -172,17 +212,32 @@ Options explained:
172212
<div class="hline"></div>
173213

174214
We now perform the PartitionFinder algorithm ([Lanfear et al., 2012]) that tries to
175-
merge partitions to reduce the potential over-parameterization:
215+
merge partitions to reduce the potential over-parameterization.
216+
217+
> What is the command line to run `iqtree2` that takes `turtle.fa` as input alignment,
218+
> `turtle.nex` as input partition file, performs 1000 ultrafast bootstrap replicates,
219+
> merges the partitions with relaxed clustering algorithm,
220+
> and automatically determines the best number of cores?
221+
222+
* Please use `--prefix turtle.merge` to set the prefix for all output files as `turtle.merge.*`.
223+
This is to avoid overwriting outputs from the previous analysis.
224+
225+
226+
<button type="button" class="btn btn-primary" id="button4" onclick="myFunction('button4','command4')">
227+
Show me the command line</button>
228+
<div id="command4" style="display: none; border:1px solid gray;">
176229

177-
iqtree2 -s turtle.fa -p turtle.nex -B 1000 -T AUTO -m MFP+MERGE -rcluster 10 --prefix turtle.merge
230+
<pre><code>iqtree2 -s turtle.fa -p turtle.nex -B 1000 -T AUTO -m MFP+MERGE -rcluster 10 --prefix turtle.merge</code></pre>
178231

179232
Options explained:
180233

181-
* `-m MFP+MERGE` to perform PartitionFinder followed by tree reconstruction.
182-
* `-rcluster 10` to reduce computations by only examining the top 10% partitioning
183-
schemes using the *relaxed clustering algorithm* ([Lanfear et al., 2014]).
184-
* `--prefix turtle.merge` to set the prefix for all output files as `turtle.merge.*`.
185-
This is to avoid overwriting outputs from the previous analysis.
234+
<ul>
235+
<li>`-m MFP+MERGE` to perform PartitionFinder followed by tree reconstruction.</li>
236+
<li>`-rcluster 10` to reduce computations by only examining the top 10% partitioning
237+
schemes using the *relaxed clustering algorithm* ([Lanfear et al., 2014]). </li>
238+
</ul>
239+
240+
</div>
186241

187242
> **QUESTIONS:**
188243
>
@@ -217,20 +272,34 @@ For Windows:
217272

218273
type turtle.fa.treefile turtle.nex.treefile >turtle.trees
219274

220-
Now pass this file into IQ-TREE via `-z` option:
275+
Now you can pass this file into IQ-TREE via `-z` option.
276+
277+
> What is the command line to run `iqtree2` that takes `turtle.fa` as input alignment,
278+
> `turtle.merge.best_scheme.nex` as input partition file,
279+
> `turtle.trees` as input trees file, performs topology tests with 10,000 replicates,
280+
> performs the approximately unbiased (AU) test,
281+
> and no tree search to save time?
221282
222-
iqtree2 -s turtle.fa -p turtle.merge.best_scheme.nex -z turtle.trees -zb 10000 -au -n 0 --prefix turtle.test
283+
* Please use `--prefix turtle.test` to set the prefix for all output files as `turtle.test.*`.
284+
285+
<button type="button" class="btn btn-primary" id="button5" onclick="myFunction('button5','command5')">
286+
Show me the command line</button>
287+
<div id="command5" style="display: none; border:1px solid gray;">
288+
289+
<pre><code>iqtree2 -s turtle.fa -p turtle.merge.best_scheme.nex -z turtle.trees -zb 10000 -au -n 0 --prefix turtle.test</code></pre>
223290

224291
Options explained:
225292

226-
* `-p turtle.merge.best_scheme.nex` to provide the best partitioning scheme found
227-
previously to avoid running ModelFinder again.
228-
* `-z turtle.trees` to input a set of trees.
229-
* `-zb 10000` to specify 10000 replicates for *approximate* boostrap for tree topology tests.
230-
* `-au` is to perform the Approximately Unbiased test.
231-
* `-n 0` to avoid tree search and just perform tree topology tests.
232-
* `--prefix turtle.test` to set the prefix for all output files as `turtle.test.*`.
293+
<ul>
294+
<li>`-p turtle.merge.best_scheme.nex` to provide the best partitioning scheme found
295+
previously to avoid running ModelFinder again.</li>
296+
<li>`-z turtle.trees` to input a set of trees.</li>
297+
<li>`-zb 10000` to specify 10000 replicates for *approximate* boostrap for tree topology tests.</li>
298+
<li>`-au` is to perform the Approximately Unbiased test.</li>
299+
<li>`-n 0` to avoid tree search and just perform tree topology tests.</li>
300+
</ul>
233301

302+
</div>
234303

235304
> **QUESTIONS:**
236305
>
@@ -269,26 +338,37 @@ partition file, and thus is actually simpler to run.
269338
Your task is now to apply the MAST model to the Turtle data. To use this model, you
270339
will need to use the option `-m` to specify the model, and adding "+T" to the model name.
271340
For example, you can use `-m GTR+T`, but this model is a bit too simple. The better way is
272-
to look again the best model found in step 2, and add "+T" to that model name in a run
273-
like this:
341+
to look again the best model found in step 2, and add "+T" to that model name.
342+
343+
> What is the command line to run `iqtree2` that takes `turtle.fa` as input alignment,
344+
> `turtle.trees` as input trees file, applies the MAST model combined with the best
345+
> model found in step 2?
274346
275-
iqtree2 -s turtle.fa -m BEST_MODEL_NAME+T -te turtle.trees --prefix turtle.mix
347+
* Please use `--prefix turtle.mix` to set the prefix for all output files as `turtle.mix.*`.
348+
349+
<button type="button" class="btn btn-primary" id="button6" onclick="myFunction('button6','command6')">
350+
Show me the command line</button>
351+
<div id="command6" style="display: none; border:1px solid gray;">
352+
353+
<pre><code>iqtree2 -s turtle.fa -m BEST_MODEL_NAME+T -te turtle.trees --prefix turtle.mix
354+
</code></pre>
276355

277356
Options explained:
278-
279-
* `BEST_MODEL_NAME` is the model string found in step 2, that you need to replace with for
280-
this command line to run properly.
281-
* `-te` is to specify a file containing the set of trees for the MAST model.
357+
358+
<ul>
359+
<li>`BEST_MODEL_NAME` is the model string found in step 2, that you need to replace with for
360+
this command line to run properly.</li>
361+
<li>`-te` is to specify a file containing the set of trees for the MAST model.
282362
Currently, MAST only accepts a set of fixed tree topologies provided by the users.
283-
It doesn't yet have the ability to automatically find the optimal trees.
284-
* `--prefix` is the option you know already to avoid overwriting output files from
285-
previous run.
363+
It doesn't yet have the ability to automatically find the optimal trees.</li>
364+
</ul>
365+
366+
</div>
286367

287368
> **QUESTIONS:**
288369
>
289-
> * Look at `turle.mix.iqtree` for the line printing the tree weights. Which tree
290-
> has a higher weight? Is it the tree having higher likelihood found in step 5?
291-
>
370+
> * Look at `turle.mix.iqtree` for the line printing the tree weights. Which tree has a higher weight?
371+
> * Is it the tree having higher likelihood found in step 5?
292372
{: .tip}
293373

294374
7) Identifying most influential genes

0 commit comments

Comments
 (0)