library(Risa)
library(xcms)
library(CAMERA)
library(pcaMethods)
Indole-3-acetaldoxime (IAOx) represents an early intermediate of the biosynthesis of a variety of indolic secondary metabolites including the phytoanticipin indol-3-ylmethyl glucosinolate and the phytoalexin camalexin (3-thiazol-2’-yl-indole). Arabidopsis thaliana cyp79B2 cyp79B3 double knockout plants are completely impaired in the conversion of tryptophan to indole-3-acetaldoxime and do not accumulate IAOx-derived metabolites any longer. Consequently, comparative analysis of wild-type and cyp79B2 cyp79B3 plant lines has the potential to explore the complete range of IAOx-derived indolic secondary metabolites.
Since 2006, the Bioconductor package xcms (Smith et al, 2006) provides a rich set of algorithms for mass spectrometry data processing. Typically, xcms will create an xcmsSet object from several raw data files in an assay, which are obtained from the samples in the study.
Allowed raw data formats are netCDF, mzData, mzXML and mzML.
In this vignette, we demonstrate the processing of the MTBLS2 dataset, which was described in Neumann 2012.
A few things might be worth to define at the beginning of an analysis
## How many CPU cores has your machine (or cluster) ?
nSlaves=1
# prefilter <- c(3,200) ## standard
prefilter=c(6,750) ## quick-run for debugging
This can be done with the vendor tools, or the open source proteowizard converter. The preferred format should be mzML or mzData/mzXML. An overview of formats (and problems) is available at the xcms online help pages.
An ISAtab archive will contain the metadata description in several tab-separated files. (One of) the assay files contains the column Raw Spectral Data File
with the paths to the mass spectral raw data files in one of the above formats.
ISAmtbls2 <- readISAtab(find.package("mtbls2"))
a.filename <- ISAmtbls2["assay.filenames"][[1]]
With the combination of Risa and xcms, we can convert the MS raw data in an ISAtab archive into an xcmsSet:
mtbls2Set <- processAssayXcmsSet(ISAmtbls2, a.filename,
method="centWave", prefilter=prefilter,
snthr=25, ppm=25,
peakwidth=c(5,12),
nSlaves=nSlaves)
##
## Detecting mass traces at 25 ppm ...
## % finished: 0 10 20 30 40 50 60 70 80 90 100
## 11335 m/z ROI's.
##
## Detecting chromatographic peaks ...
## % finished: 0 10 20 30 40 50 60 70 80 90 100
## 3707 Peaks.
##
## Detecting mass traces at 25 ppm ...
## % finished: 0 10 20 30 40 50 60 70 80 90 100
## 11193 m/z ROI's.
##
## Detecting chromatographic peaks ...
## % finished: 0 10 20 30 40 50 60 70 80 90 100
## 3690 Peaks.
##
## Detecting mass traces at 25 ppm ...
## % finished: 0 10 20 30 40 50 60 70 80 90 100
## 11156 m/z ROI's.
##
## Detecting chromatographic peaks ...
## % finished: 0 10 20 30 40 50 60 70 80 90 100
## 3722 Peaks.
##
## Detecting mass traces at 25 ppm ...
## % finished: 0 10 20 30 40 50 60 70 80 90 100
## 11146 m/z ROI's.
##
## Detecting chromatographic peaks ...
## % finished: 0 10 20 30 40 50 60 70 80 90 100
## 3771 Peaks.
##
## Detecting mass traces at 25 ppm ...
## % finished: 0 10 20 30 40 50 60 70 80 90 100
## 12661 m/z ROI's.
##
## Detecting chromatographic peaks ...
## % finished: 0 10 20 30 40 50 60 70 80 90 100
## 4045 Peaks.
##
## Detecting mass traces at 25 ppm ...
## % finished: 0 10 20 30 40 50 60 70 80 90 100
## 12041 m/z ROI's.
##
## Detecting chromatographic peaks ...
## % finished: 0 10 20 30 40 50 60 70 80 90 100
## 3862 Peaks.
##
## Detecting mass traces at 25 ppm ...
## % finished: 0 10 20 30 40 50 60 70 80 90 100
## 12489 m/z ROI's.
##
## Detecting chromatographic peaks ...
## % finished: 0 10 20 30 40 50 60 70 80 90 100
## 3969 Peaks.
##
## Detecting mass traces at 25 ppm ...
## % finished: 0 10 20 30 40 50 60 70 80 90 100
## 11940 m/z ROI's.
##
## Detecting chromatographic peaks ...
## % finished: 0 10 20 30 40 50 60 70 80 90 100
## 3897 Peaks.
##
## Detecting mass traces at 25 ppm ...
## % finished: 0 10 20 30 40 50 60 70 80 90 100
## 12627 m/z ROI's.
##
## Detecting chromatographic peaks ...
## % finished: 0 10 20 30 40 50 60 70 80 90 100
## 4124 Peaks.
##
## Detecting mass traces at 25 ppm ...
## % finished: 0 10 20 30 40 50 60 70 80 90 100
## 13344 m/z ROI's.
##
## Detecting chromatographic peaks ...
## % finished: 0 10 20 30 40 50 60 70 80 90 100
## 4226 Peaks.
##
## Detecting mass traces at 25 ppm ...
## % finished: 0 10 20 30 40 50 60 70 80 90 100
## 12897 m/z ROI's.
##
## Detecting chromatographic peaks ...
## % finished: 0 10 20 30 40 50 60 70 80 90 100
## 4185 Peaks.
##
## Detecting mass traces at 25 ppm ...
## % finished: 0 10 20 30 40 50 60 70 80 90 100
## 12689 m/z ROI's.
##
## Detecting chromatographic peaks ...
## % finished: 0 10 20 30 40 50 60 70 80 90 100
## 4190 Peaks.
##
## Detecting mass traces at 25 ppm ...
## % finished: 0 10 20 30 40 50 60 70 80 90 100
## 13007 m/z ROI's.
##
## Detecting chromatographic peaks ...
## % finished: 0 10 20 30 40 50 60 70 80 90 100
## 4429 Peaks.
##
## Detecting mass traces at 25 ppm ...
## % finished: 0 10 20 30 40 50 60 70 80 90 100
## 13666 m/z ROI's.
##
## Detecting chromatographic peaks ...
## % finished: 0 10 20 30 40 50 60 70 80 90 100
## 4407 Peaks.
##
## Detecting mass traces at 25 ppm ...
## % finished: 0 10 20 30 40 50 60 70 80 90 100
## 13033 m/z ROI's.
##
## Detecting chromatographic peaks ...
## % finished: 0 10 20 30 40 50 60 70 80 90 100
## 4337 Peaks.
##
## Detecting mass traces at 25 ppm ...
## % finished: 0 10 20 30 40 50 60 70 80 90 100
## 13646 m/z ROI's.
##
## Detecting chromatographic peaks ...
## % finished: 0 10 20 30 40 50 60 70 80 90 100
## 4377 Peaks.
The result is the same type of xcmsSet object:
show(mtbls2Set)
## An "xcmsSet" object with 16 samples
##
## Time range: 18.4-1147.6 seconds (0.3-19.1 minutes)
## Mass range: 99.5288-1003.5005 m/z
## Peaks: 64938 (about 4059 per sample)
## Peak Groups: 0
## Sample classes: Col-0.Exp1, cyp79.Exp1, Col-0.Exp2, cyp79.Exp2
##
## Peak picking was performed on MS1.
## Profile settings: method = bin
## step = 0.1
##
## Memory usage: 6.33 MB
Several options exist to quantify the individual intensities. For each feature, additional attributes are available, such as the minimum/maximum and average retention time and m/z values.
In the following steps, we perform a grouping: because the UPLC system used here has very stable retention times, we just use the retention time correction step as quality control of the raw data. After that, ‘fillPeaks()’ will integrate the raw data for those features, which were not detected in some of the samples.
mtbls2Set <- group(mtbls2Set, minfrac=1, bw=3)
## 162 224 287 349 412 474 537 599 662 724 787 849 912 974
retcor(mtbls2Set, plottype="mdevden")
## Retention Time Correction Groups: 1227