0

I have a data frame with ~500 rows which the structure looks as below:

head(df)


          nGenes
Aff4a        4
Aff4b        5
Arid3a       7
Arid3b       3

I performed the binomial test as on each row of the column nGenes and got a p-value for each of them using:

binom.test(a, b, p, alternative= c("two.sided"), conf.level = 0.95)$p.value

Based on this test I have around 20 rows with a significant p-value (<0.05) and now I am looking for a simple solution to slim down the list. I thought about the Bonferroni correction method. Would a simple solution like this work?

p.adjust(pvalues,method="bonferroni")

Or is there a more effective and efficient approach to do what I meant? Thanks.

JayPeerachai
  • 3,499
  • 3
  • 14
  • 29
Apex
  • 1,055
  • 4
  • 22
  • 3
    That makes sense what you're doing, you might want to use `p.adjust(., method='BH')`, though which is common in genomics. – jay.sf Oct 03 '22 at 12:33

0 Answers0