ber (version 3.0)

ber_bg: Batch Effects Removal using Bagging

Description

Batch effects are removed using a two-stage regression approach and bagging.

Usage

ber_bg(Y, b, covariates = NULL, stage2=FALSE,partial=TRUE,nSim=150)

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 (probe sets) 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
A logical value indicating if the covariates have to be considered only in handling the location effects (stage2 = F) or also for the scale effects (stage2 = T).
partial
A logical value indicating if partial bagging or full bugging have to be performed. See reference below.
nSim
Number of bootstrap samples.

Value

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

Details

In this implementation NA values are not allowed.

References

M. Giordan. A two-stage procedure for the removal of batch effects in microarray studies

See Also

ber, combat_np, combat_p, mean_centering, standardization

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<-ber_bg(t(E),batch,BMPB)

Run the code above in your browser using DataCamp Workspace