analyzeMsMs {RMassBank} | R Documentation

## Analyze MSMS spectra

### Description

Analyzes MSMS spectra of a compound by fitting formulas to each subpeak.

### Usage

    analyzeMsMs(msmsPeaks, mode = "pH", detail = FALSE, run = "preliminary",
      filterSettings = getOption("RMassBank")$filterSettings,
      spectraList = getOption("RMassBank")$spectraList, method = "formula")

    analyzeMsMs.formula(msmsPeaks, mode = "pH", detail = FALSE,
      run = "preliminary",
      filterSettings = getOption("RMassBank")$filterSettings)

    analyzeMsMs.intensity(msmsPeaks, mode = "pH", detail = FALSE,
      run = "preliminary",
      filterSettings = getOption("RMassBank")$filterSettings)

### Arguments

`msmsPeaks` | A `RmbSpectraSet` object. Corresponds to a parent spectrum and children MSMS spectra of one compound (plus some metadata). The objects are typically generated with `findMsMsHR`, and populate the `@spectrum` slot in a `msmsWorkspace` (refer to the corresponding documentation for the precise format specifications).
`mode` | Specifies the processing mode, i.e. which molecule species the spectra contain. `pH` (positive H) specifies [M+H]+, `pNa` specifies [M+Na]+, `pM` specifies [M]+, `mH` and `mNa` specify [M-H]- and [M-Na]-, respectively. (I apologize for the naming of `pH` which has absolutely nothing to do with chemical pH values.)
`detail` | Whether detailed return information should be provided (defaults to `FALSE`). See below.
`run` | `"preliminary"` or `"recalibrated"`. In the `preliminary` run, mass tolerance is set to 10 ppm (above m/z 120) and 15 ppm (below m/z 120), the default intensity cutoff is $10^4$ for positive mode (no default cutoff in negative mode), and the column `"mz"` from the spectra is used as data source. In the `recalibrated` run, the mass tolerance is set to 5 ppm over the whole mass range, the default cutoff is 0 and the column `"mzRecal"` is used as source for the m/z values. Defaults to `"preliminary"`.
`filterSettings` | Settings for the filter parameters, by default loaded from the RMassBank settings set with e.g. `loadRmbSettings`. Must contain: `ppmHighMass`, allowed ppm deviation before recalibration for high mass range `ppmLowMass`, allowed ppm deviation before recalibration for low mass range `massRangeDivision`, division point between high and low mass range (before recalibration) `ppmFine`, allowed ppm deviation overall after recalibration `prelimCut`, intensity cutoff for peaks in preliminary run `prelimCutRatio`, relative intensity cutoff for peaks in preliminary run, e.g. 0.01 = 1 `fineCut`, intensity cutoff for peaks in second run `fineCutRatio`, relative intensity cutoff for peaks in second run `specOkLimit`, minimum intensity of base peak for spectrum to be accepted for processing `dbeMinLimit`, minimum double bond equivalent for accepted molecular subformula. `satelliteMzLimit`, for satellite peak filtering (`filterPeakSatellites`: mass window to use for satellite removal `satelliteIntLimit`, the relative intensity below which to discard "satellites". (refer to `filterPeakSatellites`).
`spectraList` | The list of MS/MS spectra present in each data block. As also defined in the settings file.
`method` | Selects which function to actually use for data evaluation. The default "formula" runs a full analysis via formula assignment to fragment peaks. The alternative setting "intensity" calls a "mock" implementation which circumvents formula assignment and filters peaks purely based on intensity cutoffs and the satellite filtering. (In this case, the ppm and dbe related settings in filterSettings are ignored.)

### Details

The analysis function uses Rcdk. Note that in this step, satellite peaks are removed by a simple heuristic rule (refer to the documentation of `filterPeakSatellites` for details.)

### Value

The processed `RmbSpectraSet` object. Added (or filled, respectively, since the slots are present before) data include

`list("complete")` | whether all spectra have useful value
`list("empty")` | whether there are no useful spectra
`list("children")` | The processed `RmbSpectrum2` objects (in a `RmbSpectrum2List`). `ok` if the spectrum was successfully processed with at least one resulting peak `mz`, `intensity`: note that mz/int pairs can be duplicated when multiple matches are found for one mz value, therefore the two slots are not necessarily unchanged from before `rawOK` (logical) whether the m/z peak passes satellite/low removal `low`, `satellite` if `TRUE`, the peak failed cutoff (`low`) or was removed as `satellite` `formula`, `mzCalc`, `dppm`, `dbe` Formula, calculated mass, ppm deviation and dbe assigned to a peak `formulaCount`, `dppmBest` Number of formulae matched for this m/z value and ppm deviation of the best match `info` Spectrum identifying information (collision energy, resolution, collision mode) from the `spectraList` All other entries are retained from the original `RmbSpectrum2`.

### Functions

- `analyzeMsMs.formula`: Analyze the peaks using formula annotation

- `analyzeMsMs.intensity`: Analyze the peaks going only by intensity values

### Author(s)

Michael Stravs

### See Also

`msmsWorkflow`, `filterLowaccResults`, `filterPeakSatellites`, `reanalyzeFailpeaks`

### Examples

    	## Not run: analyzed <- analyzeMsMs(spec, "pH", TRUE)

[Package RMassBank version 2.8.0 Index]