| batchProcess-methods {Cardinal} | R Documentation |
Batch apply multiple pre-processing steps on an imaging dataset.
## S4 method for signature 'MSImageSet'
batchProcess(object,
normalize = NULL,
smoothSignal = NULL,
reduceBaseline = NULL,
reduceDimension = NULL,
peakPick = NULL,
peakAlign = NULL,
...,
layout,
pixel = pixels(object),
plot = FALSE)
object |
An object of class |
normalize |
Either 'TRUE' or a |
smoothSignal |
Either 'TRUE' or a |
reduceBaseline |
Either 'TRUE' or a |
reduceDimension |
Either 'TRUE' or a |
peakPick |
Either 'TRUE' or a |
peakAlign |
Either 'TRUE' or a |
layout |
The layout of the plots, given by a length 2 numeric as |
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. |
One of the primary purposes of this method (besides streamlining pre-processing steps) is to allow single-step reduction of larger-than-memory on-disk datasets to a smaller peak picked form without fully loading the data into memory. Therefore, the behavior for peakPick differs somewhat from when the peakPick method is called on its own. Typically, the spectra are preserved until peakAlign is called. However, to save memory, only the peaks are returned by batchProcess.
Additionally, when performing batch pre-processing, the mean spectrum is also calculated and returned as part of the 'featureData' of the result, to be used by subsequent calls to peakAlign.
Internally, pixelApply is used to apply the pre-processing steps, as with other pre-processing methods.
Note that reduceDimension and peakPick cannot appear in the same batchProcess call together, and peakAlign cannot appear in a batchProcess call without peakPick.
The peakAlign step is performed separately from every other step.
An object of class MSImageSet with the processed spectra.
Kylie A. Bemis
MSImageSet,
normalize,
smoothSignal,
reduceBaseline,
peakPick,
pixelApply
data <- generateImage(as="MSImageSet")
batchProcess(data, normalize=TRUE, smoothSignal=TRUE,
reduceBaseline=TRUE, peakPick=TRUE, peakAlign=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())