batchEffectRemoval: Corrects the batch effect of the data by using the selected...

Description Usage Arguments Value Examples

View source: R/batchEffectRemoval.R

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

1
2
3
4
5
6
batchEffectRemoval(
  expressionMatrix,
  labels,
  method = "combat",
  batchGroups = c()
)

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.

batchGroups

A numeric vector with the different known batch groups for the samples.

Value

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

Examples

1
2
3
4
5
6
7
dir <- system.file("extdata", package="KnowSeq")
load(paste(dir,"/expressionExample.RData",sep = ""))

batchGroups <- c(1,1,1,1,2,2,1,2,1,2)

expressionMatrixNoBatch <- batchEffectRemoval(expressionMatrix, labels, batchGroups = batchGroups)
expressionMatrixNoBatch <- batchEffectRemoval(expressionMatrix, labels, method = "sva")

KnowSeq documentation built on April 16, 2021, 6:01 p.m.