Learn R Programming

SPUTNIK (version 1.1)

normIntensity,msi.dataset-method: Normalize the peaks intensities.

Description

Normalize the peaks intensities.

Usage

# S4 method for msi.dataset
normIntensity(object, method = "median")

Arguments

object
method

String (default = "median"). the normalization method to be used. Valid values are: "TIC", "median", or "PQN". See 'Details' section.

Value

object msi.dataset-class object, with normalized peaks intensities.

Details

The valid values for method are:

  • "TIC": total ion current normalization assign the sum of the peaks intensities to one.

  • "median": median of spectrum intensities is scaled to one.

  • "PQN":

    1. apply "TIC" normalization

    2. calculate the median reference spectrum (after removing the zeros)

    3. calculate the quotients of peaks intensities and reference

    4. calculate the median of quotients for each peak (after removing the zeros)

    5. divide all the peak intensities by the median of quotients

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.

See Also

msi.dataset-class

Examples

Run this code
# NOT RUN {
## Load package
library("SPUTNIK")

## Create the msi.dataset-class object
sz <- c(5, 4)
x <- matrix(rnorm(sz[1] * sz[2] * 20), 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(5, 4)
x <- matrix(rnorm(sz[1] * sz[2]), 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")
# }

Run the code above in your browser using DataLab