Learn R Programming

MALDIquant (version 1.9)

removeBaseline-methods: Removes the baseline of a MassSpectrum object.

Description

This method removes the baseline of mass spectrometry data (represented by a MassSpectrum object). The intensity of the mass spectrometry data would be reduced by baseline.

Usage

## S3 method for class 'MassSpectrum':
removeBaseline(object,
  method=c("SNIP", "TopHat", "ConvexHull", "median"),
  fun,
  ...)

Arguments

object
MassSpectrum object or a list of MassSpectrum objects.
method
a baseline estimation function; see .estimateBaselineSnip, .estimateBaselineTopHat,
fun
deprecated.
...
arguments to be passed to estimateBaseline,MassSpectrum-method.

Value

  • Returns a modified MassSpectrum object with reduced intensities.

References

See website: http://strimmerlab.org/software/maldiquant/

See Also

MassSpectrum, estimateBaseline,MassSpectrum-method

Examples

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

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

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

## plot spectrum
plot(s)

## subtract baseline
b <- removeBaseline(s, method="SNIP")

## draw modified spectrum on the plot
lines(b, col="blue")

Run the code above in your browser using DataLab