title: SFREEMAP - A simulation-free tool for stochastic mapping.
abstract: BACKGROUND
  Stochastic mapping is frequently used in comparative biology to simulate character evolution, enabling the probabilistic computation of statistics such as number of state transitions along a tree and distribution of states in its internal nodes. Common implementations rely on Continuous-time Markov Chain simulations whose parameters are difficult to adjust and subjected to inherent inaccuracy. Thus, researchers must run a large number of simulations in order to obtain adequate estimates. Although execution time tends to be relatively small when simulations are performed on a single tree assumed to be the "true" topology, it may become an issue if analyses are conducted on several trees, such as the ones that make up posterior distributions obtained via Bayesian phylogenetic inference. Working with such distributions is preferable to working with a single tree, for they allow the integration of phylogenetic uncertainty into parameter estimation. In such cases, detailed character mapping becomes less important than parameter integration across topologies. Here, we present an R-based implementation (SFREEMAP) of an analytical approach to obtain accurate, per-branch expectations of numbers of state transitions and dwelling times. We also introduce an intuitive way of visualizing the results by integrating over the posterior distribution and summarizing the parameters onto a target reference topology (such as a consensus or MAP tree) provided by the user.
  
  
  RESULTS
  We benchmarked SFREEMAP's performance against make.simmap, a popular R-based implementation of stochastic mapping. SFREEMAP confirmed theoretical expectations outperforming make.simmap in every experiment and reducing computation time of relatively modest datasets from hours to minutes. We have also demonstrated that SFREEMAP returns estimates which were not only similar to the ones obtained by averaging across make.simmap mappings, but also more accurate, according to simulated data. We illustrate our visualization strategy using previously published data on the evolution of coloniality in scleractinian corals.
  
  
  CONCLUSIONS
  SFREEMAP is an accurate and fast alternative to ancestral state reconstruction via simulation-based stochastic mapping.
authors.affiliation: Departmento de Informática, Universidade Federal do Paraná, Caixa Postal 19081, Curitiba, PR, 81531-980, Brazil. dpasqualin@inf.ufpr.br.
authors.forename: Diego
authors.identifier: http://orcid.org/0000-0003-1950-0905
authors.initials: D
authors.lastname: Pasqualin
authors.affiliation: Departmento de Zoologia, Universidade Federal do Paraná, Caixa Postal 19020, Curitiba, PR, 81531-990, Brazil.
authors.forename: Marcos
authors.initials: M
authors.lastname: Barbeitos
authors.affiliation: Departmento de Informática, Universidade Federal do Paraná, Caixa Postal 19081, Curitiba, PR, 81531-980, Brazil.
authors.forename: Fabiano
authors.initials: F
authors.lastname: Silva
mesh_terms: D000465:Algorithms; D000818:Animals; D037421:Anthozoa / Q000145:classification; D005075:Biological Evolution; D010802:Phylogeny; D012984:Software; D013269:Stochastic Processes
keywords: Ancestral states; Phylogenetics; Rate of evolution