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 = "median"). The normalization method to be used. Valid values are: "median", "PQN", "TIC", TMM, or "upperQuartile". See 'Details' section.

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:

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

msi.dataset-class

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")

[Package SPUTNIK version 1.4.2 Index]