Reorganize the clusters
1
0
Entering edit mode
3.6 years ago

I would like the clusters to be organized as (c1/c2/c3/c4/c5)

set.seed(123) #set seed for consistency
 HM = Heatmap(data, show_row_names = F, show_column_names = T,
                 row_names_gp = gpar(fontsize = 2),
                 km = 5, 
                 column_names_side = "bottom", gap = unit(1, "mm"),
                 column_names_rot = 90,
                 cluster_columns = F,
                 show_heatmap_legend = T,
                 row_title = "c%s",
                 border = TRUE,
    )

HM = draw(HM)
Clusters • 633 views
ADD COMMENT
0
Entering edit mode

Please use the formatting bar (especially the code option) to present your post better. I've done it for you this time.
code_formatting

Thank you!

ADD REPLY
0
Entering edit mode
3.6 years ago

Boa tarde,

Tem que definir os agrupamentos fora do função Heatmap(), como faço aqui: / You have to define the clusters outside of the Heatmap() function, as I do here:

Depois/ Then (after), follow the advice here: A: Complex Heatmap: Changing order of clusters

Kevin

ADD COMMENT

Login before adding your answer.

Traffic: 2900 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6