Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

estimateMzResolution

Estimate the m/z resolution of a spectrum


Description

estimateMzResolution estimates the m/z resolution of a profile-mode Spectrum (or of all spectra in an MSnExp or OnDiskMSnExp object. The m/z resolution is defined as the most frequent difference between a spectrum's m/z values.

Usage

## S4 method for signature 'MSnExp'
estimateMzResolution(object, ...)

## S4 method for signature 'Spectrum'
estimateMzResolution(object, ...)

Arguments

object

either a Spectrum, MSnExp or OnDiskMSnExp object.

...

currently not used.

Value

numeric(1) with the m/z resolution. If called on a MSnExp or OnDiskMSnExp a list of m/z resolutions are returned (one for each spectrum).

Note

This assumes the data to be in profile mode and does not return meaningful results for centroided data.

The estimated m/z resolution depends on the number of ions detected in a spectrum, as some instrument don't measure (or report) signal if below a certain threshold.

Author(s)

Johannes Rainer

Examples

## Load a profile mode example file
library(MSnbase)
library(msdata)
f <- proteomics(full.names = TRUE,
    pattern = "TMT_Erwinia_1uLSike_Top10HCD_isol2_45stepped_60min_01.mzML.gz")

od <- readMSData(f, mode = "onDisk")

## Estimate the m/z resolution on the 3rd spectrum.
estimateMzResolution(od[[3]])

## Estimate the m/z resolution for each spectrum
mzr <- estimateMzResolution(od)

## plot the distribution of estimated m/z resolutions. The bimodal
## distribution represents the m/z resolution of the MS1 (first peak) and
## MS2 spectra (second peak).
plot(density(unlist(mzr)))

MSnbase

Base Functions and Classes for Mass Spectrometry and Proteomics

v2.16.1
Artistic-2.0
Authors
Laurent Gatto, Johannes Rainer and Sebastian Gibb with contributions from Guangchuang Yu, Samuel Wieczorek, Vasile-Cosmin Lazar, Vladislav Petyuk, Thomas Naake, Richie Cotton, Arne Smits, Martina Fisher, Ludger Goeminne, Adriaan Sticker and Lieven Clement.
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.