normalizeQuantileSpline.matrix {aroma.light} | R Documentation |
Normalizes channels so they all have the same average sample distributions.
## S3 method for class 'matrix': normalizeQuantileSpline(X, xTarget, ...)
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 (). |
Returns an NxK matrix
.
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.
Henrik Bengtsson (http://www.braju.com/R/)
[1] H. Bengtsson, R. Irizarry, B. Carvalho, and T. Speed, Estimation and assessment of raw copy numbers at the single locus level, Bioinformatics, 2008.
Internally normalizeQuantileSpline.numeric
() is used.
*normalizeQuantileRank()
.
# 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")