I have the following data:
foo_06.ix bar_06.ix bar_06.iz qux_06.ix qux_06.iz 1416474_at Igdcc4 0.563 5.649 1.654 0.776 0.973 1416576_at Socs3 5.793 5.417 0.694 3.256 0.951 ...
Why do I want to build a hierarchical map of cluster heating.
With this code:
library(gplots); library(RColorBrewer); tm <- read.table("http://dpaste.com/1494806/plain/",header=TRUE,sep="\t") nofclust <- 21; # Clustering functions hclustfunc <- function(x) hclust(x, method="complete") distfunc <- function(x) dist(x,method="euclidean") d.tm <- distfunc(tm) fit.tm <- hclustfunc(d.tm) clusters <- cutree(fit.tm, k=nofclust) # Define colours hmcols <- rev(brewer.pal(11,"Spectral")); selcol <- colorRampPalette(brewer.pal(12,"Set3")) selcol2 <- colorRampPalette(brewer.pal(9,"Set1")) sdcol= selcol(5); clustcol = selcol2(nofclust); # Plot heatmap pdf(file="tmp.pdf",width=27,height=27); heatmap.2(as.matrix(tm),dendrogram="row",scale="row",RowSideColors=clustcol[clusters],ColSideColors=sdcol,col=hmcols,trace="none", margin=c(12,12), hclust=hclustfunc,distfun=distfunc,lwid=c(0.1,0.1,0.1,0.1,0.1),keysize=0.5); dev.off()
It displays the following image: 
Using a fixed PDF size (27x27), what I want to do:
How can I change my code above to achieve these goals?
source share