Mercurial > repos > lecorguille > xcms_retcor
diff xcms_retcor.r @ 49:177b5847a211 draft
planemo upload for repository https://github.com/workflow4metabolomics/tools-metabolomics/ commit eca29d4347fe2f4802091c4a06715232a6fd9253
| author | workflow4metabolomics |
|---|---|
| date | Mon, 15 Jul 2024 15:55:13 +0000 |
| parents | 366ff564f949 |
| children | 0bc08f128b42 |
line wrap: on
line diff
--- a/xcms_retcor.r Wed Apr 07 10:31:56 2021 +0000 +++ b/xcms_retcor.r Mon Jul 15 15:55:13 2024 +0000 @@ -11,19 +11,21 @@ #Import the different functions source_local <- function(fname) { - argv <- commandArgs(trailingOnly = FALSE); base_dir <- dirname(substring(argv[grep("--file=", argv)], 8)); source(paste(base_dir, fname, sep = "/")) + argv <- commandArgs(trailingOnly = FALSE) + base_dir <- dirname(substring(argv[grep("--file=", argv)], 8)) + source(paste(base_dir, fname, sep = "/")) } source_local("lib.r") pkgs <- c("xcms", "batch", "RColorBrewer") loadAndDisplayPackages(pkgs) -cat("\n\n"); +cat("\n\n") # ----- ARGUMENTS ----- cat("\tARGUMENTS INFO\n") args <- parseCommandArgs(evaluate = FALSE) #interpretation of arguments given in command line as an R list of objects -write.table(as.matrix(args), col.names = F, quote = F, sep = "\t") +write.table(as.matrix(args), col.names = FALSE, quote = FALSE, sep = "\t") cat("\n\n") @@ -40,7 +42,8 @@ cat("\tINFILE PROCESSING INFO\n") #image is an .RData file necessary to use xset variable given by previous tools -load(args$image); args$image <- NULL +load(args$image) +args$image <- NULL if (!exists("xdata")) stop("\n\nERROR: The RData doesn't contain any object called 'xdata'. This RData should have been created by an old version of XMCS 2.*") # Handle infiles
