msNormalize {msProcess} | R Documentation |
Normalizes the intensity matrix of an msSet
object.
msNormalize(x, FUN="tic", event="Intensity Normalization", ...)
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" . |
An msSet
object with the intensity matrix object
replaced by its normalized form.
msNormalizeTIC
, msNormalizeSNV
, msSet
.
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)