This function normalises an assay in a `QFeatures`

according to
the supplied method (see Details). The normalized data is added as
a new assay

`normalizeSCP(object, i, name = "normAssay", method, ...)`

- object
An object of class

`QFeatures`

.- 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 is are`normAssay`

.- method
`character(1)`

defining the normalisation method to apply. See Details.`- ...
Additional parameters passed to

`MsCoreUtils::normalizeMethods()`

.

A `QFeatures`

object with an additional assay containing the
normalized data.

The `method`

parameter in `normalize`

can be one of `"sum"`

,
`"max"`

, `"center.mean"`

, `"center.median"`

, `"div.mean"`

,
`"div.median"`

, `"diff.meda"`

, `"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 to`sweep`

ing the column means (medians) along`MARGIN = 2`

with`FUN = "-"`

(for`"center.*"`

) or`FUN = "/"`

(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 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.

For further details and examples about normalisation, see
`MsCoreUtils::normalize_matrix()`

.

QFeatures::normalize for more details about `normalize`

```
data("scp1")
scp1
#> An instance of class QFeatures containing 5 assays:
#> [1] 190321S_LCA10_X_FP97AG: SingleCellExperiment with 166 rows and 11 columns
#> [2] 190222S_LCA9_X_FP94BM: SingleCellExperiment with 176 rows and 11 columns
#> [3] 190914S_LCB3_X_16plex_Set_21: SingleCellExperiment with 215 rows and 16 columns
#> [4] peptides: SingleCellExperiment with 539 rows and 38 columns
#> [5] proteins: SingleCellExperiment with 292 rows and 38 columns
normalizeSCP(scp1, i = "proteins", name = "normproteins",
method = "center.mean")
#> An instance of class QFeatures containing 6 assays:
#> [1] 190321S_LCA10_X_FP97AG: SingleCellExperiment with 166 rows and 11 columns
#> [2] 190222S_LCA9_X_FP94BM: SingleCellExperiment with 176 rows and 11 columns
#> [3] 190914S_LCB3_X_16plex_Set_21: SingleCellExperiment with 215 rows and 16 columns
#> [4] peptides: SingleCellExperiment with 539 rows and 38 columns
#> [5] proteins: SingleCellExperiment with 292 rows and 38 columns
#> [6] normproteins: SingleCellExperiment with 292 rows and 38 columns
```