BatchRemove: Batch effect removal

Description Usage Arguments Value Author(s) See Also Examples

View source: R/BatchRemove.R

Description

Batch effect removal

Usage

1
2
3
4
5
6
7
8
9
BatchRemove(
  mat,
  batchMat,
  log2trans = FALSE,
  pca = TRUE,
  positive = FALSE,
  cluster = FALSE,
  outdir = NULL
)

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.

pca

Boolean, specifying whether return pca plot.

positive

Boolean, specifying whether all values should be positive.

cluster

Boolean, specifying whether perform hierarchical clustering.

outdir

Output directory for hierarchical cluster tree.

Value

A list contrains two objects, including data and p.

Author(s)

Wubing Zhang

See Also

ComBat

Examples

1
2
3
4
5
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)

MAGeCKFlute documentation built on Nov. 8, 2020, 5:40 p.m.