Mercurial > repos > lecorguille > xcms_fillpeaks
annotate xcms.r @ 28:9b0bf28bcbaf draft
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit 392e432529877680e80a7b338e20d69a42e53767
| author | lecorguille | 
|---|---|
| date | Mon, 03 Apr 2017 07:53:30 -0400 | 
| parents | 4db7afa8284d | 
| children | f6d3e6be4ea3 | 
| rev | line source | 
|---|---|
| 6 
f00e39a4b0fb
planemo upload commit a3229faad6949bbca965d1d7e138cb3c0550780e
 lecorguille parents: diff
changeset | 1 #!/usr/bin/env Rscript | 
| 
f00e39a4b0fb
planemo upload commit a3229faad6949bbca965d1d7e138cb3c0550780e
 lecorguille parents: diff
changeset | 2 # xcms.r version="2.2.0" | 
| 
f00e39a4b0fb
planemo upload commit a3229faad6949bbca965d1d7e138cb3c0550780e
 lecorguille parents: diff
changeset | 3 #Authors ABIMS TEAM | 
| 
f00e39a4b0fb
planemo upload commit a3229faad6949bbca965d1d7e138cb3c0550780e
 lecorguille parents: diff
changeset | 4 #BPC Addition from Y.guitton | 
| 
f00e39a4b0fb
planemo upload commit a3229faad6949bbca965d1d7e138cb3c0550780e
 lecorguille parents: diff
changeset | 5 | 
| 
f00e39a4b0fb
planemo upload commit a3229faad6949bbca965d1d7e138cb3c0550780e
 lecorguille parents: diff
changeset | 6 | 
| 
f00e39a4b0fb
planemo upload commit a3229faad6949bbca965d1d7e138cb3c0550780e
 lecorguille parents: diff
changeset | 7 # ----- LOG FILE ----- | 
| 
f00e39a4b0fb
planemo upload commit a3229faad6949bbca965d1d7e138cb3c0550780e
 lecorguille parents: diff
changeset | 8 log_file=file("log.txt", open = "wt") | 
| 
f00e39a4b0fb
planemo upload commit a3229faad6949bbca965d1d7e138cb3c0550780e
 lecorguille parents: diff
changeset | 9 sink(log_file) | 
| 
f00e39a4b0fb
planemo upload commit a3229faad6949bbca965d1d7e138cb3c0550780e
 lecorguille parents: diff
changeset | 10 sink(log_file, type = "output") | 
| 
f00e39a4b0fb
planemo upload commit a3229faad6949bbca965d1d7e138cb3c0550780e
 lecorguille parents: diff
changeset | 11 | 
| 
f00e39a4b0fb
planemo upload commit a3229faad6949bbca965d1d7e138cb3c0550780e
 lecorguille parents: diff
changeset | 12 | 
| 
f00e39a4b0fb
planemo upload commit a3229faad6949bbca965d1d7e138cb3c0550780e
 lecorguille parents: diff
changeset | 13 # ----- PACKAGE ----- | 
| 
f00e39a4b0fb
planemo upload commit a3229faad6949bbca965d1d7e138cb3c0550780e
 lecorguille parents: diff
changeset | 14 cat("\tPACKAGE INFO\n") | 
| 
f00e39a4b0fb
planemo upload commit a3229faad6949bbca965d1d7e138cb3c0550780e
 lecorguille parents: diff
changeset | 15 #pkgs=c("xcms","batch") | 
| 
f00e39a4b0fb
planemo upload commit a3229faad6949bbca965d1d7e138cb3c0550780e
 lecorguille parents: diff
changeset | 16 pkgs=c("parallel","BiocGenerics", "Biobase", "Rcpp", "mzR", "xcms","snow","batch") | 
| 
f00e39a4b0fb
planemo upload commit a3229faad6949bbca965d1d7e138cb3c0550780e
 lecorguille parents: diff
changeset | 17 for(pkg in pkgs) { | 
| 16 
5f61570177e2
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit 22c4e92909198328fc7439ff47e4546a273eb907
 lecorguille parents: 
15diff
changeset | 18 suppressPackageStartupMessages( stopifnot( library(pkg, quietly=TRUE, logical.return=TRUE, character.only=TRUE))) | 
| 
5f61570177e2
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit 22c4e92909198328fc7439ff47e4546a273eb907
 lecorguille parents: 
15diff
changeset | 19 cat(pkg,"\t",as.character(packageVersion(pkg)),"\n",sep="") | 
| 6 
f00e39a4b0fb
planemo upload commit a3229faad6949bbca965d1d7e138cb3c0550780e
 lecorguille parents: diff
changeset | 20 } | 
| 
f00e39a4b0fb
planemo upload commit a3229faad6949bbca965d1d7e138cb3c0550780e
 lecorguille parents: diff
changeset | 21 source_local <- function(fname){ argv <- commandArgs(trailingOnly = FALSE); base_dir <- dirname(substring(argv[grep("--file=", argv)], 8)); source(paste(base_dir, fname, sep="/")) } | 
| 15 
1c78d61fd646
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit 08e7f269a5c59687a7768be8db5fcb4e4d736093
 lecorguille parents: 
6diff
changeset | 22 cat("\n\n"); | 
| 6 
f00e39a4b0fb
planemo upload commit a3229faad6949bbca965d1d7e138cb3c0550780e
 lecorguille parents: diff
changeset | 23 | 
| 
f00e39a4b0fb
planemo upload commit a3229faad6949bbca965d1d7e138cb3c0550780e
 lecorguille parents: diff
changeset | 24 | 
| 
f00e39a4b0fb
planemo upload commit a3229faad6949bbca965d1d7e138cb3c0550780e
 lecorguille parents: diff
changeset | 25 | 
| 
f00e39a4b0fb
planemo upload commit a3229faad6949bbca965d1d7e138cb3c0550780e
 lecorguille parents: diff
changeset | 26 | 
| 
f00e39a4b0fb
planemo upload commit a3229faad6949bbca965d1d7e138cb3c0550780e
 lecorguille parents: diff
