Learn R Programming

MALDIquant (version 1.2)

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

Description

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

Usage

## S3 method for class 'MassSpectrum':
estimateNoise(object)

Arguments

object
MassSpectrum object

Value

  • Returns a single numeric value.

See Also

MassSpectrum, detectPeaks,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
abline(h=n, col="red");

Run the code above in your browser using DataLab