Simulation of Fossil and Taxonomy Data

Simulating taxonomy and fossil data on phylogenetic trees under mechanistic models of speciation, preservation and sampling.


R package for simulating fossil data on phylogenetic trees under mechanistic models of preservation and sampling

The latest version can be installed in R using the package devtools:

library(devtools)
install_github("fossilsim/fossilsim")

Quick start

Simulating data using FossilSim can be as simple as the following code snippets.

# simulate a tree using ape
tips = 8
t = ape::rtree(tips)
# simulate fossils using fossilsim
rate = 2
f = sim.fossils.poisson(rate, t)  
# plot the output
plot(f, t)
# simulate taxonomy using fossilsim
beta = 0.5 # probability of symmetric speciation
lambda.a = 0.1  # rate of anagenesis
s = sim.taxonomy(t, beta, lambda.a)  
# plot the output
plot(s, t, legend.position = "bottomright")

Package vignettes

The following vignettes are available via CRAN and provide detailed examples:

For further information and examples see the package documentation

Contributors

Joëlle Barido-Sottani
Walker Pett Joseph O'Reilly
Rachel Warnock

News

Version 2.1.1

  • Fixed a bug in sim.fbd.rateshift.taxa which led to trees being simulated with the wrong rates. NB: Any dataset simulated with this function before the fix is invalid and needs to be rerun.

Version 2.1.0

New functionality

  • The new function fossils.to.pyrate can be used to convert objects generated by this package into PyRate format.
  • The new functions fossils.to.BEAST.constraints and fossils.to.BEAST.start.tree.Rd can be used to convert objects generated by this package into BEAST2 format.
  • The new functions subsample.fossils.oldest, subsample.fossils.oldest.and.youngest, subsample.fossils.uniform and subsample.fossils.youngest can be used to subsample fossil occurrences.

Function changes

  • The innovative rates model has been integrated into the independent model in the function sim.trait.values. Parameters are unchanged.
  • The asymmetric plot function has been renamed rangeplot.asymmetric and separated from the SAtree objects.

Bugfixes

  • Fixed several bugs in rangeplot.asymmetric that could lead to crashes or plots with missing edges.
  • Fixed a bug in SAtree.from.fossils where SAtree objects were not created properly when using an empty fossils object.

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.

install.packages("FossilSim")

2.1.1 by Joelle Barido-Sottani, 2 months ago


Browse source code at https://github.com/cran/FossilSim


Authors: Rachel Warnock [aut, cph] , Joelle Barido-Sottani [aut, cre, cph] , Walker Pett [aut, cph] , O'Reilly Joseph [aut, cph]


Documentation:   PDF Manual  


GPL-3 license


Imports ape, TreeSim

Suggests paleotree, knitr, rmarkdown, devtools


See at CRAN