recalibrate.addMS1data: Return MS1 peaks to be used for recalibration

Description Usage Arguments Value Author(s) Examples

View source: R/leMsMs.r

Description

Returns the precursor peaks for all MS1 spectra in the spec dataset with annotated formula to be used in recalibration.

For all spectra in spec$specFound, the precursor ion is extracted from the MS1 precursor spectrum. All found ions are returned in a data frame with a format matching spec$peaksMatched and therefore suitable for rbinding to the spec$peaksMatched table. However, only minimal information needed for recalibration is returned.

Usage

1
2
recalibrate.addMS1data(spec,mode="pH", recalibrateMS1Window = 
				getOption("RMassBank")$recalibrateMS1Window)

Arguments

spec

A msmsWorkspace or RmbSpectraSetList containing spectra for which MS1 "peaks" should be "constructed".

mode

"pH", "pNa", "pM", "pNH4", "mH", "mM", "mFA" for different ions ([M+H]+, [M+Na]+, [M]+, [M+NH4]+, [M-H]-, [M]-, [M+FA]-).

recalibrateMS1Window

Window width to look for MS1 peaks to recalibrate (in ppm).

Value

A dataframe with columns mzFound, formula, mzCalc, dppm, dbe, int, dppmBest, formulaCount, good, cpdID, scan, parentScan, dppmRc. However, columns dbe, int, formulaCount, good, scan, parentScan do not contain real information and are provided only as fillers.

Author(s)

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

Examples

1
2
3
4
5
6
7
8
9
## Not run: 
# More or less as used in recalibrateSpectra:
		rcdata <- peaksMatched(w)
		rcdata <- rcdata[rcdata$formulaCount == 1, ,drop=FALSE]
		ms1data <- recalibrate.addMS1data(w, "pH", 15)
		rcdata <- rbind(rcdata, ms1data)
 # ... continue constructing recalibration curve with rcdata

## End(Not run)

RMassBank documentation built on Nov. 8, 2020, 6:06 p.m.