What Is a Phylogenetic Tree?
A phylogenetic tree is a branching diagram that depicts the evolutionary relationships among a set of organisms, genes, or proteins. The tips of the tree (called taxa or leaves) represent the sequences in your dataset. The internal nodes represent hypothetical common ancestors. The branching pattern — called topology — reveals which taxa share a more recent common ancestor and which diverged earlier.
Phylogenetic trees are used across biology: to classify new species, trace the origin of viral outbreaks, study the evolution of gene families, compare protein structures, and reconstruct ancestral sequences. In molecular biology, the most common input is a multiple sequence alignment (MSA) of homologous DNA or protein sequences. The alignment encodes the evolutionary signal that the tree-building algorithm reads.
A tree can be rooted (with a single ancestral node at the base) or unrooted (showing relationships without specifying the direction of time). Rooting requires an outgroup — a sequence known to have diverged before all the other sequences in the dataset. The choice of root affects how you interpret branch lengths and evolutionary direction.
The Phylogenetic Workflow
Building a reliable phylogenetic tree follows a standard sequence of steps. Skipping or botching any step propagates errors into the final tree.
- Collect sequences: Gather homologous sequences from databases using BLAST or through curated sources like NCBI RefSeq. Include an outgroup if you need a rooted tree.
- Multiple sequence alignment: Align all sequences using Clustal Omega, MAFFT, or VigyanLLM MSA. The alignment must be accurate — misaligned columns produce incorrect branch lengths and topology.
- Trim unreliable regions: Remove poorly aligned terminal regions, large gap blocks, and ambiguously aligned segments using Gblocks, trimAl, or manual curation. Unreliable columns add noise.
- Select an evolutionary model: Use ModelTest-NG or IQ-TREE's built-in model selection to identify the best-fit substitution model (e.g., GTR+G+I for DNA, LG+G for proteins). Using the wrong model biases branch lengths and topology.
- Build the tree: Apply your chosen method (NJ, ML, or Bayesian) using the alignment and model. For ML, run 100-1,000 ultrafast bootstrap replicates to assess branch support.
- Visualise and interpret: Open the tree in FigTree, iTOL, or Evolview. Root with an outgroup, colour branches by clade, and examine bootstrap or posterior probability support values.
Distance-Based Methods: Neighbor-Joining
The neighbor-joining (NJ) method, introduced by Saitou and Nei in 1987, is the fastest and simplest phylogenetic algorithm. It works in three steps: (1) compute a pairwise distance matrix from the multiple alignment using a model of sequence evolution, (2) find the pair of taxa that minimises total branch length, join them, and collapse them into a single node, (3) repeat until the tree is fully resolved.
NJ produces an unrooted tree with branch lengths proportional to estimated evolutionary distance. It accounts for rate variation among lineages (the "neighbor" correction), making it more accurate than simpler methods like UPGMA. However, because it reduces the entire alignment to a single distance matrix, it discards site-by-site information. For highly divergent sequences or datasets with complex evolutionary histories, NJ can produce incorrect topologies.
NJ is the right choice when you need a quick first-pass tree, when your dataset is large (hundreds to thousands of taxa), or when the sequences are closely related enough that distance-based methods are reliable. MEGA and the VigyanLLM MSA tool both support NJ tree construction directly from alignments.
Character-Based Methods: Maximum Likelihood
Maximum likelihood (ML) evaluates every possible tree topology and branch length combination under an explicit model of sequence evolution. The algorithm asks: given this model, what is the probability of observing the alignment data on this particular tree? The tree that maximises this probability is the ML tree.
ML is more computationally intensive than NJ — it must search a vast space of possible trees — but it is significantly more accurate, particularly for datasets with rate variation among sites, compositional heterogeneity, or deep divergence. Modern ML programs (RAxML-NG, IQ-TREE 2) use heuristic search strategies and parallelisation to make ML practical for datasets of hundreds to thousands of sequences.
The key advantage of ML is that it uses the full site-by-site information in the alignment, not just a summary distance. It also provides a natural framework for model selection, hypothesis testing (e.g., likelihood ratio tests for tree topology), and partitioning (allowing different genes or codon positions to evolve under different models). IQ-TREE 2 is the current state-of-the-art for most ML phylogenetic analyses due to its speed, accuracy, and built-in model selection.
Bayesian Inference
Bayesian phylogenetics uses Markov chain Monte Carlo (MCMC) sampling to approximate the posterior probability distribution of trees. Rather than finding a single "best" tree, Bayesian methods sample thousands of trees from the probability distribution, weighted by how well each tree explains the data under the model. The result is a credible set of trees rather than a single point estimate.
The posterior probability values on Bayesian trees are direct probability statements: a posterior probability of 0.95 means there is a 95% probability that the clade is correct given the data and model. This is more interpretable than bootstrap support, which is a resampling frequency rather than a probability.
Bayesian methods (MrBayes, BEAST, RevBayes) are the most computationally demanding but also the most statistically rigorous. They are particularly useful for dating divergence events (molecular clock analysis), estimating ancestral sequences, and when the researcher wants to quantify uncertainty in the tree rather than relying on a single point estimate.
Free Phylogenetics Tools
| Tool | Method | Best For | Platform |
|---|---|---|---|
| VigyanLLM MSA | NJ tree from MSA | Quick tree from browser-based alignment | Web |
| MEGA 11 | NJ, ML, Bootstrap | Complete GUI phylogenetics package | Desktop (Win/Mac/Linux) |
| IQ-TREE 2 | ML + Ultrafast Bootstrap | Fastest ML, built-in model selection | CLI (Win/Mac/Linux) |
| RAxML-NG | ML + Standard Bootstrap | Large datasets, GPU acceleration | CLI (Win/Mac/Linux) |
| MrBayes | Bayesian (MCMC) | Posterior probabilities, model testing | CLI (Win/Mac/Linux) |
| FigTree | Visualisation only | Publication-quality tree figures | Desktop (Java) |
| iTOL | Visualisation + annotation | Interactive web-based tree viewer | Web |
Worked Example: SARS-CoV-2 Variant Phylogeny
Collect full-length Spike protein sequences for Wuhan-Hu-1, Alpha (B.1.1.7), Beta (B.1.351), Delta (B.1.617.2), and Omicron BA.1 from NCBI. Align with VigyanLLM MSA (Clustal Omega). The alignment reports ~97% identity across the full-length Spike, with the highest divergence in the receptor-binding domain (RBD).
Download the alignment in FASTA format, then run IQ-TREE 2 with iqtree2 -s alignment.fasta -m MFP -bb 1000 (model Finder Plus + 1,000 ultrafast bootstraps). The resulting tree shows Omicron BA.1 on a long, deeply divergent branch separate from the Alpha/Beta/Delta clade, consistent with its independent origin and extensive accumulation of RBD mutations.
Interpreting a Phylogenetic Tree
- Branch lengths represent evolutionary distance (substitutions per site). Longer branches indicate more divergence.
- Node support values indicate confidence in each branch. Bootstrap values above 70% or posterior probabilities above 0.95 are generally reliable.
- Sister taxa are the two most closely related lineages, sharing a most recent common ancestor not shared by any other lineage.
- Clades (monophyletic groups) include an ancestor and all its descendants. A valid clade is supported by synapomorphies (shared derived characters).
- The root represents the direction of evolutionary time. An outgroup (a taxon known to have diverged earlier) helps root the tree.
- Long-branch attraction is a common artefact where rapidly evolving lineages cluster together incorrectly, even if they are not closely related. Using an appropriate evolutionary model and adequate taxon sampling mitigates this.
Tips for Better Trees
1. Start with a clean alignment. A tree is only as good as its alignment. Use VigyanLLM MSA to build the initial alignment, then trim unreliable regions with Gblocks or trimAl before tree construction.
2. Use model selection. Never assume a substitution model. Run IQ-TREE 2's ModelFinder or jModelTest to identify the best-fit model for your data. Using the wrong model produces biased branch lengths and topology.
3. Assess support. A tree without support values is biologically meaningless. Use ultrafast bootstrap (IQ-TREE 2) with at least 1,000 replicates, or run MrBayes to get posterior probabilities.
4. Include an outgroup. To root your tree and polarise evolutionary direction, include a sequence from a related but distinct lineage. For a genus-level analysis, include a member of the sister genus.
5. Visualise properly. Use FigTree or iTOL to produce publication-quality figures. Root the tree, adjust branch lengths, colour clades, and label bootstrap values clearly.
Frequently Asked Questions
What is a phylogenetic tree?
A phylogenetic tree is a branching diagram that represents the evolutionary relationships among a set of organisms, genes, or proteins. Each branch tip (taxon) represents a sequence, and the branching pattern (topology) shows which taxa share a more recent common ancestor. Branch lengths can represent the amount of evolutionary change (substitutions per site) or simply the order of divergence. Phylogenetic trees are used to classify organisms, trace the evolution of genes, identify outbreaks, and understand the relationships between protein families.
What is the neighbor-joining method?
Neighbor-joining (NJ) is a distance-based method for constructing phylogenetic trees. It works by first computing a pairwise distance matrix from a multiple sequence alignment, then iteratively joining the closest pairs of taxa while adjusting the branch lengths to account for rate variation among lineages. NJ is fast (O(n^3) in the number of taxa) and produces an unrooted tree. It is the standard first-pass method for phylogenetic analysis and is suitable for datasets where evolutionary rates vary across lineages. However, because it uses a single distance matrix, it can be less accurate than model-based methods for divergent datasets.
What is maximum likelihood?
Maximum likelihood (ML) is a statistical method that evaluates every possible tree topology and set of branch lengths under an explicit model of sequence evolution (e.g., GTR+G+I for DNA). The method finds the tree that maximises the probability of observing the alignment data given the model. ML is computationally intensive — it must evaluate many candidate trees — but it is more accurate than distance methods, particularly for datasets with rate variation among sites or lineages. RAxML and IQ-TREE are the most widely used ML phylogenetics programs.
How do I read a phylogenetic tree?
In a rooted phylogenetic tree, the root represents the common ancestor of all taxa. Branch tips (leaves) represent the sequences in your dataset. The branching order (topology) shows which taxa share a more recent common ancestor — taxa connected by a more recent node are more closely related. Branch lengths represent the amount of evolutionary change (substitutions per site in most molecular analyses). A long branch indicates rapid evolution or a long time since divergence. The scale bar at the bottom of the tree indicates the number of substitutions per site.
What is bootstrap support?
Bootstrap support is a statistical measure of confidence in the branches of a phylogenetic tree. To calculate it, the original alignment is resampled with replacement to create many pseudo-replicate datasets (typically 100-1,000). A tree is built from each replicate, and the bootstrap value for a branch is the percentage of replicate trees that recover that same branch. Values above 70% are generally considered moderate support; above 90% is strong support. Low bootstrap values (below 50%) indicate that the branch is not reliably supported by the data.
Align & Build Trees Free Online
Align sequences in your browser, then export to IQ-TREE or MEGA for tree construction. Built-in conservation statistics.
Open VigyanLLM MSA →References
- Saitou N. & Nei M. (1987). The neighbor-joining method: a new method for reconstructing phylogenetic trees. Molecular Biology and Evolution, 4(4), 406-425.
- Felsenstein J. (1981). Evolutionary trees from DNA sequences: a maximum likelihood approach. Journal of Molecular Evolution, 17(6), 368-376.
- Ronquist F., et al. (2012). MrBayes 3.2: efficient Bayesian phylogenetic inference and model choice across a large model space. Systematic Biology, 61(3), 539-542.
- Kalyaanamoorthy S., et al. (2017). ModelFinder: fast model selection for accurate phylogenetic estimates. Nature Methods, 14(6), 587-589.
- Stamatakis A. (2014). RAxML version 8: a tool for phylogenetic analysis and post-analysis of large phylogenies. Bioinformatics, 30(9), 1312-1313.