Skip to main content

Infer tree sequences from genetic variation data.

Project description

tsinfer

License PyPI version Supported Python Versions Docs Build Binary wheels Tests codecov

Infer whole-genome tree sequences from genetic variation data. Tsinfer implements efficient algorithms to reconstruct ancestral haplotypes and recombination breakpoints, producing succinct tree sequences that capture shared ancestry across the genome. It scales to large cohorts and integrates cleanly with the broader tskit ecosystem for downstream statistics and analysis.

The documentation (stablelatest) contains details of how to use this software, including installation instructions.

Installation

python -m pip install tsinfer
# or
conda install -c conda-forge tsinfer

The initial algorithm, its rationale, and results from testing on simulated and real data are described in the following Nature Genetics paper:

Jerome Kelleher, Yan Wong, Anthony W Wohns, Chaimaa Fadil, Patrick K Albers and Gil McVean (2019) Inferring whole-genome histories in large population datasets. Nature Genetics 51: 1330-1338

Tsinfer versions 0.2.0 onwards allow missing data and provide a fully parameterised Li & Stephens matching algorithm (i.e. which allows mismatch). These improvements are described in the following Science paper:

Anthony Wilder Wohns, Yan Wong, Ben Jeffery, Ali Akbari, Swapan Mallick, Ron Pinhasi, Nick Patterson, David Reich, Jerome Kelleher, and Gil McVean (2022) A unified genealogy of modern and ancient genomes. Science 375: eabi8264

Please cite either or both of these if you use tsinfer in your work. Code to reproduce the results in the first paper is present in a separate GitHub repository.

