sigGeneCounts: Return counts of significantly regulated genes

View source: R/edgeR-funcs.R

sigGeneCountsR Documentation

Return counts of significantly regulated genes

Description

Return counts of significantly regulated genes

Usage

sigGeneCounts(countDgeResult, value = NULL)

Arguments

countDgeResult

An EdgeResult object

value

NULL or character string, if not NULL, it must be a column name in the feature annotation data.

Value

A data.frame containing counts of positively and negatively regulated genes, the sum, as well as total number of features

Examples

exMat <- matrix(rpois(120, 10), nrow=20, ncol=6)
exMat[2:4, 4:6] <- exMat[2:4, 4:6]+20
exMat[7:9, 1:3] <- exMat[7:9, 1:3]+20
exGroups <- gl(2,3, labels=c("Group1", "Group2"))
exDesign <- model.matrix(~0+exGroups)
colnames(exDesign) <- levels(exGroups)
exContrast <- matrix(c(-1,1), ncol=1, dimnames=list(c("Group1", "Group2"), c("Group2.vs.Group1")))
exDescon <- DesignContrast(exDesign, exContrast, groups=exGroups)
exFdata <- data.frame(GeneSymbol=sprintf("Gene%d", 1:nrow(exMat)))
exPdata <- data.frame(Name=sprintf("Sample%d", 1:ncol(exMat)),
                     Group=exGroups)
exObj <- EdgeObject(exMat, exDescon, 
                   fData=exFdata, pData=exPdata)
exDgeRes <- dgeWithEdgeR(exObj)
sigGeneCounts(exDgeRes)

bedapub/ribiosNGS documentation built on Feb. 10, 2025, 12:34 a.m.