# HG changeset patch # User proteore # Date 1561623487 14400 # Node ID 07748b0136bb74548bc7467b00e6e3e615b59c77 # Parent 99207b432ebc0bf1b694af86c8bd5ddd992b065c planemo upload commit fb27a6b5de5cd7b269a41be3c85c593b77aa1b18-dirty diff -r 99207b432ebc -r 07748b0136bb heatmap.xml --- a/heatmap.xml Thu Dec 13 04:14:21 2018 -0500 +++ b/heatmap.xml Thu Jun 27 04:18:07 2019 -0400 @@ -1,5 +1,5 @@ - - + + (Cluster and visualize the results) r-plotly r-heatmaply @@ -12,7 +12,7 @@ --output="$file.name" --type='$output_type' --cols='$select_data_columns.cols' - --row_names=$rownames + --row_names="$rownames" --header='$header' --col_text_angle='$angle_col' --dist="$distance" @@ -21,22 +21,39 @@ ]]> - - + + - + - + + ^([c]{0,1}[0-9]+[,]*)+$ + - + + ^[c]{0,1}[0-9]+:[c]{0,1}[0-9]+$ + - - + + [c]{0,1}[0-9]+ + + + + + + + + + + + + @@ -47,28 +64,18 @@ - - - - - - - - - - - + + - - + + @@ -96,14 +103,19 @@ - - -@misc{renameTODO, - author = {LastTODO, FirstTODO}, - year = {TODO}, - title = {TODO}, - url = {https://plot.ly/r/}, -} - -@misc{renameTODO, - author = {LastTODO, FirstTODO}, - year = {TODO}, - title = {TODO}, - url = {https://cran.r-project.org/package=heatmaply}, -} - - \ No newline at end of file + diff -r 99207b432ebc -r 07748b0136bb heatmap_viz.R --- a/heatmap_viz.R Thu Dec 13 04:14:21 2018 -0500 +++ b/heatmap_viz.R Thu Jun 27 04:18:07 2019 -0400 @@ -1,4 +1,5 @@ #!/usr/bin/Rscript +options(warn=-1) #TURN OFF WARNINGS !!!!!! suppressMessages(library('plotly',quietly = T)) suppressMessages(library('heatmaply',quietly = T)) @@ -80,7 +81,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 +103,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 +117,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 }