Hi everyone,
I am trying to do an enrichment analysis with R and compare two protein sets. I have used the compareCluster function from the clusterProfiler package. The plot of my results looks like this image (I got it from the clusterProfiler vignette). The color code indicates the p-adjusted values. I would like to know what is the adjustment method used by compareCluster and how are the p-values calculated. I could find examples on how to use this function, but not a detailed explanation on the statistical analysis. Thank you in advance for the help.
1 answer
I will consider you are using fun = "enrichGO" in compareCluster (which is the default) and that you are not passing pAdjustMethod as an extra argument to compareCluster.
From what I could understand from their source code, the short answer is that it is simply using p.adjust (from package stats) with method = "BH". The man page for p.adjust points to this reference for said method.
This is true for fun = "enrichGO" which uses the enrichGO function whose default method of adjusting the p-value is by calling p.adjust passing method = "BH" as argument. You can change the adjusting method by passing pAdjustMethod with a different value to compareCluster (check p.adjust man page for a list of adjustment methods).
Of course, if you are using another fun, then you will need to check their relevant documentation as to how they perform the p-value adjustment.
Log in to answer this question.