Prepare decoding quantities for ASMC & FastSMC
Project description
ASMC Prepare Decoding
Tool to compute decoding quantities.
Quickstart
Install the Python module from PyPI
Most functionality is available through a Python module which can be installed with:
pip install asmc-preparedecoding
This Python module is available on Linux, macOS and Windows.
Some additional functionality, for creating CSFS, requires the additional dependency smcpp, which is not available via PyPI. If you require this functionality, you should additionally follow these instructions to install smcpp.
Examples for using the Python module can be found in the notebooks directory:
- creating decoding quantities from precomputed CSFS
- creating decoding quantities from scratch (requires smcpp)
Installing smcpp
The optional smcpp dependency is not available on PyPI, and itself requires a few additional dependencies.
On Linux, run
sudo apt install libgmp-dev libmpfr-dev libgsl0-dev
on macOS, run
brew install mpfr gmp gsl
Then, we recommend starting from a clean virtual environment. Switch to the source directory and run:
python3 -m venv venv
source venv/bin/activate
python -m pip install --upgrade pip setuptools wheel
python -m pip install asmc-preparedecoding
python -m pip install git+https://github.com/popgenmethods/smcpp/@v1.15.3
License
This project is currently released under the GNU General Public License Version 3.
Release Notes
v2.1 (2021-05-13)
Default demographies are now bundled with Prepare Decoding. You can now either supply your own demography file, or choose from the following default demographies:
- ACB, ASW, BEB, CDX, CEU, CHB, CHS, CLM, ESN, FIN, GBR, GIH, GWD, IBS, ITU, JPT, KHV, LWK, MSL, MXL, PEL, PJL, PUR, STU, TSI, YRI
Breaking changes
- When using the C++ or Python libraries, methods that previous specified a demography file as a string now require an instance of a lightweight strong type
Demography
:- In C++, to specify a file:
Demography d("/path/to/demography.demo");
- In C++, to specify a default:
Demography d("CEU");
- In Python, to specify a file:
d = Demography('/path/to/demography.demo')
- In C++, to specify a default:
d = Demography('CEU')
- In C++, to specify a file:
- A default-constructed Demography will use the default CEU.
Other changes
- None
v2.0 (2021-04-22)
Computing CSFS values is now bundled with this project, and no longer relies on the optional smcpp
dependency.
Breaking changes
- Python method
create_from_precomputed_csfs
is renamedprepare_decoding_precalculated_csfs
, but it behaves identically. - Python method
create_from_scratch
is renamedcalculate_csfs_and_prepare_decoding
, and no longer requires the Python packagesmcpp
.
Other changes
- Some floating point numbers in output files are now written with higher precision.
v1.1 (2021-03-19)
Minor fixes.
Breaking changes
- None
Other changes
- Python wheels now also built for Windows as well as macOS and Linux.
- Corrected syntax in package README.
v1.0 (2021-03-18)
First public release of ASMC Prepare Decoding, with functionality as described and used in these notebooks.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distributions
Hashes for asmc_preparedecoding-2.1-cp39-cp39-manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5cb2aae1731650a0d1f2e4db8a2b1d46e31d9f2a45e3eda72f950efb20577927 |
|
MD5 | d2b0de7849ff7b1b985e71822b91e772 |
|
BLAKE2b-256 | f1f2cc41b498ec1596b20af734713639e07fa5bfac5ef1d499022c4f5c9b3e7b |
Hashes for asmc_preparedecoding-2.1-cp39-cp39-macosx_10_15_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1d7ea54eee69d86fc7e1707c93537306d0c90f2684e93dbaa95378690ef9ccf6 |
|
MD5 | 99b08b4bcc25bf3e350b1bba693e5b8b |
|
BLAKE2b-256 | 7143248048abd0657d5de7c11ad618367898bae8814fdc6251e1a7731fff4d41 |
Hashes for asmc_preparedecoding-2.1-cp38-cp38-manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a31b3d212f59966e2ef82c56bbc3ee4a9f4906889e5d8d31d0d6346a7067dcb6 |
|
MD5 | 8f543ab0b661589edaf4af3ddf62bfc2 |
|
BLAKE2b-256 | 0c2913781816b45c40b8c9563e4b357413e898e6fffbd02690439efa6c1bb9e4 |
Hashes for asmc_preparedecoding-2.1-cp38-cp38-macosx_10_15_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5b611c306a99b3859929bfe99e31b57b3d9ab6538d2bc3a28fda5854e6c481f0 |
|
MD5 | fb9d6f2bcbcfd69a52fe20382dad3147 |
|
BLAKE2b-256 | e937b491e8e2086e48b9424fc7b042b6445868e8008316b9d533c8ea9a53b75c |
Hashes for asmc_preparedecoding-2.1-cp37-cp37m-manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 42708d28102110cf2a85a444298c30d1a1965a176be4d5cc39a2b206282381b9 |
|
MD5 | 4ef76f8b63d2bceda8d658ab9e93aa11 |
|
BLAKE2b-256 | fb8327bf9a5ae8a6a6d07d7e1b2c0ca9fa896d40ad6ca73106ab5cc1fe2b1186 |
Hashes for asmc_preparedecoding-2.1-cp37-cp37m-macosx_10_15_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b790c02b585bffc9c93b11a9ce26665008812576604fde702534e1034839b834 |
|
MD5 | 0e1617f9e6bba881577280db2eec7617 |
|
BLAKE2b-256 | 51398aca2a1a4a3b1dc1ff8cffea3f06d0ba26e08b9074a9ec26e21eb3b06abe |
Hashes for asmc_preparedecoding-2.1-cp36-cp36m-manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 523e88cc63f4372cb2eedf74e487a6bfc3a3f5d907779163183ce4999b30f2d5 |
|
MD5 | c33e7a84691c217fa0503e44170998af |
|
BLAKE2b-256 | 528b47028a8763678c32fe589929073d9b5b6d8b771c523bc4374fff50aae6ef |
Hashes for asmc_preparedecoding-2.1-cp36-cp36m-macosx_10_15_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 06d91d0858470fd295813574299586b889e42d42949d270ab83bdc7ba7ca2f71 |
|
MD5 | 2a3a65c51b4e292496e434c46cc0e39f |
|
BLAKE2b-256 | fa43108b7c863bda33287845504c26eb5304478778cc487cec103f09c984e905 |