Mercurial > repos > lecorguille > xcms_plot_chromatogram
diff xcms_plot_chromatogram.r @ 17:9fff8c8ab4a3 draft
planemo upload for repository https://github.com/workflow4metabolomics/tools-metabolomics/ commit eca29d4347fe2f4802091c4a06715232a6fd9253
author | workflow4metabolomics |
---|---|
date | Mon, 15 Jul 2024 15:54:03 +0000 |
parents | bf87ce10267e |
children | 4631c19a75ff |
line wrap: on
line diff
--- a/xcms_plot_chromatogram.r Wed Apr 07 10:31:10 2021 +0000 +++ b/xcms_plot_chromatogram.r Mon Jul 15 15:54:03 2024 +0000 @@ -6,19 +6,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") @@ -52,10 +54,12 @@ register(SerialParam()) if (!exists("chromTIC") || is.null(chromTIC)) { - cat("\t\t\tCompute TIC\n"); chromTIC <- chromatogram(xdata, aggregationFun = "sum") + cat("\t\t\tCompute TIC\n") + chromTIC <- chromatogram(xdata, aggregationFun = "sum") } if (!exists("chromBPI") || is.null(chromBPI)) { - cat("\t\t\tCompute BPI\n"); chromBPI <- chromatogram(xdata, aggregationFun = "max") + cat("\t\t\tCompute BPI\n") + chromBPI <- chromatogram(xdata, aggregationFun = "max") } if (!is.null(chromTIC_adjusted)) chromTIC <- chromTIC_adjusted