reconstructChromPeakSpectra {xcms}R Documentation

Data independent acquisition (DIA): reconstruct MS2 spectra

Description

Reconstructs MS2 spectra for each MS1 chromatographic peak (if possible) for data independent acquisition (DIA) data (such as SWATH). See the LC-MS/MS analysis vignette for more details and examples.

Usage

reconstructChromPeakSpectra(
  object,
  expandRt = 0,
  diffRt = 2,
  minCor = 0.8,
  intensity = "maxo",
  peakId = rownames(chromPeaks(object, msLevel = 1L)),
  BPPARAM = bpparam(),
  return.type = c("MSpectra", "Spectra")
)

Arguments

object

XCMSnExp with identified chromatographic peaks.

expandRt

numeric(1) allowing to expand the retention time range for extracted ion chromatograms by a constant value (for the peak shape correlation). Defaults to expandRt = 0 hence correlates only the signal included in the identified chromatographic peaks.

diffRt

numeric(1) defining the maximal allowed difference between the retention time of the chromatographic peak (apex) and the retention times of MS2 chromatographic peaks (apex) to consider them as representing candidate fragments of the original ion.

minCor

numeric(1) defining the minimal required correlation coefficient for MS2 chromatographic peaks to be considered for MS2 spectrum reconstruction.

intensity

character(1) defining the column in the chromPeaks matrix that should be used for the intensities of the reconstructed spectra's peaks. The same value from the MS1 chromatographic peaks will be used as precursorIntensity of the resulting spectra.

peakId

optional character vector with peak IDs (i.e. rownames of chromPeaks) of MS1 peaks for which MS2 spectra should be reconstructed. By default they are reconstructed for all MS1 chromatographic peaks.

BPPARAM

parallel processing setup. See bpparam() for more information.

return.type

character(1) defining the type of the returned object. Can be either return.type = "MSpectra" (the default) to return a MSnbase::MSpectra object or return.type = "Spectra" for the newer Spectra::Spectra object.

Details

In detail, the function performs for each MS1 chromatographic peak:

The resulting MSpectra object provides also the peak IDs of the MS2 chromatographic peaks for each spectrum as well as their correlation value.

Value

Depending on return.type:

Author(s)

Johannes Rainer, Michael Witting

See Also

findChromPeaksIsolationWindow() for the function to perform MS2 peak detection in DIA isolation windows and for examples.


[Package xcms version 3.16.0 Index]