errf: Mass error surface for Waters Synapt Q-TOF spectrometers

Description Usage Format Details Author(s) References Examples

Description

This function can be used to calculate the optimal mz tolerance (in ppm) for annotation. The surface has been developed for a Waters Synapt QTOF spectrometer.

Usage

1

Format

errf is a linear model of the form M + logI + M * logI:

M

The mz of the ion

logI

Logarithm of the intensity of the ion.

Details

The function is a linear approaximation of the complete error function (see Reference). The latter has been calculated by comparing the measured and nominal mass of several hundreds of standards. The experiments were performed by using a Waters Synapt Q-TOF spectrometer so this specific surface is valid only for this model of spectrometers.

Author(s)

Pietro Franceschi

References

N. Shahaf, P. Franceschi, P. Arapitsas, I. Rogachev, U. Vrhovsek and R. Wehrens: "Constructing a mass measurement error surface to improve automatic annotations in liquid chromatography/mass spectrometry based metabolomics". Rapid Communications in Mass Spectrometry, 27(21), 2425 (2013).

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
## <--------------    direct use of the error function     -------------- >
## load the Synapt-QTOF error function
data(errf)

## predict the mass error in ppm
newdata <- data.frame(M = c(105, 131, 157), logI = c(1, .5, 1.4))
predict(errf, newdata) ## mass error in ppm


## <--------------    create a dummy error function     -------------- >
## dataset to evaluate it: 
## "M" is the mz, 
## "logI" is the log of the intensity
## "err" is the mass error in ppm. The error is the difference between the 
## actual m/z of a known ion, and the one measured with the spectrometer
  
MErr.data <- data.frame("M" = seq(1,500,2), 
                        "logI" = rnorm(250, mean = 5, sd = 1), 
                        "err" = rnorm(250, mean = 40, sd = 5))
  
## create the linear model
dummy.model <- lm(err~M+logI, data = MErr.data)

## Not run: 
## <--------------    Use this for the annotation     -------------- >
## load the example xcmsSet
data(LCresults)
data(FEMsettings)

## Run the analysis with an adaptive mass tolerance 
result.adaptive.dummy <- runLC(xset = LCresults$xset,
                               settings = Synapt.RP, 
                               DB = LCDBtest$DB,
                               errf = dummy.model)

## <-----------    Use the Synapt Q-TOF error function     ----------- >
## load the Synapt-QTOF error function
data(errf)

result.adaptive  <- runLC(xset = LCresults$xset,
                          settings = Synapt.RP, 
                          DB = LCDBtest$DB,
                          errf = errf)

## End(Not run)

metaMS documentation built on Nov. 8, 2020, 8:21 p.m.