Skip to content
This repository has been archived by the owner on Oct 30, 2020. It is now read-only.
/ primeval Public archive

common models of human demography, implemented in Python with msprime

License

Notifications You must be signed in to change notification settings

carjed/primeval

Repository files navigation

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:

About

common models of human demography, implemented in Python with msprime

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages