normalizeQuantileSpline.matrix {aroma.light}R Documentation

Weighted sample quantile normalization

Description

Normalizes channels so they all have the same average sample distributions.

Usage

## S3 method for class 'matrix':
normalizeQuantileSpline(X, xTarget, ...)

Arguments

X A numeric NxK matrix with the K columns representing the channels and the N rows representing the data points.
xTarget A numeric vector of length N.
... Additional arguments passed to normalizeQuantileSpline.numeric().

Value

Returns an NxK matrix.

Missing values

Both argument X and xTarget may contain non-finite values. These values do not affect the estimation of the normalization function. Non-finite values in X, remain in the output.

Author(s)

Henrik Bengtsson (http://www.braju.com/R/)

References

[1] H. Bengtsson, R. Irizarry, B. Carvalho, and T. Speed, Estimation and assessment of raw copy numbers at the single locus level, Bioinformatics, 2008.

See Also

Internally normalizeQuantileSpline.numeric() is used. *normalizeQuantileRank().

Examples

# Simulate three samples with on average 20% missing values
N <- 10000
X <- cbind(rnorm(N, mean=3, sd=1),
           rnorm(N, mean=4, sd=2),
           rgamma(N, shape=2, rate=1))
X[sample(3*N, size=0.20*3*N)] <- NA

# Plot the data
layout(matrix(c(1,0,2:5), ncol=2, byrow=TRUE))
xlim <- range(X, na.rm=TRUE);
plotDensity(X, lwd=2, xlim=xlim, main="The three original distributions")

Xn <- normalizeQuantile(X)
plotDensity(Xn, lwd=2, xlim=xlim, main="The three normalized distributions")
plotXYCurve(X, Xn, xlim=xlim, main="The three normalized distributions")

Xn2 <- normalizeQuantileSpline(X, xTarget=Xn[,1], spar=0.99)
plotDensity(Xn2, lwd=2, xlim=xlim, main="The three normalized distributions")
plotXYCurve(X, Xn2, xlim=xlim, main="The three normalized distributions")

[Package aroma.light version 1.10.0 Index]