Metadata-Version: 2.4
Name: tsinfer
Version: 0.4.2
Summary: Infer tree sequences from genetic variation data.
Home-page: https://tskit.dev/tsinfer
Author: Tskit Developers
Author-email: Tskit Developers <admin@tskit.dev>
License: GNU GPLv3+
Project-URL: Homepage, https://tskit.dev/tsinfer
Project-URL: Documentation, https://tskit.dev/tsinfer/docs/stable
Project-URL: Changelog, https://tskit.dev/tsinfer/docs/stable/CHANGELOG.html
Project-URL: Bug Tracker, https://github.com/tskit-dev/tsinfer/issues
Project-URL: Source Code, https://github.com/tskit-dev/tsinfer/
Keywords: population genetics,tree sequence,ancestral recombination graph,evolutionary tree,inference,tsinfer
Platform: POSIX
Platform: Windows
Platform: MacOS X
Classifier: Programming Language :: C
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)
Classifier: Development Status :: 3 - Alpha
Classifier: Environment :: Other Environment
Classifier: Intended Audience :: Science/Research
Classifier: Operating System :: POSIX
Classifier: Operating System :: MacOS :: MacOS X
Classifier: Operating System :: Microsoft :: Windows
Classifier: Topic :: Scientific/Engineering
Classifier: Topic :: Scientific/Engineering :: Bio-Informatics
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: numpy>=1.23.5
Requires-Dist: six
Requires-Dist: tqdm
Requires-Dist: humanize
Requires-Dist: daiquiri
Requires-Dist: tskit>=0.5.3
Requires-Dist: numcodecs<0.15.1,>=0.6
Requires-Dist: zarr!=2.11.0,!=2.11.1,!=2.11.2,<3,>=2.2
Requires-Dist: lmdb
Requires-Dist: sortedcontainers
Requires-Dist: attrs>=19.2.0
Requires-Dist: numba>=0.61.0
Requires-Dist: psutil>=5.9.0
Provides-Extra: test
Requires-Dist: build==1.2.2.post1; extra == "test"
Requires-Dist: colorama==0.4.6; extra == "test"
Requires-Dist: daiquiri==3.2.5.1; extra == "test"
Requires-Dist: humanize==4.12.1; extra == "test"
Requires-Dist: lmdb==1.6.2; extra == "test"
Requires-Dist: matplotlib==3.9.4; extra == "test"
Requires-Dist: meson==1.7.0; extra == "test"
Requires-Dist: msprime==1.3.4; extra == "test"
Requires-Dist: pytest==8.3.5; extra == "test"
Requires-Dist: pytest-cov==6.0.0; extra == "test"
Requires-Dist: seaborn==0.13.2; extra == "test"
Requires-Dist: sgkit[vcf]==0.9.0; sys_platform != "win32" and extra == "test"
Requires-Dist: tskit==0.6.0; extra == "test"
Requires-Dist: tqdm==4.67.1; extra == "test"
Requires-Dist: twine==6.1.0; extra == "test"
Provides-Extra: docs
Requires-Dist: jupyter-book==1.0.4.post1; extra == "docs"
Requires-Dist: sphinx-issues==5.0.0; extra == "docs"
Requires-Dist: sphinx-argparse==0.5.2; extra == "docs"
Requires-Dist: humanize==4.12.1; extra == "docs"
Requires-Dist: lmdb==1.6.2; extra == "docs"
Requires-Dist: tqdm==4.67.1; extra == "docs"
Requires-Dist: daiquiri==3.3.0; extra == "docs"
Requires-Dist: msprime==1.3.3; extra == "docs"
Requires-Dist: sgkit[vcf]==0.9.0; extra == "docs"
Requires-Dist: ipywidgets==8.1.5; extra == "docs"
Requires-Dist: Bio==1.7.1; extra == "docs"
Requires-Dist: bio2zarr==0.1.4; extra == "docs"
Requires-Dist: sphinx-book-theme; extra == "docs"
Requires-Dist: pyfaidx==0.8.1.3; extra == "docs"
Provides-Extra: dev
Requires-Dist: attrs; extra == "dev"
Requires-Dist: codecov; extra == "dev"
Requires-Dist: coverage; extra == "dev"
Requires-Dist: flake8; extra == "dev"
Requires-Dist: six; extra == "dev"
Requires-Dist: tqdm; extra == "dev"
Requires-Dist: humanize; extra == "dev"
Requires-Dist: daiquiri; extra == "dev"
Requires-Dist: msprime>=1.0.0; extra == "dev"
Requires-Dist: tskit>=0.5.3; extra == "dev"
Requires-Dist: lmdb; extra == "dev"
Requires-Dist: pre-commit; extra == "dev"
Requires-Dist: pytest; extra == "dev"
Requires-Dist: pytest-coverage; extra == "dev"
Requires-Dist: h5py; extra == "dev"
Requires-Dist: sortedcontainers; extra == "dev"
Requires-Dist: python-prctl; sys_platform == "linux" and extra == "dev"
Requires-Dist: numa; sys_platform == "linux" and extra == "dev"
Requires-Dist: sphinx; extra == "dev"
Requires-Dist: sphinx-argparse; extra == "dev"
Requires-Dist: sphinx_rtd_theme; extra == "dev"
Requires-Dist: setuptools>=45; extra == "dev"
Requires-Dist: setuptools_scm; extra == "dev"
Requires-Dist: matplotlib; extra == "dev"
Requires-Dist: seaborn; extra == "dev"
Requires-Dist: colorama; extra == "dev"
Requires-Dist: sgkit[vcf]; extra == "dev"
Requires-Dist: sphinx-book-theme; extra == "dev"
Requires-Dist: jupyter-book; extra == "dev"
Requires-Dist: sphinx-issues; extra == "dev"
Requires-Dist: ipywidgets; extra == "dev"
Requires-Dist: pyfaidx; extra == "dev"
Dynamic: license-file

