Mercurial > repos > lecorguille > xcms_fillpeaks
annotate xcms_fillpeaks.r @ 45:1a711c1b8b1f draft
"planemo upload for repository https://github.com/workflow4metabolomics/xcms commit dcc90f9cf76e6980c0a7d9698c89fab826e7adae"
| author | workflow4metabolomics | 
|---|---|
| date | Wed, 07 Apr 2021 10:28:50 +0000 | 
| parents | 1b5fb5a27f5e | 
| children | 871ffc15a6da | 
| rev | line source | 
|---|---|
| 31 
8fd5b5afa24d
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit e384d6dd5f410799ec211f73bca0b5d5d7bc651e
 lecorguille parents: diff
changeset | 1 #!/usr/bin/env Rscript | 
| 
8fd5b5afa24d
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit e384d6dd5f410799ec211f73bca0b5d5d7bc651e
 lecorguille parents: diff
changeset | 2 | 
| 
8fd5b5afa24d
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit e384d6dd5f410799ec211f73bca0b5d5d7bc651e
 lecorguille parents: diff
changeset | 3 # ----- LOG FILE ----- | 
| 45 
1a711c1b8b1f
"planemo upload for repository https://github.com/workflow4metabolomics/xcms commit dcc90f9cf76e6980c0a7d9698c89fab826e7adae"
 workflow4metabolomics parents: 
44diff
changeset | 4 log_file <- file("log.txt", open = "wt") | 
| 31 
8fd5b5afa24d
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit e384d6dd5f410799ec211f73bca0b5d5d7bc651e
 lecorguille parents: diff
changeset | 5 sink(log_file) | 
| 
8fd5b5afa24d
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit e384d6dd5f410799ec211f73bca0b5d5d7bc651e
 lecorguille parents: diff
changeset | 6 sink(log_file, type = "output") | 
| 
8fd5b5afa24d
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit e384d6dd5f410799ec211f73bca0b5d5d7bc651e
 lecorguille parents: diff
changeset | 7 | 
| 
8fd5b5afa24d
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit e384d6dd5f410799ec211f73bca0b5d5d7bc651e
 lecorguille parents: diff
changeset | 8 | 
| 
8fd5b5afa24d
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit e384d6dd5f410799ec211f73bca0b5d5d7bc651e
 lecorguille parents: diff
changeset | 9 # ----- PACKAGE ----- | 
| 
8fd5b5afa24d
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit e384d6dd5f410799ec211f73bca0b5d5d7bc651e
 lecorguille parents: diff
changeset | 10 cat("\tSESSION INFO\n") | 
| 
8fd5b5afa24d
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit e384d6dd5f410799ec211f73bca0b5d5d7bc651e
 lecorguille parents: diff
changeset | 11 | 
| 
8fd5b5afa24d
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit e384d6dd5f410799ec211f73bca0b5d5d7bc651e
 lecorguille parents: diff
changeset | 12 #Import the different functions | 
| 45 
1a711c1b8b1f
"planemo upload for repository https://github.com/workflow4metabolomics/xcms commit dcc90f9cf76e6980c0a7d9698c89fab826e7adae"
 workflow4metabolomics parents: 
44diff
changeset | 13 source_local <- function(fname) { | 
| 
1a711c1b8b1f
"planemo upload for repository https://github.com/workflow4metabolomics/xcms commit dcc90f9cf76e6980c0a7d9698c89fab826e7adae"
 workflow4metabolomics parents: 
44diff
changeset | 14 argv <- commandArgs(trailingOnly = FALSE); base_dir <- dirname(substring(argv[grep("--file=", argv)], 8)); source(paste(base_dir, fname, sep = "/")) | 
| 
1a711c1b8b1f
"planemo upload for repository https://github.com/workflow4metabolomics/xcms commit dcc90f9cf76e6980c0a7d9698c89fab826e7adae"
 workflow4metabolomics parents: 
44diff
changeset | 15 } | 
| 31 
8fd5b5afa24d
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit e384d6dd5f410799ec211f73bca0b5d5d7bc651e
 lecorguille parents: diff
