TiPS: rapidly simulating trajectories and phylogenies from compartmental models - CNRS - Centre national de la recherche scientifique Accéder directement au contenu
Pré-Publication, Document De Travail Année : 2022

TiPS: rapidly simulating trajectories and phylogenies from compartmental models

Résumé

Abstract 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. Furthermore, the package allows defining time periods in which the model’s parameters can take different values. 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. This package is available on the CRAN at https://cran.r-project.org/package=TiPS .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. Furthermore, the package allows defining time periods in which the model’s parameters can take different values. 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. This package is available on the CRAN at https://cran.r-project.org/package=TiPS .

Dates et versions

hal-03872312 , version 1 (25-11-2022)

Identifiants

Citer

Gonché Danesh, Emma Saulnier, Olivier Gascuel, Marc Choisy, Samuel Alizon. TiPS: rapidly simulating trajectories and phylogenies from compartmental models. 2022. ⟨hal-03872312⟩

Relations

29 Consultations
0 Téléchargements

Altmetric

Partager

Gmail Facebook X LinkedIn More