cameraLimmaVoomResultsByContrast: Apply the CAMERA method to a DGEList object

View source: R/gse.R

cameraLimmaVoomResultsByContrastR Documentation

Apply the CAMERA method to a DGEList object

Description

Apply the CAMERA method to a DGEList object

Usage

cameraLimmaVoomResultsByContrast(
  limmaVoomResults,
  index,
  doParallel = FALSE,
  ...
)

Arguments

limmaVoomResults

A LimmaVoomResults object, with GeneSymbol available

index

List of integer indices of genesets, names are names of gene sets

doParallel

Logical, whether parallel::mclapply should be used. Since at the current setting it makes a job running forever, use TRUE only if you are debugging the code.

...

Not used

Value

A data.frame containing CAMERA results.

Examples

exMat <- matrix(rpois(120, 10), nrow=20, ncol=6)
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)
exDgeList <- DGEList(exMat, genes=exFdata, samples=exPdata)
exDgeList <- edgeR::estimateDisp(exDgeList, exDesign)
edgeObj <- EdgeObject(exDgeList, exDescon)
limmaVoomRes <- ribiosNGS::dgeWithLimmaVoom(edgeObj)
cameraLimmaVoomResultsByContrast(limmaVoomRes, index=c(1:5))
cameraLimmaVoomResultsByContrast(limmaVoomRes, index=list(GS1=1:5, GS2=6:10))


bedapub/ribiosGSEA documentation built on March 30, 2023, 3:26 p.m.