I have a data frame of omics data. Gene ids in rows (931), and samples in columns (15).
> dim(my_data) # (rows columns)  931 16
I created heatmap using
cn=colnames(gdf1)[c(13:15,1:12)] col <- colorRampPalette(c("red","yellow","darkgreen"))(30) heatmap.2(as.matrix(gdf1[,cn]), dendrogram = "row", Colv = FALSE, Rowv = TRUE, scale = "none", col = col, key = TRUE, density.info = "none", key.title = NA, key.xlab = "Abundance", trace = "none", margins = c(7, 15))
However, in the heatmap, I see only few genes. Since it has 900 ish genes. How can I export what are the clustered genes in each cluster in the same order as in the heatmap?
Also, how can I reduce the size of colorkey?