Galaxy | Tool Preview

IQ-TREE (version 2.1.2+galaxy2)
General options
General options 0
Time Tree Reconstructions
Time Tree Reconstruction 0
Likelihood mapping analyses
Likelihood mapping analysis 0
Modelling Parameters
Modelling Parameters 0
Tree Parameters
Tree Parameters 0
Bootstrap Parameters
Bootstrap Parameters 0
Miscellaneous options
Miscellaneous options 0

IQ-TREE

The full documentation can be found here.

General Tutorial

Input data

IQ-TREE takes as input a multiple sequence alignment and will reconstruct an evolutionary tree that is best explained by the input data. The input alignment can be in various common formats. For example the PHYLIP format which may look like:

7 28
Frog       AAATTTGGTCCTGTGATTCAGCAGTGAT
Turtle     CTTCCACACCCCAGGACTCAGCAGTGAT
Bird       CTACCACACCCCAGGACTCAGCAGTAAT
Human      CTACCACACCCCAGGAAACAGCAGTGAT
Cow        CTACCACACCCCAGGAAACAGCAGTGAC
Whale      CTACCACGCCCCAGGACACAGCAGTGAT
Mouse      CTACCACACCCCAGGACTCAGCAGTGAT

This tiny alignment contains 7 DNA sequences from several animals with the sequence length of 28 nucleotides. IQ-TREE also supports other file formats such as FASTA, NEXUS, CLUSTALW. The FASTA file for the above example may look like this:

>Frog
AAATTTGGTCCTGTGATTCAGCAGTGAT
>Turtle
CTTCCACACCCCAGGACTCAGCAGTGAT
>Bird
CTACCACACCCCAGGACTCAGCAGTAAT
>Human
CTACCACACCCCAGGAAACAGCAGTGAT
>Cow
CTACCACACCCCAGGAAACAGCAGTGAC
>Whale
CTACCACGCCCCAGGACACAGCAGTGAT
>Mouse
CTACCACACCCCAGGACTCAGCAGTGAT

NOTE: If you have raw sequences, you need to first apply alignment programs like MAFFT or ClustalW to align the sequences, before feeding them into IQ-TREE.

Running example

From the download there is an example alignment called example.phy in PHYLIP format. This example contains parts of the mitochondrial DNA sequences of several animals.

You can now start to reconstruct a maximum-likelihood tree from this alignment by entering (assuming that you are now in the same folder with example.phy):

::iqtree -s example.phy -st AA -seed 9999 -m TESTNEW -msub nuclear -madd LG4M,LG4x -merit AICc --ufboot 2000

  • -s is the option to specify the name of the alignment file
  • -st specifies the sequence type as amino-acid
  • -seed ensures that the output files remain the same for subsequent runs
  • -m sets the modelling parameter for standard model selection
  • -msub determines the type sub-modelling
  • -madd provides an additional selection mixed models
  • -merit asserts the type of optimality criterion
  • -ufboot defines the number of replicates

Each of these parameters are available under the relevant sub-sections in the main tool interface.

At the end of the run IQ-TREE will write several output files including:

  • example.phy.iqtree: the main report file that is self-readable. You should look at this file to see the computational results. It also contains a textual representation of the final tree (see below).
  • example.phy.treefile: the ML tree in NEWICK format, which can be visualized by any supported tree viewer programs like FigTree or iTOL.

NOTE: Starting with version 1.5.4, with this simple command IQ-TREE will by default perform ModelFinder to find the best-fit substitution model and then infer a phylogenetic tree using the selected model.

For this example data the resulting maximum-likelihood tree may look like this (extracted from .iqtree file):

NOTE: Tree is UNROOTED although outgroup taxon 'LngfishAu' is drawn at root

+--------------LngfishAu
|
|        +--------------LngfishSA
+--------|
|        +--------------LngfishAf
|
|      +-------------------Frog
+------|
|               +-----------------Turtle
|         +-----|
|         |     |      +-----------------------Sphenodon
|         |     |   +--|
|         |     |   |  +--------------------------Lizard
|         |     +---|
|         |         |      +---------------------Crocodile
|         |         +------|
|         |                +------------------Bird
+---------|
|                  +----------------Human
|               +--|
|               |  |  +--------Seal
|               |  +--|
|               |     |   +-------Cow
|               |     +---|
|               |         +---------Whale
|          +----|
|          |    |         +------Mouse
|          |    +---------|
|          |              +--------Rat
+----------|
|   +----------------Platypus
+---|
+-------------Opossum

This makes sense as the mammals (Human to Opossum) form a clade, whereas the reptiles Turtle to Crocodile) and Bird form a separate sister clade. Here the tree is drawn at the outgroup Lungfish which is more accient than other species in this example. However, please note that IQ-TREE always produces an unrooted tree as it knows nothing about this biological background; IQ-TREE simply draws the tree this way as LngfishAu is the first sequence occuring in the alignment.

Choosing the right substitution model

IQ-TREE will choose the best model for you automatically if specify any of the TEST models, but valid custom models can also be specified that conform to those found in Models page.


Advanced Parameter Selection

Using codon models

IQ-TREE supports a number of codon models. You need to input a protein-coding DNA alignment and specify codon data by option -st CODON (Otherwise, IQ-TREE applies DNA model because it detects that your alignment has DNA sequences):

iqtree -s coding_gene.phy -st CODON

