bioRxivEvolutionary BiologyPreprint
demografr: A toolkit for simulation-based inference in population genetics
Abstract
Simulation-based inference methods such as Approximate Bayesian Computation (ABC) are a popular class of techniques in evolutionary biology and population genetics. These methods are particularly useful for fitting complex models, as they can bypass the need to compute an exact likelihood function, instead relying on comparisons between observed and simulated summary statistics. However, numerous technical and practical hurdles often hinder the application of these methods to new modeling problems. They require the integration of disparate scripts and software for simulation, computing summary statistics, and inference into pipelines which have to be tailor-made for each specific research project. Moreover, computational costs of population genetic simulations can make inference laborious due to costly file format conversions throughout the entire procedure. Here we present a new R package called demografr (github.com/bodkan/demografr), which aims to alleviate most issues with traditional simulation-based inference workflows while facilitating their application to novel and complex modeling problems. First, demografr leverages the R simulation toolkit slendr for interactive, user-friendly encoding of complex demographic models. Second, demografr allows the user to set up parameter distributions and run simulations from them automatically, with built-in support for parallelization. For this purpose, automated inference routines for ABC or grid-based parameter exploration are provided, with individual components available for developing other simulation-based workflows in the future. Third, demografr allows a wide range of summary statistics to be efficiently computed directly in R, without any need for file conversion. In addition to the default slendr simulation engine, demografr also supports user-defined msprime and SLiM simulation scripts as well as entirely customizable summary statistic functions. We illustrate the features of demografr on examples which would traditionally require complex workflows with hundreds of lines of code: estimating parameters of a demographic model via coalescent simulations using ABC, exploring the influence of a set of parameters on summary statistics of interest using parameter grid search, and showcasing the ability to integrate fully customized simulation code written in pure Python or SLiM.
- Citations
- 0
Reproducibility ledger
Nobody has reported trying to reproduce this paper yet. Did you replicate an experiment or run the code? Your report saves the next lab a week.
Sign in to file a reproducibility report.
Related papers
- A new iterative framework for simulation-based population genetic inference with improved coverage properties of confidence intervals
François Rousset, Raphaël Leblois, … Jean‐Michel Marin·Peer Community JournalPeer-reviewed·May 7, 2026
- A community-maintained standard library of population genetic models
J. R. Adrion, C. B. Cole, … A. D. Kern·bioRxiv·Dec 20, 2019
- Demographic inference through approximate-Bayesian-computation skyline plots
M. Navascues, R. Leblois, C. Burgarella·bioRxiv·Jun 2, 2017
- Demes: a standard format for demographic models
Graham Gower, Aaron P. Ragsdale, … Kevin Thornton·GeneticsPeer-reviewed·Sep 29, 2022
- abcneuralnet: Simulation-based Inference with Bayesian Neural Networks and Explainable AI for Population Genomics Inference
Thomas Brazier·bioRxiv·Oct 20, 2026
- Assessing simulation-based supervised machine learning for demographic parameter inference from genomic data
Arnaud Quelin, Frédéric Austerlitz, Flora Jay·HeredityPeer-reviewed·Jun 5, 2025