Skip to main content

Computes Tajimas D, the Pi- or Watterson-Estimator for multiple sequences.

Project description

tajimas-d

Compute the Tajima's-D, Pi-Estimator or Watterson-Estimator for multiple sequences.

Test Badge Python Version Badge Download Badge Code style: black

Tajima's D is a population genetic test statistic that computes the difference between the mean number of pairwise differences and the number of segregating sites. It is used to determine whether a population is expanding or shrinking.

Tajima's D

Tajima's D is defined as follows:

Tajima

If expanding, there are many rare variants, indicating an expanding population.

Whereas declining, indicates an declining population as there are many intermediate variants.

A result is consideres significant if declining-sig or expanding-sig.

Pi-Estimator

The π estimator is the average number of pairwise differences between any two sequences:

Pi

Watterson-Estimator

The Watterson estimator is the expected number of segregating sites.

Watterson

Installation

Using pip / pip3:

pip install tajimas_d

Using conda:

conda install -c bioconda tajimas_d

Or by source:

git clone git@github.com:not-a-feature/tajimas_d.git
cd tajimas_d
pip install .

How to use

from tajimas_d import tajimas_d, watterson_estimator, pi_estimator

sequences = ["AAAA", "AAAT", "AAGT", "AAGT"]

theta_tajima = tajimas_d(sequences)
theta_pi = pi_estimator(sequences)
theta_w = watterson_estimator(sequences)

Standalone version

usage: tajimas_d [-h] -f PATH [-p] [-t] [-w]

tajimas_d: Compute Tajima's D, the Pi- or Watterson-Estimator for multiple
sequences.

optional arguments:
  -h, --help            show this help message and exit
  -f PATH, --file PATH  Path to fasta file with all sequences.
  -p, --pi              Compute the Pi-Estimator score.
  -t, --tajima          Compute the Pi-Estimator score. (default)
  -w, --watterson       Compute the Watterson-Estimator score.

License

Copyright (C) 2022 by Jules Kreuer - @not_a_feature
This piece of software is published unter the GNU General Public License v3.0
TLDR:

| Permissions      | Conditions                   | Limitations |
| ---------------- | ---------------------------- | ----------- |
| ✓ Commercial use | Disclose source              | ✕ Liability |
| ✓ Distribution   | License and copyright notice | ✕ Warranty  |
| ✓ Modification   | Same license                 |             |
| ✓ Patent use     | State changes                |             |
| ✓ Private use    |                              |             |

Go to LICENSE.md to see the full version.

Dependencies

In addition to packages included in Python 3, this piece of software uses 3rd-party software packages for development purposes that are not required in the published version. Go to DEPENDENCIES.md to see all dependencies and licenses.

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

tajimas_d-2.0.0.tar.gz (18.0 kB view details)

Uploaded Source

Built Distribution

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

tajimas_d-2.0.0-py3-none-any.whl (18.0 kB view details)

Uploaded Python 3

File details

Details for the file tajimas_d-2.0.0.tar.gz.

File metadata

  • Download URL: tajimas_d-2.0.0.tar.gz
  • Upload date:
  • Size: 18.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.15

File hashes

Hashes for tajimas_d-2.0.0.tar.gz
Algorithm Hash digest
SHA256 b006387d35ce4df10b07b53dcc84cc4b0be97b050665518fda5dce8b0028ca48
MD5 cf09a8c448cf579a1bbd7c32dba16831
BLAKE2b-256 62bf46c13b5a781b197a5e3f417786f47ea6d6569c688ab18ff0921f734b653b

See more details on using hashes here.

File details

Details for the file tajimas_d-2.0.0-py3-none-any.whl.

File metadata

  • Download URL: tajimas_d-2.0.0-py3-none-any.whl
  • Upload date:
  • Size: 18.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.15

File hashes

Hashes for tajimas_d-2.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f2180a02e098cd1f5087e630fe896d1d8e7d60b00a957f0c3d7ad2293d991825
MD5 f57dee248154e86ddc4f074c9408c84a
BLAKE2b-256 abc29169560d3ba17eb8bd48a2fb61ef7c95f75076a9b3130ce3091aea093db6

See more details on using hashes here.

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