Entering edit mode
20 months ago
Eliza
▴
40
Hi Hi , I have data that has 3 column SNPs their gene based on Annovar and a pvalue for every SNP . What I would like is to aggregate the p values for every gene. I used simes method in R : https://rdrr.io/cran/mppa/man/simes.test.html:
and this is my code :
pvals <- tapply(df$p.value, df$Gene.refGene_ANNOVAR, c)
# Apply Simes method to each gene
simes_pvals <- sapply(pvals, simes.test)
# Correct for multiple testing
simes_corrected <- p.adjust(simes_pvals, method = "fdr")
# View results
results <- data.frame(gene = names(pvals), pvalue = simes_pvals, fdr = simes_corrected)
I noticed something weird: some of the pvals are larger then 1 , how can it be ? For example for the pvalues 0.77,0.964,0.964,0.964 it returns 1.28 would be happy if you could share your knowledge in this situation .(the df data didny have pvalues >1)