changeset | 27 | 
| 
f00e39a4b0fb
planemo upload commit a3229faad6949bbca965d1d7e138cb3c0550780e
 lecorguille parents: diff
changeset | 28 # ----- ARGUMENTS ----- | 
| 
f00e39a4b0fb
planemo upload commit a3229faad6949bbca965d1d7e138cb3c0550780e
 lecorguille parents: diff
changeset | 29 cat("\tARGUMENTS INFO\n") | 
| 
f00e39a4b0fb
planemo upload commit a3229faad6949bbca965d1d7e138cb3c0550780e
 lecorguille parents: diff
changeset | 30 listArguments = parseCommandArgs(evaluate=FALSE) #interpretation of arguments given in command line as an R list of objects | 
| 
f00e39a4b0fb
planemo upload commit a3229faad6949bbca965d1d7e138cb3c0550780e
 lecorguille parents: diff
changeset | 31 write.table(as.matrix(listArguments), col.names=F, quote=F, sep='\t') | 
| 
f00e39a4b0fb
planemo upload commit a3229faad6949bbca965d1d7e138cb3c0550780e
 lecorguille parents: diff
changeset | 32 | 
| 
f00e39a4b0fb
planemo upload commit a3229faad6949bbca965d1d7e138cb3c0550780e
 lecorguille parents: diff
changeset | 33 cat("\n\n"); | 
| 
f00e39a4b0fb
planemo upload commit a3229faad6949bbca965d1d7e138cb3c0550780e
 lecorguille parents: diff
changeset | 34 | 
| 
f00e39a4b0fb
planemo upload commit a3229faad6949bbca965d1d7e138cb3c0550780e
 lecorguille parents: diff
changeset | 35 | 
| 
f00e39a4b0fb
planemo upload commit a3229faad6949bbca965d1d7e138cb3c0550780e
 lecorguille parents: diff
changeset | 36 # ----- ARGUMENTS PROCESSING ----- | 
| 
f00e39a4b0fb
planemo upload commit a3229faad6949bbca965d1d7e138cb3c0550780e
 lecorguille parents: diff
changeset | 37 cat("\tINFILE PROCESSING INFO\n") | 
| 
f00e39a4b0fb
planemo upload commit a3229faad6949bbca965d1d7e138cb3c0550780e
 lecorguille parents: diff
changeset | 38 | 
| 
f00e39a4b0fb
planemo upload commit a3229faad6949bbca965d1d7e138cb3c0550780e
 lecorguille parents: diff
changeset | 39 #image is an .RData file necessary to use xset variable given by previous tools | 
| 
f00e39a4b0fb
planemo upload commit a3229faad6949bbca965d1d7e138cb3c0550780e
 lecorguille parents: diff
changeset | 40 if (!is.null(listArguments[["image"]])){ | 
| 16 
5f61570177e2
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit 22c4e92909198328fc7439ff47e4546a273eb907
 lecorguille parents: 
15diff
changeset | 41 load(listArguments[["image"]]); listArguments[["image"]]=NULL | 
| 6 
f00e39a4b0fb
planemo upload commit a3229faad6949bbca965d1d7e138cb3c0550780e
 lecorguille parents: diff
changeset | 42 } | 
| 
f00e39a4b0fb
planemo upload commit a3229faad6949bbca965d1d7e138cb3c0550780e
 lecorguille parents: diff
changeset | 43 | 
| 
f00e39a4b0fb
planemo upload commit a3229faad6949bbca965d1d7e138cb3c0550780e
 lecorguille parents: diff
changeset | 44 #Import the different functions | 
| 
f00e39a4b0fb
planemo upload commit a3229faad6949bbca965d1d7e138cb3c0550780e
 lecorguille parents: diff
changeset | 45 source_local("lib.r") | 
| 
f00e39a4b0fb
planemo upload commit a3229faad6949bbca965d1d7e138cb3c0550780e
 lecorguille parents: diff
changeset | 46 | 
| 
f00e39a4b0fb
planemo upload commit a3229faad6949bbca965d1d7e138cb3c0550780e
 lecorguille parents: diff
changeset | 47 cat("\n\n") | 
| 
f00e39a4b0fb
planemo upload commit a3229faad6949bbca965d1d7e138cb3c0550780e
 lecorguille parents: diff
changeset | 48 | 
| 
f00e39a4b0fb
planemo upload commit a3229faad6949bbca965d1d7e138cb3c0550780e
 lecorguille parents: diff
changeset | 49 #Import the different functions | 
| 
f00e39a4b0fb
planemo upload commit a3229faad6949bbca965d1d7e138cb3c0550780e
 lecorguille parents: diff
changeset | 50 | 
| 
f00e39a4b0fb
planemo upload commit a3229faad6949bbca965d1d7e138cb3c0550780e
 lecorguille parents: diff
changeset | 51 # ----- PROCESSING INFILE ----- | 
| 
f00e39a4b0fb
planemo upload commit a3229faad6949bbca965d1d7e138cb3c0550780e
 lecorguille parents: diff
changeset | 52 cat("\tARGUMENTS PROCESSING INFO\n") | 
| 
f00e39a4b0fb
planemo upload commit a3229faad6949bbca965d1d7e138cb3c0550780e
 lecorguille parents: diff
changeset | 53 | 
| 
f00e39a4b0fb
planemo upload commit a3229faad6949bbca965d1d7e138cb3c0550780e
 lecorguille parents: diff
changeset | 54 # Save arguments to generate a report | 
| 
f00e39a4b0fb
planemo upload commit a3229faad6949bbca965d1d7e138cb3c0550780e
 lecorguille parents: diff
changeset | 55 if (!exists("listOFlistArguments")) listOFlistArguments=list() | 
| 
f00e39a4b0fb
planemo upload commit a3229faad6949bbca965d1d7e138cb3c0550780e
 lecorguille parents: diff
