I have prepared a heatmap using the log2 normalized FPKM value using the following script
alpha4 <- read.table(file.choose(), header=TRUE, sep=",")
alpha5 <- as.matrix(alpha4)
alpha6 <- t(alpha5)
library(gplots)
pdf("Rdataoutput1.pdf")
heatmap.2((alpha6), trace="none", scale="row", density.info="none", col=redblue(2766))
dev.off()
I got the heatmap like this
Next, I want to extract the exact hierarchical clustering pattern of the genes as in the heatmap and obtain cluster, for which I used the following script
hc <- hclust(dist(alpha6))
pdf("test_clustering_tree1.pdf")
plot(hc)
clusters_name <- cutree(hc, h=20)
rect.hclust(hc, h=20)
dev.off()
with the scripts, I obtained the below given hierarchical pattern. My question is did I extracted the same hierarchical clustering pattern of the genes as in the heatmap?
Sorry, the images did not came.
You have to upload the images elsewhere and link to them.
If you give your mail ID, I can send the images..