Mercurial > repos > moheydarian > heatmap2
diff heatmap2.R @ 33:817f255101c6 draft
Uploaded
author | moheydarian |
---|---|
date | Thu, 27 Apr 2017 15:50:00 -0400 |
parents | d5f333f96a0d |
children | 4d73dafc7bf4 |
line wrap: on
line diff
--- a/heatmap2.R Thu Apr 27 15:33:38 2017 -0400 +++ b/heatmap2.R Thu Apr 27 15:50:00 2017 -0400 @@ -43,6 +43,10 @@ mat_input <- data.matrix(input[,2:ncol(input)]) rownames(mat_input) <- input[,1] + +hclust_fun = function(x) hclust(x, method="complete") +dist_fun = function(x) dist(x, method="maximum") + if(options$transform == "none"){ linput <- mat_input }else if(options$transform == "log2"){ @@ -67,15 +71,13 @@ if(options$cluster== "Default"){ - hclust_fun = function(x) hclust(x, method="complete") - dist_fun = function(x) dist(x, method="maximum") dclust = distfun=dist_fun hclust = hclustfun=hclust_fun - dend = NULL + dend = "both" }else{ dclust = NULL hclust = NULL - dend = dendrogram = "none" + dend = "none" } if(options$labels== "both"){ @@ -99,7 +101,7 @@ pdf(file="Rplot.pdf") colorscale heatmap.2(linput, - dclust, hclust, dend, scale = options$scale, labRow = rlabs, labCol = clabs, + dclust, hclust, dendrogram=dend, scale = options$scale, labRow = rlabs, labCol = clabs, col=colfunc(50), trace="none", density.info = "none", margins=c(8,2), main = options$title, key.xlab= options$key, keysize=1) dev.off()