changeset | 56 listOFlistArguments[[paste(format(Sys.time(), "%y%m%d-%H:%M:%S_"),listArguments[["xfunction"]],sep="")]] = listArguments | 
| 
f00e39a4b0fb
planemo upload commit a3229faad6949bbca965d1d7e138cb3c0550780e
 lecorguille parents: diff
changeset | 57 | 
| 
f00e39a4b0fb
planemo upload commit a3229faad6949bbca965d1d7e138cb3c0550780e
 lecorguille parents: diff
changeset | 58 | 
| 
f00e39a4b0fb
planemo upload commit a3229faad6949bbca965d1d7e138cb3c0550780e
 lecorguille parents: diff
changeset | 59 #saving the commun parameters | 
| 
f00e39a4b0fb
planemo upload commit a3229faad6949bbca965d1d7e138cb3c0550780e
 lecorguille parents: diff
changeset | 60 thefunction = listArguments[["xfunction"]]; listArguments[["xfunction"]]=NULL #delete from the list of arguments | 
| 
f00e39a4b0fb
planemo upload commit a3229faad6949bbca965d1d7e138cb3c0550780e
 lecorguille parents: diff
changeset | 61 | 
| 
f00e39a4b0fb
planemo upload commit a3229faad6949bbca965d1d7e138cb3c0550780e
 lecorguille parents: diff
changeset | 62 xsetRdataOutput = paste(thefunction,"RData",sep=".") | 
| 
f00e39a4b0fb
planemo upload commit a3229faad6949bbca965d1d7e138cb3c0550780e
 lecorguille parents: diff
changeset | 63 if (!is.null(listArguments[["xsetRdataOutput"]])){ | 
| 16 
5f61570177e2
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit 22c4e92909198328fc7439ff47e4546a273eb907
 lecorguille parents: 
15diff
changeset | 64 xsetRdataOutput = listArguments[["xsetRdataOutput"]]; listArguments[["xsetRdataOutput"]]=NULL | 
| 6 
f00e39a4b0fb
planemo upload commit a3229faad6949bbca965d1d7e138cb3c0550780e
 lecorguille parents: diff
changeset | 65 } | 
| 
f00e39a4b0fb
planemo upload commit a3229faad6949bbca965d1d7e138cb3c0550780e
 lecorguille parents: diff
changeset | 66 | 
| 15 
1c78d61fd646
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit 08e7f269a5c59687a7768be8db5fcb4e4d736093
 lecorguille parents: 
6diff
changeset | 67 #saving the specific parameters | 
| 6 
f00e39a4b0fb
planemo upload commit a3229faad6949bbca965d1d7e138cb3c0550780e
 lecorguille parents: diff
changeset | 68 rplotspdf = "Rplots.pdf" | 
| 
f00e39a4b0fb
planemo upload commit a3229faad6949bbca965d1d7e138cb3c0550780e
 lecorguille parents: diff
changeset | 69 if (!is.null(listArguments[["rplotspdf"]])){ | 
| 16 
5f61570177e2
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit 22c4e92909198328fc7439ff47e4546a273eb907
 lecorguille parents: 
15diff
changeset | 70 rplotspdf = listArguments[["rplotspdf"]]; listArguments[["rplotspdf"]]=NULL | 
| 6 
f00e39a4b0fb
planemo upload commit a3229faad6949bbca965d1d7e138cb3c0550780e
 lecorguille parents: diff
changeset | 71 } | 
| 
f00e39a4b0fb
planemo upload commit a3229faad6949bbca965d1d7e138cb3c0550780e
 lecorguille parents: diff
changeset | 72 sampleMetadataOutput = "sampleMetadata.tsv" | 
| 
f00e39a4b0fb
planemo upload commit a3229faad6949bbca965d1d7e138cb3c0550780e
 lecorguille parents: diff
changeset | 73 if (!is.null(listArguments[["sampleMetadataOutput"]])){ | 
| 23 
7e289788d37d
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit 87dc789d7cd70a3733a1ad0b5a427f4d5905795d
 lecorguille parents: 
20diff
changeset | 74 sampleMetadataOutput = listArguments[["sampleMetadataOutput"]]; listArguments[["sampleMetadataOutput"]]=NULL | 
| 6 
f00e39a4b0fb
planemo upload commit a3229faad6949bbca965d1d7e138cb3c0550780e
 lecorguille parents: diff
changeset | 75 } | 
| 15 
1c78d61fd646
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit 08e7f269a5c59687a7768be8db5fcb4e4d736093
 lecorguille parents: 
6diff
changeset | 76 variableMetadataOutput = "variableMetadata.tsv" | 
| 
1c78d61fd646
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit 08e7f269a5c59687a7768be8db5fcb4e4d736093
 lecorguille parents: 
6diff
changeset | 77 if (!is.null(listArguments[["variableMetadataOutput"]])){ | 
| 16 
5f61570177e2
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit 22c4e92909198328fc7439ff47e4546a273eb907
 lecorguille parents: 
15diff
changeset | 78 variableMetadataOutput = listArguments[["variableMetadataOutput"]]; listArguments[["variableMetadataOutput"]]=NULL | 
| 15 
1c78d61fd646
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit 08e7f269a5c59687a7768be8db5fcb4e4d736093
 lecorguille parents: 
6diff
changeset | 79 } | 
| 
1c78d61fd646
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit 08e7f269a5c59687a7768be8db5fcb4e4d736093
 lecorguille parents: 
6diff
changeset | 80 dataMatrixOutput = "dataMatrix.tsv" | 
| 
1c78d61fd646
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit 08e7f269a5c59687a7768be8db5fcb4e4d736093
 lecorguille parents: 
6diff
changeset | 81 if (!is.null(listArguments[["dataMatrixOutput"]])){ | 
| 16 
5f61570177e2
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit 22c4e92909198328fc7439ff47e4546a273eb907
 lecorguille parents: 
15diff
changeset | 82 dataMatrixOutput = listArguments[["dataMatrixOutput"]]; listArguments[["dataMatrixOutput"]]=NULL | 
| 15 
1c78d61fd646
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit 08e7f269a5c59687a7768be8db5fcb4e4d736093
 lecorguille parents: 
6diff
changeset | 83 } | 
| 
1c78d61fd646
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit 08e7f269a5c59687a7768be8db5fcb4e4d736093
 lecorguille parents: 
