Forward-time population genetic simulation in Python
Project description
This is the README for fwdpy11, which is a Python package for forward-time population genetic simulation. It uses fwdpp as its C++ back-end.
Build status
Main:
Development:
Miscellaneous
Python code style:
Features
Pickle-able population objects
Parallel computation via multiprocessing or concurrent.futures.
Custom temporal samplers to analyze populations during a simulation may be written in pure Python.
Flexible interface for simulating models with multiple populations.
Documentation
The manual can be found here.
Dependencies
The following must be present on your system:
License
GPLv3 or later (See COPYING)
Supported Python version
fwdpy11 is written for Python 3. We will not modify the package to be compatible with Python 2.7.
Installation
Building from the git repository:
git submodule init
git submodule update
python setup.py build_ext -i
python -m pytest tests
Using pip on macOS and Linux (or pip3 as appropriate for your system):
pip install --upgrade fwdpy11
It is possible that the cmake macros to detect the GSL can fail to detect the correct version. Issues like this are a basic weakness of cmake. I’ve seen this in conda environments, where the macro prefers the system version over the newer version in the environment. To “fix” this, give it a hint:
GSL_ROOT_DIR=/path/to/gsl python3 setup.py build_ext -i
macOS
On Apple’s macOS, we strongly encourage that you use conda with their compiler packages:
conda install clang_osx-64 clangxx_osx-64
Installing these packages will mean that you can get away from the relatively old versions of these compilers that ship with Xcode. However, you do need to add the following flag when building the package:
On macOS versions prior to “Mojave”:
CONDA_BUILD_SYSROOT=/ python3 setup.py build_ext -i
For later versions, you may omit the environment variable prefix.
Do the same for a pip install from the source directory.
Windows
We have heard positive reports of using fwdpy11 on Windows 10 with the Ubuntu subsystem installed. For such a system, you may use a Linux conda installer and then install fwdpy11 via bioconda.
The developers do not have access to this platform, but we are keen to hear of any issues.
Caution
We use the GitHub “release” mechanism to make stable versions available. However, GitHub releases to not include the sub-modules, meaning that the releases themselves cannot be used for installation. (A related irony is that the Zenodo DOI for the releases are somewhat meaningless.)
To install a specific release:
Use pip (see above). This is the recommended approach if you do not use conda.
Install from bioconda. This is the recommended approach.
Clone the repo, checkout the release, and update submodules:
git clone http://github.com/molpopgen/fwdpy11
cd fwdpy11
git submodule init
git submodule update
The latter method is probably the least appealing.
We have a strict policy of putting releases on PyPi and bioconda. If there is a release on PyPi but not on bioconda, then that is because we identified a bug and pushed a new release before the bioconda build happened. It happens. That’s life.
Bioconda
fwdpy11 is available through bioconda for Linux and for macOS:
conda install -c bioconda fwdpy11
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Hashes for fwdpy11-0.14.0-cp38-cp38-manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0b6c2c4be04b62d55e8bf4e91219ec66549bfa26366b4397b143138414ad77cb |
|
MD5 | 71cb1d48f2e608c7af0acaf91e86149f |
|
BLAKE2b-256 | 51e57b53357309d3e8665bf1c16e0cb4cd4c90a6c69c7bfa1e738350d15d3222 |
Hashes for fwdpy11-0.14.0-cp38-cp38-macosx_10_15_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1e1b0d0f4f43d4eb970be3e07cd173ac40a0e276202ae3350d872253a7402b5b |
|
MD5 | 3e0d055dfcc82eb0b40b99abf633ead1 |
|
BLAKE2b-256 | 950ad3c1faf3d6b734e6cc145d5ff31da1f698adae373fb872105cac040bf568 |
Hashes for fwdpy11-0.14.0-cp37-cp37m-manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2fb0b252d468b24c2695bd5bf7f65db9594efb0a09abca99d55219fe468d977b |
|
MD5 | c7e16bbded7bc19db0814151dedc07c5 |
|
BLAKE2b-256 | 85ccec555fb7f2b486dee1ae38798193ad043ada8fca5c6f0dd2f4ae4be3d59c |
Hashes for fwdpy11-0.14.0-cp37-cp37m-macosx_10_15_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0c123df77f2e1065beec3d990da7820d4a2402b066d8c5a5a0dad44bd321d447 |
|
MD5 | 8102a07ee7e4ca5d9565372439555fad |
|
BLAKE2b-256 | f4d79553175075cf9614ac8283bb567dc334b614599a11f7977d0bc7d88c9cd5 |
Hashes for fwdpy11-0.14.0-cp36-cp36m-manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b08b9df35824331f692964be614ce1d3924621440ef60cb83bad6355887d71e8 |
|
MD5 | 3a4d995c6a471930f0e025f3889b9cd0 |
|
BLAKE2b-256 | 2be964760a037f7a18b3227146069e2fc67e6a40385c84e0757d7cbef2f3e15c |
Hashes for fwdpy11-0.14.0-cp36-cp36m-macosx_10_15_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b380e9f563cdfbc22f33b04d711dc02acc960f7548be612a0b7063af5e9b42da |
|
MD5 | 29583b28f09d76cbfabbbccc383cb674 |
|
BLAKE2b-256 | 7a0ae65910a93383ade9f1e37f178690a3a22a151c15671e195b7cc5d2b0f7e2 |