normIntensity,msi.dataset-method {SPUTNIK} | R Documentation |
Normalize the peaks intensities.
Description
Normalize the peaks intensities.
Usage
## S4 method for signature 'msi.dataset'
normIntensity(object, method = "median", peaksInd = NULL, offsetZero = 0)
Arguments
object |
msi.dataset-class object. |
method |
string (default = |
peaksInd |
numeric array (default = NULL). Array of peak indices used to calculate the scaling factors (TIC, median). If NULL, all the peaks are used. |
offsetZero |
numeric (default = 0). This value is added to all the peak intensities to take into accounts of the zeros. |
Details
The valid values for method
are:
-
"median"
: median of spectrum intensities is scaled to one. -
"PQN"
:apply
"TIC"
normalizationcalculate the median reference spectrum (after removing the zeros)
calculate the quotients of peaks intensities and reference
calculate the median of quotients for each peak (after removing the zeros)
divide all the peak intensities by the median of quotients
-
"TIC"
: total ion current normalization assign the sum of the peaks intensities to one. -
"TMM"
: trimmed mean of M-values (TMM with zero pairing). Called TMMwzp in edgeR. -
"upperQuartile"
: spectra are scaled by their 3rd quartile.
Value
object msi.dataset-class object, with normalized peaks intensities.
When using TIC scaling, if zeros are present in the matrix, a positive offset
must be added to all the peak intensities through the parameter offsetZero
.
This is necessary for applying the CLR transformation. TIC scaling transforms the
spectra into compositional data; in this case the CLR transformation must be
applied through the varTransform function.
Author(s)
Paolo Inglese p.inglese14@imperial.ac.uk
References
F. Dieterle, A. Ross, G. Schlotterbeck, and Hans Senn. 2006. Probabilistic quotient normalization as robust method to account for dilution of complex biological mixtures. Application in 1H NMR metabonomics. Analytical Chemistry 78(13): 4281-4290.
Robinson MD, Oshlack A (2010). A scaling normalization method for differential expression analysis of RNA-seq data. Genome Biology 11, R25.
See Also
Examples
## Load package
library("SPUTNIK")
## Create the msi.dataset-class object
sz <- c(40, 40)
x <- matrix(rnorm(sz[1] * sz[2] * 20) * 1000, sz[1] * sz[2], 20)
x[x < 0] <- 0 # MS data is positive
mz <- sort(sample(100, ncol(x)))
msiX <- msiDataset(x, mz, sz[1], sz[2])
## Normalize and log-transform
msiX <- normIntensity(msiX, "median")
msiX <- varTransform(msiX, "log")
## Create the msi.dataset-class object
sz <- c(40, 40)
x <- matrix(rnorm(sz[1] * sz[2] * 20) * 1000, sz[1] * sz[2], 20)
x[x < 0] <- 0 # MS data is positive
mz <- sort(sample(100, ncol(x)))
msiX <- msiDataset(x, mz, sz[1], sz[2])
## Normalize using PQN
msiX <- normIntensity(msiX, "PQN")