6diff
changeset | 84 if (!is.null(listArguments[["convertRTMinute"]])){ | 
| 16 
5f61570177e2
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit 22c4e92909198328fc7439ff47e4546a273eb907
 lecorguille parents: 
15diff
changeset | 85 convertRTMinute = listArguments[["convertRTMinute"]]; listArguments[["convertRTMinute"]]=NULL | 
| 15 
1c78d61fd646
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit 08e7f269a5c59687a7768be8db5fcb4e4d736093
 lecorguille parents: 
6diff
changeset | 86 } | 
| 
1c78d61fd646
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit 08e7f269a5c59687a7768be8db5fcb4e4d736093
 lecorguille parents: 
6diff
changeset | 87 if (!is.null(listArguments[["numDigitsMZ"]])){ | 
| 16 
5f61570177e2
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit 22c4e92909198328fc7439ff47e4546a273eb907
 lecorguille parents: 
15diff
changeset | 88 numDigitsMZ = listArguments[["numDigitsMZ"]]; listArguments[["numDigitsMZ"]]=NULL | 
| 15 
1c78d61fd646
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit 08e7f269a5c59687a7768be8db5fcb4e4d736093
 lecorguille parents: 
6diff
changeset | 89 } | 
| 
1c78d61fd646
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit 08e7f269a5c59687a7768be8db5fcb4e4d736093
 lecorguille parents: 
6diff
changeset | 90 if (!is.null(listArguments[["numDigitsRT"]])){ | 
| 
1c78d61fd646
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit 08e7f269a5c59687a7768be8db5fcb4e4d736093
 lecorguille parents: 
6diff
changeset | 91 numDigitsRT = listArguments[["numDigitsRT"]]; listArguments[["numDigitsRT"]]=NULL | 
| 
1c78d61fd646
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit 08e7f269a5c59687a7768be8db5fcb4e4d736093
 lecorguille parents: 
6diff
changeset | 92 } | 
| 
1c78d61fd646
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit 08e7f269a5c59687a7768be8db5fcb4e4d736093
 lecorguille parents: 
6diff
changeset | 93 if (!is.null(listArguments[["intval"]])){ | 
| 16 
5f61570177e2
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit 22c4e92909198328fc7439ff47e4546a273eb907
 lecorguille parents: 
15diff
changeset | 94 intval = listArguments[["intval"]]; listArguments[["intval"]]=NULL | 
| 15 
1c78d61fd646
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit 08e7f269a5c59687a7768be8db5fcb4e4d736093
 lecorguille parents: 
6diff
changeset | 95 } | 
| 6 
f00e39a4b0fb
planemo upload commit a3229faad6949bbca965d1d7e138cb3c0550780e
 lecorguille parents: diff
changeset | 96 | 
| 
f00e39a4b0fb
planemo upload commit a3229faad6949bbca965d1d7e138cb3c0550780e
 lecorguille parents: diff
changeset | 97 if (thefunction %in% c("xcmsSet","retcor")) { | 
| 16 
5f61570177e2
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit 22c4e92909198328fc7439ff47e4546a273eb907
 lecorguille parents: 
15diff
changeset | 98 ticspdf = listArguments[["ticspdf"]]; listArguments[["ticspdf"]]=NULL | 
| 
5f61570177e2
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit 22c4e92909198328fc7439ff47e4546a273eb907
 lecorguille parents: 
15diff
changeset | 99 bicspdf = listArguments[["bicspdf"]]; listArguments[["bicspdf"]]=NULL | 
| 6 
f00e39a4b0fb
planemo upload commit a3229faad6949bbca965d1d7e138cb3c0550780e
 lecorguille parents: diff
changeset | 100 } | 
| 
f00e39a4b0fb
planemo upload commit a3229faad6949bbca965d1d7e138cb3c0550780e
 lecorguille parents: diff
changeset | 101 | 
| 
f00e39a4b0fb
planemo upload commit a3229faad6949bbca965d1d7e138cb3c0550780e
 lecorguille parents: diff
changeset | 102 | 
| 
f00e39a4b0fb
planemo upload commit a3229faad6949bbca965d1d7e138cb3c0550780e
 lecorguille parents: diff
changeset | 103 if (thefunction %in% c("xcmsSet","retcor","fillPeaks")) { | 
| 26 
4db7afa8284d
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit 5583baab62c0f17cabbfe93ba4f2522e8df9b36b
 lecorguille parents: 
24diff
changeset | 104 if (!exists("singlefile")) singlefile=NULL | 
| 
4db7afa8284d
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit 5583baab62c0f17cabbfe93ba4f2522e8df9b36b
 lecorguille parents: 
24diff
changeset | 105 if (!exists("zipfile")) zipfile=NULL | 
| 
4db7afa8284d
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit 5583baab62c0f17cabbfe93ba4f2522e8df9b36b
 lecorguille parents: 
24diff
changeset | 106 rawFilePath = getRawfilePathFromArguments(singlefile, zipfile, listArguments) | 
| 23 
7e289788d37d
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit 87dc789d7cd70a3733a1ad0b5a427f4d5905795d
 lecorguille parents: 
20diff
changeset | 107 zipfile = rawFilePath$zipfile | 
| 
7e289788d37d
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit 87dc789d7cd70a3733a1ad0b5a427f4d5905795d
 lecorguille parents: 
20diff
changeset | 108 singlefile = rawFilePath$singlefile | 
| 
7e289788d37d
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit 87dc789d7cd70a3733a1ad0b5a427f4d5905795d
 lecorguille parents: 
20diff
changeset | 109 listArguments = rawFilePath$listArguments | 
| 
7e289788d37d
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit 87dc789d7cd70a3733a1ad0b5a427f4d5905795d
 lecorguille parents: 
20diff
changeset | 110 directory = retrieveRawfileInTheWorkingDirectory(singlefile, zipfile) | 
| 
7e289788d37d
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit 87dc789d7cd70a3733a1ad0b5a427f4d5905795d
 lecorguille parents: 
20diff
changeset | 111 md5sumList=list("origin"=getMd5sum(directory)) | 
| 6 
f00e39a4b0fb
planemo upload commit a3229faad6949bbca965d1d7e138cb3c0550780e
 lecorguille parents: diff
changeset | 112 } | 
| 
f00e39a4b0fb
planemo upload commit a3229faad6949bbca965d1d7e138cb3c0550780e
 lecorguille parents: diff
