# HG changeset patch # User moheydarian # Date 1493319246 14400 # Node ID 43f627dc005e1e97657816f764bbe0d1638cb2e2 # Parent 5bae1e1fcec3c3c34c681f08ccfb886dd62672a5 Uploaded diff -r 5bae1e1fcec3 -r 43f627dc005e heatmap2.R --- a/heatmap2.R Thu Apr 27 14:06:41 2017 -0400 +++ b/heatmap2.R Thu Apr 27 14:54:06 2017 -0400 @@ -40,8 +40,8 @@ input <- read.delim(options$input,sep='\t',header=TRUE) -mat_input <- data.matrix(input) - +mat_input <- data.matrix(input[,2:ncol(input)]) +rownames(mat_input) <- input[,1] if(options$transform == "none"){ linput <- mat_input @@ -71,12 +71,11 @@ dist_fun = function(x) dist(x, method="maximum") dclust = distfun=dist_fun hclust = hclustfun=hclust_fun + dend = NULL }else{ dclust = NULL hclust = NULL - rowd = Rowv = NULL - cold = Colv = NULL - dend = dendrogram = "none" + dend = dendrogram="none" } if(options$labels== "both"){ @@ -100,7 +99,7 @@ pdf(file="Rplot.pdf") colorscale heatmap.2(linput, - dclust, hclust, rowd, cold, scale = options$scale, rlabs, clabs, + dclust, hclust, dend, scale = options$scale, rlabs, clabs, col=colfunc(50), trace="none", density.info = "none", margins=c(8,2), main = options$title, key.xlab= options$key, keysize=1) dev.off()