My question might seem very redundant, but I havn't come across a solution for my particular case (I guess I miss a small detail).
pheatmap I have generated a heapmap of ca 7.5k genes.
The code is
heat<-pheatmap(LFC_human, annotation_col=human_conditions,cluster_rows=TRUE, show_rownames=FALSE,cluster_cols=TRUE, border_color = NA, scale = "row", color=greenred(75),main="Title")
Here is the heatmap
My question is - how I can get gene names of a specific cluster (highlighted in blue)?
I know I can use
hc <-heat$tree_row lbl <- cutree(hc, 5) # split gene dendrogram in 5 groups which(lbl==1) # grab genes of first group
but how do I know to which clusters this 5 groups correspond to on my dendrogram? And since there are a lot of genes, any visual inspection is problematic. Maybe I should use a different package for heatmaps?