# HG changeset patch # User moheydarian # Date 1489522075 14400 # Node ID fe9d1a33f4214378b441c4d3ce81c0ead806ae55 # Parent 568d2153f910cca59f3ac4aee37b330783ffdc81 Uploaded diff -r 568d2153f910 -r fe9d1a33f421 heatmap2.R --- a/heatmap2.R Tue Mar 14 14:41:49 2017 -0400 +++ b/heatmap2.R Tue Mar 14 16:07:55 2017 -0400 @@ -21,6 +21,7 @@ 'title', 't', 2, 'character', 'transform', 'c', 2, 'character', 'key', 'k', 2, 'character', + 'colorscheme', 'z', 2, 'character', 'output', 'o', 2, 'character' ), byrow=TRUE, ncol=4); @@ -52,13 +53,18 @@ }else{ } +if(options$colorscheme == "Default"){ + colorscale = colfunc <- colorRampPalette(c("white", "red")) +} else { + colorscale = colfunc <- colorRampPalette(c("blue","white", "red")) +} hclust_fun = function(x) hclust(x, method="complete") dist_fun = function(x) dist(x, method="maximum") pdf(file="Rplot.pdf") -colfunc <- colorRampPalette(c("white", "red")) +colorscale heatmap.2(linput, distfun=dist_fun, hclustfun=hclust_fun, scale = "none", col=colfunc(50), trace="none", density.info = "none",labRow=FALSE, margins=c(8,2),