Mercurial > repos > lecorguille > xcms_plot_chromatogram
diff xcms_plot_chromatogram.r @ 18:4631c19a75ff draft default tip
planemo upload for repository https://github.com/workflow4metabolomics/tools-metabolomics/ commit 95721ced8347c09e79340e6d67ecb41c5cc64163
author | workflow4metabolomics |
---|---|
date | Mon, 03 Feb 2025 14:40:09 +0000 |
parents | 9fff8c8ab4a3 |
children |
line wrap: on
line diff
--- a/xcms_plot_chromatogram.r Mon Jul 15 15:54:03 2024 +0000 +++ b/xcms_plot_chromatogram.r Mon Feb 03 14:40:09 2025 +0000 @@ -4,11 +4,11 @@ # ----- PACKAGE ----- cat("\tSESSION INFO\n") -#Import the different functions +# 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") @@ -19,7 +19,7 @@ # ----- ARGUMENTS ----- cat("\tARGUMENTS INFO\n") -args <- parseCommandArgs(evaluate = FALSE) #interpretation of arguments given in command line as an R list of objects +args <- parseCommandArgs(evaluate = FALSE) # interpretation of arguments given in command line as an R list of objects write.table(as.matrix(args), col.names = FALSE, quote = FALSE, sep = "\t") cat("\n\n") @@ -54,12 +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