ANGSD: Analysis of next generation Sequencing Data

Latest tar.gz version is (0.938/0.939 on github), see Change_log for changes, and download it here.

Thetas,Tajima,Neutrality tests

From angsd
Revision as of 02:55, 18 December 2012 by Thorfinn (talk | contribs)
Jump to navigation Jump to search

Angsd can estimate the Tajimas D and other neutrality test. Method works by using the posterior allele frequencies for every site, and uses these for calculating different per-site estimates of theta.

Due to the linearity the population scaled mutation rate is therefore the sum of the per-site estimates

To estimate the thetats do:

./angsd [other input] -realSFS 1 -doThetas 1 -prior prior.sfs.ml

The prior is an estimate of the .sfs which can be found using the [RealSFS] method in angsd The output is a file called .thetas.gz To perform the Tajimas D and other related neutralitet tests you should feed the .thetas.gz file into a seperate program called calcstat which can be found in the misc dir of the sourcecode


./calcStat24 -tinput file.thetas.gz -step 50000 -win 50000

Example Output

chr10 1 -7.041327 -7.362126 -6.399318 -8.788662 -7.840050 chr10 2 -8.337345 -8.921354 -7.358819 -11.052126 -9.502293 chr10 3 -9.283203 -9.945923 -8.207280 -12.281002 -10.546671 chr10 4 -1.105216 -0.617477 -35.602360 -0.730974 -0.672616 chr10 5 -7.705427 -8.374287 -6.622234 -10.726430 -8.976529 chr10 6 -11.683662 -12.369866 -10.578860 -14.766857 -12.975926 chr10 7 -11.688400 -12.374647 -10.583545 -14.771753 -12.980717 chr10 8 -12.989104 -13.675391 -11.884201 -16.072602 -14.281470 chr10 9 -13.682495 -14.368910 -12.577435 -16.766463 -14.975017 chr10 10 -1.105216 -0.655518 -37.649835 -0.982402 -0.805662 chr10 11 -14.433381 -15.119890 -13.328206 -17.517696 -15.726019 chr10 12 -14.410507 -15.097004 -13.305348 -17.494774 -15.703129 chr10 13 -14.963982 -15.650467 -13.858836 -18.048209 -16.256590 chr10 14 -15.657183 -16.343698 -14.552002 -18.741516 -16.949827 chr10 15 -15.762558 -16.449085 -14.657361 -18.846938 -17.055218 chr10 16 -1.105216 -0.766882 -12.373455 -1.539395 -1.080326 chr10 17 -15.876465 -16.563007 -14.771249 -18.960901 -17.169143 chr10 18 -17.256944 -17.943487 -16.151728 -20.341382 -18.549623