reduceBaseline-methods {Cardinal} | R Documentation |
Apply baseline reduction to a mass spectrometry imaging dataset.
## S4 method for signature 'MSImagingExperiment' reduceBaseline(object, method = "median", ...) ## S4 method for signature 'MSImageSet' reduceBaseline(object, method = "median", ..., pixel = pixels(object), plot = FALSE) ## Median baseline reduction reduceBaseline.median(x, blocks=500, fun=min, spar=1, ...)
object |
An imaging dataset. |
method |
The baseline reduction method to use. |
pixel |
The pixels to baseline subtract. If less than the extent of the dataset, this will result in a subset of the data being processed. |
plot |
Plot the mass spectrum for each pixel while it is being processed? |
... |
Additional arguments passed to the baseline reduction method. |
x |
The mass spectrum to be baseline subtracted. |
blocks |
The number of intervals to break the mass spectrum into in order to choose minima or medians from which to interpolate the baseline. |
fun |
Function used to determine the points from which the baseline will be interpolated. |
spar |
Smoothing parameter for the spline smoothing applied to the spectrum in order to decide the cutoffs for throwing away baseline references that might occur inside peaks. |
Baseline reduction 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
: A numeric
vector of intensities.
...
: Additional arguments.
A user-created function should return a numeric
vector of the same length. with the baseline-subtracted intensities.
Internally, pixelApply
is used to apply the baseline reduction. See its documentation page for more details on additional objects available to the environment installed to the baseline reduction function.
An object of class MSImageSet
with the baseline-subtracted spectra.
Kylie A. Bemis
MSImageSet
,
MSImagingExperiment
,
pixelApply
,
process
data <- generateImage(as="MSImageSet") reduceBaseline(data, method="median", plot=interactive())