standardizeRuns-methods {Cardinal} | R Documentation |
Apply standardization across the runs in a mass spectrometry imaging dataset to correct for between-run variation.
## S4 method for signature 'MSImageSet' standardizeRuns(object, method = "sum", ...) ## Sum normalization standardizeRuns.sum(x, sum=length(x), ...)
object |
An object of class |
method |
The standardization method to use. |
... |
Additional arguments passed to the standardization method. |
x |
The flattened ion image to be standardized. |
sum |
The value to which to standardize the sum of the ion image intensity values. |
Standardization 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.
Internally, featureApply
is used to apply the standardization, with .pixel.groups=sample
. See its documentation page for more details on additional objects available to the environment installed to the standardization function.
An object of class MSImageSet
with the runs standardized across samples.
Kylie A. Bemis
data1 <- generateImage(as="MSImageSet") data2 <- generateImage(as="MSImageSet") sampleNames(data2) <- "2" data3 <- combine(data1, data2) standardizeRuns(data3, method="sum")