Skip to main content

Compute the Tajimas-D, Pi-Estimator 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

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

Tajima's D

Tajima's D is defined as follows:

Tajima

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

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

Clone the repository and cd into it. Intall the requirements (miniFasta > 2.2, for fasta reading).

usage: tajimas-d.py [-h] -f PATH [-p] [-t] [-w]

tajimas-d: Compute the Tajima s-D, Pi-Estimator 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. (default)
  -t, --tajima          Compute the Pi-Estimator score.
  -w, --watterson       Compute the Watterson-Estimator score.

License

Copyright (C) 2021 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-1.0.0.tar.gz (16.8 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-1.0.0-py3-none-any.whl (16.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: tajimas_d-1.0.0.tar.gz
  • Upload date:
  • Size: 16.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.10.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.10

File hashes

Hashes for tajimas_d-1.0.0.tar.gz
Algorithm Hash digest
SHA256 7adabaf9f32aa35e41e68e05182c1b3329f47e3f97275f7705304e58834c9d64
MD5 948195866191bceed7ae019b765de61b
BLAKE2b-256 abb2c2673a6b32d44bb9a4435270209e55aab3c5232040fe673de37eba706fb6

See more details on using hashes here.

File details

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

File metadata

  • Download URL: tajimas_d-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 16.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.10.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.10

File hashes

Hashes for tajimas_d-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 fdd75133be80d2bc64815aa3c5ee73dd016702c01e07a5d6e538071839aeb873
MD5 0534ee2e764f7c3ba78028dc31ae7735
BLAKE2b-256 93bf227975178909b7308b8ac8262276245e1384e822914498c0ddd17ce2f892

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