Skip to main content

Prepare decoding quantities for ASMC & FastSMC

Project description

Unit tests: Windows Unit tests: Ubuntu Unit tests: macOS Regression test

Static analysis checks Sanitiser checks codecov BCH compliance

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:

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')
  • 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 renamed prepare_decoding_precalculated_csfs, but it behaves identically.
  • Python method create_from_scratch is renamed calculate_csfs_and_prepare_decoding, and no longer requires the Python package smcpp.

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

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

asmc_preparedecoding-2.1-cp39-cp39-macosx_10_15_x86_64.whl (588.8 kB view hashes)

Uploaded CPython 3.9 macOS 10.15+ x86-64

asmc_preparedecoding-2.1-cp38-cp38-macosx_10_15_x86_64.whl (588.7 kB view hashes)

Uploaded CPython 3.8 macOS 10.15+ x86-64

asmc_preparedecoding-2.1-cp37-cp37m-macosx_10_15_x86_64.whl (584.9 kB view hashes)

Uploaded CPython 3.7m macOS 10.15+ x86-64

asmc_preparedecoding-2.1-cp36-cp36m-macosx_10_15_x86_64.whl (585.0 kB view hashes)

Uploaded CPython 3.6m macOS 10.15+ x86-64

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page