Rosemeis / pcangsd

Framework for analyzing low depth NGS data in heterogeneous populations using PCA.
GNU General Public License v3.0
46 stars 11 forks source link

Confussion between tutorials #67

Closed Ittybittyweeny closed 1 year ago

Ittybittyweeny commented 1 year ago

Hi!! When trying to follow the tutorial http://www.popgen.dk/software/index.php/PCAngsdTutorial#Demo_2:_Selection and after loading the selection.npy, it says

"# convert test statistic to p-value pval<-1-pchisq(s,1)"

But when following the github software front page https://github.com/Rosemeis/pcangsd the p values are obtained differently "# Obtain p-values from selection scan p <- pchisq(D, 1, lower.tail=FALSE)"

which is the correct method to follow? I am guessing is the one in github since it is more updated, but just to be sure. Thanks!

Rosemeis commented 1 year ago

Hi,

Yes the Github page is more updated! But in regards to your question then it will produce the same results, however the last option ("p <- pchisq(D, 1, lower.tail=FALSE)") will produce higher precision.

Best, Jonas

Ittybittyweeny commented 1 year ago

Thank you! Feel free to close this issue.