Mercurial > repos > bgruening > music_construct_eset
diff scripts/inspect.R @ 0:2cfd0db49bbc draft
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/music/ commit 08c6fd3885bdfbf8b5c3f4dcc2d04729b577e3e1"
author | bgruening |
---|---|
date | Sun, 12 Sep 2021 19:49:12 +0000 |
parents | |
children | be91cb6f48e7 |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/scripts/inspect.R Sun Sep 12 19:49:12 2021 +0000 @@ -0,0 +1,25 @@ + +suppressWarnings(suppressPackageStartupMessages(library(xbioc))) +suppressWarnings(suppressPackageStartupMessages(library(MuSiC))) + +args <- commandArgs(trailingOnly = TRUE) +source(args[1]) + +printout <- function(text) { + if (typeof(text) %in% c("list", "vector")) { + write.table(text, file = outfile_tab, quote = F, sep = "\t", + col.names = NA) + } else { + ## text + capture.output(text, file = outfile_tab) # nolint + } +} + +if (inspector %in% c("print", "pData", "fData", "dims", "experimentData", + "exprs", "signature", "annotation", "abstract")) { + op <- get(inspector) + tab <- op(rds_eset) + printout(tab) +} else { + stop(paste0("No such option:", inspector)) +}