Mercurial > repos > lecorguille > xcms_fillpeaks
comparison xcms_fillpeaks.r @ 18:27fbe73c4279 draft
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit f0d42bca2f34c58c04b55e5990058d479c0ae639
author | lecorguille |
---|---|
date | Mon, 11 Feb 2019 06:11:33 -0500 |
parents | 91c71f3808f3 |
children | 05d322d6facb |
comparison
equal
deleted
inserted
replaced
17:b6b62413936f | 18:27fbe73c4279 |
---|---|
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){ argv <- commandArgs(trailingOnly=FALSE); base_dir <- dirname(substring(argv[grep("--file=", argv)], 8)); source(paste(base_dir, fname, sep="/")) } | 13 source_local <- function(fname){ argv <- commandArgs(trailingOnly=FALSE); base_dir <- dirname(substring(argv[grep("--file=", argv)], 8)); source(paste(base_dir, fname, sep="/")) } |
14 source_local("lib.r") | 14 source_local("lib.r") |
15 source_local("lib-xcms3.x.x.r") | |
16 | 15 |
17 pkgs <- c("xcms","batch") | 16 pkgs <- c("xcms","batch") |
18 loadAndDisplayPackages(pkgs) | 17 loadAndDisplayPackages(pkgs) |
19 cat("\n\n"); | 18 cat("\n\n"); |
20 | 19 |
65 checkFilesCompatibilityWithXcms(directory) | 64 checkFilesCompatibilityWithXcms(directory) |
66 | 65 |
67 | 66 |
68 cat("\n\n") | 67 cat("\n\n") |
69 | 68 |
70 | |
71 # ----- MAIN PROCESSING INFO ----- | 69 # ----- MAIN PROCESSING INFO ----- |
72 cat("\tMAIN PROCESSING INFO\n") | 70 cat("\tMAIN PROCESSING INFO\n") |
73 | 71 |
74 | 72 |
75 cat("\t\tCOMPUTE\n") | 73 cat("\t\tCOMPUTE\n") |
78 # clear the arguement list to remove unexpected key/value as singlefile_galaxyPath or method ... | 76 # clear the arguement list to remove unexpected key/value as singlefile_galaxyPath or method ... |
79 args <- args[names(args) %in% slotNames(do.call(paste0(method,"Param"), list()))] | 77 args <- args[names(args) %in% slotNames(do.call(paste0(method,"Param"), list()))] |
80 | 78 |
81 fillChromPeaksParam <- do.call(paste0(method,"Param"), args) | 79 fillChromPeaksParam <- do.call(paste0(method,"Param"), args) |
82 print(fillChromPeaksParam) | 80 print(fillChromPeaksParam) |
81 | |
82 # back compatibility between xcms-3.0.0 and xcms-3.5.2 | |
83 xdata <- updateObject(xdata) | |
84 | |
83 xdata <- fillChromPeaks(xdata, param=fillChromPeaksParam) | 85 xdata <- fillChromPeaks(xdata, param=fillChromPeaksParam) |
84 | 86 |
85 if (exists("intval")) { | 87 if (exists("intval")) { |
86 getPeaklistW4M(xdata, intval, convertRTMinute, numDigitsMZ, numDigitsRT, naTOzero, "variableMetadata.tsv", "dataMatrix.tsv") | 88 getPeaklistW4M(xdata, intval, convertRTMinute, numDigitsMZ, numDigitsRT, naTOzero, "variableMetadata.tsv", "dataMatrix.tsv") |
87 } | 89 } |