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 currently available on Linux and macOS. We hope it will be available soon on Windows.

Example notebook

Examples for using the Python module can be found in the following Jupyter notebook:

Please note that to run the notebook you should first clone the repository and install Jupyter:

git clone https://github.com/PalamaraLab/PrepareDecoding.git
cd PrepareDecoding

pip install jupyter
jupyter-notebook notebooks/CreatingDecodingQuantities.ipynb

API documentation

A description of the API can be found here:

File formats

Descriptions of the file formats used can be found here:

License

This project is currently released under the GNU General Public License Version 3.

Release Notes

v2.2.3 (2023-02-22)

Infrastructure updates and building wheels for newer Python versions. No change in functionality.

v2.2.2 (2021-09-28)

Improved documentation, now available here. No change in functionality.

v2.2.1 (2021-09-01)

Very minor fix to links in documentation. No change in functionality.

v2.2 (2021-09-01)

You can now specify discretizations in the following manner:

  • as a file: discretization='/path/to/discretization.disc' (existing functionality)
  • as a number of quantiles, which will be calculated at runtime: discretization=[100]
  • as a number of pre-specified quantiles plus a number of additional quantiles calculated at runtime: discretization=[[30.0, 12], [100.0, 15], 39]
    • this will create 12 discretization points at a spacing of 30.0 (starting from 0.0), followed by 15 at a spacing of 100, followed by 39 additional quantiles

You can now specify built-in frequencies information. Currently, the only supported frequencies are from UKBB. Frequencies can now be specified in the following manner:

  • as a file: frequencies='/path/to/frequencies.frq' (existing functionality)
  • as a string: frequencies='UKBB'

Breaking changes

  • The Python API has been simplified, and the strong types mentioned in the v2.1 release are no longer required in Python. Please see the Jupyter Notebook for examples of the current API.
  • The strong types remain in the C++ API. Please see the file TestPrepareDecoding.cpp for examples of the C++ library API.
  • There is now a single top-level method prepare_decoding (Python) and prepareDecoding (C++). If the CSFS file parameter is a valid file, CSFS will be loaded from file. If the CSFS file parameter is an empty string, CSFS will be calculated at runtime.

Other changes

Various other minor changes have been made.

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.2.3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (986.7 kB view details)

Uploaded CPython 3.11 manylinux: glibc 2.17+ x86-64

asmc_preparedecoding-2.2.3-cp311-cp311-macosx_10_15_x86_64.whl (1.1 MB view details)

Uploaded CPython 3.11 macOS 10.15+ x86-64

asmc_preparedecoding-2.2.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (987.4 kB view details)

Uploaded CPython 3.10 manylinux: glibc 2.17+ x86-64

asmc_preparedecoding-2.2.3-cp310-cp310-macosx_10_15_x86_64.whl (1.1 MB view details)

Uploaded CPython 3.10 macOS 10.15+ x86-64

asmc_preparedecoding-2.2.3-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (987.1 kB view details)

Uploaded CPython 3.9 manylinux: glibc 2.17+ x86-64

asmc_preparedecoding-2.2.3-cp39-cp39-macosx_10_15_x86_64.whl (1.1 MB view details)

Uploaded CPython 3.9 macOS 10.15+ x86-64

asmc_preparedecoding-2.2.3-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (986.8 kB view details)

Uploaded CPython 3.8 manylinux: glibc 2.17+ x86-64

asmc_preparedecoding-2.2.3-cp38-cp38-macosx_10_15_x86_64.whl (1.1 MB view details)

Uploaded CPython 3.8 macOS 10.15+ x86-64

File details

Details for the file asmc_preparedecoding-2.2.3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for asmc_preparedecoding-2.2.3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 534c7eb9e5b3982cf44c790683f7a316c31bd86a1d7448dfb1723bf7b32fce38
MD5 cbdade82606db53052de374449524adc
BLAKE2b-256 f8ec03e837bd5a8775b207a0a0771d0c077562a3ad73ac718e6c6c28b5f95e69

See more details on using hashes here.

File details

Details for the file asmc_preparedecoding-2.2.3-cp311-cp311-macosx_10_15_x86_64.whl.

File metadata

File hashes

Hashes for asmc_preparedecoding-2.2.3-cp311-cp311-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 00006eccf27733c66a63984a17c8843af73c160814bac7aa8cdbed27fb751e32
MD5 fa80509e6030bc521bc3dc2d3aaa61d7
BLAKE2b-256 aace437e83b041585add65288cfa28b138d526d1266eb5f56cabb1209721720c

See more details on using hashes here.

File details

Details for the file asmc_preparedecoding-2.2.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for asmc_preparedecoding-2.2.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 15afcf9118604e28b1f7c961ca3b17a2e23aca6a8739446a7021b10f6d435008
MD5 f25a6384cb8bb3b3c76381de996dbca3
BLAKE2b-256 1376122ec1b0810a6456e53c98c4c03719038d056fbd82f193f2ca464ac5c570

See more details on using hashes here.

File details

Details for the file asmc_preparedecoding-2.2.3-cp310-cp310-macosx_10_15_x86_64.whl.

File metadata

File hashes

Hashes for asmc_preparedecoding-2.2.3-cp310-cp310-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 670fca40dbae2671bcca5a0b699beda175d9c141c4da6f215445e9b55e07e49c
MD5 b1729da974002f5b464b0fef61ddb664
BLAKE2b-256 c1d793482d9a50c9420620ecb50650f12d0e61dcd186788f586ac206d5174797

See more details on using hashes here.

File details

Details for the file asmc_preparedecoding-2.2.3-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for asmc_preparedecoding-2.2.3-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 715715e6088fc064f3c3a0629c6478662bafcbaa0f89962a6cfc4cf1d1b4e992
MD5 e0a3ef41105cb94d9d1c0d04aaa417a9
BLAKE2b-256 fdb90a94c5dc48f0519e81436605c8b10475153873a08faa7d20b106e9aafa2d

See more details on using hashes here.

File details

Details for the file asmc_preparedecoding-2.2.3-cp39-cp39-macosx_10_15_x86_64.whl.

File metadata

File hashes

Hashes for asmc_preparedecoding-2.2.3-cp39-cp39-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 4db5046d8f3c7690858ecd06a89d7811c32f1e82ad012835cf5c8d3ab32f5b8c
MD5 1881566d8161b010a134d0ef0d058e71
BLAKE2b-256 70269cd5a7e0712305df0f9016007c70b31e5439937f29c474fa80c89a19271e

See more details on using hashes here.

File details

Details for the file asmc_preparedecoding-2.2.3-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for asmc_preparedecoding-2.2.3-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 392ce964523c92b72ce7029b240e335ee6b19d8f6b4e73828af56e42ab9b8d0a
MD5 95da5feff4e53fbec7a8b4ffef6c8060
BLAKE2b-256 dc231ac9e2995a2eb089b4bf81504f5fe9c216467dc77d3d74a8a2215b2ccaf3

See more details on using hashes here.

File details

Details for the file asmc_preparedecoding-2.2.3-cp38-cp38-macosx_10_15_x86_64.whl.

File metadata

File hashes

Hashes for asmc_preparedecoding-2.2.3-cp38-cp38-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 522d94cf62327ec6d523afcb40299ccb0fd58916bb2d679e1d7080c7e8f062d3
MD5 0ba76c2e19122a791825746951c2a98b
BLAKE2b-256 856be8af8f98d966be60740f640a4a97b4a4f741c02054fc736f01184ec39941

See more details on using hashes here.

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