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 currently available on Linux and macOS. We hope it will be available soon on Windows.
Examples for using the Python module can be found in the following Jupyter notebook:
Please note that you must install Jupyter in order to view the notebook, and then open it:
pip install jupyter
jupyter-notebook notebooks/CreatingDecodingQuantities.ipynb
License
This project is currently released under the GNU General Public License Version 3.
Release Notes
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) andprepareDecoding
(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')
- 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.2-cp39-cp39-manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 569557997d6004f6d1f5aa2b7cf403d5858e2c5fd36db30d42f5538dcd5ad643 |
|
MD5 | 8bb42b19666e839727ede064496ff5f9 |
|
BLAKE2b-256 | 4429b07129570f33533fd7a285188608c504fe88b7e573c8fca0743006a56869 |
Hashes for asmc_preparedecoding-2.2-cp39-cp39-macosx_10_15_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | dddd0b8b9fc51b4c580db2d07d1239f5e9f053339cc12982791a0a96ad288c69 |
|
MD5 | 052eb368f0fb787b1c80a5524350c18d |
|
BLAKE2b-256 | 872bbd648e392bae83554a532fd5af8f8da1a88688f6c579723bd313e8dfa7d7 |
Hashes for asmc_preparedecoding-2.2-cp38-cp38-manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5059086d87baab4eaea739b033598b15adeea590f5603f3ef59783e311755b74 |
|
MD5 | cdde180a0bc5329a2dd15fbe0dea46a4 |
|
BLAKE2b-256 | 0a533b2f6daeff1f7208d42cd84d0dfc887c07ba79f157fedde0c64b8d4be1e9 |
Hashes for asmc_preparedecoding-2.2-cp38-cp38-macosx_10_15_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 71f0a23606e5e90c41d03d09de7ac3b2d8f38b97359a02c651f01e94bb5d1bdc |
|
MD5 | e24572d44bcf6976bb78d9897c1e64ad |
|
BLAKE2b-256 | 97eb1af771cb7f8f94afe296cbe6ef5a5330b8b82e860e827248d7c87ccd0d73 |
Hashes for asmc_preparedecoding-2.2-cp37-cp37m-manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0fd3294ee52e3ae43ca287637f3a88c10b7432c58c70f3899b9e94eda26a3196 |
|
MD5 | 01256c8123717e7fcf8e56501d966099 |
|
BLAKE2b-256 | fe9f80a659b7d2487f3db482772f347a3bc5ab3b2a81b49613364844cf3d4718 |
Hashes for asmc_preparedecoding-2.2-cp37-cp37m-macosx_10_15_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 110b336f25fc4f0a320d0deab9eda5eed9b680f3e8b3a020b51441553935fa46 |
|
MD5 | 109fa3f6a00ffc482d9186a85775b7c6 |
|
BLAKE2b-256 | c1774fd9b70a4b32bd5b1c7330a6fee6f1e650e609b741c950e5376b897e6ed8 |
Hashes for asmc_preparedecoding-2.2-cp36-cp36m-manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 206e69fda3f6771282e2d968ae078c96bc12144a14aa0f685ee2db6720c8f7b4 |
|
MD5 | f12ca0d9db33f9e2884bf39cc7e99043 |
|
BLAKE2b-256 | 213edef4d329e43fbaafed712e41a3036e8db7d5bdd8f915767143ccca65024e |
Hashes for asmc_preparedecoding-2.2-cp36-cp36m-macosx_10_15_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ad88a3b6d93c06fa07725a6577d28ac08ef8eb1ceca7f69039069ee4343bf670 |
|
MD5 | 85bf064dd4bf99598b89cb5dd8327bfb |
|
BLAKE2b-256 | b0af04df0d9c0e9cd43c7076edb5cbe147d976aa0b9492204bf028cad82264d0 |