bioRxiv · 10.1101/2025.09.30.679676
Bridging forward-in-time and coalescent simulations using pyslim
Abstract
Ancestral Recombination Graphs (ARGs) provide an expressive and compact way to represent genetic variation data generated by simulations embedded within its genealogical history, and it can dramatically speed up simulations. The fact that the ARG records genealogical as well as genomic information opens up the possibility for a number of new analysis and simulation techniques. Here, we aim to introduce the reader to this deep source of information as produced by the forwards simulator SLiM. SLiM records the ARG using the tree sequence format, which can be manipulated using the tskit and pyslim python packages. We first describe the information that SLiM records in the tree sequence, then provide several examples that use the tree sequence as a format to losslessly pass population states between simulators: recapitation of a forwards simulation with coalescent simulation; initiation of a forwards simulation using the results of a coalescent simulation; and parallelization of simulations, first across branches of a phylogenetic tree, and then across the populations of parasites infecting different hosts.
Explore related subjects
Keep this discovery
Explore connections, maps & timelines
Gopalan, S., Rodrigues, M. F., Ralph, P. L., Haller, B. C.. 2025-10-01. Bridging forward-in-time and coalescent simulations using pyslim. https://doi.org/10.1101/2025.09.30.679676
Cite the original work for its findings. Save a collection to share your selection of sources.