annotate xcms_merge.r @ 9:35b9bb3205d8 draft

planemo upload for repository https://github.com/workflow4metabolomics/xcms commit 1444e7c7ebd2bb5bdadede71c60a39f560721a98
author lecorguille
date Mon, 05 Mar 2018 09:31:22 -0500
parents 6b5504f877ff
children 47e953d9da82
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
7
dca722aecb67 planemo upload for repository https://github.com/workflow4metabolomics/xcms commit e384d6dd5f410799ec211f73bca0b5d5d7bc651e
lecorguille
parents:
diff changeset
1 #!/usr/bin/env Rscript
dca722aecb67 planemo upload for repository https://github.com/workflow4metabolomics/xcms commit e384d6dd5f410799ec211f73bca0b5d5d7bc651e
lecorguille
parents:
diff changeset
2
dca722aecb67 planemo upload for repository https://github.com/workflow4metabolomics/xcms commit e384d6dd5f410799ec211f73bca0b5d5d7bc651e
lecorguille
parents:
diff changeset
3 #Import the different functions
dca722aecb67 planemo upload for repository https://github.com/workflow4metabolomics/xcms commit e384d6dd5f410799ec211f73bca0b5d5d7bc651e
lecorguille
parents:
diff changeset
4 source_local <- function(fname){ argv <- commandArgs(trailingOnly=FALSE); base_dir <- dirname(substring(argv[grep("--file=", argv)], 8)); source(paste(base_dir, fname, sep="/")) }
dca722aecb67 planemo upload for repository https://github.com/workflow4metabolomics/xcms commit e384d6dd5f410799ec211f73bca0b5d5d7bc651e
lecorguille
parents:
diff changeset
5 source_local("lib.r")
dca722aecb67 planemo upload for repository https://github.com/workflow4metabolomics/xcms commit e384d6dd5f410799ec211f73bca0b5d5d7bc651e
lecorguille
parents:
diff changeset
6
dca722aecb67 planemo upload for repository https://github.com/workflow4metabolomics/xcms commit e384d6dd5f410799ec211f73bca0b5d5d7bc651e
lecorguille
parents:
diff changeset
7 pkgs <- c("xcms","batch")
dca722aecb67 planemo upload for repository https://github.com/workflow4metabolomics/xcms commit e384d6dd5f410799ec211f73bca0b5d5d7bc651e
lecorguille
parents:
diff changeset
8 loadAndDisplayPackages(pkgs)
dca722aecb67 planemo upload for repository https://github.com/workflow4metabolomics/xcms commit e384d6dd5f410799ec211f73bca0b5d5d7bc651e
lecorguille
parents:
diff changeset
9 cat("\n\n");
dca722aecb67 planemo upload for repository https://github.com/workflow4metabolomics/xcms commit e384d6dd5f410799ec211f73bca0b5d5d7bc651e
lecorguille
parents:
diff changeset
10
dca722aecb67 planemo upload for repository https://github.com/workflow4metabolomics/xcms commit e384d6dd5f410799ec211f73bca0b5d5d7bc651e
lecorguille
parents:
diff changeset
11 args <- parseCommandArgs(evaluate=FALSE) #interpretation of arguments given in command line as an R list of objects
dca722aecb67 planemo upload for repository https://github.com/workflow4metabolomics/xcms commit e384d6dd5f410799ec211f73bca0b5d5d7bc651e
lecorguille
parents:
diff changeset
12
dca722aecb67 planemo upload for repository https://github.com/workflow4metabolomics/xcms commit e384d6dd5f410799ec211f73bca0b5d5d7bc651e
lecorguille
parents:
diff changeset
13
dca722aecb67 planemo upload for repository https://github.com/workflow4metabolomics/xcms commit e384d6dd5f410799ec211f73bca0b5d5d7bc651e
lecorguille
parents:
diff changeset
14 cat("\tXSET MERGING...\n")
dca722aecb67 planemo upload for repository https://github.com/workflow4metabolomics/xcms commit e384d6dd5f410799ec211f73bca0b5d5d7bc651e
lecorguille
parents:
diff changeset
15
dca722aecb67 planemo upload for repository https://github.com/workflow4metabolomics/xcms commit e384d6dd5f410799ec211f73bca0b5d5d7bc651e
lecorguille
parents:
diff changeset
16 for(image in args$images) {
dca722aecb67 planemo upload for repository https://github.com/workflow4metabolomics/xcms commit e384d6dd5f410799ec211f73bca0b5d5d7bc651e
lecorguille
parents:
diff changeset
17 load(image)
9
35b9bb3205d8 planemo upload for repository https://github.com/workflow4metabolomics/xcms commit 1444e7c7ebd2bb5bdadede71c60a39f560721a98
lecorguille
parents: 8
diff changeset
18
35b9bb3205d8 planemo upload for repository https://github.com/workflow4metabolomics/xcms commit 1444e7c7ebd2bb5bdadede71c60a39f560721a98
lecorguille
parents: 8
diff changeset
19 # Handle infiles
35b9bb3205d8 planemo upload for repository https://github.com/workflow4metabolomics/xcms commit 1444e7c7ebd2bb5bdadede71c60a39f560721a98
lecorguille
parents: 8
diff changeset
20 if (!exists("singlefile")) singlefile <- NULL
35b9bb3205d8 planemo upload for repository https://github.com/workflow4metabolomics/xcms commit 1444e7c7ebd2bb5bdadede71c60a39f560721a98
lecorguille
parents: 8
diff changeset
21 if (!exists("zipfile")) zipfile <- NULL
35b9bb3205d8 planemo upload for repository https://github.com/workflow4metabolomics/xcms commit 1444e7c7ebd2bb5bdadede71c60a39f560721a98
lecorguille
parents: 8
diff changeset
22 rawFilePath <- getRawfilePathFromArguments(singlefile, zipfile, args)
35b9bb3205d8 planemo upload for repository https://github.com/workflow4metabolomics/xcms commit 1444e7c7ebd2bb5bdadede71c60a39f560721a98
lecorguille
parents: 8
diff changeset
23 zipfile <- rawFilePath$zipfile
35b9bb3205d8 planemo upload for repository https://github.com/workflow4metabolomics/xcms commit 1444e7c7ebd2bb5bdadede71c60a39f560721a98
lecorguille
parents: 8
diff changeset
24 singlefile <- rawFilePath$singlefile
35b9bb3205d8 planemo upload for repository https://github.com/workflow4metabolomics/xcms commit 1444e7c7ebd2bb5bdadede71c60a39f560721a98
lecorguille
parents: 8
diff changeset
25 args <- rawFilePath$args
35b9bb3205d8 planemo upload for repository https://github.com/workflow4metabolomics/xcms commit 1444e7c7ebd2bb5bdadede71c60a39f560721a98
lecorguille
parents: 8
diff changeset
26 directory <- retrieveRawfileInTheWorkingDirectory(singlefile, zipfile)
35b9bb3205d8 planemo upload for repository https://github.com/workflow4metabolomics/xcms commit 1444e7c7ebd2bb5bdadede71c60a39f560721a98
lecorguille
parents: 8
diff changeset
27
8
6b5504f877ff planemo upload for repository https://github.com/workflow4metabolomics/xcms commit 7b226c3ba91a3cf654ec1c14b3ef85090968bb0f
lecorguille
parents: 7
diff changeset
28 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.*")
7
dca722aecb67 planemo upload for repository https://github.com/workflow4metabolomics/xcms commit e384d6dd5f410799ec211f73bca0b5d5d7bc651e
lecorguille
parents:
diff changeset
29 cat(sampleNamesList$sampleNamesOrigin,"\n")
dca722aecb67 planemo upload for repository https://github.com/workflow4metabolomics/xcms commit e384d6dd5f410799ec211f73bca0b5d5d7bc651e
lecorguille
parents:
diff changeset
30 if (!exists("xdata_merged")) {
dca722aecb67 planemo upload for repository https://github.com/workflow4metabolomics/xcms commit e384d6dd5f410799ec211f73bca0b5d5d7bc651e
lecorguille
parents:
diff changeset
31 xdata_merged <- xdata
dca722aecb67 planemo upload for repository https://github.com/workflow4metabolomics/xcms commit e384d6dd5f410799ec211f73bca0b5d5d7bc651e
lecorguille
parents:
diff changeset
32 singlefile_merged <- singlefile
dca722aecb67 planemo upload for repository https://github.com/workflow4metabolomics/xcms commit e384d6dd5f410799ec211f73bca0b5d5d7bc651e
lecorguille
parents:
diff changeset
33 md5sumList_merged <- md5sumList
dca722aecb67 planemo upload for repository https://github.com/workflow4metabolomics/xcms commit e384d6dd5f410799ec211f73bca0b5d5d7bc651e
lecorguille
parents:
diff changeset
34 sampleNamesList_merged <- sampleNamesList
dca722aecb67 planemo upload for repository https://github.com/workflow4metabolomics/xcms commit e384d6dd5f410799ec211f73bca0b5d5d7bc651e
lecorguille
parents:
diff changeset
35 } else {
dca722aecb67 planemo upload for repository https://github.com/workflow4metabolomics/xcms commit e384d6dd5f410799ec211f73bca0b5d5d7bc651e
lecorguille
parents:
diff changeset
36 xdata_merged <- c(xdata_merged,xdata)
dca722aecb67 planemo upload for repository https://github.com/workflow4metabolomics/xcms commit e384d6dd5f410799ec211f73bca0b5d5d7bc651e
lecorguille
parents:
diff changeset
37 singlefile_merged <- c(singlefile_merged,singlefile)
dca722aecb67 planemo upload for repository https://github.com/workflow4metabolomics/xcms commit e384d6dd5f410799ec211f73bca0b5d5d7bc651e
lecorguille
parents:
diff changeset
38 md5sumList_merged$origin <- rbind(md5sumList_merged$origin,md5sumList$origin)
dca722aecb67 planemo upload for repository https://github.com/workflow4metabolomics/xcms commit e384d6dd5f410799ec211f73bca0b5d5d7bc651e
lecorguille
parents:
diff changeset
39 sampleNamesList_merged$sampleNamesOrigin <- c(sampleNamesList_merged$sampleNamesOrigin,sampleNamesList$sampleNamesOrigin)
dca722aecb67 planemo upload for repository https://github.com/workflow4metabolomics/xcms commit e384d6dd5f410799ec211f73bca0b5d5d7bc651e
lecorguille
parents:
diff changeset
40 sampleNamesList_merged$sampleNamesMakeNames <- c(sampleNamesList_merged$sampleNamesMakeNames,sampleNamesList$sampleNamesMakeNames)
dca722aecb67 planemo upload for repository https://github.com/workflow4metabolomics/xcms commit e384d6dd5f410799ec211f73bca0b5d5d7bc651e
lecorguille
parents:
diff changeset
41 }
dca722aecb67 planemo upload for repository https://github.com/workflow4metabolomics/xcms commit e384d6dd5f410799ec211f73bca0b5d5d7bc651e
lecorguille
parents:
diff changeset
42 }
dca722aecb67 planemo upload for repository https://github.com/workflow4metabolomics/xcms commit e384d6dd5f410799ec211f73bca0b5d5d7bc651e
lecorguille
parents:
diff changeset
43 rm(image)
dca722aecb67 planemo upload for repository https://github.com/workflow4metabolomics/xcms commit e384d6dd5f410799ec211f73bca0b5d5d7bc651e
lecorguille
parents:
diff changeset
44 xdata <- xdata_merged; rm(xdata_merged)
dca722aecb67 planemo upload for repository https://github.com/workflow4metabolomics/xcms commit e384d6dd5f410799ec211f73bca0b5d5d7bc651e
lecorguille
parents:
diff changeset
45 singlefile <- singlefile_merged; rm(singlefile_merged)
dca722aecb67 planemo upload for repository https://github.com/workflow4metabolomics/xcms commit e384d6dd5f410799ec211f73bca0b5d5d7bc651e
lecorguille
parents:
diff changeset
46 md5sumList <- md5sumList_merged; rm(md5sumList_merged)
dca722aecb67 planemo upload for repository https://github.com/workflow4metabolomics/xcms commit e384d6dd5f410799ec211f73bca0b5d5d7bc651e
lecorguille
parents:
diff changeset
47 sampleNamesList <- sampleNamesList_merged; rm(sampleNamesList_merged)
dca722aecb67 planemo upload for repository https://github.com/workflow4metabolomics/xcms commit e384d6dd5f410799ec211f73bca0b5d5d7bc651e
lecorguille
parents:
diff changeset
48
dca722aecb67 planemo upload for repository https://github.com/workflow4metabolomics/xcms commit e384d6dd5f410799ec211f73bca0b5d5d7bc651e
lecorguille
parents:
diff changeset
49 if (!is.null(args$sampleMetadata)) {
dca722aecb67 planemo upload for repository https://github.com/workflow4metabolomics/xcms commit e384d6dd5f410799ec211f73bca0b5d5d7bc651e
lecorguille
parents:
diff changeset
50 cat("\tXSET PHENODATA SETTING...\n")
dca722aecb67 planemo upload for repository https://github.com/workflow4metabolomics/xcms commit e384d6dd5f410799ec211f73bca0b5d5d7bc651e
lecorguille
parents:
diff changeset
51 sampleMetadataFile <- args$sampleMetadata
dca722aecb67 planemo upload for repository https://github.com/workflow4metabolomics/xcms commit e384d6dd5f410799ec211f73bca0b5d5d7bc651e
lecorguille
parents:
diff changeset
52 sampleMetadata <- read.table(sampleMetadataFile, h=F, sep=";", stringsAsFactors=F)
dca722aecb67 planemo upload for repository https://github.com/workflow4metabolomics/xcms commit e384d6dd5f410799ec211f73bca0b5d5d7bc651e
lecorguille
parents:
diff changeset
53 if (ncol(sampleMetadata) < 2) sampleMetadata <- read.table(sampleMetadataFile, h=F, sep="\t", stringsAsFactors=F)
dca722aecb67 planemo upload for repository https://github.com/workflow4metabolomics/xcms commit e384d6dd5f410799ec211f73bca0b5d5d7bc651e
lecorguille
parents:
diff changeset
54 if (ncol(sampleMetadata) < 2) sampleMetadata <- read.table(sampleMetadataFile, h=F, sep=",", stringsAsFactors=F)
dca722aecb67 planemo upload for repository https://github.com/workflow4metabolomics/xcms commit e384d6dd5f410799ec211f73bca0b5d5d7bc651e
lecorguille
parents:
diff changeset
55 if (ncol(sampleMetadata) < 2) {
dca722aecb67 planemo upload for repository https://github.com/workflow4metabolomics/xcms commit e384d6dd5f410799ec211f73bca0b5d5d7bc651e
lecorguille
parents:
diff changeset
56 error_message="Your sampleMetadata file seems not well formatted. The column separators accepted are ; , and tabulation"
dca722aecb67 planemo upload for repository https://github.com/workflow4metabolomics/xcms commit e384d6dd5f410799ec211f73bca0b5d5d7bc651e
lecorguille
parents:
diff changeset
57 print(error_message)
dca722aecb67 planemo upload for repository https://github.com/workflow4metabolomics/xcms commit e384d6dd5f410799ec211f73bca0b5d5d7bc651e
lecorguille
parents:
diff changeset
58 stop(error_message)
dca722aecb67 planemo upload for repository https://github.com/workflow4metabolomics/xcms commit e384d6dd5f410799ec211f73bca0b5d5d7bc651e
lecorguille
parents:
diff changeset
59 }
dca722aecb67 planemo upload for repository https://github.com/workflow4metabolomics/xcms commit e384d6dd5f410799ec211f73bca0b5d5d7bc651e
lecorguille
parents:
diff changeset
60 xdata@phenoData@data$sample_group=sampleMetadata$V2[match(xdata@phenoData@data$sample_name,sampleMetadata$V1)]
dca722aecb67 planemo upload for repository https://github.com/workflow4metabolomics/xcms commit e384d6dd5f410799ec211f73bca0b5d5d7bc651e
lecorguille
parents:
diff changeset
61
dca722aecb67 planemo upload for repository https://github.com/workflow4metabolomics/xcms commit e384d6dd5f410799ec211f73bca0b5d5d7bc651e
lecorguille
parents:
diff changeset
62 if (any(is.na(pData(xdata)$sample_group))) {
dca722aecb67 planemo upload for repository https://github.com/workflow4metabolomics/xcms commit e384d6dd5f410799ec211f73bca0b5d5d7bc651e
lecorguille
parents:
diff changeset
63 sample_missing <- pData(xdata)$sample_name[is.na(pData(xdata)$sample_group)]
dca722aecb67 planemo upload for repository https://github.com/workflow4metabolomics/xcms commit e384d6dd5f410799ec211f73bca0b5d5d7bc651e
lecorguille
parents:
diff changeset
64 error_message <- paste("Those samples are missing in your sampleMetadata:", paste(sample_missing, collapse=" "))
dca722aecb67 planemo upload for repository https://github.com/workflow4metabolomics/xcms commit e384d6dd5f410799ec211f73bca0b5d5d7bc651e
lecorguille
parents:
diff changeset
65 print(error_message)
dca722aecb67 planemo upload for repository https://github.com/workflow4metabolomics/xcms commit e384d6dd5f410799ec211f73bca0b5d5d7bc651e
lecorguille
parents:
diff changeset
66 stop(error_message)
dca722aecb67 planemo upload for repository https://github.com/workflow4metabolomics/xcms commit e384d6dd5f410799ec211f73bca0b5d5d7bc651e
lecorguille
parents:
diff changeset
67 }
dca722aecb67 planemo upload for repository https://github.com/workflow4metabolomics/xcms commit e384d6dd5f410799ec211f73bca0b5d5d7bc651e
lecorguille
parents:
diff changeset
68 }
8
6b5504f877ff planemo upload for repository https://github.com/workflow4metabolomics/xcms commit 7b226c3ba91a3cf654ec1c14b3ef85090968bb0f
lecorguille
parents: 7
diff changeset
69
6b5504f877ff planemo upload for repository https://github.com/workflow4metabolomics/xcms commit 7b226c3ba91a3cf654ec1c14b3ef85090968bb0f
lecorguille
parents: 7
diff changeset
70 # Create a sampleMetada file
6b5504f877ff planemo upload for repository https://github.com/workflow4metabolomics/xcms commit 7b226c3ba91a3cf654ec1c14b3ef85090968bb0f
lecorguille
parents: 7
diff changeset
71 sampleNamesList <- getSampleMetadata(xdata=xdata, sampleMetadataOutput="sampleMetadata.tsv")
6b5504f877ff planemo upload for repository https://github.com/workflow4metabolomics/xcms commit 7b226c3ba91a3cf654ec1c14b3ef85090968bb0f
lecorguille
parents: 7
diff changeset
72
6b5504f877ff planemo upload for repository https://github.com/workflow4metabolomics/xcms commit 7b226c3ba91a3cf654ec1c14b3ef85090968bb0f
lecorguille
parents: 7
diff changeset
73 # Get the legacy xcmsSet object
6b5504f877ff planemo upload for repository https://github.com/workflow4metabolomics/xcms commit 7b226c3ba91a3cf654ec1c14b3ef85090968bb0f
lecorguille
parents: 7
diff changeset
74 xset <- getxcmsSetObject(xdata)
6b5504f877ff planemo upload for repository https://github.com/workflow4metabolomics/xcms commit 7b226c3ba91a3cf654ec1c14b3ef85090968bb0f
lecorguille
parents: 7
diff changeset
75
6b5504f877ff planemo upload for repository https://github.com/workflow4metabolomics/xcms commit 7b226c3ba91a3cf654ec1c14b3ef85090968bb0f
lecorguille
parents: 7
diff changeset
76 cat("\n\n")
6b5504f877ff planemo upload for repository https://github.com/workflow4metabolomics/xcms commit 7b226c3ba91a3cf654ec1c14b3ef85090968bb0f
lecorguille
parents: 7
diff changeset
77
6b5504f877ff planemo upload for repository https://github.com/workflow4metabolomics/xcms commit 7b226c3ba91a3cf654ec1c14b3ef85090968bb0f
lecorguille
parents: 7
diff changeset
78
6b5504f877ff planemo upload for repository https://github.com/workflow4metabolomics/xcms commit 7b226c3ba91a3cf654ec1c14b3ef85090968bb0f
lecorguille
parents: 7
diff changeset
79 # -- TIC --
6b5504f877ff planemo upload for repository https://github.com/workflow4metabolomics/xcms commit 7b226c3ba91a3cf654ec1c14b3ef85090968bb0f
lecorguille
parents: 7
diff changeset
80 cat("\t\tGET TIC GRAPH\n")
6b5504f877ff planemo upload for repository https://github.com/workflow4metabolomics/xcms commit 7b226c3ba91a3cf654ec1c14b3ef85090968bb0f
lecorguille
parents: 7
diff changeset
81 #@TODO: one day, use xdata instead of xset to draw the TICs and BPC or a complete other method
6b5504f877ff planemo upload for repository https://github.com/workflow4metabolomics/xcms commit 7b226c3ba91a3cf654ec1c14b3ef85090968bb0f
lecorguille
parents: 7
diff changeset
82 getTICs(xcmsSet=xset, rt="raw", pdfname="TICs.pdf")
6b5504f877ff planemo upload for repository https://github.com/workflow4metabolomics/xcms commit 7b226c3ba91a3cf654ec1c14b3ef85090968bb0f
lecorguille
parents: 7
diff changeset
83 getBPCs(xcmsSet=xset, rt="raw", pdfname="BICs.pdf")
6b5504f877ff planemo upload for repository https://github.com/workflow4metabolomics/xcms commit 7b226c3ba91a3cf654ec1c14b3ef85090968bb0f
lecorguille
parents: 7
diff changeset
84
6b5504f877ff planemo upload for repository https://github.com/workflow4metabolomics/xcms commit 7b226c3ba91a3cf654ec1c14b3ef85090968bb0f
lecorguille
parents: 7
diff changeset
85 cat("\n\n")
7
dca722aecb67 planemo upload for repository https://github.com/workflow4metabolomics/xcms commit e384d6dd5f410799ec211f73bca0b5d5d7bc651e
lecorguille
parents:
diff changeset
86
dca722aecb67 planemo upload for repository https://github.com/workflow4metabolomics/xcms commit e384d6dd5f410799ec211f73bca0b5d5d7bc651e
lecorguille
parents:
diff changeset
87 cat("\tXCMSnExp OBJECT INFO\n")
dca722aecb67 planemo upload for repository https://github.com/workflow4metabolomics/xcms commit e384d6dd5f410799ec211f73bca0b5d5d7bc651e
lecorguille
parents:
diff changeset
88 print(pData(xdata))
dca722aecb67 planemo upload for repository https://github.com/workflow4metabolomics/xcms commit e384d6dd5f410799ec211f73bca0b5d5d7bc651e
lecorguille
parents:
diff changeset
89 print(xdata)
dca722aecb67 planemo upload for repository https://github.com/workflow4metabolomics/xcms commit e384d6dd5f410799ec211f73bca0b5d5d7bc651e
lecorguille
parents:
diff changeset
90 cat("\n\n")
dca722aecb67 planemo upload for repository https://github.com/workflow4metabolomics/xcms commit e384d6dd5f410799ec211f73bca0b5d5d7bc651e
lecorguille
parents:
diff changeset
91
dca722aecb67 planemo upload for repository https://github.com/workflow4metabolomics/xcms commit e384d6dd5f410799ec211f73bca0b5d5d7bc651e
lecorguille
parents:
diff changeset
92 cat("\txcmsSet OBJECT INFO\n")
dca722aecb67 planemo upload for repository https://github.com/workflow4metabolomics/xcms commit e384d6dd5f410799ec211f73bca0b5d5d7bc651e
lecorguille
parents:
diff changeset
93 # Get the legacy xcmsSet object
dca722aecb67 planemo upload for repository https://github.com/workflow4metabolomics/xcms commit e384d6dd5f410799ec211f73bca0b5d5d7bc651e
lecorguille
parents:
diff changeset
94 xset <- getxcmsSetObject(xdata)
dca722aecb67 planemo upload for repository https://github.com/workflow4metabolomics/xcms commit e384d6dd5f410799ec211f73bca0b5d5d7bc651e
lecorguille
parents:
diff changeset
95 print(xset@phenoData)
dca722aecb67 planemo upload for repository https://github.com/workflow4metabolomics/xcms commit e384d6dd5f410799ec211f73bca0b5d5d7bc651e
lecorguille
parents:
diff changeset
96 print(xset)
dca722aecb67 planemo upload for repository https://github.com/workflow4metabolomics/xcms commit e384d6dd5f410799ec211f73bca0b5d5d7bc651e
lecorguille
parents:
diff changeset
97 cat("\n\n")
dca722aecb67 planemo upload for repository https://github.com/workflow4metabolomics/xcms commit e384d6dd5f410799ec211f73bca0b5d5d7bc651e
lecorguille
parents:
diff changeset
98
dca722aecb67 planemo upload for repository https://github.com/workflow4metabolomics/xcms commit e384d6dd5f410799ec211f73bca0b5d5d7bc651e
lecorguille
parents:
diff changeset
99 cat("\tSAVE RData\n")
dca722aecb67 planemo upload for repository https://github.com/workflow4metabolomics/xcms commit e384d6dd5f410799ec211f73bca0b5d5d7bc651e
lecorguille
parents:
diff changeset
100 #saving R data in .Rdata file to save the variables used in the present tool
dca722aecb67 planemo upload for repository https://github.com/workflow4metabolomics/xcms commit e384d6dd5f410799ec211f73bca0b5d5d7bc651e
lecorguille
parents:
diff changeset
101 objects2save <- c("xdata", "zipfile", "singlefile", "md5sumList", "sampleNamesList")
dca722aecb67 planemo upload for repository https://github.com/workflow4metabolomics/xcms commit e384d6dd5f410799ec211f73bca0b5d5d7bc651e
lecorguille
parents:
diff changeset
102 save(list=objects2save[objects2save %in% ls()], file="merged.RData")