pickPeaks-methods {MSnbase} | R Documentation

## Peak Detection for 'MSnExp' or 'Spectrum' instances

### Description

This method performs a peak picking on individual spectra (`Spectrum` instances) or whole experiments (`MSnExp` instances) to create centroided spectra. For noisy spectra there are currently two different noise estimators, the Median Absolute Deviation (`method = "MAD"`) and Friedman's Super Smoother (`method = "SuperSmoother"`), as implemented in the `MALDIquant::detectPeaks` and `MALDIquant::estimateNoise` functions respectively.

### Methods

`signature(x = "MSnExp", halfWindowSize = "integer", method = "character", SNR = "numeric", verbose = "logical", ...)`

  Performs the peak picking for all spectra in an `MSnExp` instance. `method` could be `"MAD"` or `"SuperSmoother"`. `halfWindowSize` controls the window size of the peak picking algorithm. The resulting window size is `2 * halfWindowSize + 1`. The size should be nearly (or slightly larger) the FWHM (full width at half maximum). A local maximum is considered as peak if its intensity is `SNR` times larger than the estimated noise. The arguments `...` are passed to the noise estimator functions. Currenlty only the `method = "SuperSmoother"` accepts additional arguments, e.g. `span`. Please see `supsmu` for details. This method displays a progress bar if `verbose = TRUE`. Returns an `MSnExp` instance with centroided spectra.

`signature(x = "Spectrum", method = "character", halfWindowSize = "integer", ...)`

  Performs the peak picking for the spectrum (`Spectrum` instance). This method is the same as above but returns a centroided `Spectrum` instead of an `MSnExp` object. It has no `verbose` argument. Please read the details for the above `MSnExp` method.

### Author(s)

Sebastian Gibb <mail@sebastiangibb.de>

### References

S. Gibb and K. Strimmer. 2012. MALDIquant: a versatile R package for the analysis of mass spectrometry data. Bioinformatics 28: 2270-2271. http://strimmerlab.org/software/maldiquant/

### See Also

`clean`, `removePeaks` `smooth`, `estimateNoise` and `trimMz` for other spectra processing methods.

### Examples

    sp1 <- new("Spectrum1",
               intensity = c(1:6, 5:1),
               mz = 1:11,
               centroided = FALSE)
    sp2 <- pickPeaks(sp1)
    intensity(sp2)

    data(itraqdata)
    itraqdata2 <- pickPeaks(itraqdata)
    processingData(itraqdata2)

[Package MSnbase version 2.4.2 Index]