standardizeRuns-methods {Cardinal} | R Documentation

## Standardize between runs in an imaging dataset

### Description

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

### Usage

    ## S4 method for signature 'MSImageSet'
    standardizeRuns(object, method = "sum", ...)

    ## Sum normalization
    standardizeRuns.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.

### 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.

### Value

An object of class `MSImageSet` with the runs standardized across samples.

### Author(s)

Kylie A. Bemis

### See Also

`MSImageSet`, `featureApply`

### Examples

    data1 <- generateImage(as="MSImageSet")
    data2 <- generateImage(as="MSImageSet")
    sampleNames(data2) <- "2"
    data3 <- combine(data1, data2)
    standardizeRuns(data3, method="sum")

[Package Cardinal version 2.2.6 Index]