Learn R Programming

MALDIquant (version 1.4)

estimateNoise-methods: Estimates the noise of a MassSpectrum object.

Description

This method estimates the noise of mass spectrometry data (represented by a MassSpectrum object).

Usage

## S3 method for class 'MassSpectrum':
estimateNoise(object, 
    method=c("MAD", "SuperSmoother"),
    ...)

Arguments

object
MassSpectrum object
method
a noise estimation function; see .estimateNoiseMad, .estimateNoiseSuperSmoother
...
arguments to be passed to method.

Value

  • Returns a two column matrix (first column: mass, second column: intensity) of the estimated baseline.

See Also

MassSpectrum, .estimateNoiseMad, .estimateNoiseSuperSmoother removeBaseline,MassSpectrum-method

Examples

Run this code
## load library
library("MALDIquant");

## load example data
data("fiedler2009subset", package="MALDIquant");

## choose only the first mass spectrum
s <- fiedler2009subset[[1]];

## transform intensities
s <- transformIntensity(s, sqrt);

## remove baseline
s <- removeBaseline(s);

## plot spectrum
plot(s);

## estimate noise 
n <- estimateNoise(s);

## draw noise on the plot
lines(n, col="red");

Run the code above in your browser using DataLab