bcm-uga / pcadapt

Performing highly efficient genome scans for local adaptation with R package pcadapt v4
https://bcm-uga.github.io/pcadapt
37 stars 10 forks source link

Histogram of the P values #60

Closed domag closed 3 years ago

domag commented 3 years ago

Dear Florian Privé, is it possible that the analysis with PCAdapt of a dataset fitting a hierarchical island model of population structure might lead to an histogram of P values that is U shaped (i.e., with an excess of values close to 0 and close to 1) ?

thank you very much in advance for your time and help

Dom

privefl commented 3 years ago

Please include more details.

It can be that the p-values are over-corrected (using the genomic inflation factor). You can also try looking at the ones without GIF correction.

domag commented 3 years ago

Dear Florian, I followed your suggestion. When considering P values NOT corrected for the genomic inflation factor (as you suggested) the histogram of P values showed a uniform distribution. Thus, as you argued, using GIF led to over-correction of P values. Could I consider these uncorrected P values for subsequent analyses? Thank you again Dom

privefl commented 3 years ago

If the histogram looks okay, yes I think just use the uncorrected ones.

domag commented 3 years ago

Thank you again for your help!! all the best Dom

nealplatt commented 3 years ago

Hi Florian. Sorry for reviving this closed issue but I am seeing a similar "U" shaped-distribution where the majority of my pvalues are in the smallest bin. Where exactly are the GIF-corrected and uncorrected pvalues stored? Or are they derived from the $pvalues and $gif?

I'm getting a much larger than expected number of SNP outliers even after multiple test correction.

Thanks in advance.

                Length Class  Mode   
scores            270  -none- numeric
singular.values     2  -none- numeric
loadings        76404  -none- numeric
zscores         76404  -none- numeric
af              38202  -none- numeric
maf             38202  -none- numeric
chi2.stat       38202  -none- numeric
stat            38202  -none- numeric
gif                 1  -none- numeric
pvalues         38202  -none- numeric
pass            38202  -none- numeric
privefl commented 3 years ago

Please have a look at the tutorial (https://bcm-uga.github.io/pcadapt/articles/pcadapt.html) to know what's what in the output.