comparison scripts/clusterinspect.R @ 9:f3eb2291da05 draft

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/raceid3 commit 82a18e57158136e265a26f27feb40f8dc13437bf
author iuc
date Wed, 24 Aug 2022 18:11:37 +0000
parents 41f34e925bd5
children c7ddb719554d
comparison
equal deleted inserted replaced
8:2b0d3e2f402a 9:f3eb2291da05
1 #!/usr/bin/env R 1 #!/usr/bin/env R
2 VERSION <- "0.5" # nolint 2 VERSION <- "0.5" # nolint
3 3
4 args <- commandArgs(trailingOnly = T) 4 args <- commandArgs(trailingOnly = TRUE)
5 5
6 if (length(args) != 1) { 6 if (length(args) != 1) {
7 message(paste("VERSION:", VERSION)) 7 message(paste("VERSION:", VERSION))
8 stop("Please provide the config file") 8 stop("Please provide the config file")
9 } 9 }
72 72
73 getSubNames <- function(lob, sc) { # nolint 73 getSubNames <- function(lob, sc) { # nolint
74 use_names <- NULL 74 use_names <- NULL
75 if (!is.null(lob$manual)) { 75 if (!is.null(lob$manual)) {
76 use_names <- lob$manual 76 use_names <- lob$manual
77 } 77 }else if (!is.null(lob$regex)) {
78 else if (!is.null(lob$regex)) {
79 nm <- colnames(sc@ndata) 78 nm <- colnames(sc@ndata)
80 use_names <- nm[grep(lob$regex, nm)] 79 use_names <- nm[grep(lob$regex, nm)]
81 } 80 }else if (!is.null(lob$cln)) {
82 else if (!is.null(lob$cln)) {
83 use_names <- names(sc@cpart)[sc@cpart %in% lob$cln] 81 use_names <- names(sc@cpart)[sc@cpart %in% lob$cln]
84 } 82 }
85 if (is.null(use_names)) { 83 if (is.null(use_names)) {
86 stop("A or B names not given!") 84 stop("A or B names not given!")
87 } 85 }
110 } 108 }
111 109
112 title <- paste(":", plotexp$n) 110 title <- paste(":", plotexp$n)
113 plotexp$n <- "" 111 plotexp$n <- ""
114 112
115 plotexp$logsc <- FALSE; plotexp$fr <- FALSE 113 plotexp$logsc <- FALSE
114 plotexp$fr <- FALSE
116 print(do.call(plotexpmap, c(sc, plotexp))) 115 print(do.call(plotexpmap, c(sc, plotexp)))
117 print(do.call(mtext, c(paste("tSNE", title), test))) 116 print(do.call(mtext, c(paste("tSNE", title), test)))
118 117
119 plotexp$logsc <- TRUE; plotexp$fr <- FALSE 118 plotexp$logsc <- TRUE
119 plotexp$fr <- FALSE
120 print(do.call(plotexpmap, c(sc, plotexp))) 120 print(do.call(plotexpmap, c(sc, plotexp)))
121 print(do.call(mtext, c(paste("tSNE (Log)", title), test))) 121 print(do.call(mtext, c(paste("tSNE (Log)", title), test)))
122 122
123 plotexp$logsc <- FALSE; plotexp$fr <- TRUE 123 plotexp$logsc <- FALSE
124 plotexp$fr <- TRUE
124 print(do.call(plotexpmap, c(sc, plotexp))) 125 print(do.call(plotexpmap, c(sc, plotexp)))
125 print(do.call(mtext, c(paste("FR", title), test))) 126 print(do.call(mtext, c(paste("FR", title), test)))
126 127
127 plotexp$logsc <- TRUE; plotexp$fr <- TRUE 128 plotexp$logsc <- TRUE
129 plotexp$fr <- TRUE
128 print(do.call(plotexpmap, c(sc, plotexp))) 130 print(do.call(plotexpmap, c(sc, plotexp)))
129 print(do.call(mtext, c(paste("FR (Log)", title), test))) 131 print(do.call(mtext, c(paste("FR (Log)", title), test)))
130 132
131 if (!is.null(plotmarkg$samples)) { 133 if (!is.null(plotmarkg$samples)) {
132 reg <- plotmarkg$samples 134 reg <- plotmarkg$samples