- Introduced by
- Rannala & Yang (1996); operationalized by Huelsenbeck et al. (MrBayes, 2001)
- Year
- 1996–2001
- Type
- Probabilistic inference method
- Family
- Bioinformatics / omics
What does it do?
Bayesian phylogenetic analysis uses Bayes' theorem and Markov chain Monte Carlo (MCMC) sampling to estimate the posterior probability distribution over phylogenetic trees and model parameters, given observed sequence data.
Unlike bootstrapped maximum-likelihood methods that return a single best tree, Bayesian inference yields a credible set of trees with associated posterior probabilities, which gives a probabilistic measure of phylogenetic uncertainty. It is widely used to estimate evolutionary relationships and divergence times in molecular evolution.
The intuition behind the method
Consider reconstructing the family tree of a group of species from their DNA. Rather than selecting one best-guess tree, Bayesian phylogenetics explores a large space of candidate trees by random-walk sampling (MCMC), spending more time in regions of tree space that agree with the sequence data and with an explicit model of how DNA mutates. The fraction of sampled trees that share a particular grouping of species gives the posterior probability of that clade, a direct statement of confidence in that grouping under the chosen model, conditional on the chosen substitution model and priors. The output is a consensus over a set of plausible trees, together with estimates of branch lengths and substitution-model parameters and, when fossil calibrations are used, divergence dates.
History
The theoretical basis of Bayesian phylogenetic inference is commonly traced to early work on posterior inference of phylogenies under probabilistic substitution models, and the approach was later implemented in MCMC software for sampling tree space. Ronquist and Huelsenbeck (2003) described MrBayes 3, which performs Bayesian inference combining data partitions evolving under different models, including morphological, nucleotide and protein data. Drummond and Rambaut (2007) presented BEAST, which includes relaxed-clock phylogenetics and models for non-contemporaneous sequence data among its features; later platforms such as BEAST2 and RevBayes extended the framework.
When to use it
Choose Bayesian phylogenetic analysis when the goal is to infer evolutionary relationships under an explicit probabilistic model and you need to quantify uncertainty in topology, branch lengths or divergence times. It suits analyses that require posterior probabilities on clades, that place fossil calibrations within a molecular clock, or that compare richer models such as relaxed clocks or codon models. Avoid it as a default replacement for maximum likelihood when computing resources are limited and the dataset is very large (thousands of taxa or whole-genome alignments), because MCMC runtime scales poorly and faster heuristic searches may suffice. It is also inappropriate when the sequence alignment is unreliable or when there are too few informative sites to resolve the topology.
Limitations and considerations
- MCMC sampling is computationally intensive; analyses of large datasets (hundreds to thousands of taxa) can take days to weeks.
- Results depend on prior distributions for topology, branch lengths and substitution-model parameters, and these priors can be influential when the data are sparse. Check priors before running the analysis: run prior-only chains to see how informative they are, and repeat the analysis under alternative priors (for example different branch-length or clock priors) to test sensitivity. Informative priors, such as fossil calibrations, should be justified and reported.
- Assessing convergence requires inspecting several diagnostics across independent runs, and incorrectly concluding that chains have converged is a common source of error.
- Posterior probabilities on clades can be overconfident relative to bootstrap support, particularly under model misspecification.
Source conditions do not replace independent scientific review or validation by an analysis engine.
Strengths
- Yields posterior probabilities on clades, a measure of support that follows directly from Bayes' theorem under the chosen model and priors.
- Jointly estimates topology, branch lengths and substitution-model parameters, so uncertainty in these quantities is carried into the posterior summaries.
- Can combine heterogeneous data: the MrBayes 3 abstract describes analyses of partitions evolving under different models, including morphological, nucleotide and protein data.
- Supports molecular-clock dating: the BEAST abstract describes relaxed-clock phylogenetics and non-contemporaneous sequence data, which allow tip-dated analyses.
- Mature, widely used implementations (MrBayes, BEAST, and later BEAST2 and RevBayes) with extensive documentation.
Applications
- Reconstructing relationships among SARS-CoV-2 lineages to trace transmission and geographic spread, using tip-dated analyses of viral sequences.
- Estimating divergence times of mammalian groups from mitochondrial genome alignments, calibrated with fossil dates.
- Inferring phylogenies of bacterial pathogens to examine horizontal gene transfer and the spread of antibiotic resistance genes.
- Studying the diversification of plant families through time and comparing speciation patterns with geological or climatic events.
- Reconstructing viral population dynamics over time from sequences sampled at different dates.
How it works
How it works
Input sequences, nucleotide or amino acid, are first subjected to multiple sequence alignment (for example with MAFFT or MUSCLE) to produce a positionally homologous matrix. Alignment quality directly affects downstream inference, so poorly aligned regions are often masked or trimmed before analysis.
A substitution model (for example GTR+G+I for DNA, or LG or WAG for proteins) is chosen using model-comparison criteria such as the Akaike Information Criterion or Bayesian Information Criterion, typically with tools such as ModelTest-NG or IQ-TREE's ModelFinder. These criteria are usually applied to a fixed maximum-likelihood tree. Bayesian model comparison, such as marginal likelihoods or Bayes factors, is an alternative within MCMC analyses. Model adequacy can also be checked with posterior predictive simulation, which asks whether data simulated under the fitted model resemble the observed sequences. The chosen model specifies the rates of substitution between character states and the rate heterogeneity across sites.
The MCMC algorithm, most commonly a Metropolis-Hastings scheme as implemented in MrBayes or BEAST, proposes changes to the current tree topology, branch lengths and model parameters, and accepts or rejects each proposal according to the ratio of posterior probabilities. After a burn-in phase, the sampler approaches the posterior distribution P(T, theta | D), producing many trees that together represent phylogenetic uncertainty.
Formula
P(T, \theta \mid D) \propto P(D \mid T, \theta)\, P(T, \theta)
Convergence of the MCMC chains is assessed with diagnostics such as the potential scale reduction factor (PSRF, values near 1.0 are expected), the effective sample size (ESS, where a threshold above 200 for key parameters is a common rule of thumb), and visual inspection of trace plots in tools such as Tracer. These thresholds are commonly used rules of thumb rather than guarantees. Independent parallel runs must agree on posterior estimates, and failure to converge invalidates the analysis.
Sampled trees after burn-in are summarised as a consensus tree (majority-rule or maximum clade credibility) annotated with posterior probabilities for each node. Branch lengths are reported as expected substitutions per site or, when fossil calibrations are applied, as calendar time. The final tree is interpreted in the biological context of the study.
Common pitfalls
- Ignoring convergence diagnostics: running chains for an arbitrary length without checking PSRF and ESS can produce estimates that look stable while tree space has not been adequately explored.
- Misspecified substitution model: a model that is too simple (for example JC69 on highly divergent sequences) can inflate confidence in an incorrect topology, so formal model selection should precede inference.
- Treating posterior probabilities as equivalent to bootstrap support: the two measures are not directly comparable, and a high posterior probability does not imply the same confidence as a high bootstrap value. Mixing them in one manuscript without explanation misleads readers.
- Neglecting burn-in removal: trees sampled before convergence reflect the starting state and the prior rather than the posterior. Burn-in length should be set from trace plots and convergence diagnostics rather than a fixed rule. Discarding the first 25% of samples is a common default that may be too short or too long for some runs, and the discarded fraction should be reported.
- Conflating node-age estimates with certainty: divergence-time estimates carry wide credible intervals, especially with few fossil calibrations, so reporting only median ages without 95% HPD intervals is misleading.
Frequently asked questions
How does Bayesian phylogenetics differ from maximum-likelihood phylogenetics?
Both methods use an explicit substitution model and rely on the probability of the data given a tree. Maximum likelihood returns the single tree topology that maximizes the likelihood, with support usually assessed by non-parametric bootstrapping. Bayesian inference samples from the posterior distribution of trees, yielding posterior probabilities for each clade. Bayesian inference is more computationally expensive but provides richer uncertainty quantification and allows formal integration of prior biological knowledge.
What posterior probability threshold indicates a well-supported clade?
A posterior probability of 0.95 or higher is a conventional reporting threshold for describing a clade as strongly supported. It is not a statistical guarantee and is not a credible interval. The value is conditional on the chosen substitution model and priors, and posterior probabilities can be overconfident under model misspecification. Clade support should therefore be checked for sensitivity to model and prior choices and interpreted alongside biological plausibility.
How do I know if my MCMC chains have converged?
Check three diagnostics: (1) the potential scale reduction factor (PSRF) should be close to 1.0 for all parameters, and values above 1.01 indicate insufficient mixing; (2) the effective sample size (ESS) should exceed 200 for all key parameters; and (3) trace plots of log-likelihood and model parameters in Tracer should show stable, well-mixed chains resembling white noise after burn-in. Run at least two independent chains and confirm that they agree.
Can I use Bayesian phylogenetics for very large datasets with thousands of taxa?
Standard MCMC implementations (MrBayes, BEAST) scale poorly to large numbers of taxa because mixing becomes slow in large tree spaces. For very large datasets, maximum-likelihood heuristics such as IQ-TREE or RAxML are more practical; their bootstrap support is non-Bayesian and is not directly comparable to posterior probability. Bayesian analyses of large data can instead be restricted to subsets of taxa or loci, and any approximate Bayesian strategy should be checked against full MCMC on a smaller dataset.
Is a multiple sequence alignment strictly required before Bayesian phylogenetic analysis?
Yes. All standard Bayesian phylogenetic software assumes a positionally homologous aligned matrix, and alignment errors propagate into topological errors. For rapidly evolving sequences where alignment is uncertain, alignment and phylogeny can be co-estimated simultaneously in programs such as BAli-Phy, but this is computationally demanding and rarely necessary outside specialist studies.
Related methods
Sources
Ronquist, F., & Huelsenbeck, J. P. (2003). MrBayes 3: Bayesian phylogenetic inference under mixed models. Bioinformatics, 19(12), 1572–1574.
Open DOI referenceDrummond, A. J., & Rambaut, A. (2007). BEAST: Bayesian evolutionary analysis by sampling trees. BMC Evolutionary Biology, 7(1), 214.
Open DOI reference