Skip to content

Commit

Permalink
Merge pull request #11 from not-a-feature/not-a-feature-patch-1
Browse files Browse the repository at this point in the history
Update README.md to new math mode
  • Loading branch information
not-a-feature committed Apr 25, 2024
2 parents fe3a6c1 + cf7bf35 commit 9a88c8c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
13 changes: 6 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,24 +13,23 @@ Tajima's D is a population genetic test statistic that computes the difference b

## 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})}}$

![Tajima](https://render.githubusercontent.com/render/math?math=\theta_\text{Tajima}=\frac{\theta_{\pi}%20-%20\theta_{W}}{\sqrt{\text{Var}(\theta_{\pi}-\theta_{W})}})
If $\theta_\text{Tajima}<0$, there are many rare variants, indicating an **expanding** population.

If ![expanding](https://render.githubusercontent.com/render/math?math=\theta_\text{Tajima}<0), there are many rare variants, indicating an **expanding** population.
Whereas $0<\theta_\text{Tajima}$, indicates an **declining** population as there are many intermediate variants.

Whereas ![declining](https://render.githubusercontent.com/render/math?math=0<\theta_\text{Tajima}), indicates an **declining** population as there are many intermediate variants.

A result is consideres significant if ![declining-sig](https://render.githubusercontent.com/render/math?math=\theta_\text{Tajima}<-2) or ![expanding-sig](https://render.githubusercontent.com/render/math?math=2<\theta_\text{Tajima}).
A result is consideres significant if $\theta_\text{Tajima}<-2$ or $2<\theta_\text{Tajima}$.

## Pi-Estimator
The π estimator is the average number of pairwise differences between any two sequences:

![Pi](https://render.githubusercontent.com/render/math?math=\theta_{\pi}=\frac{\text{Nr.%20of%20pairwise%20differences}}{\binom{n}{2}})
$\theta_{\pi}=\frac{\text{Nr. of pairwise differences}}{\binom{n}{2}}$

## Watterson-Estimator
The Watterson estimator is the expected number of segregating sites.

![Watterson](https://render.githubusercontent.com/render/math?math=\theta_{\W}=\frac{\text{Nr.%20of%20segregating%20sites}}{\sum^{n-1}_{i=1}\frac{1}{i}})
$\theta_{W}=\frac{\text{Nr. of segregating sites}}{\Sigma_{i=1}^{n-1}\frac{1}{i}}$

## Installation
Using pip / pip3:
Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[metadata]
name = tajimas_d
version = 2.0.1
version = 2.0.2
description = Computes Tajimas D, the Pi- or Watterson-Estimator for multiple sequences.
long_description = file: README.md
long_description_content_type=text/markdown
Expand Down

0 comments on commit 9a88c8c

Please sign in to comment.