YuLab-SMU / biomedical-knowledge-mining-book

:books: Biomedical knowledge mining using GOSemSim and clusterProfiler
https://yulab-smu.top/biomedical-knowledge-mining-book/
70 stars 29 forks source link

enrichplot barplot doesn't work with GSEA enrichment result #19

Closed hermidalc closed 2 years ago

hermidalc commented 2 years ago
library(DOSE)
data(geneList)

de <- names(geneList)[abs(geneList) > 2]
edo <- gseDO(geneList)

library(clusterProfiler)

dplyr::mutate(edo, qscore = -log(p.adjust, base=10)) |> barplot(x="qscore")
Error in barplot.default(dplyr::mutate(edo, qscore = -log(p.adjust, base = 10)),  : 
  argument 2 matches multiple formal arguments

Or just trying to use any result column:

barplot(edo, x="NES")
Error in barplot.default(edo, x = "NES") : 
  argument 2 matches multiple formal arguments
huerqiang commented 2 years ago

barplot() only support enrichResult.