Closed complexgenome closed 4 years ago
Dear Sariya,
You almost got there.
You should be correcting for the actual number of tests in cis-eQTL analysis.
It is reported in me$cis$eqtls$pvalue
. Here is the code confirming the FDR you'd get is the same.
me$cis$eqtls$FDR_p.adjust = p.adjust(p = me$cis$eqtls$pvalue, n = me$cis$ntests, method = "fdr")
range( me$cis$eqtls$FDR_p.adjust / me$cis$eqtls$FDR )
# 1 1
Andrey
hi there devs,
Thanks for this awesome package. I'm using ~120 genes and ~44K SNPs to perform cis eqtl analysis. I use 2Mb as cis eqtl boundary.
After analysis, I extract cis eqtls. However, I'd like to replicate the FDr generated by the matrix eqtl function. First, I use
p.adjust
methodFDR
in the output the p-value are little off (better).df_eqtl_jointed$TEST_FDR<-p.adjust(p=df_eqtl$pvalue,n=nrow(df_eqtl),method="fdr")
Number of rows in the cis eqtl output= 129196
If I use the number of tests when calculating FDR,
head(me$param)
p.adjust(p=df_eqtl_jointed$pvalue,n=30385434,method="fdr")
I'm interested to know on FDR because I'd subset genes from the analysis. So, knowing correct method would help me to calculate FDR for them separately.
Also, in the output, is FDR calculated for each gene individually? Just curious.
Thank you.