changeset | 16 source_local("lib.r") | 
| 
8fd5b5afa24d
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit e384d6dd5f410799ec211f73bca0b5d5d7bc651e
 lecorguille parents: diff
changeset | 17 | 
| 45 
1a711c1b8b1f
"planemo upload for repository https://github.com/workflow4metabolomics/xcms commit dcc90f9cf76e6980c0a7d9698c89fab826e7adae"
 workflow4metabolomics parents: 
44diff
changeset | 18 pkgs <- c("xcms", "batch") | 
| 31 
8fd5b5afa24d
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit e384d6dd5f410799ec211f73bca0b5d5d7bc651e
 lecorguille parents: diff
changeset | 19 loadAndDisplayPackages(pkgs) | 
| 
8fd5b5afa24d
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit e384d6dd5f410799ec211f73bca0b5d5d7bc651e
 lecorguille parents: diff
changeset | 20 cat("\n\n"); | 
| 
8fd5b5afa24d
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit e384d6dd5f410799ec211f73bca0b5d5d7bc651e
 lecorguille parents: diff
changeset | 21 | 
| 
8fd5b5afa24d
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit e384d6dd5f410799ec211f73bca0b5d5d7bc651e
 lecorguille parents: diff
changeset | 22 | 
| 
8fd5b5afa24d
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit e384d6dd5f410799ec211f73bca0b5d5d7bc651e
 lecorguille parents: diff
changeset | 23 # ----- ARGUMENTS ----- | 
| 
8fd5b5afa24d
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit e384d6dd5f410799ec211f73bca0b5d5d7bc651e
 lecorguille parents: diff
changeset | 24 cat("\tARGUMENTS INFO\n") | 
| 45 
1a711c1b8b1f
"planemo upload for repository https://github.com/workflow4metabolomics/xcms commit dcc90f9cf76e6980c0a7d9698c89fab826e7adae"
 workflow4metabolomics parents: 
44diff
changeset | 25 args <- parseCommandArgs(evaluate = FALSE) #interpretation of arguments given in command line as an R list of objects | 
| 
1a711c1b8b1f
"planemo upload for repository https://github.com/workflow4metabolomics/xcms commit dcc90f9cf76e6980c0a7d9698c89fab826e7adae"
 workflow4metabolomics parents: 
44diff
changeset | 26 write.table(as.matrix(args), col.names = F, quote = F, sep = "\t") | 
| 31 
8fd5b5afa24d
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit e384d6dd5f410799ec211f73bca0b5d5d7bc651e
 lecorguille parents: diff
changeset | 27 | 
| 
8fd5b5afa24d
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit e384d6dd5f410799ec211f73bca0b5d5d7bc651e
 lecorguille parents: diff
changeset | 28 cat("\n\n") | 
| 
8fd5b5afa24d
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit e384d6dd5f410799ec211f73bca0b5d5d7bc651e
 lecorguille parents: diff
changeset | 29 | 
| 
8fd5b5afa24d
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit e384d6dd5f410799ec211f73bca0b5d5d7bc651e
 lecorguille parents: diff
changeset | 30 # ----- PROCESSING INFILE ----- | 
| 
8fd5b5afa24d
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit e384d6dd5f410799ec211f73bca0b5d5d7bc651e
 lecorguille parents: diff
changeset | 31 cat("\tARGUMENTS PROCESSING INFO\n") | 
| 
8fd5b5afa24d
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit e384d6dd5f410799ec211f73bca0b5d5d7bc651e
 lecorguille parents: diff
changeset | 32 | 
| 
8fd5b5afa24d
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit e384d6dd5f410799ec211f73bca0b5d5d7bc651e
 lecorguille parents: diff
changeset | 33 #saving the specific parameters | 
| 
8fd5b5afa24d
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit e384d6dd5f410799ec211f73bca0b5d5d7bc651e
 lecorguille parents: diff
