Skip to content

Commit b31ff98

Browse files
committed
change all iqtree2 to iqtree3 (except "for older versions")
1 parent 10cb422 commit b31ff98

14 files changed

Lines changed: 118 additions & 118 deletions

doc/AliSim.md

Lines changed: 51 additions & 51 deletions
Large diffs are not rendered by default.

doc/Assessing-Phylogenetic-Assumptions.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ IQ-TREE provides three matched-pairs tests of symmetry ([Naser-Khdour et al., 20
3939
test the two assumptions of _stationarity_ and _homogeneity_.
4040
A simple analysis:
4141

42-
iqtree2 -s example.phy -p example.nex --symtest-only
42+
iqtree3 -s example.phy -p example.nex --symtest-only
4343

4444
will perform the three tests of symmetry on every partition of the alignment
4545
and print the result into a `.symtest.csv` file. `--symtest-only` option tells
@@ -83,14 +83,14 @@ stationary assumption.
8383

8484
Now you may want to perform the phylogenetic analysis excluding all "bad" partitions by:
8585

86-
iqtree2 -s example.phy -p example.nex --symtest-remove-bad
86+
iqtree3 -s example.phy -p example.nex --symtest-remove-bad
8787

8888
that will remove all "bad" partitions where SymPval < 0.05 and continue the analysis with the
8989
remaining "good" partitions. You may then compare the trees from "all" partitions
9090
and from "good" only partitions to see if there is significant difference between them
9191
with [tree topology tests](Advanced-Tutorial#tree-topology-tests).
9292

93-
Other options can be seen when running `iqtree2 -h`:
93+
Other options can be seen when running `iqtree3 -h`:
9494

9595
```
9696
TEST OF SYMMETRY:

doc/Command-Reference.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -457,7 +457,7 @@ are very similar to each other).
457457
* Infer a maximum-likelihood tree for an alignment, automatically switching to CMAPLE algorithm
458458
if sequence divergence is low:
459459

460-
iqtree2 -s data.phy --pathogen --prefix pathogen
460+
iqtree3 -s data.phy --pathogen --prefix pathogen
461461
462462
It will print two output files:
463463

@@ -472,13 +472,13 @@ and remove `--pathogen` option to invoke the default IQ-TREE machinery.
472472
* Infer a tree like above and additionally assign branch supports using SH-aLRT test
473473
with 1000 replicates using 4 CPU cores:
474474

475-
iqtree2 -s data.phy --pathogen --alrt 1000 -T 4 --prefix pathogen_sh_alrt
475+
iqtree3 -s data.phy --pathogen --alrt 1000 -T 4 --prefix pathogen_sh_alrt
476476

477477
The output file `pathogen_sh_alrt.treefile` will contain SH-aLRT branch supports for all internal branches.
478478

479479
* Infer a tree like above and additionally assign SPRTA branch supports:
480480

481-
iqtree2 -s data.phy --pathogen-force --sprta --prefix pathogen_sprta
481+
iqtree3 -s data.phy --pathogen-force --sprta --prefix pathogen_sprta
482482

483483
The output file `pathogen_sprta.nex` will contain SPRTA branch supports for all (internal and external) branches.
484484

doc/Compilation-Guide.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,15 +58,15 @@ Downloading source code
5858

5959
Choose the source code (`zip` or `tar.gz`) of the IQ-TREE release you want to use from:
6060

61-
<https://github.com/iqtree/iqtree2/releases>
61+
<https://github.com/iqtree/iqtree3/releases>
6262

6363
For IQ-TREE version 1 please use:
6464

6565
<https://github.com/Cibiv/IQ-TREE/releases/>
6666

6767
Alternatively, if you have `git` installed, you can also clone the source code from GitHub with:
6868

69-
git clone --recursive https://github.com/iqtree/iqtree2.git
69+
git clone --recursive https://github.com/iqtree/iqtree3.git
7070

7171
For IQ-TREE version 1 please clone:
7272

@@ -106,7 +106,7 @@ Compiling under Linux
106106

107107
`j` option tells it to use all CPU cores to speed up the compilation. Without this option, `make` uses only one core, which might be slow.
108108

109-
This creates an executable `iqtree2` (`iqtree` for version 1). It can be copied to your system search path so that IQ-TREE can be called from the Terminal simply with the command line `iqtree2`.
109+
This creates an executable `iqtree3` (`iqtree` for version 1). It can be copied to your system search path so that IQ-TREE can be called from the Terminal simply with the command line `iqtree3`.
110110

111111
To compile IQ-TREE under Linux with ARM processor, use either GCC 10 (but not above), or Clang 14 or above.
112112

doc/Complex-Models.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -347,7 +347,7 @@ If you use this model in a publication please cite:
347347

348348
Starting with version 2.3.0, the MAST model can be executed by adding `+T` to the model option (`-m`) and providing a newick file with multiple trees by the option (`-te`). For example if one wants to fit a MAST model with different topologies contained in `trees.nwk` in conjunction with the `GTR` model to sequences in `data.fst`, one would use the following command:
349349

350-
iqtree2 -s data.fst -m "GTR+T" -te trees.nwk
350+
iqtree3 -s data.fst -m "GTR+T" -te trees.nwk
351351

352352
The above command will *link* GTR parameters across all the trees. That means all trees will have the same GTR model. IQ-TREE will check the number of trees inside the newick file, and then estimate the model parameters and the weights of each tree: the proportion of sites belonging to each tree.
353353

@@ -359,11 +359,11 @@ An example of the newick file with 3 topologies:
359359

360360
You can also link the GTR parameters, frequency array, and the rate-heterogeneity-across-site (RHAS) model across all the trees by including the frequency and the RHAS model in the model option (`-m`). For example:
361361

362-
iqtree2 -s data.fst -m "GTR+FO+G+T" -te trees.nwk
362+
iqtree3 -s data.fst -m "GTR+FO+G+T" -te trees.nwk
363363

364364
If one would like to have *unlink* components across the trees (for example, each tree has its own substitution model, frequency array and RHAS model), one can specify the unlinked components via the `TMIX` keyword in the model string. For example:
365365

366-
iqtree2 -s data.fst -m "TMIX{GTR+FO+G,F81+FO+R3,HKY+FO+I}+T" -te trees.nwk
366+
iqtree3 -s data.fst -m "TMIX{GTR+FO+G,F81+FO+R3,HKY+FO+I}+T" -te trees.nwk
367367

368368
The above command specifies the `GTR+FO+G` model for the first topology (inside the newick file), the `F81+FO+R3` model for the second topology, and the `HKY+FO+I` model for the third topology. These components are given in curly brackets and separated with a comma. Note that the number of components has to match with the number of topologies in the newick file.
369369

@@ -388,15 +388,15 @@ Note: subst - substitution model; freq - DNA/AA frequency array; RHAS - rate het
388388
One can use `+TR` instead of `+T` to represent the branch-length-Restricted MAST model.
389389
In this model, the length of branch `x` of a tree <code>T<sub>i</sub></code> is constrained to be equal to the length of branch `y` of a tree <code>T<sub>j</sub></code> if the branches `x` and `y` split the trees <code>T<sub>i</sub></code> and <code>T<sub>j</sub></code> into the same two sets of taxa. For example:
390390

391-
iqtree2 -s data.fst -m "GTR+FO+G+TR" -te trees.nwk
391+
iqtree3 -s data.fst -m "GTR+FO+G+TR" -te trees.nwk
392392

393393
In the above command, all trees share the same GTR model, DNA frequencies and gamma model, and the lengths of the branches across the trees which split the taxa set into the same partition are restricted the same.
394394

395395
**Weight-constrained MAST model**
396396

397397
One can define a constraint array following `+T` to restrict the tree weights. The constraint array can be defined as <code>[s<sub>1</sub>,s<sub>2</sub>,...,s<sub>n</sub>]</code> where <code>s<sub>i</sub></code> can be any string. The weight of tree <code>T<sub>i</sub></code> and that of tree <code>T<sub>j</sub></code> are restricted the same value if <code>s<sub>i</sub> = s<sub>j</sub></code>. For example, assuming there are 3 topologies in the newick file:
398398

399-
iqtree2 -s data.fst -m "GTR+FO+G+T[x,x,y]" -te trees.nwk
399+
iqtree3 -s data.fst -m "GTR+FO+G+T[x,x,y]" -te trees.nwk
400400

401401
In the above command, all trees share the same GTR model, DNA frequencies and gamma model, and the weight of the first tree is constrained as the same as the weight of the second tree.
402402

doc/Concordance-Factor.md

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -46,25 +46,25 @@ First, you need to infer a reference tree (e.g. a species tree), on which the co
4646

4747
As an example, you can apply an [edge-linked proportional partition model](Complex-Models) with ultrafast bootstrap (1000 replicates; for comparison with concordance factors):
4848

49-
iqtree2 -s ALN_FILE -p PARTITION_FILE --prefix concat -B 1000 -T AUTO
49+
iqtree3 -s ALN_FILE -p PARTITION_FILE --prefix concat -B 1000 -T AUTO
5050

5151
where `ALN_FILE` and `PARTITION_FILE` are your input files. `-T AUTO` is to detect the best number of CPU cores. Here we use a prefix `concat`, so that all output files (`concat.*`) do not interfere with analyses below. If `--prefix` is omitted, all output files will be `PARTITION_FILE.*`.
5252

53-
Moreover, IQ-TREE 2 provides a new convenient feature: if you have a directory with many (locus) alignments, you can specify this directory directly with `-p` option:
53+
Moreover, IQ-TREE 3 provides a new convenient feature: if you have a directory with many (locus) alignments, you can specify this directory directly with `-p` option:
5454

55-
iqtree2 -p ALN_DIR --prefix concat -B 1000 -T AUTO
55+
iqtree3 -p ALN_DIR --prefix concat -B 1000 -T AUTO
5656

5757
IQ-TREE detects if `-p` argument is a directory and automatically load all alignment files and concatenate them into a supermatrix for the partition analysis.
5858

5959

6060
Inferring gene/locus trees
6161
--------------------
6262

63-
We now construct a set of gene/locus trees. One can manually do a for-loop, but IQ-TREE 2 provides a new convenient option `-S` to compute individual locus trees given a partition file or a directory:
63+
We now construct a set of gene/locus trees. One can manually do a for-loop, but IQ-TREE 3 provides a new convenient option `-S` to compute individual locus trees given a partition file or a directory:
6464

65-
iqtree2 -s ALN_FILE -S PARTITION_FILE --prefix loci -T AUTO
65+
iqtree3 -s ALN_FILE -S PARTITION_FILE --prefix loci -T AUTO
6666
# or
67-
iqtree2 -S ALN_DIR --prefix loci -T AUTO
67+
iqtree3 -S ALN_DIR --prefix loci -T AUTO
6868

6969
In the second case, IQ-TREE automatically detects that `ALN_DIR` is a directory and will load all alignment files within the directory. So `-S` takes the same argument as `-p` except that it performs model selection (ModelFinder) and tree inference separately for each partition/alignment. The output files are similar to those from a partitioned analysis, except that `loci.treefile` now contains a set of trees.
7070

@@ -73,7 +73,7 @@ Gene concordance factor (gCF)
7373

7474
Given the species tree `concat.treefile` and the set of locus trees `loci.treefile` computed above, you can calculate gCF for each branch of the species tree as the fraction of decisive gene trees concordant with this branch:
7575

76-
iqtree2 -t concat.treefile --gcf loci.treefile --prefix concord
76+
iqtree3 -t concat.treefile --gcf loci.treefile --prefix concord
7777

7878
Note that `-t` accepts any reference tree (e.g., by coalescent/reconciliation approach) and `--gcf` accepts any set of trees (e.g. locus trees and bootstrap trees), which may contain a subset of taxa from the reference tree. IQ-Tree will write three files:
7979

@@ -92,7 +92,7 @@ Site concordance factor (sCF)
9292
Given the species tree `concat.treefile` and the alignment, you can calculate sCF for each branch of the species tree as the fraction of decisive alignment sites supporting that branch:
9393

9494
# for version 2.2.2 or above
95-
iqtree2 -te concat.treefile -s ALN_FILE --scfl 100 --prefix concord
95+
iqtree3 -te concat.treefile -s ALN_FILE --scfl 100 --prefix concord
9696
# older versions
9797
iqtree2 -t concat.treefile -s ALN_FILE --scf 100 --prefix concord -T 10
9898

@@ -103,14 +103,14 @@ Note that the `--scfl` option from IQ-TREE v2.2.2 will invoke model selection wi
103103
Instead of `-s`, you can alternatively provide a directory or a partition file. IQ-Tree then computes sCF for the concatenated alignment:
104104

105105
# for version 2.2.2 or above
106-
iqtree2 -te concat.treefile -p ALN_DIR --scfl 100 --prefix concord
106+
iqtree3 -te concat.treefile -p ALN_DIR --scfl 100 --prefix concord
107107
# older versions
108108
iqtree2 -t concat.treefile -p ALN_DIR --scf 100 --prefix concord -T 10
109109

110110
Finally, you can combine gCF and sCF within a single run:
111111

112112
# only for the original sCF
113-
iqtree2 -t concat.treefile --gcf loci.treefile -p ALN_DIR --scf 100 --prefix concord -T 10
113+
iqtree3 -t concat.treefile --gcf loci.treefile -p ALN_DIR --scf 100 --prefix concord -T 10
114114

115115
Here, each branch of `concord.cf.tree` will be assigned (or appended) with `gCF/sCF` values and `concord.cf.stat` will be written with both gCF and sCF values.
116116

@@ -122,30 +122,30 @@ Putting it all together
122122
If you have separate alignments for each locus in a folder, then perform the following commands:
123123

124124
# infer a concatenation-based species tree with 1000 ultrafast bootstrap and an edge-linked partition model
125-
iqtree2 -p ALN_DIR --prefix concat -B 1000 -T AUTO
125+
iqtree3 -p ALN_DIR --prefix concat -B 1000 -T AUTO
126126

127127
# infer the locus trees
128-
iqtree2 -S ALN_DIR --prefix loci -T AUTO
128+
iqtree3 -S ALN_DIR --prefix loci -T AUTO
129129

130130
# compute gene concordance factors
131-
iqtree2 -t concat.treefile --gcf loci.treefile --prefix concord
131+
iqtree3 -t concat.treefile --gcf loci.treefile --prefix concord
132132

133133
# compute site concordance factor using likelihood with v2.2.2
134-
iqtree2 -te concat.treefile -p ALN_DIR --scfl 100 --prefix concord2
134+
iqtree3 -te concat.treefile -p ALN_DIR --scfl 100 --prefix concord2
135135

136136
If you have a single concatenated alignment with a partition file that defines loci:
137137

138138
# infer a concatenation-based species tree with 1000 ultrafast bootstrap and an edge-linked partition model
139-
iqtree2 -s ALN_FILE -p PARTITION_FILE --prefix concat -B 1000 -T AUTO
139+
iqtree3 -s ALN_FILE -p PARTITION_FILE --prefix concat -B 1000 -T AUTO
140140

141141
# infer the locus trees
142-
iqtree2 -s ALN_FILE -S PARTITION_FILE --prefix loci -T AUTO
142+
iqtree3 -s ALN_FILE -S PARTITION_FILE --prefix loci -T AUTO
143143

144144
# compute gene concordance factors
145-
iqtree2 -t concat.treefile --gcf loci.treefile --prefix concord
145+
iqtree3 -t concat.treefile --gcf loci.treefile --prefix concord
146146

147147
# compute site concordance factor using likelihood with v2.2.2
148-
iqtree2 -te concat.treefile -s ALN_FILE --scfl 100 --prefix concord2
148+
iqtree3 -te concat.treefile -s ALN_FILE --scfl 100 --prefix concord2
149149

150150

151151
Note that you can adjust `-T 10` if you have fewer/larger CPU cores.
@@ -160,7 +160,7 @@ Specifically, because the new version of the site concordance factor uses likeli
160160

161161
So, suppose that in the first step of the analysis you ran the command as above:
162162

163-
iqtree2 -s ALN_FILE -p PARTITION_FILE --prefix concat -B 1000 -T AUTO
163+
iqtree3 -s ALN_FILE -p PARTITION_FILE --prefix concat -B 1000 -T AUTO
164164

165165
That command will have figured out for you the model of evolution, all the parameters of that model, and the branch lengths of the corresponding tree. We can re-use all of that useful information in the final step. It just takes a little bit of effort to find what you need.
166166

@@ -183,21 +183,21 @@ To put all of that together, we are going to change the final command of the tut
183183

184184
# simple command, with per-locus alignments
185185
# compute site concordance factor using likelihood with v2.2.2
186-
iqtree2 -te concat.treefile -p ALN_DIR --scfl 100 --prefix concord2
186+
iqtree3 -te concat.treefile -p ALN_DIR --scfl 100 --prefix concord2
187187

188188
# simple command, with concatenated alignments
189189
# compute site concordance factor using likelihood with v2.2.2
190-
iqtree2 -te concat.treefile -s ALN_FILE --scfl 100 --prefix concord2
190+
iqtree3 -te concat.treefile -s ALN_FILE --scfl 100 --prefix concord2
191191

192192
To one of these, where we add the two extra commands via `-blfix` and `-m`, to fix all the parameters we already calculated. A reminder - do NOT use the exact commandlines above. You have to replace everything after the `-m` with what you found in your own `concat.iqtree` file:
193193

194194
# faster analysis, using pre-computed model parameters, with per-locus alignments
195195
# compute site concordance factor using likelihood with v2.2.2
196-
iqtree2 -te concat.treefile -p ALN_DIR --scfl 100 --prefix concord2 -blfix -m "Q.plant+I{0.177536}+R8{0.147295,0.0935335,0.114418,0.190578,0.108376,0.538389,0.113777,0.804005,0.0898871,1.30004,0.137297,1.95653,0.0958285,3.48597,0.0155849,6.09904}"
196+
iqtree3 -te concat.treefile -p ALN_DIR --scfl 100 --prefix concord2 -blfix -m "Q.plant+I{0.177536}+R8{0.147295,0.0935335,0.114418,0.190578,0.108376,0.538389,0.113777,0.804005,0.0898871,1.30004,0.137297,1.95653,0.0958285,3.48597,0.0155849,6.09904}"
197197

198198
# faster analysis, using pre-computed model parameters, with concatenated alignments
199199
# compute site concordance factor using likelihood with v2.2.2
200-
iqtree2 -te concat.treefile -s ALN_FILE --scfl 100 --prefix concord2 -blfix -m "Q.plant+I{0.177536}+R8{0.147295,0.0935335,0.114418,0.190578,0.108376,0.538389,0.113777,0.804005,0.0898871,1.30004,0.137297,1.95653,0.0958285,3.48597,0.0155849,6.09904}"
200+
iqtree3 -te concat.treefile -s ALN_FILE --scfl 100 --prefix concord2 -blfix -m "Q.plant+I{0.177536}+R8{0.147295,0.0935335,0.114418,0.190578,0.108376,0.538389,0.113777,0.804005,0.0898871,1.30004,0.137297,1.95653,0.0958285,3.48597,0.0155849,6.09904}"
201201

202202
All this does is tells IQ-TREE to use the model parameters and branch lengths you already calculated. On large datasets this can save a lot of analysis time.
203203

0 commit comments

Comments
 (0)