BatchRemove {MAGeCKFlute} | R Documentation

## Batch effect removal

### Description

Batch effect removal

### Usage

    BatchRemove(mat, batchMat, log2trans = FALSE, positive = FALSE)

### Arguments

`mat` | Matrix, or a file path of data.
`batchMat` | Matrix like data object or a file path of batch table, in which the first two columns are 'Samples'(matched colname of mat) and 'Batch', and remaining columns should be Covariates.
`log2trans` | Boolean, specifying whether do log2 transition before batch removal.
`positive` | Boolean, specifying whether all values should be positive.

### Value

A list contrains two objects, including `data` and `p`.

### Author(s)

Wubing Zhang

### See Also

`ComBat`

### Examples

    data(bladderdata, package = "bladderbatch")
    dat <- bladderEset[1:50,]
    pheno = pData(dat)
    edata = exprs(dat)
    batchMat = pheno[, c("sample", "batch", "cancer")]
    batchMat$sample = rownames(batchMat)
    edata1 = BatchRemove(edata, batchMat)

[Package MAGeCKFlute version 1.2.3 Index]