7: Molecular Phylogenetics & Evolutionary Tree Reconstruction
Tested Stacks:
GATK 4.6.1
Samtools 1.21
Nextflow 24.10
Seurat v5.1
Python 3.12
Prerequisites: Basic Linux CLI & Sequencing Formats
📚 Chapter 7 of 13
0% Course Completed
Chapter 7: Molecular Phylogenetics & Evolutionary Tree Reconstruction
Nothing in biology makes sense except in the light of evolution. Molecular Phylogenetics infers the evolutionary history and genealogical relationships among genes, genomes, and species from molecular sequence alignments, reconstructing the Tree of Life with mathematical and statistical rigor.
Substitution Models: Beyond Hamming Distance
The observed fraction of differences between two sequences underestimates their true evolutionary divergence because of multiple substitutions at the same site (back-mutations, parallel mutations). Evolutionary models correct for these unobserved events:
- Jukes-Cantor (JC69): Assumes equal nucleotide frequencies (25% each) and identical substitution rates across all transitions and transversions. Distance formula: \(d = -rac{3}{4} \ln(1 - rac{4}{3}p)\).
- Kimura 2-Parameter (K80): Distinguishes between transitions (\(A \leftrightarrow G\), \(C \leftrightarrow T\)) and transversions (\(A \leftrightarrow C, T\); \(G \leftrightarrow C, T\)), acknowledging that transitions occur much more frequently in nature.
- GTR (General Time Reversible): Permits unique base frequencies and 6 distinct reversible substitution rates, paired with Gamma (\(+\Gamma\)) distributed rate variation across sites.
1. Distance-Based vs. Maximum Likelihood Methods
- Neighbor-Joining (NJ): A star-decomposition distance method that does not assume a constant molecular clock. Extremely fast (\(O(N^3)\)), making it ideal for preliminary trees of thousands of taxa.
- Maximum Likelihood (ML): Evaluates the probability \(P( ext{Data} \mid ext{Tree, Model})\) of observing the multiple alignment given a specific tree topology, branch lengths, and substitution model. Finds the tree that maximizes this likelihood.
2. State-of-the-Art ML Phylogenetics with IQ-TREE
# Run IQ-TREE with automated model selection (ModelFinder)
# and 1000 ultrafast bootstrap replicates (-B 1000)
iqtree2 \
-s aligned_msa.fasta \
-m MFP \
-B 1000 \
-T AUTO \
--prefix species_phylogeny
# Inspect the resulting Newick tree format:
# (Human:0.015,(Chimp:0.012,Bonobo:0.011):0.004,Gorilla:0.025);
⚠️
Common Pitfalls & Troubleshooting Checklist
- Java Heap Exhaustion (GATK / Picard): If processes terminate with
java.lang.OutOfMemoryError, set your environment variable explicitly:export _JAVA_OPTIONS="-Xmx16g -Djava.io.tmpdir=/tmp". - Index Timestamp Mismatch: If tools complain that a BAM index is missing or out of date, regenerate with
samtools index -@ 4 sample.bam. - Conda Channel Conflicts: Avoid ABI incompatibilities between bioconda and conda-forge by setting strict priority:
conda config --set channel_priority strict. - Chromosome Naming Contamination: Always verify whether reference FASTA headers use
chr1or1; divergent naming causes silent alignment drops.
Was this guide helpful to your research?
Help us maintain 100% accurate, peer-reviewed bioinformatics standards.