cameraDGEListByContrast | R Documentation |
Apply the CAMERA method to a DGEList object and a contrast
cameraDGEListByContrast(dgeList, index, design, contrasts, doParallel = FALSE)
dgeList |
A DGEList object, with GeneSymbol available, and dispersion must be estimated |
index |
List of integer indices of genesets, names are names of gene sets |
design |
Design matrix |
contrasts |
Contrast matrix |
doParallel |
Logical, whether |
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)
cameraDGEListByContrast(exDgeList, index=1:5, design=exDesign, contrasts=exContrast)
cameraDGEListByContrast(exDgeList,
index=list(1:5, 6:10),
design=exDesign, contrasts=exContrast)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.