combat_p: parametric combat

Description Usage Arguments Details Value Author(s) References See Also Examples

Description

Batch effects are removed using a parametric empirical Bayes approach, as described in Johnson et al. 2007.

Usage

1
combat_p(Y, b, covariates = NULL, prior.plots=T)

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,…,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).

prior.plots

A logical value; if true prior plots to compare kernel density estimate and parametric estimate are produced.

Details

In this implementation pre-processing of the data is obtained through Moore-Penrose pseudo inverse. The final matrix of adjusted data can be different from that obtained through the original ComBat algorithm (see sva package) due to small differences in the optimization peocedure. NA values are not allowed.

Value

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

Author(s)

Marco Giordan

References

Johnson et al. 2007 http://www.ncbi.nlm.nih.gov/pubmed/16632515

See Also

ber, ber_bg, combat_np, mean_centering, standardization

Examples

1
2
3
4
5
Y<-matrix(rnorm(1200),nrow=12)
class<-gl(2,6,labels=c("Control","Treat"))
class<-data.frame(class)
batch<-rep(gl(2,3,labels=c("Batch1","Batch2")),2)
YEadj<-combat_p(Y,batch,class)

Example output

Loading required package: MASS

ber documentation built on May 2, 2019, 2:21 p.m.

Related to combat_p in ber...