demografr : A toolkit for simulation-based inference in population genetics

preprint OA: closed CC-BY-4.0
🔓 Open OA copy View at publisher

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.

My notes (saved in your browser only)

Citation neighborhood (no data yet)

We don't have any in-corpus citations linked to this paper yet. This is a recent paper (2025) — citers typically take a year or two to land, and the OpenAlex reference graph may still be filling in.

Source provenance

europepmc
last seen: 2026-05-20T01:45:00.602351+00:00
unpaywall
last seen: 2026-05-30T02:00:01.510937+00:00
License: CC-BY-4.0