This manual page describes common quantitative proteomics data
processing methods using QFeatures objects. In the following
functions, if object
is of class QFeatures
, and optional assay
index or name i
can be specified to define the assay (by name of
index) on which to operate.
The following functions are currently available:
logTransform(object, base = 2, i, pc = 0)
log-transforms (with an optional pseudocount offset) the assay(s).normalize(object, method, i)
normalises the assay(s) according tomethod
(see Details).scaleTransform(object, center = TRUE, scale = TRUE, i)
appliesbase::scale()
toSummarizedExperiment
andQFeatures
objects.sweep(x, MARGIN, STATS, FUN = "-", check.margin = TRUE, ...)
sweeps out array summaries fromSummarizedExperiment
andQFeatures
objects. Seebase::sweep()
for details.
See the Processing vignette for examples.
Usage
# S4 method for class 'SummarizedExperiment'
logTransform(object, base = 2, pc = 0)
# S4 method for class 'QFeatures'
logTransform(object, i, name = "logAssay", base = 2, pc = 0)
# S4 method for class 'SummarizedExperiment'
scaleTransform(object, center = TRUE, scale = TRUE)
# S4 method for class 'QFeatures'
scaleTransform(object, i, name = "scaledAssay", center = TRUE, scale = TRUE)
# S4 method for class 'SummarizedExperiment'
normalize(object, method, ...)
# S4 method for class 'QFeatures'
normalize(object, i, name = "normAssay", method, ...)
# S4 method for class 'SummarizedExperiment'
sweep(x, MARGIN, STATS, FUN = "-", check.margin = TRUE, ...)
# S4 method for class 'QFeatures'
sweep(
x,
MARGIN,
STATS,
FUN = "-",
check.margin = TRUE,
...,
i,
name = "sweptAssay"
)
Arguments
- object
An object of class
QFeatures
orSummarizedExperiment
.- base
numeric(1)
providing the base with respect to which logarithms are computed. Defaults is 2.- pc
numeric(1)
with a pseudocount to add to the quantitative data. Useful when (true) 0 are present in the data. Default is 0 (no effect).- i
A numeric vector or a character vector giving the index or the name, respectively, of the assay(s) to be processed.
- name
A
character(1)
naming the new assay name. Defaults arelogAssay
forlogTransform
,scaledAssay
forscaleTranform
andnormAssay
fornormalize
.- center
logical(1)
(default isTRUE
) value or numeric-alike vector of length equal to the number of columns ofobject
. Seebase::scale()
for details.- scale
logical(1)
(default isTRUE
) or a numeric-alike vector of length equal to the number of columns ofobject
. Seebase::scale()
for details.- method
character(1)
defining the normalisation method to apply. See Details.- ...
Additional parameters passed to inner functions.
- x
An object of class
QFeatures
orSummarizedExperiment
insweep
.- MARGIN
As in
base::sweep()
, a vector of indices giving the extent(s) ofx
which correspond toSTATS
.- STATS
As in
base::sweep()
, the summary statistic which is to be swept out.- FUN
As in
base::sweep()
, the function to be used to carry out the sweep.- check.margin
As in
base::sweep()
, alogical
. IfTRUE
(the default), warn if the length or dimensions ofSTATS
do not match the specified dimensions ofx
. Set toFALSE
for a small speed gain when you know that dimensions match.
Details
The method
parameter in normalize
can be one of "sum"
,
"max"
, "center.mean"
, "center.median"
, "div.mean"
,
"div.median"
, "diff.median"
, "quantiles
", "quantiles.robust
"
or "vsn"
. The MsCoreUtils::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. These are equivalent tosweep
ing the column means (medians) alongMARGIN = 2
withFUN = "-"
(for"center.*"
) orFUN = "/"
(for"div.*"
)."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 inpreprocessCore::normalize.quantiles()
andpreprocessCore::normalize.quantiles.robust()
."vsn"
uses thevsn::vsn2()
function. Note that the latter also glog-transforms the intensities. See respective manuals for more details and function arguments.
For further details and examples about normalisation, see
MsCoreUtils::normalize_matrix()
.
Examples
MsCoreUtils::normalizeMethods()
#> [1] "sum" "max" "center.mean" "center.median"
#> [5] "div.mean" "div.median" "diff.median" "quantiles"
#> [9] "quantiles.robust" "vsn"