CRAN/E | slendr

slendr

A Simulation Framework for Spatiotemporal Population Genetics

Installation

About

A framework for simulating spatially explicit genomic data which leverages real cartographic information for programmatic and visual encoding of spatiotemporal population dynamics on real geographic landscapes. Population genetic models are then automatically executed by the 'SLiM' software by Haller et al. (2019) doi:10.1093/molbev/msy228 behind the scenes, using a custom built-in simulation 'SLiM' script. Additionally, fully abstract spatial models not tied to a specific geographic location are supported, and users can also simulate data from standard, non-spatial, random-mating models. These can be simulated either with the 'SLiM' built-in back-end script, or using an efficient coalescent population genetics simulator 'msprime' by Baumdicker et al. (2022) doi:10.1093/genetics/iyab229 with a custom-built 'Python' script bundled with the R package. Simulated genomic data is saved in a tree-sequence format and can be loaded, manipulated, and summarised using tree-sequence functionality via an R interface to the 'Python' module 'tskit' by Kelleher et al. (2019) doi:10.1038/s41588-019-0483-y. Complete model configuration, simulation and analysis pipelines can be therefore constructed without a need to leave the R environment, eliminating friction between disparate tools for population genetic simulations and data analysis.

github.com/bodkan/slendr
System requirements 'SLiM' is a forward simulation software for population genetics and evolutionary biology. See <https://messerlab.org/slim/> for installation instructions and further information. The 'Python' coalescent framework 'msprime' and the 'tskit' module can by installed by following the instructions at <https://tskit.dev/>.
Bug report File report

Key Metrics

Version 0.9.1
R ≥ 3.6.0
Published 2024-02-21 64 days ago
Needs compilation? no
License MIT
License File
CRAN checks slendr results

Downloads

Yesterday 11 0%
Last 7 days 41 -37%
Last 30 days 261 -39%
Last 90 days 1.115 -11%
Last 365 days 4.510 +73%

Maintainer

Maintainer

Martin Petr

contact@bodkan.net

Authors

Martin Petr

aut / cre

Material

README
NEWS
Reference manual
Package source

Vignettes

Installation instructions
Introduction and basic tutorial
Demes on a regular spatial grid
Programming dispersion dynamics
Traditional, non-spatial models
Tree-sequence processing and statistics
Spatially annotated tree sequences
Simulating data with SLiM and msprime backends
Analyzing non-slendr tree sequences
Examples from the slendr paper
Extracting true ancestry tracts

macOS

r-release

arm64

r-oldrel

arm64

r-release

x86_64

Windows

r-devel

x86_64

r-release

x86_64

r-oldrel

x86_64

Old Sources

slendr archive

Depends

R ≥ 3.6.0

Imports

ggplot2
dplyr
purrr
readr
magrittr
reticulate
tidyr
png
ijtiff
ape
shinyWidgets
shiny
scales
digest

Suggests

testthat ≥ 3.0.0
sf
stars
rnaturalearth
gganimate
knitr
rmarkdown
admixr
units
magick
cowplot
forcats
rsvg