Mercurial > repos > lecorguille > xcms_plot_chromatogram
diff xcms_plot_chromatogram.r @ 14:8846a03995d3 draft default tip
planemo upload for repository https://github.com/workflow4metabolomics/tools-metabolomics/ commit 2cb157bd9a8701a3d6874e084032cbd050b8953e
author | workflow4metabolomics |
---|---|
date | Mon, 11 Sep 2023 09:18:38 +0000 |
parents | 024974037c4e |
children |
line wrap: on
line diff
--- a/xcms_plot_chromatogram.r Wed Apr 07 12:07:49 2021 +0000 +++ b/xcms_plot_chromatogram.r Mon Sep 11 09:18:38 2023 +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