Skip to content

Commit cdb1673

Browse files
committed
added bootstrapped tree page
1 parent e458dad commit cdb1673

File tree

22 files changed

+837
-22
lines changed

22 files changed

+837
-22
lines changed

_optionals/50-multiple_gene_copies.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
---
22
title: "Multiple gene copies"
3-
Objectives:
3+
objectives:
44
- Search for another gene in a combination of genomes.
55
- Translating command line skills to your specific research.
6+
67
---
78

89

_optionals/60-bootstrapped_trees.md

+168
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,168 @@
1+
---
2+
title: "ML trees with bootstraps"
3+
objectives:
4+
- Creating maximum likelihood trees with RAxML
5+
- Creating bootstrapped trees with RAxML
6+
- Creating bipartition tree (ML + bootstrap)
7+
---
8+
9+
We showed how to generate a simple tree in the lesson "Phylogenetic tree".
10+
However, for publication, you are expected to show more evidence,
11+
such as the stability of tree topology.
12+
One way to show this is using bootstrap values,
13+
which is the probability that a particular node
14+
(i.e. a dichotomous branching with a particular set of samples in each branch)
15+
appearing among a large number of trees generated
16+
while resampling within the sequence alignment.
17+
Bootstrap values are often used in the same fashion as confidence intervals.
18+
19+
A common method for creating bootstrapped trees using RAxML consists of
20+
3 step approach:
21+
- Generate a few maximum likelihood (ML) trees.
22+
- Generate many bootstrapped trees.
23+
- Apply the bootstrap information to the best ML tree.
24+
25+
### Generating an ML tree
26+
27+
Maximum likelihood tree generation is computationally expensive,
28+
but the resulting tree is considered superior to other rapid methods.
29+
Thus, we'll generate a small number of ML trees.
30+
31+
~~~
32+
$ raxmlHPC -T 8 -m GTRGAMMA -p 144 -# 16 -s input.fasta -n treeML -w outdir
33+
34+
$ ls -t outdir/*treeML*
35+
~~~
36+
{: .language-bash}
37+
38+
> Output directory specified by `-w` must be an absolute path in RAxML.
39+
> `$(pwd)/outdir` may be used if **outdir** is a relative path.
40+
> This directory needs to be created prior to running the command.
41+
> Alternatively, you can use the current directory as output directory
42+
> by not including this `-w` parameter.
43+
{: .caution}
44+
45+
~~~
46+
RAxML_parsimonyTree.treeML.RUN.0 RAxML_parsimonyTree.treeML.RUN.1
47+
RAxML_log.treeML.RUN.0 RAxML_parsimonyTree.treeML.RUN.2
48+
RAxML_log.treeML.RUN.1 RAxML_parsimonyTree.treeML.RUN.3
49+
...
50+
...
51+
RAxML_result.treeML.RUN.0 RAxML_result.treeML.RUN.1
52+
RAxML_result.treeML.RUN.2 RAxML_result.treeML.RUN.3
53+
...
54+
...
55+
RAxML_info.treeML RAxML_bestTree.treeML
56+
~~~
57+
{: .output}
58+
59+
RAxML will automatically select the best tree among the outputs
60+
and store it in the file **RAxML_bestTree.xxx**.
61+
62+
In the command above,
63+
- `-T` specifies number of CPU threads to be used.
64+
- `-m` specified the substitution model.
65+
- `-p` specifies random seed for starting parsimony tree.
66+
- `-#` specifies the number of trees to generate using unique starting tree.
67+
- `-s` specifies input file containing sequence alignment.
68+
- `-n` specifies suffix for output files.
69+
- `-w` specifies output directory.
70+
71+
### Generating bootstraps
72+
73+
Next, we can generate a large number of computationally permissive trees
74+
for calculating bootstrap values.
75+
76+
~~~
77+
$ raxmlHPC -T 8 -m GTRGAMMA -p 144 -b 144 -# 1000 -s input.fasta -n treeML -w outdir
78+
79+
$ ls outdir/*treeBS*
80+
~~~
81+
{: .language-bash}
82+
83+
~~~
84+
RAxML_info.treeBS RAxML_bootstrap.treeBS
85+
~~~
86+
{: .output}
87+
88+
In the command above, `-b` specifies bootstrapping with supplied random seed,
89+
and `-#` specifies the number of bootstraps.
90+
91+
> A newer rapid bootstrap method
92+
> [](https://doi.org/10.1080/10635150802429642){:target="_blank"}
93+
> can be employed in place of standard bootstraping
94+
> [](https://doi.org/10.1111/j.1558-5646.1985.tb00420.x){:target="_blank"}
95+
> by using the argument `-x` instead of `-b`.
96+
{: .tips}
97+
98+
RAxML can also perform posterior bootstrap convergence analysis to determine
99+
if the number of bootstraps is adequate.
100+
101+
~~~
102+
$ raxmlHPC -m GTRGAMMA -p144 -z outdir/RAxML_bootstrap.treeBS -I autoMRE -n BStest -w outdir
103+
104+
$ tail -n1 outdir/RAxML_info.BStest
105+
~~~
106+
{: .language-bash}
107+
108+
~~~
109+
Converged after 900 replicates
110+
~~~
111+
{: .output}
112+
113+
In the command above, `-I` initiates convergence testing and
114+
specifies which criterion to use for the test.
115+
`-z` specifies input bootstrap tree file to test.
116+
117+
### Applying bootstrap values to the best ML tree
118+
119+
The final step is to apply the bootstrap values to the best ML tree.
120+
121+
~~~
122+
$ raxmlHPC -T 8 -m GTRGAMMA -p 144 -f b -t outdir/RAxML_bestTree.treeML -z outdir/RAxML_bootstrap.treeBS -n treeBP -w outdir
123+
124+
$ ls outdir/*treeBP*
125+
~~~
126+
{: .language-bash}
127+
128+
~~~
129+
RAxML_bipartitionsBranchLabels.treeBP RAxML_bipartitions.treeBP
130+
~~~
131+
{: .output}
132+
133+
In the command above, `-f b` instructs creation of bipartition tree from
134+
best ML tree (supplied with `-t`) and
135+
the bootstrap trees (specified with `-z`).
136+
137+
The output files can be used to visualize the trees.
138+
The two output files have similar information except
139+
the branch support information is supplied in a
140+
slightly different format (node label vs branch label).
141+
Select the file that is correctly interpreted by your visualization
142+
program.
143+
144+
### A single-step approach
145+
146+
RAxML can perform all three steps above with a single line of code.
147+
However, only the newer rapid approach can be used for bootstraping.
148+
By default, 20 ML trees are generated.
149+
150+
~~~
151+
$ raxmlHPC -T 8 -m GTRGAMMA -p 144 -f a -x 144 -# 1000 -s input.fasta -n treeALL -w outdir
152+
153+
$ ls outdir/*treeALL*
154+
~~~
155+
{: .language-bash}
156+
157+
~~~
158+
RAxML_bestTree.treeALL RAxML_bootstrap.treeALL
159+
RAxML_bipartitionsBranchLabels.treeALL RAxML_info.treeALL
160+
RAxML_bipartitions.treeALL
161+
~~~
162+
{: .language-bash}
163+
164+
> ## RAxML resources
165+
> - [RAxML v8 manual](https://cme.h-its.org/exelixis/resource/download/NewManual.pdf){:target="_blank"}
166+
> - [A more extensive RAxML guide by the authors](https://cme.h-its.org/exelixis/web/software/raxml/hands_on.html){:target="_blank"}
167+
> - [ExaML - parallelized approach for whole genomes datasets](https://github.com/stamatak/ExaML){:target="_blank"}
168+
{: .notes}

_site/01-unix/index.html

+3-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
<head>
2020
<meta charset="utf-8">
2121
<meta http-equiv="X-UA-Compatible" content="IE=edge">
22-
<meta http-equiv="last-modified" content="2022-10-18 13:17:04 -0400">
22+
<meta http-equiv="last-modified" content="2022-10-20 16:21:04 -0400">
2323
<meta name="viewport" content="width=device-width, initial-scale=1">
2424
<!-- meta "search-domain" used for google site search function google_search() -->
2525
<meta name="search-domain" value="https://bioinfoaps.github.io/">
@@ -170,6 +170,8 @@
170170

171171
<li><a href="../50-multiple_gene_copies/index.html">Multiple gene copies</a></li>
172172

173+
<li><a href="../60-bootstrapped_trees/index.html">ML trees with bootstraps</a></li>
174+
173175
</ul>
174176
</li>
175177

_site/02-slurm/index.html

+3-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
<head>
2020
<meta charset="utf-8">
2121
<meta http-equiv="X-UA-Compatible" content="IE=edge">
22-
<meta http-equiv="last-modified" content="2022-10-18 13:17:04 -0400">
22+
<meta http-equiv="last-modified" content="2022-10-20 16:21:04 -0400">
2323
<meta name="viewport" content="width=device-width, initial-scale=1">
2424
<!-- meta "search-domain" used for google site search function google_search() -->
2525
<meta name="search-domain" value="https://bioinfoaps.github.io/">
@@ -170,6 +170,8 @@
170170

171171
<li><a href="../50-multiple_gene_copies/index.html">Multiple gene copies</a></li>
172172

173+
<li><a href="../60-bootstrapped_trees/index.html">ML trees with bootstraps</a></li>
174+
173175
</ul>
174176
</li>
175177

_site/03-blast/index.html

+3-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
<head>
2020
<meta charset="utf-8">
2121
<meta http-equiv="X-UA-Compatible" content="IE=edge">
22-
<meta http-equiv="last-modified" content="2022-10-18 13:17:04 -0400">
22+
<meta http-equiv="last-modified" content="2022-10-20 16:21:04 -0400">
2323
<meta name="viewport" content="width=device-width, initial-scale=1">
2424
<!-- meta "search-domain" used for google site search function google_search() -->
2525
<meta name="search-domain" value="https://bioinfoaps.github.io/">
@@ -170,6 +170,8 @@
170170

171171
<li><a href="../50-multiple_gene_copies/index.html">Multiple gene copies</a></li>
172172

173+
<li><a href="../60-bootstrapped_trees/index.html">ML trees with bootstraps</a></li>
174+
173175
</ul>
174176
</li>
175177

_site/04-parse/index.html

+3-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
<head>
2020
<meta charset="utf-8">
2121
<meta http-equiv="X-UA-Compatible" content="IE=edge">
22-
<meta http-equiv="last-modified" content="2022-10-18 13:17:04 -0400">
22+
<meta http-equiv="last-modified" content="2022-10-20 16:21:04 -0400">
2323
<meta name="viewport" content="width=device-width, initial-scale=1">
2424
<!-- meta "search-domain" used for google site search function google_search() -->
2525
<meta name="search-domain" value="https://bioinfoaps.github.io/">
@@ -170,6 +170,8 @@
170170

171171
<li><a href="../50-multiple_gene_copies/index.html">Multiple gene copies</a></li>
172172

173+
<li><a href="../60-bootstrapped_trees/index.html">ML trees with bootstraps</a></li>
174+
173175
</ul>
174176
</li>
175177

_site/05-tree/index.html

+3-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
<head>
2020
<meta charset="utf-8">
2121
<meta http-equiv="X-UA-Compatible" content="IE=edge">
22-
<meta http-equiv="last-modified" content="2022-10-18 13:17:04 -0400">
22+
<meta http-equiv="last-modified" content="2022-10-20 16:21:04 -0400">
2323
<meta name="viewport" content="width=device-width, initial-scale=1">
2424
<!-- meta "search-domain" used for google site search function google_search() -->
2525
<meta name="search-domain" value="https://bioinfoaps.github.io/">
@@ -170,6 +170,8 @@
170170

171171
<li><a href="../50-multiple_gene_copies/index.html">Multiple gene copies</a></li>
172172

173+
<li><a href="../60-bootstrapped_trees/index.html">ML trees with bootstraps</a></li>
174+
173175
</ul>
174176
</li>
175177

_site/10-more_unix/index.html

+3-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
<head>
2020
<meta charset="utf-8">
2121
<meta http-equiv="X-UA-Compatible" content="IE=edge">
22-
<meta http-equiv="last-modified" content="2022-10-18 13:17:04 -0400">
22+
<meta http-equiv="last-modified" content="2022-10-20 16:21:04 -0400">
2323
<meta name="viewport" content="width=device-width, initial-scale=1">
2424
<!-- meta "search-domain" used for google site search function google_search() -->
2525
<meta name="search-domain" value="https://bioinfoaps.github.io/">
@@ -170,6 +170,8 @@
170170

171171
<li><a href="../50-multiple_gene_copies/index.html">Multiple gene copies</a></li>
172172

173+
<li><a href="../60-bootstrapped_trees/index.html">ML trees with bootstraps</a></li>
174+
173175
</ul>
174176
</li>
175177

_site/20-text_process/index.html

+3-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
<head>
2020
<meta charset="utf-8">
2121
<meta http-equiv="X-UA-Compatible" content="IE=edge">
22-
<meta http-equiv="last-modified" content="2022-10-18 13:17:04 -0400">
22+
<meta http-equiv="last-modified" content="2022-10-20 16:21:04 -0400">
2323
<meta name="viewport" content="width=device-width, initial-scale=1">
2424
<!-- meta "search-domain" used for google site search function google_search() -->
2525
<meta name="search-domain" value="https://bioinfoaps.github.io/">
@@ -170,6 +170,8 @@
170170

171171
<li><a href="../50-multiple_gene_copies/index.html">Multiple gene copies</a></li>
172172

173+
<li><a href="../60-bootstrapped_trees/index.html">ML trees with bootstraps</a></li>
174+
173175
</ul>
174176
</li>
175177

_site/30-extra_tools/index.html

+3-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
<head>
2020
<meta charset="utf-8">
2121
<meta http-equiv="X-UA-Compatible" content="IE=edge">
22-
<meta http-equiv="last-modified" content="2022-10-18 13:17:04 -0400">
22+
<meta http-equiv="last-modified" content="2022-10-20 16:21:04 -0400">
2323
<meta name="viewport" content="width=device-width, initial-scale=1">
2424
<!-- meta "search-domain" used for google site search function google_search() -->
2525
<meta name="search-domain" value="https://bioinfoaps.github.io/">
@@ -170,6 +170,8 @@
170170

171171
<li><a href="../50-multiple_gene_copies/index.html">Multiple gene copies</a></li>
172172

173+
<li><a href="../60-bootstrapped_trees/index.html">ML trees with bootstraps</a></li>
174+
173175
</ul>
174176
</li>
175177

_site/40-awesome_bioinfo/index.html

+3-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
<head>
2020
<meta charset="utf-8">
2121
<meta http-equiv="X-UA-Compatible" content="IE=edge">
22-
<meta http-equiv="last-modified" content="2022-10-18 13:17:04 -0400">
22+
<meta http-equiv="last-modified" content="2022-10-20 16:21:04 -0400">
2323
<meta name="viewport" content="width=device-width, initial-scale=1">
2424
<!-- meta "search-domain" used for google site search function google_search() -->
2525
<meta name="search-domain" value="https://bioinfoaps.github.io/">
@@ -170,6 +170,8 @@
170170

171171
<li><a href="../50-multiple_gene_copies/index.html">Multiple gene copies</a></li>
172172

173+
<li><a href="../60-bootstrapped_trees/index.html">ML trees with bootstraps</a></li>
174+
173175
</ul>
174176
</li>
175177

_site/50-multiple_gene_copies/index.html

+11-3
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
<head>
2020
<meta charset="utf-8">
2121
<meta http-equiv="X-UA-Compatible" content="IE=edge">
22-
<meta http-equiv="last-modified" content="2022-10-18 13:17:04 -0400">
22+
<meta http-equiv="last-modified" content="2022-10-20 16:21:04 -0400">
2323
<meta name="viewport" content="width=device-width, initial-scale=1">
2424
<!-- meta "search-domain" used for google site search function google_search() -->
2525
<meta name="search-domain" value="https://bioinfoaps.github.io/">
@@ -170,6 +170,8 @@
170170

171171
<li><a href="../50-multiple_gene_copies/index.html">Multiple gene copies</a></li>
172172

173+
<li><a href="../60-bootstrapped_trees/index.html">ML trees with bootstraps</a></li>
174+
173175
</ul>
174176
</li>
175177

@@ -261,7 +263,7 @@ <h3 class="maintitle"><a href="../">Basic bioinformatics and command-line tools
261263
<div class="col-xs-1">
262264
<h3 class="text-right">
263265

264-
<a href="../"><span class="glyphicon glyphicon-menu-up" aria-hidden="true"></span><span class="sr-only">lesson home</span></a>
266+
<a href="../60-bootstrapped_trees/index.html"><span class="glyphicon glyphicon-menu-right" aria-hidden="true"></span><span class="sr-only">next episode</span></a>
265267

266268
</h3>
267269
</div>
@@ -293,6 +295,12 @@ <h2>Overview</h2>
293295
<strong>Objectives</strong>
294296
<ul>
295297

298+
<li><p>Search for another gene in a combination of genomes.</p>
299+
</li>
300+
301+
<li><p>Translating command line skills to your specific research.</p>
302+
</li>
303+
296304
</ul>
297305
</div>
298306
</div>
@@ -396,7 +404,7 @@ <h3 class="text-left">
396404
<div class="col-xs-1">
397405
<h3 class="text-right">
398406

399-
<a href="../"><span class="glyphicon glyphicon-menu-up" aria-hidden="true"></span><span class="sr-only">lesson home</span></a>
407+
<a href="../60-bootstrapped_trees/index.html"><span class="glyphicon glyphicon-menu-right" aria-hidden="true"></span><span class="sr-only">next episode</span></a>
400408

401409
</h3>
402410
</div>

0 commit comments

Comments
 (0)