camera.LimmaVoomResult: Run the CAMERA method using LimmaVoomResult

View source: R/gse.R

camera.LimmaVoomResultR Documentation

Run the CAMERA method using LimmaVoomResult

Description

Run the CAMERA method using LimmaVoomResult

Usage

## S3 method for class 'LimmaVoomResult'
camera(y, gmtList, doParallel = FALSE, ...)

Arguments

y

A LimmaVoomResult object

gmtList

Gene set collections, for example read by readGmt

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.

...

Passed to cameraLimmaVoomResultsByContrast

Note that the LimmaVoomResult object must have a column 'GeneSymbol' in its fData.

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)
exGmt <- BioQC::GmtList(list(GeneSet1=sprintf("GeneSymbol%d", 1:5),
  GeneSet2=sprintf("GeneSymbol%d", 6:10)))
  
camera(limmaVoomRes, exGmt)


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