Description Usage Arguments Value Author(s) Examples
View source: R/functions-XCMSnExp.R
Extract (MS2) spectra from an XCMSnExp object that represent ions within
the rt and m/z range of each chromatographic peak (in the same file
/sample in which the peak was detected). All MS2 spectra are returned for
chromatographic peak i
for which the precursor m/z is
>= chromPeaks(x)[i, "mzmin"]
and <= chromPeaks(x)[i, "mzmax"]
and the
retention time is >= chromPeaks(x)[i, "rtmin"]
and
<= chromPeaks(x)[i, "rtmax"]
.
See also the LC-MS/MS data analysis vignette for more details and examples.
1 2 3 4 5 6 7 8 9 10 |
x |
XCMSnExp object with identified chromatographic peaks. |
msLevel |
|
expandRt |
|
expandMz |
|
ppm |
|
method |
|
skipFilled |
|
return.type |
|
Which object is returned depends on the value of return.type
:
For return.type = "MSpectra"
: a MSpectra object with elements being
Spectrum objects. The result objects contains all spectra
for all peaks. Metadata column "peak_id"
provides the ID of the
respective peak (i.e. its rowname in chromPeaks()
).
If return.type = "list"
: list
of list
s that are either of length
0 or contain Spectrum2 object(s) within the m/z-rt range. The
length of the list matches the number of peaks.
Johannes Rainer
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | ## Read a file with DDA LC-MS/MS data
fl <- system.file("TripleTOF-SWATH/PestMix1_DDA.mzML", package = "msdata")
dda <- readMSData(fl, mode = "onDisk")
## Subset the object to reduce runtime of the example
dda <- filterRt(dda, c(200, 400))
## Perform MS1 peak detection
dda <- findChromPeaks(dda, CentWaveParam(peakwidth = c(5, 15), prefilter = c(5, 1000)))
ms2_sps <- chromPeakSpectra(dda)
ms2_sps
## Metadata column `peak_id` contains the ID of the chromatographic peak
## of the MS2 spectrum
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.