Note that tsinfer does not attempt to infer node times (i.e. branch lengths of the inferred trees). If you require a tree sequence where the dates of common ancestors are expressed in calendar or generation times, you should post-process the tsinfer output using software such as tsdate.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tsinfer-0.5.0.tar.gz (780.7 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

tsinfer-0.5.0-cp313-cp313-win_amd64.whl (154.3 kB view details)

Uploaded CPython 3.13Windows x86-64

tsinfer-0.5.0-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.whl (312.1 kB view details)

Uploaded CPython 3.13manylinux: glibc 2.17+ x86-64

tsinfer-0.5.0-cp313-cp313-macosx_10_13_universal2.whl (230.3 kB view details)

Uploaded CPython 3.13macOS 10.13+ universal2 (ARM64, x86-64)

tsinfer-0.5.0-cp312-cp312-win_amd64.whl (154.1 kB view details)

Uploaded CPython 3.12Windows x86-64

tsinfer-0.5.0-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl (311.8 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64

tsinfer-0.5.0-cp312-cp312-macosx_10_13_universal2.whl (229.9 kB view details)

Uploaded CPython 3.12macOS 10.13+ universal2 (ARM64, x86-64)

tsinfer-0.5.0-cp311-cp311-win_amd64.whl (154.0 kB view details)

Uploaded CPython 3.11Windows x86-64

tsinfer-0.5.0-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl (310.1 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

tsinfer-0.5.0-cp311-cp311-macosx_10_9_universal2.whl (229.3 kB view details)

Uploaded CPython 3.11macOS 10.9+ universal2 (ARM64, x86-64)

tsinfer-0.5.0-cp310-cp310-win_amd64.whl (153.9 kB view details)

Uploaded CPython 3.10Windows x86-64

tsinfer-0.5.0-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.whl (308.8 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64

tsinfer-0.5.0-cp310-cp310-macosx_10_9_universal2.whl (229.3 kB view details)

Uploaded CPython 3.10macOS 10.9+ universal2 (ARM64, x86-64)

File details

Details for the file tsinfer-0.5.0.tar.gz.

File metadata

  • Download URL: tsinfer-0.5.0.tar.gz
  • Upload date:
  • Size: 780.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for tsinfer-0.5.0.tar.gz
Algorithm Hash digest
SHA256 56047e24b1b6b1735112d0ed4c40342d69bfa8f558715bce0f89fbd3db58067e
MD5 0a90ceebe5cad7873c00da25a8950df7
BLAKE2b-256 c20c32f3b642c1977ab1bfb3e18da1ce305aab5f64b568a5c772a9b7062852ed

See more details on using hashes here.

Provenance

The following attestation bundles were made for tsinfer-0.5.0.tar.gz:

Publisher: wheels.yml on tskit-dev/tsinfer

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file tsinfer-0.5.0-cp313-cp313-win_amd64.whl.

File metadata

  • Download URL: tsinfer-0.5.0-cp313-cp313-win_amd64.whl
  • Upload date:
  • Size: 154.3 kB
  • Tags: CPython 3.13, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for tsinfer-0.5.0-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 e269f8b93a0de848e3e063f93da0fc0f711045727ba410f179e85e4f9c7a7997
MD5 58a61de07d2b50c001559efa20ffd32b
BLAKE2b-256 7f2e469d75ec6e5194bf1bcc0a794c3f59f0f84f233765be57048a29823d22a7

See more details on using hashes here.

Provenance

The following attestation bundles were made for tsinfer-0.5.0-cp313-cp313-win_amd64.whl:

Publisher: wheels.yml on tskit-dev/tsinfer

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file tsinfer-0.5.0-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.whl.

File metadata

File hashes

Hashes for tsinfer-0.5.0-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 56ba2ff364c858559aacd2d0f304bf91e75bab1dee8558b6393d2480dc0065c3
MD5 3c738fc0c840028e37fdbffe82649ee3
BLAKE2b-256 c6af92155a6569c7da1c9ac6f849f3e0e1e74c82496ba435c5c754c275acfd65

See more details on using hashes here.

Provenance

The following attestation bundles were made for tsinfer-0.5.0-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.whl:

Publisher: wheels.yml on tskit-dev/tsinfer

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file tsinfer-0.5.0-cp313-cp313-macosx_10_13_universal2.whl.

File metadata

File hashes

Hashes for tsinfer-0.5.0-cp313-cp313-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 e2d25d6ad576b8cc2d478802259fa1f475f604a4daf99bb58915b4759d16c3e9
MD5 17154d7f7a279e2518217e043c820e2d
BLAKE2b-256 607e8f107496c70989b9ef889f94e4c28995fc7f40e9b3900c6e36373e6b07df

See more details on using hashes here.

Provenance

The following attestation bundles were made for tsinfer-0.5.0-cp313-cp313-macosx_10_13_universal2.whl:

Publisher: wheels.yml on tskit-dev/tsinfer

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file tsinfer-0.5.0-cp312-cp312-win_amd64.whl.

File metadata

  • Download URL: tsinfer-0.5.0-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 154.1 kB
  • Tags: CPython 3.12, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for tsinfer-0.5.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 d29b1c6aa92dad731d75846e6fb951cb4969a000cd1bf1018b259ffb86b11009
MD5 9e53ba66422822a72ec639788a2692a9
BLAKE2b-256 1c18f037aa8d9fec5eee0870343a740ce4ecc1efffe0cbd6e46cdf4df7b51f5b

See more details on using hashes here.

Provenance

The following attestation bundles were made for tsinfer-0.5.0-cp312-cp312-win_amd64.whl:

Publisher: wheels.yml on tskit-dev/tsinfer

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file tsinfer-0.5.0-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl.

File metadata

File hashes

Hashes for tsinfer-0.5.0-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 a9a04aa862a60ddbf6dfd1581967106e9ff63b34f2b7756ce23a4dcacf2feef1
MD5 b9b25d5b0880587d94880c7db3dd4b4d
BLAKE2b-256 95142ac47ba3f03708c8f227c90b4a5176f968623a48ae98eca3c5062676d444

See more details on using hashes here.

Provenance

The following attestation bundles were made for tsinfer-0.5.0-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl:

Publisher: wheels.yml on tskit-dev/tsinfer

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file tsinfer-0.5.0-cp312-cp312-macosx_10_13_universal2.whl.

File metadata

File hashes

Hashes for tsinfer-0.5.0-cp312-cp312-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 60cc7b298d7d050d34fbbcad09f977297e642843065060c970f2fa53cc2eeaf4
MD5 75abc464d617e908b131efc948c5cdb4
BLAKE2b-256 1dbcc6ef088fb03a60fcff0e22f1a6b8198459b73e1c25953b81c4988534ebfb

See more details on using hashes here.

Provenance

The following attestation bundles were made for tsinfer-0.5.0-cp312-cp312-macosx_10_13_universal2.whl:

Publisher: wheels.yml on tskit-dev/tsinfer

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file tsinfer-0.5.0-cp311-cp311-win_amd64.whl.

File metadata

  • Download URL: tsinfer-0.5.0-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 154.0 kB
  • Tags: CPython 3.11, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for tsinfer-0.5.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 0e44addf1f0780fac5932bfc0e1ba41d33e13f3fe57ae02ffcbac46c72eb8e11
MD5 8ecf15cadabeb579561a26bdeaa78ca7
BLAKE2b-256 54a3e752af716f53c875ae4f9993e55460f61d6285a87ef00d9993279a67b341

See more details on using hashes here.

Provenance

The following attestation bundles were made for tsinfer-0.5.0-cp311-cp311-win_amd64.whl:

Publisher: wheels.yml on tskit-dev/tsinfer

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file tsinfer-0.5.0-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl.

File metadata

File hashes

Hashes for tsinfer-0.5.0-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 41e34cd8976a464c49d71b85d3fb6bd7a77d3a2879e645b6385c809fa349c9cb
MD5 4d6bc8fb431a07445746bddff70fc974
BLAKE2b-256 0bfc690fb7f30f8ebc4d127130fefcef839af7a98c7bdf4a1d8a3e33f60605f9

See more details on using hashes here.

Provenance

The following attestation bundles were made for tsinfer-0.5.0-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl:

Publisher: wheels.yml on tskit-dev/tsinfer

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file tsinfer-0.5.0-cp311-cp311-macosx_10_9_universal2.whl.

File metadata

File hashes

Hashes for tsinfer-0.5.0-cp311-cp311-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 761eb8d5447b8762d5c419edae0dcf4c5aa402db0dd55d07156cd391300949bf
MD5 79fb83272b6cb01968ffa38142511134
BLAKE2b-256 f57b46dbec7b5dc75bec63d243856aec2cb5a689970625f3ed747a9d613700b6

See more details on using hashes here.

Provenance

The following attestation bundles were made for tsinfer-0.5.0-cp311-cp311-macosx_10_9_universal2.whl:

Publisher: wheels.yml on tskit-dev/tsinfer

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file tsinfer-0.5.0-cp310-cp310-win_amd64.whl.

File metadata

  • Download URL: tsinfer-0.5.0-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 153.9 kB
  • Tags: CPython 3.10, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for tsinfer-0.5.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 0627c1918fb514ac22aeceb3e57117b5da5257f295623bc29a88f35843d9cf02
MD5 607f0129b5e53ed4558e29c9a107b443
BLAKE2b-256 ecc1ff24be2a680aba3e7abf33a1468844591270e3f59ceffe42c52ed0a1038a

See more details on using hashes here.

Provenance

The following attestation bundles were made for tsinfer-0.5.0-cp310-cp310-win_amd64.whl:

Publisher: wheels.yml on tskit-dev/tsinfer

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file tsinfer-0.5.0-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.whl.

File metadata

File hashes

Hashes for tsinfer-0.5.0-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 751b41a2f38f8f993367a71f7dfa348fd5c536bc842c44c515bb4bbfd9c8cc81
MD5 6e349b8fc61c0b69b8f99a02d298701e
BLAKE2b-256 f281e34fafdc25200e06c70ebfcf5b96afc37fd898f8bf86ab76f34f997f9136

See more details on using hashes here.

Provenance

The following attestation bundles were made for tsinfer-0.5.0-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.whl:

Publisher: wheels.yml on tskit-dev/tsinfer

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file tsinfer-0.5.0-cp310-cp310-macosx_10_9_universal2.whl.

File metadata

File hashes

Hashes for tsinfer-0.5.0-cp310-cp310-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 cccced41345edb8c39fb4a03ad3da56563af9d102e1be71989ad9dd49dc99c3d
MD5 ba7d4243295ba78c341e8e56bcfbe44d
BLAKE2b-256 49045dfaadef46a8e9d1894e03e2897d97847196719ae48599e55751305dddd1

See more details on using hashes here.

Provenance

The following attestation bundles were made for tsinfer-0.5.0-cp310-cp310-macosx_10_9_universal2.whl:

Publisher: wheels.yml on tskit-dev/tsinfer

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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