Learn R Programming

Cardinal (version 1.4.0)

peakFilter-methods: Peak Filter an Imaging Dataset

Description

Apply peak filtering to a mass spectrometry imaging dataset.

Usage

"peakFilter"(object, method = "freq", ..., pixel, plot)
## Filter based on the frequency of a peak peakFilter.freq(x, freq.min=length(x) / 100, ...)

Arguments

object
An object of class MSImageSet.
method
The peak filtering method to use.
...
Additional arguments passed to the peak filtering method.
pixel
Deprecated.
plot
Deprecated. (Never did anything anyway.)
x
The vector of ion image intensities to filter.
freq.min
Peaks that occur in the dataset fewer times than this will be removed.

Value

An object of class MSImageSet with the filtered peaks.

Details

Unlike most other processing methods, peakFilter operates on the feature space (ion images) of the dataset.

Peak filtering is usually performed using the provided functions, but a user-created function can also be passed to method. In this case it should take the following arguments:

  • x: The vector of ion image intensities to filter.
  • ...: Additional arguments.

A user-created function should return a logical: TRUE means keep the peak, and FALSE means remove the peak.

Internally, featureApply is used to apply the filtering. See its documentation page for more details on additional objects available to the environment installed to the peak filtering function.

See Also

MSImageSet, peakPick, peakAlign, reduceDimension, featureApply

Examples

Run this code
data <- generateImage(diag(2), as="MSImageSet")
peaks <- peakPick(data, method="simple", plot=interactive())
peaks <- peakAlign(peaks, method="diff", plot=interactive())
peaks <- peakFilter(peaks, method="freq")

Run the code above in your browser using DataLab