enrichplot icon indicating copy to clipboard operation
enrichplot copied to clipboard

`emapplot` `showCategory` doesn't support providing a vector of names

Open hermidalc opened this issue 3 years ago • 3 comments

emapplot showCategory doesn't support providing a vector of names. Most other enrichplot functions and it would be useful.

hermidalc avatar Oct 27 '22 18:10 hermidalc

Please read the example of emapplot:

    categorys <- c("pre-malignant neoplasm", "intestinal disease",
                   "breast ductal carcinoma")
    emapplot(x2, showCategory = categorys)

huerqiang avatar Oct 30 '22 00:10 huerqiang

Sorry, though why is there a warning?

library(clusterProfiler)
library(enrichplot)
library(msigdbr)

data(geneList, package = "DOSE")

m_t2g <- msigdbr(species = "Homo sapiens", category = "C6") %>%  dplyr::select(gs_name, entrez_gene)
em <- GSEA(geneList, TERM2GENE = m_t2g, eps = 0.0)

em <- pairwise_termsim(em)
categories <- c("E2F3_UP.V1_UP", "CAHOY_NEURONAL", "LEF1_UP.V1_DN")
emapplot(em, showCategory = categories)
Warning message:
In if (n == 1) { :
  the condition has length > 1 and only the first element will be used

hermidalc avatar Oct 30 '22 16:10 hermidalc

Please use the latest version of enrichplot.

huerqiang avatar Oct 30 '22 16:10 huerqiang