Mercurial > repos > lecorguille > xcms_merge
comparison xcms_merge.r @ 10:47e953d9da82 draft
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit 49203f8a5271fa5e6bb889e907df71ebf7757309
author | lecorguille |
---|---|
date | Thu, 08 Mar 2018 05:52:52 -0500 |
parents | 35b9bb3205d8 |
children | 67ab853b89f3 |
comparison
equal
deleted
inserted
replaced
9:35b9bb3205d8 | 10:47e953d9da82 |
---|---|
13 | 13 |
14 cat("\tXSET MERGING...\n") | 14 cat("\tXSET MERGING...\n") |
15 | 15 |
16 for(image in args$images) { | 16 for(image in args$images) { |
17 load(image) | 17 load(image) |
18 | 18 print(args) |
19 # Handle infiles | 19 # Handle infiles |
20 if (!exists("singlefile")) singlefile <- NULL | 20 if (!exists("singlefile")) singlefile <- NULL |
21 if (!exists("zipfile")) zipfile <- NULL | 21 if (!exists("zipfile")) zipfile <- NULL |
22 rawFilePath <- getRawfilePathFromArguments(singlefile, zipfile, args) | 22 rawFilePath <- getRawfilePathFromArguments(singlefile, zipfile, args) |
23 zipfile <- rawFilePath$zipfile | 23 zipfile <- rawFilePath$zipfile |
24 singlefile <- rawFilePath$singlefile | 24 singlefile <- rawFilePath$singlefile |
25 args <- rawFilePath$args | |
26 directory <- retrieveRawfileInTheWorkingDirectory(singlefile, zipfile) | 25 directory <- retrieveRawfileInTheWorkingDirectory(singlefile, zipfile) |
27 | 26 |
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.*") | 27 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.*") |
29 cat(sampleNamesList$sampleNamesOrigin,"\n") | 28 cat(sampleNamesList$sampleNamesOrigin,"\n") |
30 if (!exists("xdata_merged")) { | 29 if (!exists("xdata_merged")) { |
31 xdata_merged <- xdata | 30 xdata_merged <- xdata |
32 singlefile_merged <- singlefile | 31 singlefile_merged <- singlefile |
68 } | 67 } |
69 | 68 |
70 # Create a sampleMetada file | 69 # Create a sampleMetada file |
71 sampleNamesList <- getSampleMetadata(xdata=xdata, sampleMetadataOutput="sampleMetadata.tsv") | 70 sampleNamesList <- getSampleMetadata(xdata=xdata, sampleMetadataOutput="sampleMetadata.tsv") |
72 | 71 |
73 # Get the legacy xcmsSet object | |
74 xset <- getxcmsSetObject(xdata) | |
75 | |
76 cat("\n\n") | |
77 | |
78 | |
79 # -- TIC -- | |
80 cat("\t\tGET TIC GRAPH\n") | |
81 #@TODO: one day, use xdata instead of xset to draw the TICs and BPC or a complete other method | |
82 getTICs(xcmsSet=xset, rt="raw", pdfname="TICs.pdf") | |
83 getBPCs(xcmsSet=xset, rt="raw", pdfname="BICs.pdf") | |
84 | |
85 cat("\n\n") | 72 cat("\n\n") |
86 | 73 |
87 cat("\tXCMSnExp OBJECT INFO\n") | 74 cat("\tXCMSnExp OBJECT INFO\n") |
88 print(pData(xdata)) | 75 print(pData(xdata)) |
89 print(xdata) | 76 print(xdata) |