batchEffectRemoval {KnowSeq} | R Documentation |
This function corrects the batch effect of the expression matrix indicated by parameter. There are two method to choose such as ComBat or SVA.
batchEffectRemoval(expressionMatrix, labels, method = "combat", clusters = 2)
expressionMatrix |
The original expression matrix to treat the batch effect. |
labels |
A vector that contains the labels of the samples in expressionMatrix. |
method |
The method that will be used to remove the batch effect. The possibilities are "combat" or "sva". Next release will add RUV. |
clusters |
The number of clusters intrinsic to the expression matrix data which could means different batches. The optimal number of clusters in the expression matrix can be calculated by calling the function |
A matrix with the batch effect corrected for combat or a model for limmaDEGsExtraction
function in the case of sva.
dir <- system.file("extdata", package="KnowSeq") load(paste(dir,"/expressionExample.RData",sep = "")) expressionMatrixNoBatch <- batchEffectRemoval(expressionMatrix, labels, clusters = 4) svaMod <- batchEffectRemoval(expressionMatrix, labels, method = "sva")