Compute the Tajima’s-D, Pi-Estimator or Watterson-Estimator for multiple sequences.
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:
\theta_\text{Tajima}=\frac{\theta_{\pi}%20-%20\theta_{W}}{\sqrt{\text{Var}(\theta_{\pi}-\theta_{W})}}
If θTajima<0, there are many rare variants, indicating an expanding population.
Whereas 0<θTajima, indicates an declining population as there are many intermediate variants.
A result is consideres significant if θTajima<−2 or 2<θTajima.
Pi-Estimator
The π estimator is the average number of pairwise differences between any two sequences:
θπ=(2n)Nr. of pairwise differences
Watterson-Estimator
The Watterson estimator is the expected number of segregating sites.
θW=Σi=1n−1i1Nr. of segregating sites
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 .
The standalone version requires miniFasta>=2.2 to be installed.
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) 2024 by Jules Kreuer - @not_a_feature
This piece of software is published unter the GNU General Public License v3.0
TLDR:
Compute the Tajima’s-D, Pi-Estimator or Watterson-Estimator for multiple sequences.
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: \theta_\text{Tajima}=\frac{\theta_{\pi}%20-%20\theta_{W}}{\sqrt{\text{Var}(\theta_{\pi}-\theta_{W})}}
If θTajima<0, there are many rare variants, indicating an expanding population.
Whereas 0<θTajima, indicates an declining population as there are many intermediate variants.
A result is consideres significant if θTajima<−2 or 2<θTajima.
Pi-Estimator
The π estimator is the average number of pairwise differences between any two sequences:
θπ=(2n)Nr. of pairwise differences
Watterson-Estimator
The Watterson estimator is the expected number of segregating sites.
θW=Σi=1n−1i1Nr. of segregating sites
Installation
Using pip / pip3:
Using conda:
Or by source:
How to use
Standalone version
The standalone version requires
miniFasta>=2.2to be installed.License
Copyright (C) 2024 by Jules Kreuer - @not_a_feature
This piece of software is published unter the GNU General Public License v3.0 TLDR:
Go to LICENSE.md to see the full version.