ber (version 1.0)

ber: Batch Effects Removal

Description

The function ber removes the batch effects from a data set.

Usage

ber(Y, b)

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 integers of length $n$ where the elements correspond to the batches. For $m$ batches the elements must be integers between 1 and $m$; the element in position $i$ ($i=1,\ldots,n$) represents the batch from which observation $i$ belongs to.

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.

Examples

Run this code
library(golubEsets)
library(vsn)
data(Golub_Merge)
b<-Golub_Merge$Source

E<-exprs(vsn2(Golub_Merge))
batch<-rep(1,length(b))
for(i in 1:length(b)){
    if(b[i]=="CALGB"){batch[i]<-2}
    if(b[i]=="CCG"){batch[i]<-3}
    if(b[i]=="St-Jude"){batch[i]<-4}
}

Eadj<-ber(t(E),batch)

Run the code above in your browser using DataLab