diff heatmap_viz.R @ 1:b8a5139cf5b9 draft

planemo upload commit 5dd4a8814abf4a735409189a4c7cfe3ffd207c62-dirty
author proteore
date Mon, 18 Feb 2019 05:58:08 -0500
parents edbb84a94a36
children 2a04fffda914
line wrap: on
line diff
--- a/heatmap_viz.R	Tue Dec 18 09:58:49 2018 -0500
+++ b/heatmap_viz.R	Mon Feb 18 05:58:08 2019 -0500
@@ -80,7 +80,7 @@
 }
 
 get_cols <-function(input_cols) {
-  input_cols <- gsub("c","",input_cols)
+  input_cols <- gsub("c","",gsub("C","",gsub(" ","",input_cols)))
   if (grepl(":",input_cols)) {
     first_col=unlist(strsplit(input_cols,":"))[1]
     last_col=unlist(strsplit(input_cols,":"))[2]
@@ -102,7 +102,7 @@
 output <- paste(output[1:length(output)-1],collapse=".")
 output <- paste(output,args$type,sep=".")
 cols = get_cols(args$cols)
-rownames_col = as.integer(gsub("c","",args$row_names))
+rownames_col = as.integer(gsub("c","",gsub("C","",gsub(" ","",args$row_names))))
 if (length(cols) <=1 ){
   stop("You need several colums to build a heatmap")
 }
@@ -116,7 +116,7 @@
 uto <- uto[rowSums(is.na(uto)) != ncol(uto), ]  #remove emptylines
 
 if (header) {
-  col_names = names(data)
+  col_names = names(uto)
 } else {
   col_names = cols
 }