BatchRemove {MAGeCKFlute} | R Documentation |
Remove batch effect
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, which has at least two columns, including Samples(matched colname of mat) and Batch. It can have the third column, which should be Covariate. |
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(MLE_Data) beta = ReadBeta(MLE_Data, organism="hsa") samples = c("D7_R1", "D7_R2", "PLX7_R1", "PLX7_R2") batchMat = data.frame(samples = samples, batch = c("bat1","bat2","bat1","bat2"), cov = c(1,1,2,2)) res = BatchRemove(beta[, samples], batchMat)