IQ-TREE (Efficient and Effective Stochastic Algorithm for Estimating Maximum-Likelihood Phylogenies) is a software tool that builds evolutionary trees (phylogenetic trees) from DNA sequences.
Think of it as a tool that:
- Compares DNA sequences from different organisms
- Figures out which organisms are most closely related
- Creates a family tree showing their evolutionary relationships
IQ-TREE is the gold standard for phylogenetic analysis in 2025 because:
✓ Fast - Analyzes sequences much faster than older methods ✓ Accurate - Uses advanced statistical models to find the best tree ✓ Automatic - Picks the best evolutionary model for your data ✓ Reliable - Provides confidence scores (bootstrap values) for branches ✓ Widely used - Standard tool in scientific research
- RAxML - Older, slower, but still good
- FastTree - Very fast but less accurate
- MEGA - GUI-based, good for teaching but less powerful
- MrBayes - Uses different method (Bayesian), very slow
We chose IQ-TREE because it gives the best balance of speed, accuracy, and ease of use for students.
Maximum Likelihood is a statistical method for building phylogenetic trees. It answers the question:
"Given my DNA sequences, which tree arrangement is most likely to have produced these sequences through evolution?"
Imagine you have DNA from 4 mosquito species. There are many ways to arrange them into a tree:
Tree 1: Tree 2: Tree 3:
┌─A ┌─A ┌─B
──┤ ──┤ ──┤
│ ┌─B │ ┌─C │ ┌─A
└──┤ └──┤ └──┤
│ ┌─C │ ┌─B │ ┌─C
└──┤ └──┤ └──┤
└─D └─D └─D
Maximum Likelihood asks: "Which tree is most likely to be correct, given:
- The DNA differences we see
- A model of how DNA evolves (mutations, deletions, insertions)
- The laws of probability"
For each tree, ML calculates a likelihood score - how probable that tree is given your data. The tree with the highest score "wins."
| Method | How It Works | Pros | Cons | When to Use |
|---|---|---|---|---|
| Maximum Likelihood (ML) | Finds tree with highest probability given data | Most accurate; uses statistical model; handles complex evolution | Slower than simpler methods | Best for research & publication |
| Neighbor-Joining (NJ) | Joins closest sequences first | Very fast; simple | Less accurate; no statistical model | Quick previews, large datasets |
| Maximum Parsimony (MP) | Finds tree with fewest mutations | Fast; intuitive | Assumes all changes equally likely (wrong!) | Historical; rarely used now |
| Bayesian (MrBayes) | Samples many trees using probability | Most rigorous statistically | VERY slow (hours to days) | Research with critical questions |
For DNA barcoding, Maximum Likelihood is the gold standard because:
- ✅ Accurate enough for species identification
- ✅ Fast enough for student projects (1-5 minutes)
- ✅ Uses a realistic model of DNA evolution
- ✅ Provides statistical support (bootstrap values)
- ✅ Widely accepted in scientific literature
Bayesian methods (like MrBayes) are theoretically superior BUT:
- Time: Takes hours to days for 50 sequences
- Complexity: Students must understand priors, MCMC, convergence
- Overkill: For species ID, ML is plenty accurate
Our choice: ML gives 95% of the accuracy in 1% of the time.
When IQ-TREE runs, you'll see:
Choosing best model... GTR+F+I+G4
Computing ML tree... done
Running 1000 bootstrap replicates... done
This means:
- Best model chosen: GTR+F+I+G4 (complex model of DNA evolution)
- ML tree computed: Found the most likely tree arrangement
- Bootstrap: Tested how confident we are in each branch
IQ-TREE receives an aligned FASTA file from the alignment step:
>AT99_F
ATCGATCGATCG---ATCG
>AT99_R
ATCGATCGATCG---ATCG
>AT_ROCK_F
ATCGAT---ATCGATGATCG
>AT_ROCK_R
ATCGAT---ATCGATGATCG
All sequences must be the same length (gaps filled with -).
Step 1: Choose the Best Model
- DNA evolves in different ways (some positions change faster than others)
- IQ-TREE tests many models and picks the best one
- Common models: GTR+G, HKY+I, K2P
Step 2: Build the Tree
- Tries millions of possible tree arrangements
- Uses maximum likelihood to find the most probable tree
- This is like finding the family tree that best explains the DNA differences
Step 3: Test the Tree (Bootstrap)
- Creates 1000 "fake" datasets by resampling your data
- Builds a tree for each fake dataset
- Counts how often each branch appears
- This gives confidence scores (0-100%)
IQ-TREE creates several files:
results/phylogeny/
├── tree.treefile # The best tree (Newick format)
├── tree.iqtree # Detailed analysis report
├── tree.log # What IQ-TREE did step-by-step
├── tree.png # Simple tree visualization
└── phylogeny_report.html # Interactive HTML report
((AT99_F:0.0123,AT99_R:0.0098)100:0.0456,(AT_ROCK_F:0.0234,AT_ROCK_R:0.0221)95:0.0567);
Reading this:
()= groups organisms together:0.0123= branch length (amount of evolution)100or95= bootstrap support (% confidence)
┌─ AT99_F
┌─100%───┤
│ └─ AT99_R
────┤
│ ┌─ AT_ROCK_F
└─95%────┤
└─ AT_ROCK_R
Interpreting:
- Closer together = more related (e.g., AT99_F and AT99_R are very similar)
- Bootstrap 100% = we're very confident in this grouping
- Bootstrap <70% = less confident, might not be real relationship
- Longer branches = more mutations = more evolution
- 0.001 = very few mutations (0.1% of positions different)
- 0.01 = moderate mutations (1% of positions different)
- 0.1 = many mutations (10% of positions different)
In DNA barcoding (COI gene):
- Same species: usually 0-2% difference (0.000-0.02)
- Different species, same genus: 2-10% difference (0.02-0.10)
- Different genera: >10% difference (>0.10)
- 90-100% = Strong support - very confident
- 70-89% = Moderate support - probably correct
- 50-69% = Weak support - uncertain
- <50% = Very weak - might be wrong
Rule of thumb: Only trust branches with >70% bootstrap support.
When you open tree.iqtree, you'll see:
Best-fit model: GTR+F+I+G4
- GTR = General Time Reversible (allows different mutation rates)
- +F = Empirical base frequencies (uses your data's A/T/G/C ratios)
- +I = Invariable sites (some positions never change)
- +G4 = Gamma rate heterogeneity (some positions change faster)
What this means: IQ-TREE chose a complex model that accounts for how DNA really evolves.
Log-likelihood: -2345.678
Higher (less negative) is better. Only useful for comparing trees from the same data.
Number of taxa: 52
Number of free parameters: 125
More sequences = more complex tree = needs more data to be confident.
Branches with support >70%: 45/50 (90%)
If most branches have high support, your tree is reliable!
A: Check if:
- You have enough sequences (need at least 4, ideally 10+)
- Sequences are actually related (all from the same gene region)
- Alignment is good (run quality control first)
- You included reference sequences for comparison
A: This means:
- Not enough data to be confident
- Sequences might be too similar (or too different)
- Need more sequences to resolve relationships
Solution: Add more reference sequences from GenBank.
A: Yes, but it's limited:
- Shows relationships among YOUR sequences
- Can't identify species (need references for that)
- Can spot contamination (if one sequence is very different)
A:
- 4-10 sequences: ~10 seconds
- 50 sequences: ~1 minute
- 100 sequences: ~5 minutes
- 1000 sequences: ~1 hour
Our pipeline uses 1000 ultrafast bootstrap replicates, which is much faster than traditional bootstrap (1000x replicates would take days!).
Download free from: http://tree.bio.ed.ac.uk/software/figtree/
Steps:
- Open FigTree
- File → Open → Select
tree.treefile - Check "Node Labels" → "label" to see bootstrap values
- Adjust appearance, colors, labels
- Export as PDF or PNG
Upload to: https://itol.embl.de/
Steps:
- Upload
tree.treefile - Customize colors and labels
- Download publication-quality figure
Open phylogeny_report.html in your browser - includes basic visualization.
Let's say you sequenced mosquito samples and got this tree:
┌─ Your_Sample_1
┌─98%────┤
│ └─ Aedes_aegypti_reference
────┤
│ ┌─ Your_Sample_2
└─95%────┤
└─ Culex_quinquefasciatus_reference
What this tells you:
-
Your_Sample_1 groups with Aedes aegypti (98% confidence) → Probably Aedes aegypti
-
Your_Sample_2 groups with Culex quinquefasciatus (95% confidence) → Probably Culex quinquefasciatus
-
These two mosquitoes are from different genera → Confirms they're very different species
Problem: All sequences are identical (or only differ by gaps) Solution: Check your alignment - you need sequences that actually differ
Problem: IQ-TREE needs at least 4 sequences Solution: Add more sequences or reference sequences
Problem: One sequence is very different from others Solution:
- Might be contamination (check your sample)
- Might be from a different gene region
- Might be a different organism entirely
Problem: Can't confidently determine relationships Solution:
- Add more sequences
- Use longer DNA sequences
- Check alignment quality
- Make sure sequences are actually related
- IQ-TREE Tutorial: http://www.iqtree.org/doc/Tutorial
- Phylogenetics for Dummies: Start with YouTube videos on "phylogenetic trees"
- IQ-TREE Documentation: http://www.iqtree.org/doc/
- Model Selection Guide: http://www.iqtree.org/doc/Substitution-Models
- IQ-TREE Paper: Nguyen et al. (2015) Molecular Biology and Evolution
- See
tutorials/03_r_basics/for tree visualization in R - See
data/reference_sequences/for example reference data
What you need to know:
- IQ-TREE builds evolutionary trees from DNA sequences
- It automatically picks the best method for your data
- Bootstrap values show confidence (>70% is good)
- Branch lengths show how different sequences are
- Use FigTree or iTOL to make pretty trees
- Always include reference sequences for species ID
What you DON'T need to worry about:
- Complex mathematical models (IQ-TREE handles this)
- Manual parameter tuning (automatic mode works great)
- Programming (our pipeline runs it for you)
Just understand:
- What the tree shows (relationships)
- What the numbers mean (confidence and distance)
- How to interpret your results (which sequences are related)
Happy tree building! 🌳