changeset | 113 | 
| 
f00e39a4b0fb
planemo upload commit a3229faad6949bbca965d1d7e138cb3c0550780e
 lecorguille parents: diff
changeset | 114 #addition of the directory to the list of arguments in the first position | 
| 
f00e39a4b0fb
planemo upload commit a3229faad6949bbca965d1d7e138cb3c0550780e
 lecorguille parents: diff
changeset | 115 if (thefunction == "xcmsSet") { | 
| 16 
5f61570177e2
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit 22c4e92909198328fc7439ff47e4546a273eb907
 lecorguille parents: 
15diff
changeset | 116 checkXmlStructure(directory) | 
| 
5f61570177e2
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit 22c4e92909198328fc7439ff47e4546a273eb907
 lecorguille parents: 
15diff
changeset | 117 checkFilesCompatibilityWithXcms(directory) | 
| 
5f61570177e2
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit 22c4e92909198328fc7439ff47e4546a273eb907
 lecorguille parents: 
15diff
changeset | 118 listArguments=append(directory, listArguments) | 
| 6 
f00e39a4b0fb
planemo upload commit a3229faad6949bbca965d1d7e138cb3c0550780e
 lecorguille parents: diff
changeset | 119 } | 
| 
f00e39a4b0fb
planemo upload commit a3229faad6949bbca965d1d7e138cb3c0550780e
 lecorguille parents: diff
changeset | 120 | 
| 
f00e39a4b0fb
planemo upload commit a3229faad6949bbca965d1d7e138cb3c0550780e
 lecorguille parents: diff
changeset | 121 | 
| 
f00e39a4b0fb
planemo upload commit a3229faad6949bbca965d1d7e138cb3c0550780e
 lecorguille parents: diff
changeset | 122 #addition of xset object to the list of arguments in the first position | 
| 
f00e39a4b0fb
planemo upload commit a3229faad6949bbca965d1d7e138cb3c0550780e
 lecorguille parents: diff
changeset | 123 if (exists("xset")){ | 
| 16 
5f61570177e2
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit 22c4e92909198328fc7439ff47e4546a273eb907
 lecorguille parents: 
15diff
changeset | 124 listArguments=append(list(xset), listArguments) | 
| 6 
f00e39a4b0fb
planemo upload commit a3229faad6949bbca965d1d7e138cb3c0550780e
 lecorguille parents: diff
changeset | 125 } | 
| 
f00e39a4b0fb
planemo upload commit a3229faad6949bbca965d1d7e138cb3c0550780e
 lecorguille parents: diff
changeset | 126 | 
| 
f00e39a4b0fb
planemo upload commit a3229faad6949bbca965d1d7e138cb3c0550780e
 lecorguille parents: diff
changeset | 127 cat("\n\n") | 
| 
f00e39a4b0fb
planemo upload commit a3229faad6949bbca965d1d7e138cb3c0550780e
 lecorguille parents: diff
changeset | 128 | 
| 
f00e39a4b0fb
planemo upload commit a3229faad6949bbca965d1d7e138cb3c0550780e
 lecorguille parents: diff
changeset | 129 | 
| 
f00e39a4b0fb
planemo upload commit a3229faad6949bbca965d1d7e138cb3c0550780e
 lecorguille parents: diff
changeset | 130 | 
| 
f00e39a4b0fb
planemo upload commit a3229faad6949bbca965d1d7e138cb3c0550780e
 lecorguille parents: diff
changeset | 131 | 
| 
f00e39a4b0fb
planemo upload commit a3229faad6949bbca965d1d7e138cb3c0550780e
 lecorguille parents: diff
changeset | 132 # ----- MAIN PROCESSING INFO ----- | 
| 
f00e39a4b0fb
planemo upload commit a3229faad6949bbca965d1d7e138cb3c0550780e
 lecorguille parents: diff
changeset | 133 cat("\tMAIN PROCESSING INFO\n") | 
| 
f00e39a4b0fb
planemo upload commit a3229faad6949bbca965d1d7e138cb3c0550780e
 lecorguille parents: diff
changeset | 134 | 
| 
f00e39a4b0fb
planemo upload commit a3229faad6949bbca965d1d7e138cb3c0550780e
 lecorguille parents: diff
changeset | 135 | 
| 
f00e39a4b0fb
planemo upload commit a3229faad6949bbca965d1d7e138cb3c0550780e
 lecorguille parents: diff
changeset | 136 #Verification of a group step before doing the fillpeaks job. | 
| 
f00e39a4b0fb
planemo upload commit a3229faad6949bbca965d1d7e138cb3c0550780e
 lecorguille parents: diff
changeset | 137 | 
| 
f00e39a4b0fb
planemo upload commit a3229faad6949bbca965d1d7e138cb3c0550780e
 lecorguille parents: diff
