Understanding the dynamics of speciation, extinction and phenotypic evolution is a central challenge in evolutionary biology. Here, we present BAMMtools, an r package for the analysis and visualization of macroevolutionary dynamics on phylogenetic trees. BAMMtools is a companion package to BAMM, an open-source program for reversible-jump MCMC analyses of diversification and trait evolution. Functions in BAMMtools operate directly on output from the BAMM program. The package is oriented towards reconstructing and visualizing changes in evolutionary rates through time and across clades in a Bayesian statistical framework. BAMMtools enables users to extract credible sets of diversification shifts and to identify diversification histories with the maximum a posteriori probability. Users can compare the fit of alternative diversification models using Bayes factors and by directly comparing model posterior probabilities. By providing a robust framework for quantifying uncertainty in macroevolutionary dynamics, BAMMtools will facilitate inference on the complex mixture of processes that have shaped the distribution of species and phenotypes across the tree of life.
- Computational biology