Entering edit mode
4.5 years ago
huynguyen96.dnu
▴
50
Annotation:
ha = HeatmapAnnotation(IntCl = info2$groups,
CNAcorCl = info$groups, METcorCl = info1$groups, col = list(IntCl = c("1" = "turquoise", "2" = "pink"), CNAcorCl = c("1" = "turquoise", "2" = "pink"), METcorCl = c("1" = "turquoise", "2" = "pink")), which="col")
and I plot the heatmap
set.seed(5342)
Heatmap(test , name = "expression levels",
show_row_names = FALSE, show_column_names = FALSE, cluster_rows = FALSE, cluster_columns = FALSE, show_row_dend = FALSE, show_column_dend=FALSE, row_dend_reorder = FALSE, column_dend_reorder = FALSE, row_title = "566 CNAcor", row_title_side = "left", row_title_gp = gpar(fontsize = 10), column_title = "208 patients", column_title_side = "bottom", column_title_gp = gpar(fontsize = 10), top_annotation = ha)
The problem is that I want the order of the column of the heatmap to abide by the order of cluster IntCl (i.e., info2$groups). I try a lot but can not solve it.
https://jokergoo.github.io/ComplexHeatmap-reference/book/a-single-heatmap.html#row-and_column_orders
Thanks a a lot. This is the answer I'm looking for.