Description Usage Arguments Details Value Author(s) See Also Examples
Function to normalise a matrix of quantitative omics data. The
nature of the normalisation is controlled by the method
argument, described below.
1 2 3 | normalizeMethods()
normalize_matrix(x, method, ...)
|
x |
A matrix to be normalised. |
method |
|
... |
Additional parameters passed to the inner normalisation function. |
The method
parameter can be one of "sum"
, "max"
, "center.mean"
,
"center.median"
, "div.mean"
, "div.median"
, "diff.meda"
,
"quantiles
", "quantiles.robust
" or "vsn"
. The normalizeMethods()
function returns a vector of available normalisation methods.
For "sum"
and "max"
, each feature's intensity is divided by the
maximum or the sum of the feature respectively. These two methods are
applied along the features (rows).
"center.mean"
and "center.median"
center the respective sample
(column) intensities by subtracting the respective column means or
medians. "div.mean"
and "div.median"
divide by the column means or
medians.
"diff.median"
centers all samples (columns) so that they all match the
grand median by subtracting the respective columns medians differences to
the grand median.
Using "quantiles"
or "quantiles.robust"
applies (robust) quantile
normalisation, as implemented in preprocessCore::normalize.quantiles()
and preprocessCore::normalize.quantiles.robust()
. "vsn"
uses the
vsn::vsn2()
function. Note that the latter also glog-transforms the
intensities. See respective manuals for more details and function
arguments.
A normalised matrix of dimensions dim(x)
.
Laurent Gatto
The scale()
function that centers (like center.mean
above) and
scales.
1 2 3 4 5 6 7 8 9 10 11 12 13 | normalizeMethods()
## test data
set.seed(42)
m <- matrix(rlnorm(60), 10)
normalize_matrix(m, method = "sum")
normalize_matrix(m, method = "max")
normalize_matrix(m, method = "quantiles")
normalize_matrix(m, method = "center.mean")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.