clusterProfiler icon indicating copy to clipboard operation
clusterProfiler copied to clipboard

ShowCategory does not work in compareCluster

Open cutleraging opened this issue 1 year ago • 1 comments

Hi Guangchuang, I would like to only plot a subset of results from compareCluster.

c <- msigdbr(species = "Homo sapiens")
C8_t2g <- msigdbr(species = "Homo sapiens", category = "C8") %>% 
  dplyr::select(gs_name, ensembl_gene)

ck.c8 <- compareCluster(geneCluster = df, 
                        fun = enricher,
                        TERM2GENE = C8_t2g,
                        universe = rownames(dds_vst.mat),
                        qvalueCutoff = 0.05)

ck.c8.liver <- ck.c8@compareClusterResult$ID[grep("LIVER", ck.c8@compareClusterResult$ID)
                                             
dotplot(ck.c8, showCategory=ck.c8.liver, label_format = function(x) stringr::str_wrap(x, width=40)) + ggtitle("Cell Type Signatures")

While I am expecting around 60 enrichments to be shown, I am getting way too many that are not liver.

image

Any help with this?

cutleraging avatar Jul 26 '22 00:07 cutleraging

Hi @cutleraging @GuangchuangYu , I am having the same issue. Did you find a solution? Thank you!

laijen000 avatar Oct 03 '22 15:10 laijen000