enrichplot icon indicating copy to clipboard operation
enrichplot copied to clipboard

Enrichment maps with custom p-value threshold

Open federicomarini opened this issue 3 years ago • 2 comments

Hi Guangchuang, thanks for the excellent package!

I was wondering if you can enable some more customizability in the enrichment map function, emapplot, e.g. to allow considering gene sets that have a not so strict adjusted p-value.

Would it be possible? I guess this can be done at the point where you select out the rows from the enrichResult object, https://github.com/YuLab-SMU/enrichplot/blob/7313fe97bd0ed1f9709c89fc6a4b6eb3d1f02c17/R/emapplot.R#L112

Thanks in advance for considering this thought! Federico

federicomarini avatar Jul 30 '20 09:07 federicomarini

Hi, all kinds of filtering can be done on the "enrichResult" object before drawing the plot. They have developed multiple "dplyr verbs" including the filter which can be applied directly on "enrichResult" object, for example:

data(geneList, package = "DOSE")
de <- names(geneList)[1:100]
yy <- enrichGO(de, 'org.Hs.eg.db', ont = "BP", pvalueCutoff = 0.01)
emapplot(filter(yy, p.adjust < 5e-20))

Ning-L avatar Sep 17 '20 15:09 Ning-L

I'll try that, thanks! Would the verbs also work in a more liberal way, i.e. if I want to include more gene sets than the classical threshold?

federicomarini avatar Sep 17 '20 16:09 federicomarini