Skip to main page content
U.S. flag

An official website of the United States government

Dot gov

The .gov means it’s official.
Federal government websites often end in .gov or .mil. Before sharing sensitive information, make sure you’re on a federal government site.

Https

The site is secure.
The https:// ensures that you are connecting to the official website and that any information you provide is encrypted and transmitted securely.

Access keys NCBI Homepage MyNCBI Homepage Main Content Main Navigation
. 2013 Jun;30(6):1480-93.
doi: 10.1093/molbev/mst057. Epub 2013 Mar 16.

A stochastic simulator of birth-death master equations with application to phylodynamics

Affiliations

A stochastic simulator of birth-death master equations with application to phylodynamics

Timothy G Vaughan et al. Mol Biol Evol. 2013 Jun.

Abstract

In this article, we present a versatile new software tool for the simulation and analysis of stochastic models of population phylodynamics and chemical kinetics. Models are specified via an expressive and human-readable XML format and can be used as the basis for generating either single population histories or large ensembles of such histories. Importantly, phylogenetic trees or networks can be generated alongside the histories they correspond to, enabling investigations into the interplay between genealogies and population dynamics. Summary statistics such as means and variances can be recorded in place of the full ensemble, allowing for a reduction in the amount of memory used--an important consideration for models including large numbers of individual subpopulations or demes. In the case of population size histories, the resulting simulation output is written to disk in the flexible JSON format, which is easily read into numerical analysis environments such as R for visualization or further processing. Simulated phylogenetic trees can be recorded using the standard Newick or NEXUS formats, with extensions to these formats used for non-tree-like inheritance relationships.

Keywords: chemical kinetics simulation; epidemic modeling; phylogenetic trees; population genetics; stochastic simulation.

PubMed Disclaimer

Figures

F<sc>ig</sc>. 1.
Fig. 1.
MASTER input file specifying a single fixed time length simulation of a stochastic SIR model.
F<sc>ig</sc>. 2.
Fig. 2.
Visualization of a typical SIR simulation result, using R in combination with the rjson library.
F<sc>ig</sc>. 3.
Fig. 3.
Histories generated using the two-deme structured SIR model. Note the clear delay between peak infection in deme 0 and peak infection in deme 1.
F<sc>ig</sc>. 4.
Fig. 4.
Using MASTER to perform within-host infection dynamics simulations. (a) Expected viral load conditional on chronic infection. (b) Relative covariance between infected cell and virion within-host populations.
F<sc>ig</sc>. 5.
Fig. 5.
A stochastic logistic model with inheritance tracking. (a) Inheritance relationships between reactants (top) and products (bottom). (b) A typical tree produced by MASTER.
F<sc>ig</sc>. 6.
Fig. 6.
Simulating a serially sampled coalescent tree. (a) Inheritance relationships between coalescing individuals. (b) A typical tree generated using the chosen leaf times and coalescence rate. Note the late introduction of lineages at times formula image, extending the age of the root substantially.
F<sc>ig</sc>. 7.
Fig. 7.
Elapsed computation times used in simulating population dynamics under a stochastic logistic model for 100 units for a range of total event counts (selected by adjusting the carrying capacity), using each of the calculation methods currently implemented in MASTER. The gray line depicts the gradient associated with strict linear dependence on the number of events simulated. Tau-leaping and SAL algorithms were simulated using a fixed time step formula image (computations performed on an Intel Core i5 CPU operating at 3.0 GHz).
F<sc>ig</sc>. 8.
Fig. 8.
Relationship between populations and population types in MASTER.
F<sc>ig</sc>. 9.
Fig. 9.
General structure of a MASTER XML file.

References

    1. BEAST 2 Development Team. 2013. BEAST version 2 [Internet] Available from: http://beast2.cs.auckland.ac.nz (last accessed March 29, 2013)
    1. Britton T. Stochastic epidemic models: a survey. Math Biosci. 2010;225:24–35. - PubMed
    1. Cardona G, Rossell F, Valiente G. Extended Newick: it is time for a standard representation of phylogenetic networks. BMC Bioinformatics. 2008;9:532. - PMC - PubMed
    1. Couture-Beil A. 2013. rjson: JSON for R (version 0.2.12) [Internet] Available from: http://cran.r-project.org/web/packages/rjson/ (last accessed March 29, 2013)
    1. Drummond AJ, Pybus OG, Rambaut A, Forsberg R, Rodrigo AG. Measurably evolving populations. Trends Ecol Evol. 2003;18:481–488.

Publication types