Mercurial > repos > lecorguille > xcms_fillpeaks
comparison xcms_fillpeaks.r @ 26:bb9ee352fce0 draft
planemo upload for repository https://github.com/workflow4metabolomics/tools-metabolomics/ commit 2cb157bd9a8701a3d6874e084032cbd050b8953e
author | workflow4metabolomics |
---|---|
date | Mon, 11 Sep 2023 09:15:33 +0000 |
parents | 26d77e9ceb49 |
children |
comparison
equal
deleted
inserted
replaced
25:26d77e9ceb49 | 26:bb9ee352fce0 |
---|---|
9 # ----- PACKAGE ----- | 9 # ----- PACKAGE ----- |
10 cat("\tSESSION INFO\n") | 10 cat("\tSESSION INFO\n") |
11 | 11 |
12 #Import the different functions | 12 #Import the different functions |
13 source_local <- function(fname) { | 13 source_local <- function(fname) { |
14 argv <- commandArgs(trailingOnly = FALSE); base_dir <- dirname(substring(argv[grep("--file=", argv)], 8)); source(paste(base_dir, fname, sep = "/")) | 14 argv <- commandArgs(trailingOnly = FALSE) |
15 base_dir <- dirname(substring(argv[grep("--file=", argv)], 8)) | |
16 source(paste(base_dir, fname, sep = "/")) | |
15 } | 17 } |
16 source_local("lib.r") | 18 source_local("lib.r") |
17 | 19 |
18 pkgs <- c("xcms", "batch") | 20 pkgs <- c("xcms", "batch") |
19 loadAndDisplayPackages(pkgs) | 21 loadAndDisplayPackages(pkgs) |
20 cat("\n\n"); | 22 cat("\n\n") |
21 | 23 |
22 | 24 |
23 # ----- ARGUMENTS ----- | 25 # ----- ARGUMENTS ----- |
24 cat("\tARGUMENTS INFO\n") | 26 cat("\tARGUMENTS INFO\n") |
25 args <- parseCommandArgs(evaluate = FALSE) #interpretation of arguments given in command line as an R list of objects | 27 args <- parseCommandArgs(evaluate = FALSE) #interpretation of arguments given in command line as an R list of objects |
26 write.table(as.matrix(args), col.names = F, quote = F, sep = "\t") | 28 write.table(as.matrix(args), col.names = FALSE, quote = FALSE, sep = "\t") |
27 | 29 |
28 cat("\n\n") | 30 cat("\n\n") |
29 | 31 |
30 # ----- PROCESSING INFILE ----- | 32 # ----- PROCESSING INFILE ----- |
31 cat("\tARGUMENTS PROCESSING INFO\n") | 33 cat("\tARGUMENTS PROCESSING INFO\n") |
79 xdata <- updateObject(xdata) | 81 xdata <- updateObject(xdata) |
80 register(SerialParam()) | 82 register(SerialParam()) |
81 xdata <- fillChromPeaks(xdata, param = fillChromPeaksParam) | 83 xdata <- fillChromPeaks(xdata, param = fillChromPeaksParam) |
82 | 84 |
83 if (exists("intval")) { | 85 if (exists("intval")) { |
84 getPeaklistW4M(xdata, intval, convertRTMinute, numDigitsMZ, numDigitsRT, naTOzero, "variableMetadata.tsv", "dataMatrix.tsv") | 86 getPeaklistW4M(xdata, intval, convertRTMinute, numDigitsMZ, numDigitsRT, naTOzero, "variableMetadata.tsv", "dataMatrix.tsv") |
85 } | 87 } |
86 | 88 |
87 cat("\n\n") | 89 cat("\n\n") |
88 | 90 |
89 # ----- EXPORT ----- | 91 # ----- EXPORT ----- |