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.15.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b49138e60d4cc4a1466512d8561a7b04b206e29f62b7f01539585bcf6cd0cfae |
|
MD5 | 944d0fe10956ec7a0836a7ba2504e942 |
|
BLAKE2b-256 | a8900cf726a2ee8003b754e6f4f01602924ab09b1b34b90bbacbc30b4634a3cd |
Hashes for fwdpy11-0.15.0-cp39-cp39-macosx_10_15_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 86312fd8f942d0b7acc7ff292e3897a4c8ed9277622a10bbd567479fbbc6a809 |
|
MD5 | f21e4ed762c11a7f3cf70b0131e55956 |
|
BLAKE2b-256 | 2aabbf44cb14c10fe9db30c2c713ac628ce9f26e93239a191aeedbfd950968ac |
Hashes for fwdpy11-0.15.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fe1b4047811c888ea724ee35799092beb5f4f330c7a43d0515fa3da1ce4849a8 |
|
MD5 | 712c7fbad69f5e34e6345b06796d5b2a |
|
BLAKE2b-256 | c179efdef6f8c3c7840ec8e8fc84ba5d674ffbad0c58de6c2d730f61486b8180 |
Hashes for fwdpy11-0.15.0-cp38-cp38-macosx_10_15_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f65eb17d73c6f4b8cf91e4156ec9566bd7c0f34f20b8c396ae4fd9d7b228bc5d |
|
MD5 | b1a9f3ed66b1dd9a0e5f6bdf96aac0dc |
|
BLAKE2b-256 | f5f28da0d617ba174a3b4498305317ba534869eb0dab380cbd38a995c4d40a85 |
Hashes for fwdpy11-0.15.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fe38e1cac48565da06e8ea6ad5e03f8b3338fe9c463d632694d84297dd3ded5c |
|
MD5 | 151181984c59a7660a401bc93a5ae8c7 |
|
BLAKE2b-256 | 102fb6b97fee83b1d2d3213c395f7da8b0295a6f665c89ba8ed08453fe2d2dbc |
Hashes for fwdpy11-0.15.0-cp37-cp37m-macosx_10_15_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c673c76f4fe50c2aa951b149db2856836b0193adfc7d418dd143b1252f746496 |
|
MD5 | d3c62965ee123c19c8ba76aff38cb3bd |
|
BLAKE2b-256 | 2907c27714f3085328e458548e5aa5422edb854e75693d21ca22cd61b9f6afa4 |