view scripts/inspect.R @ 1:817eb707bbf4 draft default tip

"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/music/ commit 683bb72ae92b5759a239b7e3bf4c5a229ed35b54"
author bgruening
date Fri, 26 Nov 2021 15:54:31 +0000
parents 2fed32b5aa02
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))
}