changeset | 138 if (thefunction == "fillPeaks") { | 
| 16 
5f61570177e2
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit 22c4e92909198328fc7439ff47e4546a273eb907
 lecorguille parents: 
15diff
changeset | 139 res=try(is.null(groupnames(xset))) | 
| 
5f61570177e2
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit 22c4e92909198328fc7439ff47e4546a273eb907
 lecorguille parents: 
15diff
changeset | 140 if (class(res) == "try-error"){ | 
| 
5f61570177e2
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit 22c4e92909198328fc7439ff47e4546a273eb907
 lecorguille parents: 
15diff
changeset | 141 error<-geterrmessage() | 
| 
5f61570177e2
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit 22c4e92909198328fc7439ff47e4546a273eb907
 lecorguille parents: 
15diff
changeset | 142 write(error, stderr()) | 
| 
5f61570177e2
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit 22c4e92909198328fc7439ff47e4546a273eb907
 lecorguille parents: 
15diff
changeset | 143 stop("You must always do a group step after a retcor. Otherwise it won't work for the fillpeaks step") | 
| 
5f61570177e2
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit 22c4e92909198328fc7439ff47e4546a273eb907
 lecorguille parents: 
15diff
changeset | 144 } | 
| 6 
f00e39a4b0fb
planemo upload commit a3229faad6949bbca965d1d7e138cb3c0550780e
 lecorguille parents: diff
changeset | 145 | 
| 
f00e39a4b0fb
planemo upload commit a3229faad6949bbca965d1d7e138cb3c0550780e
 lecorguille parents: diff
changeset | 146 } | 
| 
f00e39a4b0fb
planemo upload commit a3229faad6949bbca965d1d7e138cb3c0550780e
 lecorguille parents: diff
changeset | 147 | 
| 
f00e39a4b0fb
planemo upload commit a3229faad6949bbca965d1d7e138cb3c0550780e
 lecorguille parents: diff
changeset | 148 #change the default display settings | 
| 
f00e39a4b0fb
planemo upload commit a3229faad6949bbca965d1d7e138cb3c0550780e
 lecorguille parents: diff
changeset | 149 #dev.new(file="Rplots.pdf", width=16, height=12) | 
| 
f00e39a4b0fb
planemo upload commit a3229faad6949bbca965d1d7e138cb3c0550780e
 lecorguille parents: diff
changeset | 150 pdf(file=rplotspdf, width=16, height=12) | 
| 
f00e39a4b0fb
planemo upload commit a3229faad6949bbca965d1d7e138cb3c0550780e
 lecorguille parents: diff
changeset | 151 if (thefunction == "group") { | 
| 16 
5f61570177e2
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit 22c4e92909198328fc7439ff47e4546a273eb907
 lecorguille parents: 
15diff
changeset | 152 par(mfrow=c(2,2)) | 
| 6 
f00e39a4b0fb
planemo upload commit a3229faad6949bbca965d1d7e138cb3c0550780e
 lecorguille parents: diff
changeset | 153 } | 
| 
f00e39a4b0fb
planemo upload commit a3229faad6949bbca965d1d7e138cb3c0550780e
 lecorguille parents: diff
changeset | 154 #else if (thefunction == "retcor") { | 
| 
f00e39a4b0fb
planemo upload commit a3229faad6949bbca965d1d7e138cb3c0550780e
 lecorguille parents: diff
changeset | 155 #try to change the legend display | 
| 
f00e39a4b0fb
planemo upload commit a3229faad6949bbca965d1d7e138cb3c0550780e
 lecorguille parents: diff
changeset | 156 # par(xpd=NA) | 
| 
f00e39a4b0fb
planemo upload commit a3229faad6949bbca965d1d7e138cb3c0550780e
 lecorguille parents: diff
changeset | 157 # par(xpd=T, mar=par()$mar+c(0,0,0,4)) | 
| 
f00e39a4b0fb
planemo upload commit a3229faad6949bbca965d1d7e138cb3c0550780e
 lecorguille parents: diff
changeset | 158 #} | 
| 
f00e39a4b0fb
planemo upload commit a3229faad6949bbca965d1d7e138cb3c0550780e
 lecorguille parents: diff
changeset | 159 | 
| 
f00e39a4b0fb
planemo upload commit a3229faad6949bbca965d1d7e138cb3c0550780e
 lecorguille parents: diff
changeset | 160 | 
| 
f00e39a4b0fb
planemo upload commit a3229faad6949bbca965d1d7e138cb3c0550780e
 lecorguille parents: diff
changeset | 161 #execution of the function "thefunction" with the parameters given in "listArguments" | 
| 15 
1c78d61fd646
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit 08e7f269a5c59687a7768be8db5fcb4e4d736093
 lecorguille parents: 
6diff
changeset | 162 | 
| 
1c78d61fd646
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit 08e7f269a5c59687a7768be8db5fcb4e4d736093
 lecorguille parents: 
6diff
changeset | 163 cat("\t\tCOMPUTE\n") | 
| 6 
f00e39a4b0fb
planemo upload commit a3229faad6949bbca965d1d7e138cb3c0550780e
 lecorguille parents: diff
changeset | 164 xset = do.call(thefunction, listArguments) | 
| 
f00e39a4b0fb
planemo upload commit a3229faad6949bbca965d1d7e138cb3c0550780e
 lecorguille parents: diff
changeset | 165 | 
| 24 
7a01dfc8be41
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit e1f22c9b6d39de7aabc6bb625f65aa5ba6a91312
 lecorguille parents: 
23diff
changeset | 166 # check if there are no peaks | 
| 
7a01dfc8be41
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit e1f22c9b6d39de7aabc6bb625f65aa5ba6a91312
 lecorguille parents: 
23diff
changeset | 167 if (nrow(peaks(xset)) == 0) { | 
| 
7a01dfc8be41
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit e1f22c9b6d39de7aabc6bb625f65aa5ba6a91312
 lecorguille parents: 
23diff
changeset | 168 stop("No peaks were detected. You should review your settings") | 
| 
7a01dfc8be41
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit e1f22c9b6d39de7aabc6bb625f65aa5ba6a91312
 lecorguille parents: 
23diff
changeset | 169 } | 
| 
7a01dfc8be41
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit e1f22c9b6d39de7aabc6bb625f65aa5ba6a91312
 lecorguille parents: 
