batch_normalize {geneExpression} R Documentation

remove the technical batch effects from a merged multi-dataset gene expression matrix.

Description

Usage

batch_normalize(x,
    batch = NULL,
    center.batch = TRUE);

Arguments

x

the merged gene expression matrix (genes in rows, samples in columns) that is assembled from multiple public datasets. Different datasets usually carry platform/library/pre-processing specific technical effects; without this step the downstream co-expression analysis will produce many spurious correlations between samples of the same batch. [as Matrix]

batch

the batch grouping information. Accepts either a list object of (dataset name => sample id vector) slots, or a stream of SampleInfo objects (the batch label is taken from the batch slot of each sample info record). When Nothing, all samples are treated as one single batch and a global z-score normalization is applied.

center.batch

TRUE (default) -> per-gene, per-batch z-score: subtract the batch mean and divide by the batch standard deviation, which removes both the additive and the scale batch effects; FALSE -> per-gene, per-batch mean centering only (subtract the batch mean, keep the between-batch amplitude differences). [as boolean]

env

the R# runtime environment object. [as Environment]

Details

this function processes each gene row independently, so it does not change the relative relationships between genes. Run it before the co-expression / WGCNA analysis and after the multi-dataset merging.

Authors

phenotype_kit

Value

a new batch-normalized gene expression matrix. The row order and the sample order are identical to the input matrix; the input matrix object is not modified in place. Missing values (NaN) are imputed with the corresponding batch mean (which is zero after the centering).

clr value class

Examples


[Package geneExpression version 1.0.0.0 Index]