Mercurial > repos > bgruening > music_construct_eset
annotate 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 |
rev | line source |
---|---|
0
67c243187c1e
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/music/ commit 08c6fd3885bdfbf8b5c3f4dcc2d04729b577e3e1"
bgruening
parents:
diff
changeset
|
1 |
67c243187c1e
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/music/ commit 08c6fd3885bdfbf8b5c3f4dcc2d04729b577e3e1"
bgruening
parents:
diff
changeset
|
2 suppressWarnings(suppressPackageStartupMessages(library(xbioc))) |
67c243187c1e
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/music/ commit 08c6fd3885bdfbf8b5c3f4dcc2d04729b577e3e1"
bgruening
parents:
diff
changeset
|
3 suppressWarnings(suppressPackageStartupMessages(library(MuSiC))) |
67c243187c1e
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/music/ commit 08c6fd3885bdfbf8b5c3f4dcc2d04729b577e3e1"
bgruening
parents:
diff
changeset
|
4 |
67c243187c1e
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/music/ commit 08c6fd3885bdfbf8b5c3f4dcc2d04729b577e3e1"
bgruening
parents:
diff
changeset
|
5 args <- commandArgs(trailingOnly = TRUE) |
67c243187c1e
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/music/ commit 08c6fd3885bdfbf8b5c3f4dcc2d04729b577e3e1"
bgruening
parents:
diff
changeset
|
6 source(args[1]) |
67c243187c1e
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/music/ commit 08c6fd3885bdfbf8b5c3f4dcc2d04729b577e3e1"
bgruening
parents:
diff
changeset
|
7 |
67c243187c1e
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/music/ commit 08c6fd3885bdfbf8b5c3f4dcc2d04729b577e3e1"
bgruening
parents:
diff
changeset
|
8 printout <- function(text) { |
1
271f56c5d629
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/music/ commit 683bb72ae92b5759a239b7e3bf4c5a229ed35b54"
bgruening
parents:
0
diff
changeset
|
9 if (typeof(text) %in% c("list", "vector", "integer", "double", "numeric")) { |
0
67c243187c1e
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/music/ commit 08c6fd3885bdfbf8b5c3f4dcc2d04729b577e3e1"
bgruening
parents:
diff
changeset
|
10 write.table(text, file = outfile_tab, quote = F, sep = "\t", |
67c243187c1e
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/music/ commit 08c6fd3885bdfbf8b5c3f4dcc2d04729b577e3e1"
bgruening
parents:
diff
changeset
|
11 col.names = NA) |
67c243187c1e
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/music/ commit 08c6fd3885bdfbf8b5c3f4dcc2d04729b577e3e1"
bgruening
parents:
diff
changeset
|
12 } else { |
67c243187c1e
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/music/ commit 08c6fd3885bdfbf8b5c3f4dcc2d04729b577e3e1"
bgruening
parents:
diff
changeset
|
13 ## text |
1
271f56c5d629
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/music/ commit 683bb72ae92b5759a239b7e3bf4c5a229ed35b54"
bgruening
parents:
0
diff
changeset
|
14 print(typeof(text)) |
0
67c243187c1e
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/music/ commit 08c6fd3885bdfbf8b5c3f4dcc2d04729b577e3e1"
bgruening
parents:
diff
changeset
|
15 capture.output(text, file = outfile_tab) # nolint |
67c243187c1e
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/music/ commit 08c6fd3885bdfbf8b5c3f4dcc2d04729b577e3e1"
bgruening
parents:
diff
changeset
|
16 } |
67c243187c1e
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/music/ commit 08c6fd3885bdfbf8b5c3f4dcc2d04729b577e3e1"
bgruening
parents:
diff
changeset
|
17 } |
67c243187c1e
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/music/ commit 08c6fd3885bdfbf8b5c3f4dcc2d04729b577e3e1"
bgruening
parents:
diff
changeset
|
18 |
1
271f56c5d629
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/music/ commit 683bb72ae92b5759a239b7e3bf4c5a229ed35b54"
bgruening
parents:
0
diff
changeset
|
19 if (inspector %in% c("print", "pData", "fData", "dims", |
271f56c5d629
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/music/ commit 683bb72ae92b5759a239b7e3bf4c5a229ed35b54"
bgruening
parents:
0
diff
changeset
|
20 "experimentData", "protocolData", "exprs", |
271f56c5d629
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/music/ commit 683bb72ae92b5759a239b7e3bf4c5a229ed35b54"
bgruening
parents:
0
diff
changeset
|
21 "signature", "annotation", "abstract")) { |
0
67c243187c1e
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/music/ commit 08c6fd3885bdfbf8b5c3f4dcc2d04729b577e3e1"
bgruening
parents:
diff
changeset
|
22 op <- get(inspector) |
67c243187c1e
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/music/ commit 08c6fd3885bdfbf8b5c3f4dcc2d04729b577e3e1"
bgruening
parents:
diff
changeset
|
23 tab <- op(rds_eset) |
67c243187c1e
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/music/ commit 08c6fd3885bdfbf8b5c3f4dcc2d04729b577e3e1"
bgruening
parents:
diff
changeset
|
24 printout(tab) |
67c243187c1e
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/music/ commit 08c6fd3885bdfbf8b5c3f4dcc2d04729b577e3e1"
bgruening
parents:
diff
changeset
|
25 } else { |
67c243187c1e
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/music/ commit 08c6fd3885bdfbf8b5c3f4dcc2d04729b577e3e1"
bgruening
parents:
diff
changeset
|
26 stop(paste0("No such option:", inspector)) |
67c243187c1e
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/music/ commit 08c6fd3885bdfbf8b5c3f4dcc2d04729b577e3e1"
bgruening
parents:
diff
changeset
|
27 } |