removeBatchEffect {limma}R Documentation

Remove Batch Effect

Description

Remove batch effects from expression data.

Usage

removeBatchEffect(x,batch,batch2=NULL,design=matrix(1,ncol(x),1))

Arguments

x

numeric matrix, or any object that can be coerced to a matrix by as.matrix(x), containing log-expression intensities for a series of microarrays. Rows correspond to probes and columns to arrays.

batch

a factor or vector indicating batches.

batch2

an optional second batch factor or vector.

design

optional design matrix relating to treatment conditions to be preserved

Details

This function is useful for removing batch effects, associated with hybridization time or other technical variables, prior to clustering or unsupervised analysis such as PCA or heatmaps. It is not intended to use with linear modelling. For linear modelling, it is better to include the batch factors in the linear model.

The design matrix is used to describe comparisons between the samples, for example treatment effects, which should not be removed.

The function (in effect) fits a linear model to the data, including both batches and regular treatments, then removes the component due to the batch effects.

Value

A numeric matrix of log-expression values with batch effects removed.

Author(s)

Gordon Smyth and Carolyn de Graaf

See Also

05.Normalization


[Package limma version 3.10.2 Index]