Learn R Programming

Cardinal (version 1.4.0)

batchProcess-methods: Batch Pre-Processing on an Imaging Dataset

Description

Batch apply multiple pre-processing steps on an imaging dataset.

Usage

"batchProcess"(object, normalize = NULL, smoothSignal = NULL, reduceBaseline = NULL, peakPick = NULL, ..., layout, pixel = pixels(object), plot = FALSE)

Arguments

object
An object of class MSImageSet.
normalize
Either 'TRUE' or a list of arguments to be passed to the normalize method. Use 'FALSE' or 'NULL' to skip this pre-processing step.
smoothSignal
Either 'TRUE' or a list of arguments to be passed to the smoothSignal method. Use 'FALSE' or 'NULL' to skip this pre-processing step.
reduceBaseline
Either 'TRUE' or a list of arguments to be passed to the reduceBaseline method. Use 'FALSE' or 'NULL' to skip this pre-processing step.
peakPick
Either 'TRUE' or a list of arguments to be passed to the peakPick method. Use 'FALSE' or 'NULL' to skip this pre-processing step.
layout
The layout of the plots, given by a length 2 numeric as c(ncol, nrow).
pixel
The pixels to process. If less than the extent of the dataset, this will result in a subset of the data being processed.
plot
Plot the pre-processing step for each pixel while it is being processed?
...
Ignored.

Value

An object of class MSImageSet with the processed spectra.

Details

When performing batch pre-processing, the mean spectrum is also calculated and returned as part of the 'featureData' of the result.

Internally, pixelApply is used to apply the pre-processing steps, as with other pre-processing methods.

See Also

MSImageSet, normalize, smoothSignal, reduceBaseline, peakPick, pixelApply

Examples

Run this code
data <- generateImage(as="MSImageSet")

batchProcess(data, normalize=TRUE, smoothSignal=TRUE,
    reduceBaseline=TRUE, peakPick=TRUE,
    layout=c(2,2), plot=interactive())

batchProcess(data, normalize=TRUE,
    reduceBaseline=list(blocks=200), peakPick=list(SNR=12),
    layout=c(1,3), plot=interactive())

Run the code above in your browser using DataLab