diff heatmap2.R @ 10:fe9d1a33f421 draft

Uploaded
author moheydarian
date Tue, 14 Mar 2017 16:07:55 -0400
parents 84935e121609
children e75734b84e61
line wrap: on
line diff
--- 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),