changeset | 34 method <- "FillChromPeaks" | 
| 
8fd5b5afa24d
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit e384d6dd5f410799ec211f73bca0b5d5d7bc651e
 lecorguille parents: diff
changeset | 35 | 
| 34 
d8bac1291473
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit f01148783819c37e474790dbd56619862960448a
 lecorguille parents: 
31diff
changeset | 36 if (!is.null(args$convertRTMinute)) convertRTMinute <- args$convertRTMinute | 
| 
d8bac1291473
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit f01148783819c37e474790dbd56619862960448a
 lecorguille parents: 
31diff
changeset | 37 if (!is.null(args$numDigitsMZ)) numDigitsMZ <- args$numDigitsMZ | 
| 
d8bac1291473
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit f01148783819c37e474790dbd56619862960448a
 lecorguille parents: 
31diff
changeset | 38 if (!is.null(args$numDigitsRT)) numDigitsRT <- args$numDigitsRT | 
| 
d8bac1291473
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit f01148783819c37e474790dbd56619862960448a
 lecorguille parents: 
31diff
changeset | 39 if (!is.null(args$intval)) intval <- args$intval | 
| 38 
a3e80894efd3
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit e131bacd37bfaf2c4132fd214c81db9b8a9df513
 lecorguille parents: 
35diff
changeset | 40 if (!is.null(args$naTOzero)) naTOzero <- args$naTOzero | 
| 31 
8fd5b5afa24d
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit e384d6dd5f410799ec211f73bca0b5d5d7bc651e
 lecorguille parents: diff
changeset | 41 | 
| 
8fd5b5afa24d
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit e384d6dd5f410799ec211f73bca0b5d5d7bc651e
 lecorguille parents: diff
changeset | 42 cat("\n\n") | 
| 
8fd5b5afa24d
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit e384d6dd5f410799ec211f73bca0b5d5d7bc651e
 lecorguille parents: diff
changeset | 43 | 
| 
8fd5b5afa24d
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit e384d6dd5f410799ec211f73bca0b5d5d7bc651e
 lecorguille parents: diff
changeset | 44 | 
| 
8fd5b5afa24d
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit e384d6dd5f410799ec211f73bca0b5d5d7bc651e
 lecorguille parents: diff
changeset | 45 # ----- ARGUMENTS PROCESSING ----- | 
| 
8fd5b5afa24d
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit e384d6dd5f410799ec211f73bca0b5d5d7bc651e
 lecorguille parents: diff
changeset | 46 cat("\tINFILE PROCESSING INFO\n") | 
| 
8fd5b5afa24d
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit e384d6dd5f410799ec211f73bca0b5d5d7bc651e
 lecorguille parents: diff
changeset | 47 | 
| 
8fd5b5afa24d
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit e384d6dd5f410799ec211f73bca0b5d5d7bc651e
 lecorguille parents: diff
changeset | 48 #image is an .RData file necessary to use xset variable given by previous tools | 
| 34 
d8bac1291473
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit f01148783819c37e474790dbd56619862960448a
 lecorguille parents: 
31diff
changeset | 49 load(args$image) | 
| 31 
8fd5b5afa24d
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit e384d6dd5f410799ec211f73bca0b5d5d7bc651e
 lecorguille parents: diff
changeset | 50 if (!exists("xdata")) stop("\n\nERROR: The RData doesn't contain any object called 'xdata'. This RData should have been created by an old version of XMCS 2.*") | 
| 
8fd5b5afa24d
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit e384d6dd5f410799ec211f73bca0b5d5d7bc651e
 lecorguille parents: diff
changeset | 51 | 
| 
8fd5b5afa24d
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit e384d6dd5f410799ec211f73bca0b5d5d7bc651e
 lecorguille parents: diff
changeset | 52 #Verification of a group step before doing the fillpeaks job. | 
| 
8fd5b5afa24d
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit e384d6dd5f410799ec211f73bca0b5d5d7bc651e
 lecorguille parents: diff
