enrichplot icon indicating copy to clipboard operation
enrichplot copied to clipboard

arrangement of group label in treeplot

Open cmy3 opened this issue 3 years ago • 3 comments

Hi, I am using the treeplot function to visualize the result of comparecluster, may I know how can I re-arrange the order of labels as highlighted in yellow (under the heatmap)? Thanks. image

cmy3 avatar Feb 25 '22 12:02 cmy3

@cmy3 Could you post the code used to produce this plot?

peranti avatar Mar 14 '22 17:03 peranti

@cmy3 Could you post the code used to produce this plot?

Hi there peranti!

I don't know if I arrived on time but the plot that cym did can be done with treeplot() but with the input coming from GSEA created with compareCluster() and then do pairwise_termsim(). In this way, you already have all the results in the same object and ready to generate a treeplot with the heatmap.

my best! Dani

str(compare_KEGG)
            List of 25
             $ ASDC          : Named num [1:7647] 2.52 2.2 2.12 2 2 ...
              ..- attr(*, "names")= chr [1:7647] "6280" "81552" "401145" "817" ...
             $ BaEoMa        : Named num [1:11857] 0.912 0.794 0.724 0.603 0.555 ...
              ..- attr(*, "names")= chr [1:11857] "1178" "116" "5874" "4069" ...
             $ CD14 Mono     : Named num [1:14770] 0.748 0.726 0.662 0.612 0.559 ...
              ..- attr(*, "names")= chr [1:14770] "3115" "55022" "6252" "378938" ...

compare_KEGG2 <- compareCluster(geneClusters=compare_KEGG,  fun = "gseKEGG")
compare_KEGG2 <- pairwise_termsim(compare_KEGG2)
treeplot(compare_KEGG2, hclust_method = "average", showCategory=25)

damouzo avatar Sep 17 '22 16:09 damouzo

@cmy3 did you solve your problem? If yes could you please share the code?

Thanks

eleonore-schneeg avatar Sep 28 '22 08:09 eleonore-schneeg