ematAdjust: matrix row-wise scaling and centering

View source: R/ematAdjust.R

ematAdjustR Documentation

matrix row-wise scaling and centering

Description

Centers and scales gene expression matrix so that each row has mean=0 and sd=1. If input data is non-normalized sequencing count data, normalization should be performed by setting normMethod. This also enforces log2-transformation.

Usage

ematAdjust(
  emat,
  center = TRUE,
  scale = TRUE,
  signalFilt = 0,
  verbose = getOption("verbose"),
  ...
)

Arguments

emat

a numeric matrix with row features and sample columns.

center

numeric of same length as nrow(emat).

scale

numeric of same length as nrow(emat).

signalFilt

numeric setting feature filtering. Specifically rows where rowMax(emat) < quantile(emat, probs = signalFilt) are discarded.

verbose

logical, console messages output.

...

additional arguments passed to normalizeBetweenArrays and calcNormFactors depending normalization method selected.

Details

ematAdjust performs row-wise scaling and centering by passing matrix to scale. Setting scale and center may be useful for predicting new samples based on row-wise means and standard deviations from prior (identically processed) datasets. If e.g. signalFilt=.1 features with maximum below emat 10th percentile are discarded.

Value

A row-wise centered and scaled matrix. Output matrix will have fewer rows than input if signalFilt>0.


MolecularPathologyLab/MmCMS documentation built on Oct. 18, 2023, 10:42 p.m.