changeset | 53 if (!hasFeatures(xdata)) stop("You must always do a group step after a retcor. Otherwise it won't work for the fillpeaks step") | 
| 
8fd5b5afa24d
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit e384d6dd5f410799ec211f73bca0b5d5d7bc651e
 lecorguille parents: diff
changeset | 54 | 
| 
8fd5b5afa24d
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit e384d6dd5f410799ec211f73bca0b5d5d7bc651e
 lecorguille parents: diff
changeset | 55 # Handle infiles | 
| 
8fd5b5afa24d
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit e384d6dd5f410799ec211f73bca0b5d5d7bc651e
 lecorguille parents: diff
changeset | 56 if (!exists("singlefile")) singlefile <- NULL | 
| 
8fd5b5afa24d
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit e384d6dd5f410799ec211f73bca0b5d5d7bc651e
 lecorguille parents: diff
changeset | 57 if (!exists("zipfile")) zipfile <- NULL | 
| 45 
1a711c1b8b1f
"planemo upload for repository https://github.com/workflow4metabolomics/xcms commit dcc90f9cf76e6980c0a7d9698c89fab826e7adae"
 workflow4metabolomics parents: 
44diff
changeset | 58 rawFilePath <- retrieveRawfileInTheWorkingDir(singlefile, zipfile, args) | 
| 31 
8fd5b5afa24d
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit e384d6dd5f410799ec211f73bca0b5d5d7bc651e
 lecorguille parents: diff
changeset | 59 zipfile <- rawFilePath$zipfile | 
| 
8fd5b5afa24d
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit e384d6dd5f410799ec211f73bca0b5d5d7bc651e
 lecorguille parents: diff
changeset | 60 singlefile <- rawFilePath$singlefile | 
| 
8fd5b5afa24d
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit e384d6dd5f410799ec211f73bca0b5d5d7bc651e
 lecorguille parents: diff
changeset | 61 | 
| 
8fd5b5afa24d
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit e384d6dd5f410799ec211f73bca0b5d5d7bc651e
 lecorguille parents: diff
changeset | 62 | 
| 
8fd5b5afa24d
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit e384d6dd5f410799ec211f73bca0b5d5d7bc651e
 lecorguille parents: diff
changeset | 63 cat("\n\n") | 
| 
8fd5b5afa24d
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit e384d6dd5f410799ec211f73bca0b5d5d7bc651e
 lecorguille parents: diff
changeset | 64 | 
| 
8fd5b5afa24d
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit e384d6dd5f410799ec211f73bca0b5d5d7bc651e
 lecorguille parents: diff
changeset | 65 # ----- MAIN PROCESSING INFO ----- | 
| 
8fd5b5afa24d
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit e384d6dd5f410799ec211f73bca0b5d5d7bc651e
 lecorguille parents: diff
changeset | 66 cat("\tMAIN PROCESSING INFO\n") | 
| 
8fd5b5afa24d
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit e384d6dd5f410799ec211f73bca0b5d5d7bc651e
 lecorguille parents: diff
changeset | 67 | 
| 
8fd5b5afa24d
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit e384d6dd5f410799ec211f73bca0b5d5d7bc651e
 lecorguille parents: diff
changeset | 68 | 
| 
8fd5b5afa24d
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit e384d6dd5f410799ec211f73bca0b5d5d7bc651e
 lecorguille parents: diff
changeset | 69 cat("\t\tCOMPUTE\n") | 
| 
8fd5b5afa24d
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit e384d6dd5f410799ec211f73bca0b5d5d7bc651e
 lecorguille parents: diff
changeset | 70 | 
| 
8fd5b5afa24d
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit e384d6dd5f410799ec211f73bca0b5d5d7bc651e
 lecorguille parents: diff
changeset | 71 cat("\t\t\tFilling missing peaks using default settings\n") | 
| 34 
d8bac1291473
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit f01148783819c37e474790dbd56619862960448a
 lecorguille parents: 
