How can you pull out the genes/observations from the row groups generated from cutree_rows = 3
in pheatmap
? would be obj$tree_row$...
?
obj <- pheatmap(mat, annotation_col = anno, fontsize_row = 10, show_colnames = F, show_rownames = F, cutree_cols = 3, cluster_cols = FALSE, color = col, scale = 'row',cutree_rows = 3)
I have seen you can find the gene list if you apply k means by running obj$kmeans$cluster
like in here is there a way to preserve the clustering in a heatmap but reduce the number of observations?