ber (version 2.0)

berCov: Batch Effects Removal using Covariates

Description

The function berCov removes batch effects from (microarray) data. This function uses information about the batches, the expression levels in the data and other covariates of interest.

Usage

berCov(Y, b, covariates, stage2_cov = FALSE)

Arguments

Y
A matrix with $n$ rows and $g$ columns, where $n$ is the number of objects and $g$ is the number of variables. In the case of gene expression data, columns correspond to genes and rows to samples.
b
A vector of class factor with the element in position $i$ ($i=1,\ldots,n$) representing the batch from which observation $i$ belongs to.
covariates
An object of class data.frame where each column corresponds to a quantitative variable (of class numeric) or a qualitative variable (of class factor)
stage2_cov
logical indicating if the covariates have to be considered only in handling the location effects (stage2_cov = F) or also for the scale effects (stage2_cov = T).

Value

  • A matrix of adjusted data with $n$ rows and $g$ columns.

References

M. Giordan (Submitted). An efficient two-stage procedure for removing batch effects in high dimensional data experiments.

See Also

ber

Examples

Run this code
library(golubEsets)
library(vsn)
data(Golub_Merge)
E<-exprs(vsn2(Golub_Merge))
batch<-Golub_Merge$Source
BMPB<-Golub_Merge$BM.PB
BMPB<-data.frame(BMPB)
Eadj<-berCov(t(E),batch,BMPB)

Run the code above in your browser using DataCamp Workspace