SkillAgentSearch skills...

Primeval

common models of human demography, implemented in Python with msprime

Install / Use

/learn @carjed/Primeval
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

primeval

NOTICE

A separate community-maintained library of standard simulation population genetic simulation models has been started at https://github.com/popgensims/stdpopsim. The demographic models here will eventually be merged into that repository.


Binder

primeval is a small Python module with functions for performing coalescent simulations under various models of human demographic history, using the msprime reimplementation of Richard Hudson’s seminal ms program.

Quick Start

The easiest way to use primeval is with BinderHub. This will launch a cloud-based computing environment, with interactive Jupyter notebooks to run and explore the various coalescent models.

Local Install

To use primeval locally, simply clone this repository and ensure that the msprime library is installed (we recommend installing with conda, but pip can also be used--see the msprime documentation for additional instructions):

conda config --add channels conda-forge
conda install msprime

git clone https://github.com/carjed/primeval.git
cd primeval

Then, from within the Python console or a script, import the primeval.py module:

# load module
from primeval import *

# Print debugging info for the Gutenkunst et al. (2009) model
gutenkunst_model(debug = True)

Alternatively, the interactive notebooks in this repository can be accessed locally if you have Jupyter installed on your system.

Current Models

primeval currently includes functions for running coalescent simulations under the following models:

Related Skills

View on GitHub
GitHub Stars5
CategoryDevelopment
Updated1y ago
Forks0

Languages

Jupyter Notebook

Security Score

70/100

Audited on Jun 7, 2024

No findings