<p>While I can't explain it to you directly, you might check out the section on theta estimators in <a href="https://bmcbioinformatics.biomedcentral.com/articles/10.1186/1471-2105-14-289" rel="nofollow noreferrer">Korneliussen et al. (2013)</a> which is cited on the above ANGSD wiki page. The equation for this estimator in this paper traces back to the <a href="https://www.ncbi.nlm.nih.gov/pmc/articles/PMC1203831/pdf/ge1233585.pdf" rel="nofollow noreferrer">original Tajima (1989).</a></p>

CC BY-SA 4.0
2022-01-27T18:46:16.687Z
2022-01-27T18:46:16.687Z
bishopia
<p>I don't know Theta but Tajima D is a population genetics test that assumes constant sample size. When the number of segregating sites (non-conservative sites in an alignment) significantly differs from pi (Nei's p-distance between a pair of sequence) one possibility is selection given a constant population size.</p>
<p>What Tajima found was cool: under neutrality this relationship conforms to a beta distribution. Just to explain that again so the nucleotide differences between every pair of sequences in an alignment (pi) against the total number of possible mutations conforms to a beta distribution for a constant population size under neutrality.</p>
<p>Its a cool idea - like really cool - but the violations - any level of 'extinction' will skew the distribution, population movement and importantly so could a bias in sampling.</p>
<p>So what you get is a pair-wise matrix at 5% critical probability. If your data entirely conformed to Tajima's D it would be an amazing result, but that is not the result you are looking for. So if Tajima D gave a particular pair &lt;0.05  AND it was supported by other tests THEN (sounds like code) it provides a basis to consider selection as an explanation.</p>
<p>Again I don't know Theta but if both tests were congruent for putative selection I'd say that was reasonable. However, Tajima D alone is not a cool result, its cool theory however but not cool in practice. I hope that explains it?</p>
<p>Note: did any one ever follow this up in trees? Cool if they did because there will be a relationship between the balance of a tree (e.g. Bayesian 'Skyline' plots) and Tajima D.</p>

CC BY-SA 4.0
2022-02-26T20:06:17.740Z
2022-02-26T21:46:51.807Z
2022-02-26T21:46:51.807Z
M__
<p>We were looking for genetic diversity in the exon level of an MHC transcript and analysing the data under <a href="http://www.popgen.dk/angsd/index.php/ANGSD" rel="nofollow noreferrer">ANGSD</a> (Analysis of next generation Sequencing Data) written in C++</p>
<p>We used ANGSD to calculate Thetas and Tajima D neutrality tests and one of the thetas was a pairwise theta, however I am unsure what this means and how it differs from Tajima's D?</p>
<p><a href="http://www.popgen.dk/angsd/index.php/Thetas,Tajima,Neutrality_tests" rel="nofollow noreferrer">http://www.popgen.dk/angsd/index.php/Thetas,Tajima,Neutrality_tests</a></p>
<p>We then divided the tP over length of each exon to find genetic diversity in the exon level. However, as I am very interested in statistics, if someone could explain what the tP statistic means exactly it would be highly appreciated.</p>

<r><phylogeny><phylogenetics><exon>
What is the tP statistic from ANGSD?
# What is the tP statistic from ANGSD?

(Asked by: username_0 on 2021-07-13)

We were looking for genetic diversity in the exon level of an MHC transcript and analysing the data under [ANGSD](http://www.popgen.dk/angsd/index.php/ANGSD) (Analysis of next generation Sequencing Data) written in C++

We used ANGSD to calculate Thetas and Tajima D neutrality tests and one of the thetas was a pairwise theta, however I am unsure what this means and how it differs from Tajima's D?

<http://www.popgen.dk/angsd/index.php/Thetas,Tajima,Neutrality_tests>

We then divided the tP over length of each exon to find genetic diversity in the exon level. However, as I am very interested in statistics, if someone could explain what the tP statistic means exactly it would be highly appreciated.

**Tags:** r, phylogeny, phylogenetics, exon

---

## 2 answers

### Answer by username_1 on 2022-01-27. Score: 1

While I can't explain it to you directly, you might check out the section on theta estimators in [Korneliussen et al. (2013)](https://bmcbioinformatics.biomedcentral.com/articles/10.1186/1471-2105-14-289) which is cited on the above ANGSD wiki page. The equation for this estimator in this paper traces back to the [original Tajima (1989).](https://www.ncbi.nlm.nih.gov/pmc/articles/PMC1203831/pdf/ge1233585.pdf)


---

### Answer by username_2 on 2022-02-26. Score: 0

I don't know Theta but Tajima D is a population genetics test that assumes constant sample size. When the number of segregating sites (non-conservative sites in an alignment) significantly differs from pi (Nei's p-distance between a pair of sequence) one possibility is selection given a constant population size.

What Tajima found was cool: under neutrality this relationship conforms to a beta distribution. Just to explain that again so the nucleotide differences between every pair of sequences in an alignment (pi) against the total number of possible mutations conforms to a beta distribution for a constant population size under neutrality.

Its a cool idea - like really cool - but the violations - any level of 'extinction' will skew the distribution, population movement and importantly so could a bias in sampling.

So what you get is a pair-wise matrix at 5% critical probability. If your data entirely conformed to Tajima's D it would be an amazing result, but that is not the result you are looking for. So if Tajima D gave a particular pair <0.05 AND it was supported by other tests THEN (sounds like code) it provides a basis to consider selection as an explanation.

Again I don't know Theta but if both tests were congruent for putative selection I'd say that was reasonable. However, Tajima D alone is not a cool result, its cool theory however but not cool in practice. I hope that explains it?

Note: did any one ever follow this up in trees? Cool if they did because there will be a relationship between the balance of a tree (e.g. Bayesian 'Skyline' plots) and Tajima D.


---

