I am trying to make a heatmap and the was able to achieve the one I wanted. However, I have a feeling it looks clumpsy.
Y is a 4 column matrix with expression values
y<-ave_scaledCounts[Gene_Markers,] hr <- hclust(as.dist(1-cor(t(y), method="pearson")), method="centroid"); hc <- hclust(as.dist(1-cor(y, method="spearman")), method="centroid") # Cuts the tree and creates color vector for clusters. mycl <- cutree(hr,k=4, h=max(hr$height)/2); mycolhc <- rainbow(length(unique(mycl)), start=0.1, end=0.9); mycolhc <- mycolhc[as.vector(mycl)] myheatcol <- bluered(75) pdf("Hierarchial_Clustering/Final_HeatMap Hierarchial clustering.pdf",width=9,height=7) heatmap.2(y, Rowv=as.dendrogram(hr), Colv=as.dendrogram(hc), col=myheatcol, scale="row", density.info="none", trace="none", + RowSideColors= mycolhc,margins=c(10,10),keep.dendro=FALSE) dev.off()
. I would like the heatmap in itself to be smaller in area... preferable like a tile!! The dendograms are not neccessary and the color key could be even thinner! ANy help would be great! Thanks!
EDIT: Would it just be possible to make a better heatmap if I just have the clusters in order already?? May be