# HG changeset patch # User moheydarian # Date 1493323099 14400 # Node ID 4d73dafc7bf4d103ccfdd07cc46236743c34123e # Parent 817f255101c68308d363476f48009e216412ae24 Uploaded diff -r 817f255101c6 -r 4d73dafc7bf4 heatmap2.R --- a/heatmap2.R Thu Apr 27 15:50:00 2017 -0400 +++ b/heatmap2.R Thu Apr 27 15:58:19 2017 -0400 @@ -46,7 +46,8 @@ hclust_fun = function(x) hclust(x, method="complete") dist_fun = function(x) dist(x, method="maximum") - +distfun=dist_fun +hclustfun=hclust_fun if(options$transform == "none"){ linput <- mat_input }else if(options$transform == "log2"){ @@ -70,15 +71,7 @@ } -if(options$cluster== "Default"){ - dclust = distfun=dist_fun - hclust = hclustfun=hclust_fun - dend = "both" -}else{ - dclust = NULL - hclust = NULL - dend = "none" -} + if(options$labels== "both"){ rlabs = NULL @@ -100,8 +93,21 @@ pdf(file="Rplot.pdf") colorscale + +if(options$cluster== "Default"){ + heatmap.2(linput, - dclust, hclust, dendrogram=dend, scale = options$scale, labRow = rlabs, labCol = clabs, + distfun=dist_fun, hclustfun=hclust_fun, 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) +}else{ +heatmap.2(linput, + dendrogram="none", 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()