| BatchRemove {MAGeCKFlute} | R Documentation |
Batch effect removal
BatchRemove(mat, batchMat, log2trans = FALSE, positive = FALSE)
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. |
A list contrains two objects, including data and p.
Wubing Zhang
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)