Closed adil-mohamed closed 1 year ago
You can apply k-means before making the heatmap:
km = kmeans(your_matrix, centers = 4)$cluster
Then you can use km
to split whatever heatmap:
Heatmap(mat1, row_split = km)
Heatmap(mat2, row_split = km)
Perfect, thank you!
I have used a scaled RNAseq dataset to generate a heatmap and used kmeans clustering to split the rows (genes). Is there a quick and easy way of generating another heatmap using the same kmeans clusters but run on the original non-scaled dataset? ** Thanks for this amazing resource!