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.6.tar.gz (384.4 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.6-py3-none-any.whl (99.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: tsdate-0.2.6.tar.gz
  • Upload date:
  • Size: 384.4 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.6.tar.gz
Algorithm Hash digest
SHA256 97c38a2d5152e3285c37e627b3d29aeedbfd4fccba7bd7e88f00bd7696a604b4
MD5 a598b2b30336bd096447425954028870
BLAKE2b-256 014ec591d736020e85fe49fde5d216ce49242b0820e2946614808d86e240899c

See more details on using hashes here.

Provenance

The following attestation bundles were made for tsdate-0.2.6.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.6-py3-none-any.whl.

File metadata

  • Download URL: tsdate-0.2.6-py3-none-any.whl
  • Upload date:
  • Size: 99.9 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.6-py3-none-any.whl
Algorithm Hash digest
SHA256 a3879ef251c9d63aa3f3618e04c61f76641608a56e093a9bb17c43e7a300d52f
MD5 2e042d6ddf92756c87c1fbacc365d5b4
BLAKE2b-256 445e8b36cf904d8686b5fd26636b67d2cbbc12e5744d671834be57246483cdd7

See more details on using hashes here.

Provenance

The following attestation bundles were made for tsdate-0.2.6-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