Highly scalable inference of ancestral recombination graphs (ARGs)
Project description
Threads
Highly scalable inference of ancestral recombination graphs (ARGs)
Installation
pip install threads_arg
Usage
ARG inference
You will need
- genotypes in pgen format
- list of variants in bim or pvar format (with the same prefix as the pgen)
- genetic map with 4 columns: Chromosome, SNP, cM, bp
- demography file with two columns: generations in the past, effective population size in haploids
Minimal usage using the provided example data:
threads infer \
--pgen example/example_data.pgen \
--map_gz example/example_data.map \
--demography example/Ne10000.demo \
--out example/example_data.threads
threads convert \
--threads example/example_data.threads \
--argn example/example_data.argn
This will write a .threads
file to path/to/output.threads
.
threads infer
accepts more options:
threads infer \
--pgen path/to/input.pgen \
--map_gz path/to/genetic_map.gz \
--demography path/to/demography \
--out path/to/output.threads \
--modality [wgs|array] (default: wgs) \
--query_interval (default: 0.01) \
--match_group_interval (default: 0.5) \
--max_sample_batch_size (default: None) \
--mutation_rate (default: 1.4e-8) \
--region 1234-56789 (default: whole region, end-inclusive) \
--num_threads 8 (default: 1)
--modality array
can be set for inference from arrays.
--query_interval
and --match_group_interval
can be raised to save memory for inference over long genomic regions, this will have little impact on accuracy, especially for sparse variants.
The HMM mutation rate can be set with --mutation_rate
. This defaults to a realistic human rate of 1.4e-8
per site per generation.
Specifying a --region start-end
means the output ARG is truncated to those base-pair coordinates (end-inclusive). The whole input set will still be used for inference.
Parallelism can be enabled by specifying --num_threads
ARG conversion
.threads
files can be converted to .argn
and .tsz
using
threads convert \
--threads arg.threads \
--argn arg.argn
and
threads convert \
--threads arg.threads \
--tsz arg.tsz
Phasing/imputation/variant mapping
These functions are in an experimental stage and will be released later.
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 Distributions
Built Distributions
Hashes for threads_arg-0.1.0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c3ec28a26185ad45d17a138d94ef79ed22d9721f3bf44ad480b9e91f76224761 |
|
MD5 | 0dbd84b91d40c943c8dbb30db167f6e4 |
|
BLAKE2b-256 | 671cd4e34eb8542325cb00fab672e9d75d9835258d1b589402f486e0877ac1a5 |
Hashes for threads_arg-0.1.0-cp312-cp312-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 79fdd1d93cd6a253e8bcb81b96131a37f343c342e4962b02b318961289428fe2 |
|
MD5 | 20834ee6527c4a30204b1cbe5132d7a7 |
|
BLAKE2b-256 | 59ebc4cbed73c9396400395795292e9c3e3bd83f85bac41bdec321c98dbd0c67 |
Hashes for threads_arg-0.1.0-cp312-cp312-macosx_10_15_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 81ea447b4a396e7fe51dced1b9873a96d23dcff2c0090ad713c031bc8d5ff0c7 |
|
MD5 | 5d45013a9cde17fa5d187da46fc24a11 |
|
BLAKE2b-256 | bb7cf4280033018c3dfef3677b87c059f45a1f073b333413e222d3478b6f26ba |
Hashes for threads_arg-0.1.0-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0f2b07d43f8c843e51ce513844e8ab693b8d96abe2a8bd3b83c14946e806f1bc |
|
MD5 | 8e549ba3896175527ec21b0d84960f64 |
|
BLAKE2b-256 | d9a023a480e87fe4cebdf7f78144f8d8da893b6737f5c79bf1ab4ad77a5e5fb4 |
Hashes for threads_arg-0.1.0-cp311-cp311-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | feaafbdef078cc41025422b04890460153bc3be6d10457808992840716543371 |
|
MD5 | 8246318ddd6ff10eb2b4bed38805890f |
|
BLAKE2b-256 | ebd7216ab35224c131eba45710f700e3aa77ff9db7c5739b2c3e618da8e62882 |
Hashes for threads_arg-0.1.0-cp311-cp311-macosx_10_15_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 883a8f143067e796c4c4e8d921bad36cb4a278d1e93bed7e5d93be0fef490129 |
|
MD5 | 76b27ffa514ead37c4380f4d2c98a4b8 |
|
BLAKE2b-256 | ca0650a15da3feac2c69b0c1942aaed77d4888bc1f536077f52f2886b31e302b |
Hashes for threads_arg-0.1.0-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 16fc3cccf28b7a7dab924e933b9a1e35ab62ff7c065368098c7025a4fb7324c8 |
|
MD5 | 237b37261ff56d3c662dcd26a4085aaa |
|
BLAKE2b-256 | 0d0d220359907dbbd3314cc4ed825f35703818f827e16f8224366596f2bf195c |
Hashes for threads_arg-0.1.0-cp310-cp310-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 935ed6eecb8f2335fb61d960415367360b46bb2882637f11b6c4ee636e546d8e |
|
MD5 | aaaa22dc070f024e5562f3cf9fdff56e |
|
BLAKE2b-256 | 1b90a9ebdcf72afa275b59e7e2d5e42579dd1b481b351100b3971ab59c229392 |
Hashes for threads_arg-0.1.0-cp310-cp310-macosx_10_15_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3bdcb4dbc1b9a4abcb435c9634fd22c7133babba354ed59f93ca39f341e3eaa2 |
|
MD5 | 67c3f4e233c83c18c220057cf2cbb65c |
|
BLAKE2b-256 | 2f3ad33b5ec0b3e27636a8b16d4d4617c05cd5ab9883a9d2346fdec98ee4484a |
Hashes for threads_arg-0.1.0-cp39-cp39-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 813fc494f9eda2e2e4035a1e08cae32ce87d2364c1a00abce3fe013a7cfbcd9e |
|
MD5 | 67dff571a95461774b16cffa4b2fc262 |
|
BLAKE2b-256 | 9ba085865d31a7440e570abaf4b50a009a4ac966f4e8a7a3dec9c792fb40b900 |
Hashes for threads_arg-0.1.0-cp39-cp39-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 631ebcf79b2a97a2a0d78c2912ffdfa4029b1b4945f4a9e988a6f9cd2583862b |
|
MD5 | ceb9b8b22aef23147abf2aa2e90a1d29 |
|
BLAKE2b-256 | de8fd5472f22b1074cb9dfd44fffc6aefa3cbb080ce3645abbcdc8b47762d69a |
Hashes for threads_arg-0.1.0-cp39-cp39-macosx_10_15_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 587a863be4b0d34e6f01b7321b2c0bd36037c022788d9a5139827fc11c9e808e |
|
MD5 | 256adb4b5125c8e74248f8402b4a3e13 |
|
BLAKE2b-256 | abd925958be422db941be6f70762a6d7552b5ce3d66e397d35ab415760c9b291 |
Hashes for threads_arg-0.1.0-cp38-cp38-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 15716c2bbbeda528c89e29851c73840964e47568ea0eeb63b167678d165d03e2 |
|
MD5 | 792d73daa0ec0e729d3a631ecf208723 |
|
BLAKE2b-256 | cda67d7387cdd0fb3ee4b20a1b06c057fcf8d148c2b8bb7ca77a6bd160896167 |
Hashes for threads_arg-0.1.0-cp38-cp38-macosx_10_15_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 99b877e302f54585a9fbdd851506371895d823e090b118ecbeaebf6940f873ef |
|
MD5 | 9a3c8407e5a788a5a4ac968cdac22ec5 |
|
BLAKE2b-256 | 12134aa547b201291395b303e88a0f23e071497c00705777d081c9d01fefd1dd |