I am trying to display the result of a clustering algorithm based on k-means as pheatmap
. For this, I use the procedure suggested here: R draw kmeans clustering with heatmap
Now the problem is, that I would like to add a color scheme highlighting the clusters, something similar to the "RowSideColors"-option in heatmap
and heatmap.2
. As to pheatmap
, I found only the annotation
option, but this works columnwise instead of rowwise. Is there a way to highlight the row clusters in pheatmap
?
Another idea that I had is to add the cluster-column as a separate color within the heatmap. However, I would need to use another colour scheme than for the rest of the heatmap, so I am not sure if it's possible.