Hi Biostars,
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).
So, with 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?
Thanks
I believe we do have clustering gurus in Biostars:)
I hope @Kevin_Blighe will hear me :)
Not unless you tag him: Kevin Blighe
Ah, thanks @genomax, wan't aware about this functionality.
I embedded the image you had linked in original post. For future reference: How to add images to a post
Thanks! For some reason only cubeupload works for me.
A very dirty way is to print the graph as a PDF with the gene IDs on the right of the Heat map. You can then highlight the geneID of your choice and paste them in your favorite text editor....