view scripts/inspect.R @ 1:271f56c5d629 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:53:38 +0000
parents 67c243187c1e
children
line wrap: on
line source


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", "integer", "double", "numeric")) {
        write.table(text, file = outfile_tab, quote = F, sep = "\t",
                    col.names = NA)
    } else {
        ## text
        print(typeof(text))
        capture.output(text, file = outfile_tab)  # nolint
    }
}

if (inspector %in% c("print", "pData", "fData", "dims",
                     "experimentData", "protocolData", "exprs",
                     "signature", "annotation", "abstract")) {
    op <- get(inspector)
    tab <- op(rds_eset)
    printout(tab)
} else {
    stop(paste0("No such option:", inspector))
}