Skip to main content

Infer tree sequences from genetic variation data.

Project description

tsinfer

License PyPI version Supported Python Versions Docs Build 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.1.tar.gz (889.8 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.1-cp313-cp313-win_amd64.whl (143.0 kB view details)

Uploaded CPython 3.13Windows x86-64

tsinfer-0.5.1-cp313-cp313-win32.whl (137.7 kB view details)

Uploaded CPython 3.13Windows x86

tsinfer-0.5.1-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl (307.4 kB view details)

Uploaded CPython 3.13manylinux: glibc 2.17+ x86-64manylinux: glibc 2.28+ x86-64

tsinfer-0.5.1-cp313-cp313-macosx_11_0_arm64.whl (162.3 kB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

tsinfer-0.5.1-cp313-cp313-macosx_10_13_x86_64.whl (165.5 kB view details)

Uploaded CPython 3.13macOS 10.13+ x86-64

tsinfer-0.5.1-cp312-cp312-win_amd64.whl (142.8 kB view details)

Uploaded CPython 3.12Windows x86-64

tsinfer-0.5.1-cp312-cp312-win32.whl (137.6 kB view details)

Uploaded CPython 3.12Windows x86

tsinfer-0.5.1-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl (306.9 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64manylinux: glibc 2.28+ x86-64

tsinfer-0.5.1-cp312-cp312-macosx_11_0_arm64.whl (162.1 kB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

tsinfer-0.5.1-cp312-cp312-macosx_10_13_x86_64.whl (165.2 kB view details)

Uploaded CPython 3.12macOS 10.13+ x86-64

tsinfer-0.5.1-cp311-cp311-win_amd64.whl (142.7 kB view details)

Uploaded CPython 3.11Windows x86-64

tsinfer-0.5.1-cp311-cp311-win32.whl (137.4 kB view details)

Uploaded CPython 3.11Windows x86

tsinfer-0.5.1-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl (303.5 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64manylinux: glibc 2.28+ x86-64

tsinfer-0.5.1-cp311-cp311-macosx_11_0_arm64.whl (162.0 kB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

tsinfer-0.5.1-cp311-cp311-macosx_10_9_x86_64.whl (164.9 kB view details)

Uploaded CPython 3.11macOS 10.9+ x86-64

File details

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

File metadata

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

File hashes

Hashes for tsinfer-0.5.1.tar.gz
Algorithm Hash digest
SHA256 c6c6b1b658ed24a08eb8017a92b67e5bef07009b439c78eab294e144faf2df30
MD5 0c98e42f7ff2f72f37abaae8fb4baa1d
BLAKE2b-256 0a291540bb7c26c7a0bbc08a2d79869ebe7fea7adbd94dfaab5da229dee1e2e3

See more details on using hashes here.

Provenance

The following attestation bundles were made for tsinfer-0.5.1.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.1-cp313-cp313-win_amd64.whl.

File metadata

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

File hashes

Hashes for tsinfer-0.5.1-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 f2f05fc5d91b0ac6601cbb7e0fe72d282aa3a91a021140dec2759292fbcb1c4c
MD5 1d3fe539af3ce68d9186f6ad64e87246
BLAKE2b-256 c263a8aced1d9d273a7a49c8dff602d6376c28d9db579c3dc8b2841dda7652c4

See more details on using hashes here.

Provenance

The following attestation bundles were made for tsinfer-0.5.1-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.1-cp313-cp313-win32.whl.

File metadata

  • Download URL: tsinfer-0.5.1-cp313-cp313-win32.whl
  • Upload date:
  • Size: 137.7 kB
  • Tags: CPython 3.13, Windows x86
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for tsinfer-0.5.1-cp313-cp313-win32.whl
Algorithm Hash digest
SHA256 fe6bdc633366a0738f8cf244fec906bf40b4e454c2bb627147817972b33a17f6
MD5 ce2bc158509e0d0f777c2a71266acebf
BLAKE2b-256 09e1c31629df71412004aa042e81f2821f96ee10f7e5b1fcfc9490cb9a86f360

See more details on using hashes here.

Provenance

The following attestation bundles were made for tsinfer-0.5.1-cp313-cp313-win32.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.1-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for tsinfer-0.5.1-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 5f0331bb8ce2b451b1741248c221e830f19b9cdae87e54d070477c0dedb392a2
MD5 753368beeb98f189c25749f9baee51e8
BLAKE2b-256 f331e9f6d5bf77d27d0312e927015d7a4f3ea0bf39a46084571cfce1db9651f7

See more details on using hashes here.

Provenance

The following attestation bundles were made for tsinfer-0.5.1-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_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.1-cp313-cp313-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for tsinfer-0.5.1-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 919802809179850534640806c25f804e6565439f13371628b8d4d0f34ccccbf2
MD5 9d5c522b88e140e666feb09be82c5f1e
BLAKE2b-256 fc733520cd0e53c58f19a0e1c451e16f7ea5adc627e46340616ce36cc7966c86

See more details on using hashes here.

Provenance

The following attestation bundles were made for tsinfer-0.5.1-cp313-cp313-macosx_11_0_arm64.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.1-cp313-cp313-macosx_10_13_x86_64.whl.

File metadata

File hashes

Hashes for tsinfer-0.5.1-cp313-cp313-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 9befdee01fefb92d91138d0b8ab49650a81542b7289010b0971fbee8559efce8
MD5 13d77f0d42b514aebdcabd878ade2304
BLAKE2b-256 6b94d0cda70275c06263c5b129769e7c3c9a49e60880addc435ba364053442f0

See more details on using hashes here.

Provenance

The following attestation bundles were made for tsinfer-0.5.1-cp313-cp313-macosx_10_13_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.1-cp312-cp312-win_amd64.whl.

File metadata

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

File hashes

Hashes for tsinfer-0.5.1-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 90490041882f31c7ed7334230430da14cc426edbfae28f2ebc88c36c428cae0e
MD5 b7fd59073d29303adbb1c6cede4c2383
BLAKE2b-256 ff9de14f481f0b93150b346d66446d8834abdbe0fc9d10b690db336b5756c76d

See more details on using hashes here.

Provenance

The following attestation bundles were made for tsinfer-0.5.1-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.1-cp312-cp312-win32.whl.

File metadata

  • Download URL: tsinfer-0.5.1-cp312-cp312-win32.whl
  • Upload date:
  • Size: 137.6 kB
  • Tags: CPython 3.12, Windows x86
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for tsinfer-0.5.1-cp312-cp312-win32.whl
Algorithm Hash digest
SHA256 327999e205e670ee342158a518b493edbc4d35b86cc81cf65dab0253915b9cfe
MD5 93a84b16e9bd230e722a1bda036277ed
BLAKE2b-256 1f75147414f17ded7127ea189e07d62dade0a018f196c9a05bc181c15598e67e

See more details on using hashes here.

Provenance

The following attestation bundles were made for tsinfer-0.5.1-cp312-cp312-win32.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.1-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for tsinfer-0.5.1-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 e0def60a001897c99ab85b101d343009b32f46b11905e288682d1717954ae36a
MD5 fc5e5e3f9a8b94e0aec4635a9990450e
BLAKE2b-256 e4271ffa21b39ec3d66f27e0986ca5b78f1b012b8f93ab26046fbcc631ef68fc

See more details on using hashes here.

Provenance

The following attestation bundles were made for tsinfer-0.5.1-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_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.1-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for tsinfer-0.5.1-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 9b4f3724ffaf248cdff0200bf99572b2cac40b5d6decb1c6b77083e4537b00c9
MD5 f37bf012b3516c93a9168589672ec432
BLAKE2b-256 0fdba296904680a9326c3ddad066088b6a095a9163573ff092658c5c52cf311f

See more details on using hashes here.

Provenance

The following attestation bundles were made for tsinfer-0.5.1-cp312-cp312-macosx_11_0_arm64.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.1-cp312-cp312-macosx_10_13_x86_64.whl.

File metadata

File hashes

Hashes for tsinfer-0.5.1-cp312-cp312-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 67d3258ce7392f07a2d202cc282e64120badb4fc13a50bf4962ddea3fb74f9bd
MD5 8fb1c546637cdad3a846f66ed95d2fd5
BLAKE2b-256 a823c955d0d4896ad46d16fbeb901dca3c9a758af84a944166af20dd525ce617

See more details on using hashes here.

Provenance

The following attestation bundles were made for tsinfer-0.5.1-cp312-cp312-macosx_10_13_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.1-cp311-cp311-win_amd64.whl.

File metadata

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

File hashes

Hashes for tsinfer-0.5.1-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 61d2705fb0861d7f9a455ee9e0ab95275ab8c0b41b2ae7270f2c3f3aed85771c
MD5 9a29d5e495517cba4e4202cdd1f760db
BLAKE2b-256 2516176e55d9babe6c58b67bafd9d0ee6450ce6c5d28406525bebddd5d5084f4

See more details on using hashes here.

Provenance

The following attestation bundles were made for tsinfer-0.5.1-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.1-cp311-cp311-win32.whl.

File metadata

  • Download URL: tsinfer-0.5.1-cp311-cp311-win32.whl
  • Upload date:
  • Size: 137.4 kB
  • Tags: CPython 3.11, Windows x86
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for tsinfer-0.5.1-cp311-cp311-win32.whl
Algorithm Hash digest
SHA256 1b5c6cb6b983d9639aefab9c0f71df2cb40e09de54938a903b02c28247daad4d
MD5 edafba03a1f1cd5e7a0391e9fbb3a9b7
BLAKE2b-256 9ac551250c24a2367c21850a38a036ac7dc04fa2e9bbfbf98672a3ea2c3d2f59

See more details on using hashes here.

Provenance

The following attestation bundles were made for tsinfer-0.5.1-cp311-cp311-win32.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.1-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for tsinfer-0.5.1-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 68da9ef192a0ce8ee853b889dd70f6fbd1f097b3dbf93088dffdfa036907782f
MD5 9f5d74a7ecf0c61c95441034c06598ed
BLAKE2b-256 5f4b5c2ffa94d3f0df4ac167f6ab85c1b854a19faedbf617118cbaff47ddbbd4

See more details on using hashes here.

Provenance

The following attestation bundles were made for tsinfer-0.5.1-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_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.1-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for tsinfer-0.5.1-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 66fdd65627334f4642e87ef1ebc7144d5f76ae8b9af103f3641c61dd08de27b5
MD5 75281b2e4e7bdc5a1699f79c10624955
BLAKE2b-256 25cfebc6523b2e816556185569c4096fb85c9659e06660da532271aa799e595b

See more details on using hashes here.

Provenance

The following attestation bundles were made for tsinfer-0.5.1-cp311-cp311-macosx_11_0_arm64.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.1-cp311-cp311-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for tsinfer-0.5.1-cp311-cp311-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 d77241881c191525026fec53daeaefd28aa86c171bf91a9fe5c1be385503d0ed
MD5 ebaa24f302b7ad19190245a246926fe6
BLAKE2b-256 d949bd447115b9d4bda2de09cd3723be9b9c686fa4ca47ade2ffed83d4390e22

See more details on using hashes here.

Provenance

The following attestation bundles were made for tsinfer-0.5.1-cp311-cp311-macosx_10_9_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.

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