estimatePrecursorIntensity,Spectra-method | R Documentation |
Some MS instrument manufacturers don't provide precursor intensities for
fragment spectra. These can however be estimated, given that also MS1
spectra are available. The estimatePrecursorIntensity()
funtion defines the
precursor intensities for MS2 spectra using the intensity of the matching
MS1 peak from the closest MS1 spectrum (i.e. the last MS1 spectrum measured
before the respective MS2 spectrum). With method = "interpolation"
it is
also possible to calculate the precursor intensity based on an interpolation
of intensity values (and retention times) of the matching MS1 peaks from the
previous and next MS1 spectrum. See below for an example.
## S4 method for signature 'Spectra'
estimatePrecursorIntensity(
object,
ppm = 20,
tolerance = 0,
method = c("previous", "interpolation"),
msLevel. = 2L,
f = dataOrigin(object),
BPPARAM = bpparam()
)
object |
|
ppm |
|
tolerance |
|
method |
|
msLevel. |
|
f |
|
BPPARAM |
Parallel setup configuration. See |
Johannes Rainer with feedback and suggestions from Corey Broeckling
#' ## Calculating the precursor intensity for MS2 spectra:
##
## Some MS instrument manufacturer don't report the precursor intensities
## for MS2 spectra. The `estimatePrecursorIntensity` function can be used
## in these cases to calculate the precursor intensity on MS1 data. Below
## we load an mzML file from a vendor providing precursor intensities and
## compare the estimated and reported precursor intensities.
tmt <- Spectra(msdata::proteomics(full.names = TRUE)[5],
backend = MsBackendMzR())
pmi <- estimatePrecursorIntensity(tmt)
plot(pmi, precursorIntensity(tmt))
## We can also replace the original precursor intensity values with the
## newly calculated ones
tmt$precursorIntensity <- pmi
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.