limmaDEGsExtraction {KnowSeq}R Documentation

limmaDEGsExtraction performs the analysis to extract the Differentially Expressed Genes (DEGs) among the classes to compare.

Description

The function performs the analysis to extract the Differentially Expressed Genes (DEGs) among the classes to compare. The number of final DEGs can change depending on the p-value and the LFC indicated by parameters of the function. Furthermore, the function detects if the number of classes are greater than 2 to perform a multiclass DEGs analysis.

Usage

limmaDEGsExtraction(expressionMatrix, labels, pvalue = 0.05, lfc = 1,
  cov = 1, number = Inf, svaCorrection = FALSE, svaMod)

Arguments

expressionMatrix

The expressionMatrix parameter is an expression matrix or data.frame that contains the genes in the rows and the samples in the columns.

labels

A vector or factors that contains the labels for each of the samples in the expressionMatrix parameter.

pvalue

The value of the p-value which determines the DEGs. If one or more genes have a p-value lower or equal to the selected p-value, they would be considered as DEGs.

lfc

The value of the LFC which determines the DEGs. If one or more genes have a LFC greater or equal to the selected LFC, they would be considered as DEGs.

cov

This value only works when there are more than two classes in the labels. This parameter stablishs a minimum number of pair of classes combination in which exists differential expression to consider a genes as expressed genes.

number

The maximum number of desired genes as output of limma. As default, the function returns all the extracted DEGs with the selected parameters.

svaCorrection

A logical variable that represents if the model for limma is calculated or indicated by parameter from the output of batchEffectRemoval function by using sva method.

svaMod

The model calculated by batchEffectRemoval function by using sva method.

Value

A list that contains two objects. The table with statistics of the different DEGs and a reduced expression matrix which contains the DEGs and the samples.

Examples

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

expressionMatrix <- calculateGeneExpressionValues(countsMatrix,myAnnotation, genesNames = TRUE)

DEGsInformation <- limmaDEGsExtraction(expressionMatrix, labels, lfc = 2.0,
pvalue = 0.01, number = Inf)

topTable <- DEGsInformation$Table

DEGsMatrix <- DEGsInformation$DEGsMatrix

[Package KnowSeq version 1.0.0 Index]