Learn R Programming

Cardinal (version 1.4.0)

standardizeSamples-methods: Standardize the Samples in an Imaging Dataset

Description

Apply standardization across the samples in a mass spectrometry imaging dataset to correct for between-sample variation.

Usage

"standardizeSamples"(object, method = "sum", ...)
## TIC normalization standardizeSamples.sum(x, sum=length(x), ...)

Arguments

object
An object of class MSImageSet.
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.

Value

An object of class MSImageSet with the ion images standardized across samples.

Details

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.

See Also

MSImageSet, featureApply

Examples

Run this code
data1 <- generateImage(as="MSImageSet")
data2 <- generateImage(as="MSImageSet")
sampleNames(data2) <- "2"
data3 <- combine(data1, data2)
standardizeSamples(data3, method="sum")

Run the code above in your browser using DataLab