msNormalize: Mother Function for Intensity Normalization

Description Usage Arguments Value See Also Examples

Description

Normalizes the intensity matrix of an msSet object.

Usage

1
2
msNormalize(x, FUN="tic",
    event="Intensity Normalization", ...)

Arguments

x

An object of class msSet.

...

Additional arguments to FUN. They are passed unchanged to each call of FUN and include their names. See the help documentation of the specified FUN for details.

FUN

Either an object of class "character" or of class "function".

character: A character string denoting the method to use in denoising the data. Supported choices are "snv" for standard normal variate transformation or "tic" for normalization based on the median total ion current estimate for all spectra. Default: "tic".

function: A user-defined function with an argument list of the form (x, ...) where x is a required argument corresponding to a numeric vector (typically these values will be the intensity values of a mass spectrum).

In either case, the additional arguments ... will be passed directly to the specified FUN.

event

A character string denoting the name of the event to register with the (embedded) event history object of the input after processing the input data. Default: "Intensity Normalization".

Value

An msSet object with the intensity matrix object replaced by its normalized form.

See Also

msNormalizeTIC, msNormalizeSNV, msSet.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
if (!exists("qcset")) data("qcset", package="msProcess")

## normalize a subset of spectra in the
## qcset object using total ion current.
data <- qcset[,1:8]
zion <- msNormalize(data, FUN="tic")
plot(zion, process="msNormalize", subset=1:8,
xlim=c(13000, 17000), lty=c(1,4), lwd=1:2)

## normalize a subset of spectra in the
## qcset object using a standard normal
## variate transformation.
zsnv <- msNormalize(data, FUN="snv")
plot(zsnv, process="msNormalize", subset=1:8,
xlim=c(13000, 17000), lty=c(1,4), lwd=1:2)

## perform a multiresolution decomposition of each
## spectrum in the intensity matrix, sum over
## levels 6-8, then normalize using the SNV
## transformation (this process is equivalent
## to scale-based normalization (SBN)).
data <- msDenoise(data, FUN="mrd", levels=6:8, keep.smooth=FALSE)
zsnv <- msNormalize(data, FUN="snv")
plot(zsnv, process="msNormalize", subset=1:8,
xlim=c(13000, 17000), lty=c(1,4), lwd=1:2)

zeehio/msProcess documentation built on May 4, 2019, 10:15 p.m.