Mercurial > repos > lecorguille > xcms_group
comparison xcms_group.r @ 28:2b676d5eb848 draft
planemo upload for repository https://github.com/workflow4metabolomics/tools-metabolomics/ commit 2cb157bd9a8701a3d6874e084032cbd050b8953e
author | workflow4metabolomics |
---|---|
date | Mon, 11 Sep 2023 09:16:31 +0000 |
parents | d45a786cbc40 |
children |
comparison
equal
deleted
inserted
replaced
27:d45a786cbc40 | 28:2b676d5eb848 |
---|---|
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", "RColorBrewer") | 20 pkgs <- c("xcms", "batch", "RColorBrewer") |
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 | 81 |
80 cat("\t\tDRAW GRAPHICS\n") | 82 cat("\t\tDRAW GRAPHICS\n") |
81 getPlotChromPeakDensity(xdata, param = groupChromPeaksParam) | 83 getPlotChromPeakDensity(xdata, param = groupChromPeaksParam) |
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 ----- |