Skip to contents

GillespieSSA2 is a fast, scalable, and versatile framework for simulating large systems with Gillespie’s Stochastic Simulation Algorithm (SSA) (Cannoodt et al. 2021). This package is the spiritual successor to the GillespieSSA package originally written by Mario Pineda-Krch (Pineda-Krch 2008).

GillespieSSA2 has the following added benefits:

  • The whole algorithm is run in Rcpp which results in major speed improvements (>100x). Even your propensity functions (reactions) are being compiled to Rcpp!
  • Parameters and variables have been renamed to make them easier to understand.
  • Many unit tests try to ensure that the code works as intended.

The SSA methods currently implemented are: Exact (ssa_exact()), Explicit tau-leaping (ssa_etl()), and the Binomial tau-leaping (ssa_btl()).

Install

You can install:

  • the latest released version from CRAN with

    install.packages("GillespieSSA2")
  • the latest development version from github with

    devtools::install_github("rcannood/GillespieSSA2", build_vignettes = TRUE)

If you encounter a bug, please file a minimal reproducible example on the issues page.

Examples

The following example models are available:

References

Cannoodt, Robrecht, Wouter Saelens, Louise Deconinck, and Yvan Saeys. 2021. “Spearheading Future Omics Analyses Using Dyngen, a Multi-Modal Simulator of Single Cells.” Nature Communications 12 (1). https://doi.org/10.1038/s41467-021-24152-2.
Pineda-Krch, Mario. 2008. “GillespieSSA: Implementing the Stochastic Simulation Algorithm in r.” Journal of Statistical Software 25 (12). https://doi.org/10.18637/jss.v025.i12.