Mercurial > repos > bgruening > music_construct_eset
comparison scripts/inspect.R @ 1:be91cb6f48e7 draft
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/music/ commit 683bb72ae92b5759a239b7e3bf4c5a229ed35b54"
author | bgruening |
---|---|
date | Fri, 26 Nov 2021 15:55:11 +0000 |
parents | 2cfd0db49bbc |
children |
comparison
equal
deleted
inserted
replaced
0:2cfd0db49bbc | 1:be91cb6f48e7 |
---|---|
4 | 4 |
5 args <- commandArgs(trailingOnly = TRUE) | 5 args <- commandArgs(trailingOnly = TRUE) |
6 source(args[1]) | 6 source(args[1]) |
7 | 7 |
8 printout <- function(text) { | 8 printout <- function(text) { |
9 if (typeof(text) %in% c("list", "vector")) { | 9 if (typeof(text) %in% c("list", "vector", "integer", "double", "numeric")) { |
10 write.table(text, file = outfile_tab, quote = F, sep = "\t", | 10 write.table(text, file = outfile_tab, quote = F, sep = "\t", |
11 col.names = NA) | 11 col.names = NA) |
12 } else { | 12 } else { |
13 ## text | 13 ## text |
14 print(typeof(text)) | |
14 capture.output(text, file = outfile_tab) # nolint | 15 capture.output(text, file = outfile_tab) # nolint |
15 } | 16 } |
16 } | 17 } |
17 | 18 |
18 if (inspector %in% c("print", "pData", "fData", "dims", "experimentData", | 19 if (inspector %in% c("print", "pData", "fData", "dims", |
19 "exprs", "signature", "annotation", "abstract")) { | 20 "experimentData", "protocolData", "exprs", |
21 "signature", "annotation", "abstract")) { | |
20 op <- get(inspector) | 22 op <- get(inspector) |
21 tab <- op(rds_eset) | 23 tab <- op(rds_eset) |
22 printout(tab) | 24 printout(tab) |
23 } else { | 25 } else { |
24 stop(paste0("No such option:", inspector)) | 26 stop(paste0("No such option:", inspector)) |