Skip to main content

Infer node ages from a tree sequence topology.

Project description

tsdate

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

tsdate is a scalable method for estimating the age of ancestral nodes in a tree sequence. The method uses a coalescent prior and updates node times on the basis of the number of mutations along each edge of the tree sequence (i.e. using the "molecular clock").

The method is frequently combined with the tsinfer algorithm, which efficiently infers tree sequence topologies from large genetic datasets.

Please refer to the documentation (stablelatest) for information on installing and using the software.

Installation

python -m pip install tsdate

If using the variational_gamma algorithm (the default from version 0.2 onwards), please cite the preprint:

Nathaniel S. Pope, Sam Tallman, Ben Jeffery, Duncan Robertson, Yan Wong, Savita Karthikeyan, Peter L. Ralph, and Jerome Kelleher (2026) Tracing the evolutionary histories of ultra-rare variants using variational dating of large ancestral recombination graphs. bioRxiv: 2026.01.07.698223; doi: https://doi.org/10.64898/2026.01.07.698223

The algorithms for the original inside_outside and maximization methods (the default prior to version 0.2) are described in this Science paper (citation below, preprint here, evaluations in another repository).

The citation to use for the original tsdate algorithms is:

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; doi: https://doi.org/10.1126/science.abi8264

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

tsdate-0.2.7.tar.gz (385.2 kB view details)

Uploaded Source

Built Distribution

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

tsdate-0.2.7-py3-none-any.whl (99.8 kB view details)

Uploaded Python 3

File details

Details for the file tsdate-0.2.7.tar.gz.

File metadata

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

File hashes

Hashes for tsdate-0.2.7.tar.gz
Algorithm Hash digest
SHA256 9cc0c09db3d6bc65bd53f3fe2736b2a6614cc7cce0fc83237e5fdf2fec527257
MD5 cfe0d1a587232c6170f9535183186447
BLAKE2b-256 a8c9efb3c119adda693064c5076a52d3c336de30a0fc67fd1bfab86ef5a26dd7

See more details on using hashes here.

Provenance

The following attestation bundles were made for tsdate-0.2.7.tar.gz:

Publisher: wheels.yml on tskit-dev/tsdate

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

File details

Details for the file tsdate-0.2.7-py3-none-any.whl.

File metadata

  • Download URL: tsdate-0.2.7-py3-none-any.whl
  • Upload date:
  • Size: 99.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for tsdate-0.2.7-py3-none-any.whl
Algorithm Hash digest
SHA256 62898fa50edaeab8ef9a17f8ba3ff2df8b689265ed630d3a9090ea7bbbecd0b0
MD5 95a2beaa234a877b5321a0aa3ee48988
BLAKE2b-256 2a661e23d4f2622a984969d40ad30c11380ecfbf820ba4dceb31f415fea1737d

See more details on using hashes here.

Provenance

The following attestation bundles were made for tsdate-0.2.7-py3-none-any.whl:

Publisher: wheels.yml on tskit-dev/tsdate

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