@article{fdi:010086721, title = {{T}i{PS} : rapidly simulating trajectories and phylogenies from compartmental models}, author = {{D}anesh, {G}. and {S}aulnier, {E}. and {G}ascuel, {O}. and {C}hoisy, {M}arc and {A}lizon, {S}.}, editor = {}, language = {{ENG}}, abstract = {{S}tochastic population dynamics simulations are essential for many ecological and epidemiological studies to generate time series and genealogies that capture the relatedness between individuals. {M}any software packages allow one to simulate phylogenetic trees but these tend to suffer from one or two major limitations. {F}irst, the underlying population dynamics model is often simplistic (e.g. constant population size or exponential growth). {S}econd, the software packages are not appropriate to simulate a large number of trees. {W}e introduce {T}i{PS}, an {R} package to generate trajectories and phylogenetic trees associated with a compartmental model. {T}rajectories are simulated using {G}illespie's exact or approximate stochastic simulation algorithm, or a newly proposed mixed version of the two. {P}hylogenetic trees are simulated from a trajectory under a backwards-in-time approach (i.e. coalescent). {T}i{PS} is based on the {R}cpp package, allowing to combine the flexibility of {R} for model definition and the speed of {C}++ for simulations execution. {T}he model is defined in {R} with a set of reactions, which allow capturing heterogeneity in life cycles or any sort of population structure. {T}i{PS} converts the model into {C}++ code and compiles it into a simulator that is interfaced in {R} via a function. {T}i{PS} is flexible, easy-to-use and available on the {CRAN} at . {P}lus, benchmarking analyses show that {T}i{PS} is faster than existing packages. {T}his 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.}, keywords = {compartmental models ; phylogenies ; population dynamics ; {R} package ; stochastic simulations}, booktitle = {}, journal = {{M}ethods in {E}cology and {E}volution}, volume = {[{E}arly access]}, numero = {}, pages = {[9 p.]}, ISSN = {2041-210{X}}, year = {2022}, DOI = {10.1111/2041-210x.14038}, URL = {https://www.documentation.ird.fr/hor/fdi:010086721}, }