31diff
changeset | 72 # clear the arguement list to remove unexpected key/value as singlefile_galaxyPath or method ... | 
| 45 
1a711c1b8b1f
"planemo upload for repository https://github.com/workflow4metabolomics/xcms commit dcc90f9cf76e6980c0a7d9698c89fab826e7adae"
 workflow4metabolomics parents: 
44diff
changeset | 73 args <- args[names(args) %in% slotNames(do.call(paste0(method, "Param"), list()))] | 
| 34 
d8bac1291473
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit f01148783819c37e474790dbd56619862960448a
 lecorguille parents: 
31diff
changeset | 74 | 
| 45 
1a711c1b8b1f
"planemo upload for repository https://github.com/workflow4metabolomics/xcms commit dcc90f9cf76e6980c0a7d9698c89fab826e7adae"
 workflow4metabolomics parents: 
44diff
changeset | 75 fillChromPeaksParam <- do.call(paste0(method, "Param"), args) | 
| 31 
8fd5b5afa24d
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit e384d6dd5f410799ec211f73bca0b5d5d7bc651e
 lecorguille parents: diff
changeset | 76 print(fillChromPeaksParam) | 
| 42 
a98dbb09fed1
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit f0d42bca2f34c58c04b55e5990058d479c0ae639
 lecorguille parents: 
38diff
changeset | 77 | 
| 
a98dbb09fed1
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit f0d42bca2f34c58c04b55e5990058d479c0ae639
 lecorguille parents: 
38diff
changeset | 78 # back compatibility between xcms-3.0.0 and xcms-3.5.2 | 
| 
a98dbb09fed1
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit f0d42bca2f34c58c04b55e5990058d479c0ae639
 lecorguille parents: 
38diff
changeset | 79 xdata <- updateObject(xdata) | 
| 44 
1b5fb5a27f5e
"planemo upload for repository https://github.com/workflow4metabolomics/xcms commit f1caf2a3bf23cf319a75dd12c86402555dd02617"
 workflow4metabolomics parents: 
43diff
changeset | 80 register(SerialParam()) | 
| 45 
1a711c1b8b1f
"planemo upload for repository https://github.com/workflow4metabolomics/xcms commit dcc90f9cf76e6980c0a7d9698c89fab826e7adae"
 workflow4metabolomics parents: 
44diff
changeset | 81 xdata <- fillChromPeaks(xdata, param = fillChromPeaksParam) | 
| 31 
8fd5b5afa24d
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit e384d6dd5f410799ec211f73bca0b5d5d7bc651e
 lecorguille parents: diff
changeset | 82 | 
| 
8fd5b5afa24d
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit e384d6dd5f410799ec211f73bca0b5d5d7bc651e
 lecorguille parents: diff
changeset | 83 if (exists("intval")) { | 
| 38 
a3e80894efd3
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit e131bacd37bfaf2c4132fd214c81db9b8a9df513
 lecorguille parents: 
35diff
changeset | 84 getPeaklistW4M(xdata, intval, convertRTMinute, numDigitsMZ, numDigitsRT, naTOzero, "variableMetadata.tsv", "dataMatrix.tsv") | 
| 31 
8fd5b5afa24d
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit e384d6dd5f410799ec211f73bca0b5d5d7bc651e
 lecorguille parents: diff
changeset | 85 } | 
| 
8fd5b5afa24d
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit e384d6dd5f410799ec211f73bca0b5d5d7bc651e
 lecorguille parents: diff
changeset | 86 | 
| 
8fd5b5afa24d
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit e384d6dd5f410799ec211f73bca0b5d5d7bc651e
 lecorguille parents: diff
changeset | 87 cat("\n\n") | 
| 
8fd5b5afa24d
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit e384d6dd5f410799ec211f73bca0b5d5d7bc651e
 lecorguille parents: diff
changeset | 88 | 
| 
8fd5b5afa24d
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit e384d6dd5f410799ec211f73bca0b5d5d7bc651e
 lecorguille parents: diff
changeset | 89 # ----- EXPORT ----- | 
| 
8fd5b5afa24d
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit e384d6dd5f410799ec211f73bca0b5d5d7bc651e
 lecorguille parents: diff
