Journal article icon

Journal article

TiPS: rapidly simulating trajectories and phylogenies from compartmental models

Abstract:
Stochastic population dynamics simulations are essential for many ecological and epidemiological studies to generate time series and genealogies that capture the relatedness between individuals. Many software packages allow one to simulate phylogenetic trees but these tend to suffer from one or two major limitations. First, the underlying population dynamics model is often simplistic (e.g. constant population size or exponential growth). Second, the software packages are not appropriate to simulate a large number of trees. We introduce TiPS, an R package to generate trajectories and phylogenetic trees associated with a compartmental model. Trajectories are simulated using Gillespie's exact or approximate stochastic simulation algorithm, or a newly proposed mixed version of the two. Phylogenetic trees are simulated from a trajectory under a backwards-in-time approach (i.e. coalescent). TiPS is based on the Rcpp package, allowing to combine the flexibility of R for model definition and the speed of C++ for simulations execution. The model is defined in R with a set of reactions, which allow capturing heterogeneity in life cycles or any sort of population structure. TiPS converts the model into C++ code and compiles it into a simulator that is interfaced in R via a function. TiPS is flexible, easy-to-use and available on the CRAN at https://cran.r-project.org/package=TiPS. Plus, benchmarking analyses show that TiPS is faster than existing packages. This package is particularly well suited for population genetics and phylodynamics studies that need to generate a large number of phylogenies used for population dynamics studies.
Publication status:
Published
Peer review status:
Peer reviewed

Actions

Access Document

Files:
Publisher copy:
10.1111/2041-210x.14038

Authors

More by this author
Institution:
University of Oxford
Division:
MSD
Department:
NDM
Sub department:
Tropical Medicine
Role:
Author
ORCID:
0000-0002-5187-6390


More from this funder
Funder identifier:
https://ror.org/04w6kn183
Grant:
ECO20170637560


Publisher:
Wiley
Journal:
Methods in Ecology and Evolution More from this journal
Volume:
14
Issue:
2
Pages:
487-495
Publication date:
2022-12-12
Acceptance date:
2022-10-07
DOI:
EISSN:
2041-210X


Language:
English
Keywords:
Pubs id:
1317462
Local pid:
pubs:1317462
Deposit date:
2025-02-20
ARK identifier:

Terms of use


Views and Downloads






If you are the owner of this record, you can report an update to it here: Report update to this record

TO TOP