I learned that Tajima's D compares the sum of nucleotide diversities for each pair of genomes to the expected nucleotide diversity of that population. After a selective sweep, the population is more homogeneous and so mutations that do occur are rare ones, meaning theta_T < theta_W and D<0. This made me think that one Tajima's D is calculated for an entire population.
However, I've also seen that you can calculate a Tajima's D for each individual in a population. My guess is that this individual statistic compares d_ij, where d is the pairwise difference b/w individuals i and j, to the population's Tajima's D?
Additionally, I've read that Tajima's D can be defined for individual genes, and also that: genes in the lower 5% tail of Tajima's D --> likely targets of selection. So how can Tajima's D be used to infer which genes are likely targets of selection? My guess is that Tajima's D is calculated on sliding windows along a genome.
2 answers
I have never come across Tajima's D calculated for a single individual. Theta, Pi and Tajima's D are population level properties. 5% outlier cutoff is often used when 5% is of the distribution of Tajima's D for all the genes. Yes calculations are usually performed on the sliding windows or per gene for a population. I am quite happy with Variscan for doing this http://www.ub.edu/softevol/variscan/
You can use this tool called vcf2tajima https://github.com/xoaib4/vcf2tajima You can further customize it by reading their paper: https://doi.org/10.3390/mps7040057
Log in to answer this question.