# tsinfer <img align="right" width="145" height="90" src="https://raw.githubusercontent.com/tskit-dev/tsinfer/main/docs/tsinfer_logo.svg">

[![License](https://img.shields.io/github/license/tskit-dev/tsinfer)](https://github.com/tskit-dev/tsinfer/blob/main/LICENSE) [![PyPI version](https://img.shields.io/pypi/v/tsinfer.svg)](https://pypi.org/project/tsinfer/) [![Supported Python Versions](https://img.shields.io/pypi/pyversions/tsinfer.svg)](https://pypi.org/project/tsinfer/) [![Docs Build](https://github.com/tskit-dev/tsinfer/actions/workflows/docs.yml/badge.svg)](https://github.com/tskit-dev/tsinfer/actions/workflows/docs.yml) [![Binary wheels](https://github.com/tskit-dev/tsinfer/actions/workflows/wheels.yml/badge.svg)](https://github.com/tskit-dev/tsinfer/actions/workflows/wheels.yml) [![Tests](https://github.com/tskit-dev/tsinfer/actions/workflows/tests.yml/badge.svg)](https://github.com/tskit-dev/tsinfer/actions/workflows/tests.yml) [![codecov](https://codecov.io/gh/tskit-dev/tsinfer/branch/main/graph/badge.svg)](https://codecov.io/gh/tskit-dev/tsinfer)


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 ([stable](https://tskit.dev/tsinfer/docs/stable/) • [latest](https://tskit.dev/tsinfer/docs/latest/)) contains details of how to use this software, including [installation instructions](https://tskit.dev/tsinfer/docs/stable/installation.html).

## Installation

```bash
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](https://doi.org/10.1038/s41588-019-0483-y):

> 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](https://github.com/tskit-dev/tsinfer/releases/tag/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](https://doi.org/10.1126/science.abi8264):

> 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](https://github.com/mcveanlab/treeseq-inference).

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``](https://github.com/tskit-dev/tsdate).