23diff
changeset | 170 | 
| 6 
f00e39a4b0fb
planemo upload commit a3229faad6949bbca965d1d7e138cb3c0550780e
 lecorguille parents: diff
changeset | 171 | 
| 
f00e39a4b0fb
planemo upload commit a3229faad6949bbca965d1d7e138cb3c0550780e
 lecorguille parents: diff
changeset | 172 cat("\n\n") | 
| 
f00e39a4b0fb
planemo upload commit a3229faad6949bbca965d1d7e138cb3c0550780e
 lecorguille parents: diff
changeset | 173 | 
| 
f00e39a4b0fb
planemo upload commit a3229faad6949bbca965d1d7e138cb3c0550780e
 lecorguille parents: diff
changeset | 174 dev.off() #dev.new(file="Rplots.pdf", width=16, height=12) | 
| 
f00e39a4b0fb
planemo upload commit a3229faad6949bbca965d1d7e138cb3c0550780e
 lecorguille parents: diff
changeset | 175 | 
| 
f00e39a4b0fb
planemo upload commit a3229faad6949bbca965d1d7e138cb3c0550780e
 lecorguille parents: diff
changeset | 176 if (thefunction == "xcmsSet") { | 
| 
f00e39a4b0fb
planemo upload commit a3229faad6949bbca965d1d7e138cb3c0550780e
 lecorguille parents: diff
changeset | 177 | 
| 16 
5f61570177e2
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit 22c4e92909198328fc7439ff47e4546a273eb907
 lecorguille parents: 
15diff
changeset | 178 #transform the files absolute pathways into relative pathways | 
| 
5f61570177e2
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit 22c4e92909198328fc7439ff47e4546a273eb907
 lecorguille parents: 
15diff
changeset | 179 xset@filepaths<-sub(paste(getwd(),"/",sep="") ,"", xset@filepaths) | 
| 23 
7e289788d37d
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit 87dc789d7cd70a3733a1ad0b5a427f4d5905795d
 lecorguille parents: 
20diff
changeset | 180 if(exists("zipfile") && !is.null(zipfile) && (zipfile!="")) { | 
| 15 
1c78d61fd646
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit 08e7f269a5c59687a7768be8db5fcb4e4d736093
 lecorguille parents: 
6diff
changeset | 181 | 
| 16 
5f61570177e2
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit 22c4e92909198328fc7439ff47e4546a273eb907
 lecorguille parents: 
15diff
changeset | 182 #Modify the samples names (erase the path) | 
| 
5f61570177e2
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit 22c4e92909198328fc7439ff47e4546a273eb907
 lecorguille parents: 
15diff
changeset | 183 for(i in 1:length(sampnames(xset))){ | 
| 6 
f00e39a4b0fb
planemo upload commit a3229faad6949bbca965d1d7e138cb3c0550780e
 lecorguille parents: diff
changeset | 184 | 
| 16 
5f61570177e2
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit 22c4e92909198328fc7439ff47e4546a273eb907
 lecorguille parents: 
15diff
changeset | 185 sample_name=unlist(strsplit(sampnames(xset)[i], "/")) | 
| 
5f61570177e2
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit 22c4e92909198328fc7439ff47e4546a273eb907
 lecorguille parents: 
15diff
changeset | 186 sample_name=sample_name[length(sample_name)] | 
| 
5f61570177e2
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit 22c4e92909198328fc7439ff47e4546a273eb907
 lecorguille parents: 
15diff
changeset | 187 sample_name= unlist(strsplit(sample_name,"[.]"))[1] | 
| 
5f61570177e2
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit 22c4e92909198328fc7439ff47e4546a273eb907
 lecorguille parents: 
15diff
changeset | 188 sampnames(xset)[i]=sample_name | 
| 
5f61570177e2
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit 22c4e92909198328fc7439ff47e4546a273eb907
 lecorguille parents: 
15diff
changeset | 189 | 
| 
5f61570177e2
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit 22c4e92909198328fc7439ff47e4546a273eb907
 lecorguille parents: 
15diff
changeset | 190 } | 
| 6 
f00e39a4b0fb
planemo upload commit a3229faad6949bbca965d1d7e138cb3c0550780e
 lecorguille parents: diff
changeset | 191 | 
| 
f00e39a4b0fb
planemo upload commit a3229faad6949bbca965d1d7e138cb3c0550780e
 lecorguille parents: diff
changeset | 192 } | 
| 
f00e39a4b0fb
planemo upload commit a3229faad6949bbca965d1d7e138cb3c0550780e
 lecorguille parents: diff
changeset | 193 | 
| 
f00e39a4b0fb
planemo upload commit a3229faad6949bbca965d1d7e138cb3c0550780e
 lecorguille parents: diff
changeset | 194 } | 
| 
f00e39a4b0fb
planemo upload commit a3229faad6949bbca965d1d7e138cb3c0550780e
 lecorguille parents: diff
changeset | 195 | 
| 
f00e39a4b0fb
planemo upload commit a3229faad6949bbca965d1d7e138cb3c0550780e
 lecorguille parents: diff
changeset | 196 # -- TIC -- | 
| 
f00e39a4b0fb
planemo upload commit a3229faad6949bbca965d1d7e138cb3c0550780e
 lecorguille parents: diff
