batchEffectRemoval {KnowSeq}R Documentation

Corrects the batch effect of the data by using the selected method.

Description

This function corrects the batch effect of the expression matrix indicated by parameter. There are two method to choose such as ComBat or SVA.

Usage

batchEffectRemoval(expressionMatrix, labels, method = "combat",
  clusters = 2)

Arguments

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 dataPlot, with the parameter mode equal to "optimalClusters". This parameter is only required when the user selects the combat method.

Value

A matrix with the batch effect corrected for combat or a model for limmaDEGsExtraction function in the case of sva.

Examples

dir <- system.file("extdata", package="KnowSeq")
load(paste(dir,"/expressionExample.RData",sep = ""))

expressionMatrixNoBatch <- batchEffectRemoval(expressionMatrix, labels, clusters = 4)
svaMod <- batchEffectRemoval(expressionMatrix, labels, method = "sva")

[Package KnowSeq version 1.0.0 Index]