If your alignment length is not divisible by 3, IQ-TREE will stop with an error message. IQ-TREE will group sites 1,2,3 into codon site 1; sites 4,5,6 to codon site 2; etc. Moreover, any codon, which has at least one gap/unknown/ambiguous nucleotide, will be treated as unknown codon character.

Note that the above command assumes the standard genetic code. If your sequences follow 'The Invertebrate Mitochondrial Code', then run:

iqtree -s coding_gene.phy -st CODON5

Note that ModelFinder works for codon alignments. IQ-TREE version >= 1.5.4 will automatically invokes ModelFinder to find the best-fit codon model.

Assessing branch supports with ultrafast bootstrap approximation

To overcome the computational burden required by the nonparametric bootstrap, IQ-TREE introduces an ultrafast bootstrap approximation (UFBoot) ([Minh et al., 2013]) that is orders of magnitude faster than the standard procedure and provides relatively unbiased branch support values. Citation for UFBoot:

B.Q. Minh, M.A.T. Nguyen, and A. von Haeseler (2013) Ultrafast approximation for phylogenetic bootstrap. _Mol. Biol. Evol., 30:1188-1195.
iqtree -s example.phy -m TIM2+I+G --ufboot 1000

-ufboot specifies the number of bootstrap replicates where 1000 is the minimum number recommended. The section MAXIMUM LIKELIHOOD TREE in example.phy.iqtree shows a textual representation of the maximum likelihood tree with branch support values in percentage. The NEWICK format of the tree is printed to the file example.phy.treefile. In addition, IQ-TREE writes the following files:

  • example.phy.contree: the consensus tree with assigned branch supports where branch lengths are optimized on the original alignment.
  • example.phy.splits: support values in percentage for all splits (bipartitions), computed as the occurence frequencies in the bootstrap trees. This file is in "star-dot" format.
  • example.phy.splits.nex: has the same information as example.phy.splits but in NEXUS format, which can be viewed with the program IcyTree to explore the conflicting signals in the data. So it is more informative than consensus tree, e.g. you can see how highly supported the second best conflicting split is, which had no chance to enter the consensus tree.

Reducing impact of severe model violations with UFBoot

Starting with IQ-TREE version 1.6 we provide a new option -bnni to reduce the risk of overestimating branch supports with UFBoot due to severe model violations. With this option UFBoot will further optimize each bootstrap tree using a hill-climbing nearest neighbor interchange (NNI) search based directly on the corresponding bootstrap alignment.

Thus, if severe model violations are present in the data set at hand, users are advised to append -bnni to the regular UFBoot command:

iqtree -s example.phy -m TIM2+I+G --ufboot 1000 -bnni

For more details see:

D.T. Hoang, O. Chernomor, A. von Haeseler, B.Q. Minh, L.S. Vinh (2017) UFBoot2: Improving the ultrafast bootstrap approximation.

Assessing branch supports with standard nonparametric bootstrap

The standard nonparametric bootstrap is invoked by the -b option:

iqtree -s example.phy -m TIM2+I+G -b 100

-b specifies the number of bootstrap replicates where 100 is the minimum recommended number. The output files are similar to those produced by the UFBoot procedure.

Assessing branch supports with single branch tests

IQ-TREE provides an implementation of the SH-like approximate likelihood ratio test ([Guindon et al., 2010]). To perform this test, run:

iqtree -s example.phy -m TIM2+I+G --alrt 1000

--alrt specifies the number of bootstrap replicates for SH-aLRT where 1000 is the minimum number recommended.

IQ-TREE also supports other tests such as the aBayes test (Anisimova et al., 2011) and the local bootstrap test (Adachi and Hasegawa, 1996).

You can also perform both SH-aLRT and the ultrafast bootstrap within one single run:

iqtree -s example.phy -m TIM2+I+G --alrt 1000 --ufboot 1000

The branches of the resulting .treefile will be assigned with both SH-aLRT and UFBoot support values, which are readable by any tree viewer program like FigTree, Dendroscope or ETE. You can also look at the textual tree figure in .iqtree file:

NOTE: Tree is UNROOTED although outgroup taxon 'LngfishAu' is drawn at root Numbers in parentheses are SH-aLRT support (%) / ultrafast bootstrap support (%)

+-------------LngfishAu
|
|       +--------------LngfishSA
+-------| (100/100)
|       +------------LngfishAf
|
|      +--------------------Frog
+------| (99.8/100)
|                     +-----------------Turtle
|                  +--| (85/72)
|                  |  |    +------------------------Crocodile
|                  |  +----| (96.5/97)
|                  |       +------------------Bird
|               +--| (39/51)
|               |  +---------------------------Sphenodon
|         +-----| (98.2/99)
|         |     +-------------------------------Lizard
+---------| (100/100)
|                   +--------------Human
|                +--| (92.3/93)
|                |  |  +------Seal
|                |  +--| (68.3/75)
|                |     |  +-----Cow
|                |     +--| (99.7/100)
|                |        +-------Whale
|           +----| (99.1/100)
|           |    |         +---Mouse
|           |    +---------| (100/100)
|           |              +------Rat
+-----------| (100/100)
|  +--------------Platypus
+--| (93/98)
+-----------Opossum

From this figure, the branching patterns within reptiles are poorly supported (e.g. Sphenodon with SH-aLRT: 39%, UFBoot: 51% and Turtle with SH-aLRT: 85%, UFBoot: 72%) as well as the phylogenetic position of Seal within mammals (SH-aLRT: 68.3%, UFBoot: 75%). Other branches appear to be well supported.