BAli-Phy
BAli-Phy is software by Ben Redelings and Marc Suchard for estimating multiple sequence alignments and evolutionary trees from DNA, amino-acid, or codon sequences. It uses evolutionary models of substitutions, insertions, and deletions to place gaps. It can also estimate trees and model parameters from a fixed alignment.
New in 4.3
Released September 12, 2026. See the release notes.
- Locate positively selected codons, even when the alignment is uncertain.
- Visualize rates and dN/dS for individual letters or codons, including rate differences within a column.
- A fuller range of codon analyses: single-ω analyses, site, branch, and branch-site tests.
When upgrading: many model and distribution names are now capitalized. See breaking changes.
Accurate sequence alignments
BAli-Phy produces accurate sequence alignments using evolutionary models of substitutions, insertions, and deletions. These models can account for codon evolution and variation in evolutionary rates while determining where gaps belong.
For example, BAli-Phy produced substantially fewer alignment errors than MUSCLE and MAFFT in the simulations of Redelings (2014).
Infer trees while accounting for alignment uncertainty
Trees and branch lengths inferred from a single alignment can be misleading when the alignment is uncertain. BAli-Phy uses joint estimation of alignments and phylogenies, averaging over alternative alignments rather than conditioning on a single estimated alignment (Redelings and Suchard, 2005).
Insertions and deletions provide additional evidence about evolutionary relationships (Redelings and Suchard, 2007). Alignment summaries also show which regions are well supported and which remain uncertain.
Accurately detect positive selection
Alignment errors can create false evidence of positive selection. BAli-Phy jointly infers the alignment and tests for positive selection, reducing false positives caused by misaligned codons while accounting for alignment uncertainty (Redelings, 2014).
Run site, branch, and branch-site tests, and visualize which codons show evidence of positive selection.
Visualize evolutionary variation
Color alignments by estimated evolutionary rate or dN/dS. Posterior summaries are associated with individual letters or codons rather than fixed alignment columns, so they can be computed even when the alignment changes.
With heterotachy models, different sequences can have different rates within the same column. Per-letter coloring reveals this variation.
Flexible evolutionary analyses
- Substitution models
- Use codon models, rate variation among sites, and heterotachy with either fixed or inferred alignments.
- Positive selection
- Run single-ω analyses, site, branch, and branch-site tests.
- Fixed alignments
- Estimate phylogenies and model parameters from an existing alignment.
- Multiple genes
- Combine genes with different substitution models and estimate their relative evolutionary rates.
- Ancestral sequences
- Reconstruct ancestral sequences, including gaps, while averaging over alignment and tree uncertainty.
- Custom models
- Define custom Bayesian models and perform inference using BAli-Phy's probabilistic programming language.
References
Cite the 2021 paper for the software and the 2014 paper for the positive-selection method.
- Redelings BD BAli-Phy version 3: model-based co-estimation of alignment and phylogeny.
(2021) Bioinformatics 37(18). [doi:10.1093/bioinformatics/btab129] - Redelings BD Erasing Errors Due to Alignment Ambiguity When Estimating Positive Selection.
(2014) Mol. Biol. Evo. 31(8). [doi:10.1093/molbev/msu174] - Redelings BD and Suchard MA Incorporating indel information into phylogeny estimation for rapidly emerging pathogens.
(2007) BMC Evolutionary Biology, 7:40. [doi: 10.1186/1471-2148-7-40] - Suchard MA and Redelings BD BAli-Phy: simultaneous Bayesian inference of alignment and phylogeny.
(2006) Bioinformatics, 22:2047-2048. [doi:10.1093/bioinformatics/btl175] - Redelings BD and Suchard MA Joint Bayesian Estimation of Alignment and Phylogeny.
(2005) Systematic Biology, 54(3):401-418 [doi:10.1080/10635150590947041]