Question: How are the p-adjusted values calculated with the compareCluster function in R?
gravatar for Expe
2.2 years ago by
Expe10 wrote:

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.

ADD COMMENTlink modified 2.2 years ago by dppb0590 • written 2.2 years ago by Expe10
gravatar for dppb05
2.2 years ago by
dppb0590 wrote:

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.

ADD COMMENTlink written 2.2 years ago by dppb0590
Please log in to add an answer.


Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1427 users visited in the last hour