| Literature DB >> 28428869 |
Abstract
Ancestral state reconstruction is a method used to study the evolutionary trajectories of quantitative characters on phylogenies. Although efficient methods for univariate ancestral state reconstruction under a Brownian motion model have been described for at least 25 years, to date no generalization has been described to allow more complex evolutionary models, such as multivariate trait evolution, non-Brownian models, missing data, and within-species variation. Furthermore, even for simple univariate Brownian motion models, most phylogenetic comparative R packages compute ancestral states via inefficient tree rerooting and full tree traversals at each tree node, making ancestral state reconstruction extremely time-consuming for large phylogenies. Here, a computationally efficient method for fast maximum likelihood ancestral state reconstruction of continuous characters is described. The algorithm has linear complexity relative to the number of species and outperforms the fastest existing R implementations by several orders of magnitude. The described algorithm is capable of performing ancestral state reconstruction on a 1,000,000-species phylogeny in fewer than 2 s using a standard laptop, whereas the next fastest R implementation would take several days to complete. The method is generalizable to more complex evolutionary models, such as phylogenetic regression, within-species variation, non-Brownian evolutionary models, and multivariate trait evolution. Because this method enables fast repeated computations on phylogenies of virtually any size, implementation of the described algorithm can drastically alleviate the computational burden of many otherwise prohibitively time-consuming tasks requiring reconstruction of ancestral states, such as phylogenetic imputation of missing data, bootstrapping procedures, Expectation-Maximization algorithms, and Bayesian estimation. The described ancestral state reconstruction algorithm is implemented in the Rphylopars functions anc.recon and phylopars.Entities:
Keywords: ancestral state reconstruction; fast methods; linear‐time algorithm; maximum likelihood; phylogenetic comparative method; phylogenetic generalized least squares
Year: 2017 PMID: 28428869 PMCID: PMC5395464 DOI: 10.1002/ece3.2837
Source DB: PubMed Journal: Ecol Evol ISSN: 2045-7758 Impact factor: 2.912
Figure 1Computation times (left) for univariate ancestral state reconstruction using the described fast two‐pass algorithm (anc.recon function, Rphylopars package), numerical optimization (ace function, ape package), generalized least squares (GLS) with matrix inversion (Martins & Hansen, 1997), GLS without matrix inversion (Ho & Ané, 2014), and the rerooting method implemented in the fastAnc function in phytools. The right panel consists of ratios of computation times for optimization, GLS with and without inversion, and rerooting relative to the described fast algorithm. All anc.recon run times completed in fewer than 10 ms, whereas the next‐fastest method (fastAnc) ran from 141 to 13,104 times slower than anc.recon, and the slowest method (ace) ranged from 537 to nearly three million times slower than anc.recon (right panel). Error bars (where visible) indicate standard deviation of five replicate runs per simulated number of species
Mean computation times for anc.recon ancestral state reconstruction on univariate datasets with 256 to 2,097,152 (28 to 221) species. For each number of species, five simulated phylogenies and datasets were generated
| Number of species | Computation time (s) | Standard deviation |
|---|---|---|
| 256 | 0.0003 | 1.87E‐05 |
| 512 | 0.0004 | 1.67E‐05 |
| 1,024 | 0.0007 | 1.14E‐05 |
| 2,048 | 0.001 | 3.36E‐05 |
| 4,096 | 0.003 | 8.29E‐05 |
| 8,192 | 0.006 | 0.0004 |
| 16,384 | 0.011 | 0.0006 |
| 32,768 | 0.021 | 0.0004 |
| 65,536 | 0.052 | 0.0084 |
| 131,072 | 0.110 | 0.0071 |
| 262,144 | 0.222 | 0.0148 |
| 524,288 | 0.520 | 0.0418 |
| 1,048,576 | 1.136 | 0.0929 |
| 2,097,152 | 2.422 | 0.4268 |