changeset | 197 if (thefunction == "xcmsSet") { | 
| 16 
5f61570177e2
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit 22c4e92909198328fc7439ff47e4546a273eb907
 lecorguille parents: 
15diff
changeset | 198 cat("\t\tGET TIC GRAPH\n") | 
| 
5f61570177e2
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit 22c4e92909198328fc7439ff47e4546a273eb907
 lecorguille parents: 
15diff
changeset | 199 sampleNamesList = getSampleMetadata(xcmsSet=xset, sampleMetadataOutput=sampleMetadataOutput) | 
| 
5f61570177e2
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit 22c4e92909198328fc7439ff47e4546a273eb907
 lecorguille parents: 
15diff
changeset | 200 getTICs(xcmsSet=xset, pdfname=ticspdf,rt="raw") | 
| 
5f61570177e2
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit 22c4e92909198328fc7439ff47e4546a273eb907
 lecorguille parents: 
15diff
changeset | 201 getBPCs(xcmsSet=xset,rt="raw",pdfname=bicspdf) | 
| 6 
f00e39a4b0fb
planemo upload commit a3229faad6949bbca965d1d7e138cb3c0550780e
 lecorguille parents: diff
changeset | 202 } else if (thefunction == "retcor") { | 
| 16 
5f61570177e2
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit 22c4e92909198328fc7439ff47e4546a273eb907
 lecorguille parents: 
15diff
changeset | 203 cat("\t\tGET TIC GRAPH\n") | 
| 
5f61570177e2
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit 22c4e92909198328fc7439ff47e4546a273eb907
 lecorguille parents: 
15diff
changeset | 204 getTICs(xcmsSet=xset, pdfname=ticspdf,rt="corrected") | 
| 
5f61570177e2
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit 22c4e92909198328fc7439ff47e4546a273eb907
 lecorguille parents: 
15diff
changeset | 205 getBPCs(xcmsSet=xset,rt="corrected",pdfname=bicspdf) | 
| 6 
f00e39a4b0fb
planemo upload commit a3229faad6949bbca965d1d7e138cb3c0550780e
 lecorguille parents: diff
changeset | 206 } | 
| 
f00e39a4b0fb
planemo upload commit a3229faad6949bbca965d1d7e138cb3c0550780e
 lecorguille parents: diff
changeset | 207 | 
| 20 
02bb34af0921
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit 481448087f0e09c131b24f7d552db69f3552d371-dirty
 lecorguille parents: 
19diff
changeset | 208 if ((thefunction == "group" || thefunction == "fillPeaks") && exists("intval")) { | 
| 16 
5f61570177e2
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit 22c4e92909198328fc7439ff47e4546a273eb907
 lecorguille parents: 
15diff
changeset | 209 getPeaklistW4M(xset,intval,convertRTMinute,numDigitsMZ,numDigitsRT,variableMetadataOutput,dataMatrixOutput) | 
| 15 
1c78d61fd646
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit 08e7f269a5c59687a7768be8db5fcb4e4d736093
 lecorguille parents: 
6diff
changeset | 210 } | 
| 
1c78d61fd646
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit 08e7f269a5c59687a7768be8db5fcb4e4d736093
 lecorguille parents: 
6diff
changeset | 211 | 
| 
1c78d61fd646
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit 08e7f269a5c59687a7768be8db5fcb4e4d736093
 lecorguille parents: 
6diff
changeset | 212 | 
| 6 
f00e39a4b0fb
planemo upload commit a3229faad6949bbca965d1d7e138cb3c0550780e
 lecorguille parents: diff
changeset | 213 cat("\n\n") | 
| 
f00e39a4b0fb
planemo upload commit a3229faad6949bbca965d1d7e138cb3c0550780e
 lecorguille parents: diff
changeset | 214 | 
| 
f00e39a4b0fb
planemo upload commit a3229faad6949bbca965d1d7e138cb3c0550780e
 lecorguille parents: diff
changeset | 215 # ----- EXPORT ----- | 
| 
f00e39a4b0fb
planemo upload commit a3229faad6949bbca965d1d7e138cb3c0550780e
 lecorguille parents: diff
changeset | 216 | 
| 
f00e39a4b0fb
planemo upload commit a3229faad6949bbca965d1d7e138cb3c0550780e
 lecorguille parents: diff
changeset | 217 cat("\tXSET OBJECT INFO\n") | 
| 
f00e39a4b0fb
planemo upload commit a3229faad6949bbca965d1d7e138cb3c0550780e
 lecorguille parents: diff
changeset | 218 print(xset) | 
| 
f00e39a4b0fb
planemo upload commit a3229faad6949bbca965d1d7e138cb3c0550780e
 lecorguille parents: diff
changeset | 219 #delete the parameters to avoid the passage to the next tool in .RData image | 
| 
f00e39a4b0fb
planemo upload commit a3229faad6949bbca965d1d7e138cb3c0550780e
 lecorguille parents: diff
changeset | 220 | 
| 
f00e39a4b0fb
planemo upload commit a3229faad6949bbca965d1d7e138cb3c0550780e
 lecorguille parents: diff
changeset | 221 | 
| 
f00e39a4b0fb
planemo upload commit a3229faad6949bbca965d1d7e138cb3c0550780e
 lecorguille parents: diff
changeset | 222 #saving R data in .Rdata file to save the variables used in the present tool | 
| 16 
5f61570177e2
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit 22c4e92909198328fc7439ff47e4546a273eb907
 lecorguille parents: 
15diff
changeset | 223 objects2save = c("xset","zipfile","singlefile","listOFlistArguments","md5sumList","sampleNamesList") | 
| 6 
f00e39a4b0fb
planemo upload commit a3229faad6949bbca965d1d7e138cb3c0550780e
 lecorguille parents: diff
changeset | 224 save(list=objects2save[objects2save %in% ls()], file=xsetRdataOutput) | 
| 
f00e39a4b0fb
planemo upload commit a3229faad6949bbca965d1d7e138cb3c0550780e
 lecorguille parents: diff
changeset | 225 | 
| 
f00e39a4b0fb
planemo upload commit a3229faad6949bbca965d1d7e138cb3c0550780e
 lecorguille parents: diff
changeset | 226 cat("\n\n") | 
| 
f00e39a4b0fb
planemo upload commit a3229faad6949bbca965d1d7e138cb3c0550780e
 lecorguille parents: diff
changeset | 227 | 
| 
f00e39a4b0fb
planemo upload commit a3229faad6949bbca965d1d7e138cb3c0550780e
 lecorguille parents: diff
changeset | 228 | 
| 
f00e39a4b0fb
planemo upload commit a3229faad6949bbca965d1d7e138cb3c0550780e
 lecorguille parents: diff
changeset | 229 cat("\tDONE\n") | 
