Mercurial > repos > lecorguille > xcms_xcmsset
annotate xcms_xcmsSet.r @ 30:14b1c52fae62 draft
"planemo upload for repository https://github.com/workflow4metabolomics/xcms commit f1caf2a3bf23cf319a75dd12c86402555dd02617"
author | workflow4metabolomics |
---|---|
date | Wed, 12 Feb 2020 08:30:58 -0500 |
parents | 9eebe9690ced |
children | eb15a3841da4 |
rev | line source |
---|---|
15
b62808a2a008
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit 9f72e947d9c241d11221cad561f3525d27231857
lecorguille
parents:
diff
changeset
|
1 #!/usr/bin/env Rscript |
b62808a2a008
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit 9f72e947d9c241d11221cad561f3525d27231857
lecorguille
parents:
diff
changeset
|
2 |
b62808a2a008
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit 9f72e947d9c241d11221cad561f3525d27231857
lecorguille
parents:
diff
changeset
|
3 # ----- LOG FILE ----- |
b62808a2a008
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit 9f72e947d9c241d11221cad561f3525d27231857
lecorguille
parents:
diff
changeset
|
4 log_file <- file("log.txt", open="wt") |
b62808a2a008
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit 9f72e947d9c241d11221cad561f3525d27231857
lecorguille
parents:
diff
changeset
|
5 sink(log_file) |
b62808a2a008
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit 9f72e947d9c241d11221cad561f3525d27231857
lecorguille
parents:
diff
changeset
|
6 sink(log_file, type = "output") |
b62808a2a008
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit 9f72e947d9c241d11221cad561f3525d27231857
lecorguille
parents:
diff
changeset
|
7 |
b62808a2a008
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit 9f72e947d9c241d11221cad561f3525d27231857
lecorguille
parents:
diff
changeset
|
8 |
b62808a2a008
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit 9f72e947d9c241d11221cad561f3525d27231857
lecorguille
parents:
diff
changeset
|
9 # ----- PACKAGE ----- |
b62808a2a008
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit 9f72e947d9c241d11221cad561f3525d27231857
lecorguille
parents:
diff
changeset
|
10 cat("\tSESSION INFO\n") |
b62808a2a008
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit 9f72e947d9c241d11221cad561f3525d27231857
lecorguille
parents:
diff
changeset
|
11 |
b62808a2a008
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit 9f72e947d9c241d11221cad561f3525d27231857
lecorguille
parents:
diff
changeset
|
12 #Import the different functions |
b62808a2a008
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit 9f72e947d9c241d11221cad561f3525d27231857
lecorguille
parents:
diff
changeset
|
13 source_local <- function(fname){ argv <- commandArgs(trailingOnly=FALSE); base_dir <- dirname(substring(argv[grep("--file=", argv)], 8)); source(paste(base_dir, fname, sep="/")) } |
b62808a2a008
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit 9f72e947d9c241d11221cad561f3525d27231857
lecorguille
parents:
diff
changeset
|
14 source_local("lib.r") |
b62808a2a008
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit 9f72e947d9c241d11221cad561f3525d27231857
lecorguille
parents:
diff
changeset
|
15 |
b62808a2a008
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit 9f72e947d9c241d11221cad561f3525d27231857
lecorguille
parents:
diff
changeset
|
16 pkgs <- c("xcms","batch") |
b62808a2a008
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit 9f72e947d9c241d11221cad561f3525d27231857
lecorguille
parents:
diff
changeset
|
17 loadAndDisplayPackages(pkgs) |
b62808a2a008
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit 9f72e947d9c241d11221cad561f3525d27231857
lecorguille
parents:
diff
changeset
|
18 cat("\n\n"); |
b62808a2a008
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit 9f72e947d9c241d11221cad561f3525d27231857
lecorguille
parents:
diff
changeset
|
19 |
b62808a2a008
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit 9f72e947d9c241d11221cad561f3525d27231857
lecorguille
parents:
diff
changeset
|
20 |
b62808a2a008
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit 9f72e947d9c241d11221cad561f3525d27231857
lecorguille
parents:
diff
changeset
|
21 # ----- ARGUMENTS ----- |
b62808a2a008
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit 9f72e947d9c241d11221cad561f3525d27231857
lecorguille
parents:
diff
changeset
|
22 cat("\tARGUMENTS INFO\n") |
b62808a2a008
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit 9f72e947d9c241d11221cad561f3525d27231857
lecorguille
parents:
diff
changeset
|
23 args <- parseCommandArgs(evaluate = FALSE) #interpretation of arguments given in command line as an R list of objects |
b62808a2a008
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit 9f72e947d9c241d11221cad561f3525d27231857
lecorguille
parents:
diff
changeset
|
24 write.table(as.matrix(args), col.names=F, quote=F, sep='\t') |
b62808a2a008
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit 9f72e947d9c241d11221cad561f3525d27231857
lecorguille
parents:
diff
changeset
|
25 |
b62808a2a008
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit 9f72e947d9c241d11221cad561f3525d27231857
lecorguille
parents:
diff
changeset
|
26 cat("\n\n") |
b62808a2a008
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit 9f72e947d9c241d11221cad561f3525d27231857
lecorguille
parents:
diff
changeset
|
27 |
b62808a2a008
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit 9f72e947d9c241d11221cad561f3525d27231857
lecorguille
parents:
diff
changeset
|
28 |
b62808a2a008
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit 9f72e947d9c241d11221cad561f3525d27231857
lecorguille
parents:
diff
changeset
|
29 # ----- PROCESSING INFILE ----- |
b62808a2a008
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit 9f72e947d9c241d11221cad561f3525d27231857
lecorguille
parents:
diff
changeset
|
30 cat("\tARGUMENTS PROCESSING INFO\n") |
b62808a2a008
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit 9f72e947d9c241d11221cad561f3525d27231857
lecorguille
parents:
diff
changeset
|
31 |
b62808a2a008
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit 9f72e947d9c241d11221cad561f3525d27231857
lecorguille
parents:
diff
changeset
|
32 #saving the commun parameters |
b62808a2a008
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit 9f72e947d9c241d11221cad561f3525d27231857
lecorguille
parents:
diff
changeset
|
33 BPPARAM <- MulticoreParam(1) |
b62808a2a008
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit 9f72e947d9c241d11221cad561f3525d27231857
lecorguille
parents:
diff
changeset
|
34 if (!is.null(args$BPPARAM)){ |
b62808a2a008
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit 9f72e947d9c241d11221cad561f3525d27231857
lecorguille
parents:
diff
changeset
|
35 BPPARAM <- MulticoreParam(args$BPPARAM) |
b62808a2a008
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit 9f72e947d9c241d11221cad561f3525d27231857
lecorguille
parents:
diff
changeset
|
36 } |
b62808a2a008
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit 9f72e947d9c241d11221cad561f3525d27231857
lecorguille
parents:
diff
changeset
|
37 register(BPPARAM) |
b62808a2a008
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit 9f72e947d9c241d11221cad561f3525d27231857
lecorguille
parents:
diff
changeset
|
38 |
b62808a2a008
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit 9f72e947d9c241d11221cad561f3525d27231857
lecorguille
parents:
diff
changeset
|
39 #saving the specific parameters |
b62808a2a008
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit 9f72e947d9c241d11221cad561f3525d27231857
lecorguille
parents:
diff
changeset
|
40 if (!is.null(args$filterAcquisitionNum)) filterAcquisitionNumParam <- args$filterAcquisitionNum |
b62808a2a008
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit 9f72e947d9c241d11221cad561f3525d27231857
lecorguille
parents:
diff
changeset
|
41 if (!is.null(args$filterRt)) filterRtParam <- args$filterRt |
b62808a2a008
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit 9f72e947d9c241d11221cad561f3525d27231857
lecorguille
parents:
diff
changeset
|
42 if (!is.null(args$filterMz)) filterMzParam <- args$filterMz |
b62808a2a008
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit 9f72e947d9c241d11221cad561f3525d27231857
lecorguille
parents:
diff
changeset
|
43 |
b62808a2a008
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit 9f72e947d9c241d11221cad561f3525d27231857
lecorguille
parents:
diff
changeset
|
44 method <- args$method |
b62808a2a008
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit 9f72e947d9c241d11221cad561f3525d27231857
lecorguille
parents:
diff
changeset
|
45 |
b62808a2a008
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit 9f72e947d9c241d11221cad561f3525d27231857
lecorguille
parents:
diff
changeset
|
46 if (!is.null(args$roiList)){ |
b62808a2a008
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit 9f72e947d9c241d11221cad561f3525d27231857
lecorguille
parents:
diff
changeset
|
47 cat("\t\troiList provided\n") |
b62808a2a008
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit 9f72e947d9c241d11221cad561f3525d27231857
lecorguille
parents:
diff
changeset
|
48 args$roiList <- list(getDataFrameFromFile(args$roiList)) |
b62808a2a008
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit 9f72e947d9c241d11221cad561f3525d27231857
lecorguille
parents:
diff
changeset
|
49 print(args$roiList) |
b62808a2a008
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit 9f72e947d9c241d11221cad561f3525d27231857
lecorguille
parents:
diff
changeset
|
50 } |
b62808a2a008
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit 9f72e947d9c241d11221cad561f3525d27231857
lecorguille
parents:
diff
changeset
|
51 |
b62808a2a008
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit 9f72e947d9c241d11221cad561f3525d27231857
lecorguille
parents:
diff
changeset
|
52 cat("\n\n") |
b62808a2a008
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit 9f72e947d9c241d11221cad561f3525d27231857
lecorguille
parents:
diff
changeset
|
53 |
b62808a2a008
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit 9f72e947d9c241d11221cad561f3525d27231857
lecorguille
parents:
diff
changeset
|
54 # ----- INFILE PROCESSING ----- |
b62808a2a008
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit 9f72e947d9c241d11221cad561f3525d27231857
lecorguille
parents:
diff
changeset
|
55 cat("\tINFILE PROCESSING INFO\n") |
b62808a2a008
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit 9f72e947d9c241d11221cad561f3525d27231857
lecorguille
parents:
diff
changeset
|
56 |
b62808a2a008
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit 9f72e947d9c241d11221cad561f3525d27231857
lecorguille
parents:
diff
changeset
|
57 #image is an .RData file necessary to use xset variable given by previous tools |
b62808a2a008
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit 9f72e947d9c241d11221cad561f3525d27231857
lecorguille
parents:
diff
changeset
|
58 load(args$image) |
b62808a2a008
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit 9f72e947d9c241d11221cad561f3525d27231857
lecorguille
parents:
diff
changeset
|
59 if (!exists("raw_data")) stop("\n\nERROR: The RData doesn't contain any object called 'raw_data' which is provided by the tool: MSnbase readMSData") |
b62808a2a008
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit 9f72e947d9c241d11221cad561f3525d27231857
lecorguille
parents:
diff
changeset
|
60 |
b62808a2a008
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit 9f72e947d9c241d11221cad561f3525d27231857
lecorguille
parents:
diff
changeset
|
61 # Handle infiles |
30
14b1c52fae62
"planemo upload for repository https://github.com/workflow4metabolomics/xcms commit f1caf2a3bf23cf319a75dd12c86402555dd02617"
workflow4metabolomics
parents:
26
diff
changeset
|
62 rawFilePath <- retrieveRawfileInTheWorkingDirectory(singlefile, zipfile, args) |
15
b62808a2a008
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit 9f72e947d9c241d11221cad561f3525d27231857
lecorguille
parents:
diff
changeset
|
63 zipfile <- rawFilePath$zipfile |
b62808a2a008
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit 9f72e947d9c241d11221cad561f3525d27231857
lecorguille
parents:
diff
changeset
|
64 singlefile <- rawFilePath$singlefile |
b62808a2a008
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit 9f72e947d9c241d11221cad561f3525d27231857
lecorguille
parents:
diff
changeset
|
65 |
b62808a2a008
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit 9f72e947d9c241d11221cad561f3525d27231857
lecorguille
parents:
diff
changeset
|
66 |
b62808a2a008
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit 9f72e947d9c241d11221cad561f3525d27231857
lecorguille
parents:
diff
changeset
|
67 cat("\n\n") |
b62808a2a008
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit 9f72e947d9c241d11221cad561f3525d27231857
lecorguille
parents:
diff
changeset
|
68 |
b62808a2a008
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit 9f72e947d9c241d11221cad561f3525d27231857
lecorguille
parents:
diff
changeset
|
69 |
b62808a2a008
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit 9f72e947d9c241d11221cad561f3525d27231857
lecorguille
parents:
diff
changeset
|
70 # ----- MAIN PROCESSING INFO ----- |
b62808a2a008
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit 9f72e947d9c241d11221cad561f3525d27231857
lecorguille
parents:
diff
changeset
|
71 cat("\tMAIN PROCESSING INFO\n") |
b62808a2a008
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit 9f72e947d9c241d11221cad561f3525d27231857
lecorguille
parents:
diff
changeset
|
72 |
b62808a2a008
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit 9f72e947d9c241d11221cad561f3525d27231857
lecorguille
parents:
diff
changeset
|
73 |
b62808a2a008
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit 9f72e947d9c241d11221cad561f3525d27231857
lecorguille
parents:
diff
changeset
|
74 cat("\t\tCOMPUTE\n") |
b62808a2a008
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit 9f72e947d9c241d11221cad561f3525d27231857
lecorguille
parents:
diff
changeset
|
75 |
b62808a2a008
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit 9f72e947d9c241d11221cad561f3525d27231857
lecorguille
parents:
diff
changeset
|
76 cat("\t\t\tApply filter[s] (if asked)\n") |
b62808a2a008
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit 9f72e947d9c241d11221cad561f3525d27231857
lecorguille
parents:
diff
changeset
|
77 if (exists("filterAcquisitionNumParam")) raw_data <- filterAcquisitionNum(raw_data, filterAcquisitionNumParam[1]:filterAcquisitionNumParam[2]) |
b62808a2a008
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit 9f72e947d9c241d11221cad561f3525d27231857
lecorguille
parents:
diff
changeset
|
78 if (exists("filterRtParam")) raw_data <- filterRt(raw_data, filterRtParam) |
b62808a2a008
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit 9f72e947d9c241d11221cad561f3525d27231857
lecorguille
parents:
diff
changeset
|
79 if (exists("filterMzParam")) raw_data <- filterMz(raw_data, filterMzParam) |
b62808a2a008
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit 9f72e947d9c241d11221cad561f3525d27231857
lecorguille
parents:
diff
changeset
|
80 #Apply this filter only if file contain MS and MSn |
b62808a2a008
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit 9f72e947d9c241d11221cad561f3525d27231857
lecorguille
parents:
diff
changeset
|
81 if(length(unique(msLevel(raw_data)))!= 1){ |
b62808a2a008
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit 9f72e947d9c241d11221cad561f3525d27231857
lecorguille
parents:
diff
changeset
|
82 raw_data <- filterMsLevel(raw_data,msLevel=1) |
b62808a2a008
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit 9f72e947d9c241d11221cad561f3525d27231857
lecorguille
parents:
diff
changeset
|
83 } |
b62808a2a008
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit 9f72e947d9c241d11221cad561f3525d27231857
lecorguille
parents:
diff
changeset
|
84 |
b62808a2a008
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit 9f72e947d9c241d11221cad561f3525d27231857
lecorguille
parents:
diff
changeset
|
85 cat("\t\t\tChromatographic peak detection\n") |
b62808a2a008
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit 9f72e947d9c241d11221cad561f3525d27231857
lecorguille
parents:
diff
changeset
|
86 # clear the arguement list to remove unexpected key/value as singlefile_galaxyPath or method ... |
b62808a2a008
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit 9f72e947d9c241d11221cad561f3525d27231857
lecorguille
parents:
diff
changeset
|
87 args <- args[names(args) %in% slotNames(do.call(paste0(method,"Param"), list()))] |
b62808a2a008
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit 9f72e947d9c241d11221cad561f3525d27231857
lecorguille
parents:
diff
changeset
|
88 |
b62808a2a008
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit 9f72e947d9c241d11221cad561f3525d27231857
lecorguille
parents:
diff
changeset
|
89 findChromPeaksParam <- do.call(paste0(method,"Param"), args) |
b62808a2a008
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit 9f72e947d9c241d11221cad561f3525d27231857
lecorguille
parents:
diff
changeset
|
90 print(findChromPeaksParam) |
b62808a2a008
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit 9f72e947d9c241d11221cad561f3525d27231857
lecorguille
parents:
diff
changeset
|
91 xdata <- findChromPeaks(raw_data, param=findChromPeaksParam) |
b62808a2a008
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit 9f72e947d9c241d11221cad561f3525d27231857
lecorguille
parents:
diff
changeset
|
92 |
b62808a2a008
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit 9f72e947d9c241d11221cad561f3525d27231857
lecorguille
parents:
diff
changeset
|
93 # Check if there are no peaks |
b62808a2a008
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit 9f72e947d9c241d11221cad561f3525d27231857
lecorguille
parents:
diff
changeset
|
94 if (nrow(chromPeaks(xdata)) == 0) stop("No peaks were detected. You should review your settings") |
b62808a2a008
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit 9f72e947d9c241d11221cad561f3525d27231857
lecorguille
parents:
diff
changeset
|
95 |
b62808a2a008
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit 9f72e947d9c241d11221cad561f3525d27231857
lecorguille
parents:
diff
changeset
|
96 # Create a sampleMetada file |
b62808a2a008
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit 9f72e947d9c241d11221cad561f3525d27231857
lecorguille
parents:
diff
changeset
|
97 sampleNamesList <- getSampleMetadata(xdata=xdata, sampleMetadataOutput="sampleMetadata.tsv") |
b62808a2a008
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit 9f72e947d9c241d11221cad561f3525d27231857
lecorguille
parents:
diff
changeset
|
98 |
26
9eebe9690ced
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit 6f3e71bbe985b4c6af622c9395762b17416062ca
lecorguille
parents:
24
diff
changeset
|
99 #cat("\t\t\tCompute and Store TIC and BPI\n") |
9eebe9690ced
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit 6f3e71bbe985b4c6af622c9395762b17416062ca
lecorguille
parents:
24
diff
changeset
|
100 #chromTIC = chromatogram(xdata, aggregationFun = "sum") |
9eebe9690ced
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit 6f3e71bbe985b4c6af622c9395762b17416062ca
lecorguille
parents:
24
diff
changeset
|
101 #chromBPI = chromatogram(xdata, aggregationFun = "max") |
15
b62808a2a008
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit 9f72e947d9c241d11221cad561f3525d27231857
lecorguille
parents:
diff
changeset
|
102 |
b62808a2a008
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit 9f72e947d9c241d11221cad561f3525d27231857
lecorguille
parents:
diff
changeset
|
103 cat("\n\n") |
b62808a2a008
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit 9f72e947d9c241d11221cad561f3525d27231857
lecorguille
parents:
diff
changeset
|
104 |
b62808a2a008
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit 9f72e947d9c241d11221cad561f3525d27231857
lecorguille
parents:
diff
changeset
|
105 # ----- EXPORT ----- |
b62808a2a008
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit 9f72e947d9c241d11221cad561f3525d27231857
lecorguille
parents:
diff
changeset
|
106 |
b62808a2a008
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit 9f72e947d9c241d11221cad561f3525d27231857
lecorguille
parents:
diff
changeset
|
107 cat("\tXCMSnExp OBJECT INFO\n") |
b62808a2a008
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit 9f72e947d9c241d11221cad561f3525d27231857
lecorguille
parents:
diff
changeset
|
108 print(xdata) |
b62808a2a008
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit 9f72e947d9c241d11221cad561f3525d27231857
lecorguille
parents:
diff
changeset
|
109 cat("\n\n") |
b62808a2a008
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit 9f72e947d9c241d11221cad561f3525d27231857
lecorguille
parents:
diff
changeset
|
110 |
b62808a2a008
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit 9f72e947d9c241d11221cad561f3525d27231857
lecorguille
parents:
diff
changeset
|
111 cat("\txcmsSet OBJECT INFO\n") |
b62808a2a008
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit 9f72e947d9c241d11221cad561f3525d27231857
lecorguille
parents:
diff
changeset
|
112 # Get the legacy xcmsSet object |
b62808a2a008
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit 9f72e947d9c241d11221cad561f3525d27231857
lecorguille
parents:
diff
changeset
|
113 xset <- getxcmsSetObject(xdata) |
b62808a2a008
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit 9f72e947d9c241d11221cad561f3525d27231857
lecorguille
parents:
diff
changeset
|
114 print(xset) |
b62808a2a008
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit 9f72e947d9c241d11221cad561f3525d27231857
lecorguille
parents:
diff
changeset
|
115 cat("\n\n") |
b62808a2a008
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit 9f72e947d9c241d11221cad561f3525d27231857
lecorguille
parents:
diff
changeset
|
116 |
b62808a2a008
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit 9f72e947d9c241d11221cad561f3525d27231857
lecorguille
parents:
diff
changeset
|
117 #saving R data in .Rdata file to save the variables used in the present tool |
24
9a0ca3f3a847
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit 8ed93601e09e1db2fbaef5af29d58464b639f2a8
lecorguille
parents:
21
diff
changeset
|
118 objects2save <- c("xdata", "zipfile", "singlefile", "md5sumList", "sampleNamesList") #, "chromTIC", "chromBPI") |
15
b62808a2a008
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit 9f72e947d9c241d11221cad561f3525d27231857
lecorguille
parents:
diff
changeset
|
119 save(list=objects2save[objects2save %in% ls()], file="xcmsSet.RData") |
b62808a2a008
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit 9f72e947d9c241d11221cad561f3525d27231857
lecorguille
parents:
diff
changeset
|
120 |
b62808a2a008
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit 9f72e947d9c241d11221cad561f3525d27231857
lecorguille
parents:
diff
changeset
|
121 |
b62808a2a008
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit 9f72e947d9c241d11221cad561f3525d27231857
lecorguille
parents:
diff
changeset
|
122 cat("\tDONE\n") |