I love the ComplexHeatmap package, and have been using it to make some gene expression heatmaps. If I wish to add row annotations for genes, with each gene belonging to one of 10 clusters, how do I make automatic color assignments to the groups instead of giving them as a list manually?
I also had a bottom_annotation for the columns, with two classes as follows:
ha_column <- HeatmapAnnotation(df = data.frame(CellType=cellTYPE), col = list(CellType = c("WT" = "black", "KO" = "green")))
It was easy to assign colors in this case.
But for the rows, I have 10 classes, and then for different data sets, the number of such row classes will change. So, it will be very helpful if I could get R to assign colors automatically instead of the manual assignments above (black and green).
Any help would be greatly appreciated!