BatchRemove {MAGeCKFlute}R Documentation

Batch effect removal

Description

Batch effect removal

Usage

BatchRemove(mat, batchMat, log2trans = FALSE)

Arguments

mat

A data frame, each row is a gene, and each column is a sample.

batchMat

A data frame, the first column should be 'Samples'(matched colnames of mat) and the second column is 'Batch'. The remaining columns could be Covariates.

log2trans

Boolean, specifying whether do logarithmic transformation before batch removal.

Value

A list contrains two objects, including data and p.

Author(s)

Wubing Zhang

See Also

ComBat

Examples

edata = matrix(c(rnorm(2000, 5), rnorm(2000, 8)), 1000)
colnames(edata) = paste0("s", 1:4)
batchMat = data.frame(sample = colnames(edata), batch = rep(1:2, each = 2))
edata1 = BatchRemove(edata, batchMat)
print(edata1$p)


[Package MAGeCKFlute version 1.4.3 Index]