changeset | 90 | 
| 
8fd5b5afa24d
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit e384d6dd5f410799ec211f73bca0b5d5d7bc651e
 lecorguille parents: diff
changeset | 91 cat("\tXCMSnExp OBJECT INFO\n") | 
| 
8fd5b5afa24d
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit e384d6dd5f410799ec211f73bca0b5d5d7bc651e
 lecorguille parents: diff
changeset | 92 print(xdata) | 
| 
8fd5b5afa24d
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit e384d6dd5f410799ec211f73bca0b5d5d7bc651e
 lecorguille parents: diff
changeset | 93 cat("\n\n") | 
| 
8fd5b5afa24d
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit e384d6dd5f410799ec211f73bca0b5d5d7bc651e
 lecorguille parents: diff
changeset | 94 | 
| 
8fd5b5afa24d
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit e384d6dd5f410799ec211f73bca0b5d5d7bc651e
 lecorguille parents: diff
changeset | 95 cat("\txcmsSet OBJECT INFO\n") | 
| 
8fd5b5afa24d
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit e384d6dd5f410799ec211f73bca0b5d5d7bc651e
 lecorguille parents: diff
changeset | 96 # Get the legacy xcmsSet object | 
| 
8fd5b5afa24d
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit e384d6dd5f410799ec211f73bca0b5d5d7bc651e
 lecorguille parents: diff
changeset | 97 xset <- getxcmsSetObject(xdata) | 
| 
8fd5b5afa24d
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit e384d6dd5f410799ec211f73bca0b5d5d7bc651e
 lecorguille parents: diff
changeset | 98 print(xset) | 
| 
8fd5b5afa24d
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit e384d6dd5f410799ec211f73bca0b5d5d7bc651e
 lecorguille parents: diff
changeset | 99 cat("\n\n") | 
| 
8fd5b5afa24d
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit e384d6dd5f410799ec211f73bca0b5d5d7bc651e
 lecorguille parents: diff
changeset | 100 | 
| 
8fd5b5afa24d
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit e384d6dd5f410799ec211f73bca0b5d5d7bc651e
 lecorguille parents: diff
changeset | 101 #saving R data in .Rdata file to save the variables used in the present tool | 
| 45 
1a711c1b8b1f
"planemo upload for repository https://github.com/workflow4metabolomics/xcms commit dcc90f9cf76e6980c0a7d9698c89fab826e7adae"
 workflow4metabolomics parents: 
44diff
changeset | 102 objects2save <- c("xdata", "zipfile", "singlefile", "md5sumList", "sampleNamesList") #, "chromTIC", "chromBPI", "chromTIC_adjusted", "chromBPI_adjusted") | 
| 
1a711c1b8b1f
"planemo upload for repository https://github.com/workflow4metabolomics/xcms commit dcc90f9cf76e6980c0a7d9698c89fab826e7adae"
 workflow4metabolomics parents: 
44diff
changeset | 103 save(list = objects2save[objects2save %in% ls()], file = "fillpeaks.RData") | 
| 31 
8fd5b5afa24d
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit e384d6dd5f410799ec211f73bca0b5d5d7bc651e
 lecorguille parents: diff
changeset | 104 | 
| 
8fd5b5afa24d
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit e384d6dd5f410799ec211f73bca0b5d5d7bc651e
 lecorguille parents: diff
changeset | 105 cat("\n\n") | 
| 
8fd5b5afa24d
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit e384d6dd5f410799ec211f73bca0b5d5d7bc651e
 lecorguille parents: diff
changeset | 106 | 
| 
8fd5b5afa24d
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit e384d6dd5f410799ec211f73bca0b5d5d7bc651e
 lecorguille parents: diff
changeset | 107 | 
| 
8fd5b5afa24d
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit e384d6dd5f410799ec211f73bca0b5d5d7bc651e
 lecorguille parents: diff
changeset | 108 cat("\tDONE\n") | 
