batch_removal: batch_removal with sva's ComBat() function

Description Usage Arguments Value Examples

Description

Removes batch effects in combined datasets using sva's ComBat() function.

Usage

1

Arguments

expmatrix

An input matrix with gene names as row names and sample names as column names.

pheno

Phenotype table with batch information.

Value

Returns batch corrected expression matrix.

Examples

1
2
3
4
5
test_expmatrix <- matrix(rnorm(100*30),nrow=100,ncol=8,
                         dimnames=list(c(rownames(expmatrix[1:100,1:8])),
                         c(colnames(expmatrix[1:100,1:8]))))
pheno <- data.frame(batch=as.factor(rep(c(1,2), 4)), row.names = colnames(test_expmatrix))
test_expmatrix <- batch_removal(expmatrix=test_expmatrix, pheno)

ShirinG/exprAnalysis documentation built on May 9, 2019, 1:28 p.m.