Description Usage Arguments Details Value Author(s) See Also Examples
Apply baseline reduction to the feature vectors of an imaging dataset.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | ## S4 method for signature 'SparseImagingExperiment'
reduceBaseline(object, method = c("locmin", "median"), ...)
## S4 method for signature 'MSImageSet'
reduceBaseline(object, method = "median",
...,
pixel = pixels(object),
plot = FALSE)
## Local minima baseline reduction
reduceBaseline.locmin(x, window=5, ...)
## Interpolated median baseline reduction
reduceBaseline.median(x, blocks=500, fun=median, 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 each pixel while it is being processed? |
... |
Additional arguments passed to the baseline reduction method. |
x |
The signal to be baseline-corrected. |
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. |
window |
The sliding window (number of data points) to consider when determining the local minima. |
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 the same class with the baseline-subtracted spectra.
Kylie A. Bemis
MSImagingExperiment
,
MSImageSet
,
pixelApply
,
process
1 2 3 4 5 6 7 8 9 10 11 | setCardinalBPPARAM(SerialParam())
set.seed(2)
data <- simulateImage(preset=1, npeaks=10, dim=c(3,3), baseline=1)
data <- data[,pData(data)$circle]
# queue baseline reduction
data <- reduceBaseline(data, method="median", blocks=100)
# apply baseline reduction
data_nobaseline <- process(data, plot=interactive())
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.