filterPeaksMultiplicity: Multiplicity filtering: Removes peaks which occur only once...

Description Usage Arguments Value Author(s) Examples

View source: R/leMsMs.r

Description

For every compound, every peak (with annotated formula) is compared across all spectra. Peaks whose formula occurs only once for all collision energies / spectra types, are discarded. This eliminates "stochastic formula hits" of pure electronic noise peaks efficiently from the spectra. Note that in the author's experimental setup two spectra were recorded at every collision energy, and therefore every peak-formula should appear at least twice if it is real, even if it is by chance a fragment which appears on only one collision energy setting. The function was not tested in a different setup. Therefore, use with a bit of caution.

Usage

1
filterPeaksMultiplicity(peaks, formulacol, recalcBest = TRUE)

Arguments

recalcBest

Whether the best formula for each peak should be re-determined. This is necessary for results from the ordinary analyzeMsMs analysis which allows multiple potential formulas per peak - the old best match could potentially have been dropped because of multiplicity filtering. For results from reanalyzeFailpeak this is not necessary, since only one potential formula is assigned in this case.

peaks

An aggregate peak data.frame containing all peaks to be analyzed; with at least the columns cpdID, scan, mzFound and one column for the formula specified with the formulacol parameter.

formulacol

Which column the assigned formula is stored in. (Needed to separately process "formula" and "reanalyzed.formula" multiplicites.)

Value

The peak table is returned, enriched with columns:

Author(s)

Michael Stravs, EAWAG <michael.stravs@eawag.ch>

Examples

1
2
3
4
5
6
## Not run: 
		peaksFiltered <- filterPeaksMultiplicity(peaksMatched(w), 
			"formula", TRUE)
		peaksOK <- subset(peaksFiltered, formulaMultiplicity > 1)

## End(Not run)

sneumann/RMassBank documentation built on Oct. 20, 2020, 3:19 p.m.