
## S3 method for class 'DGEList':
roast(y, index=NULL, design=NULL, contrast=ncol(design), ...)
## S3 method for class 'DGEList':
mroast(y, index=NULL, design=NULL, contrast=ncol(design), ...)
## S3 method for class 'DGEList':
fry(y, index=NULL, design=NULL, contrast=ncol(design), ...)
DGEList
object.y
are in the test set. This can be a vector of indices, or a logical vector of the same length as statistics
, or any vector such as y[iset,]
contains the values for the gene set to be tested. Defaults to all genes. For mroast
a list of index vectors.design
, or the name of a column of design
, or else a contrast vector of length equal to the number of columns of design
.roast.default
or mroast.default
.roast
for more description of the test and for a complete list of possible arguments.
The design matrix defaults to the model.matrix(~y$samples$group)
.
mroast
performs roast
tests for a multiple of gene sets.roast
, camera.DGEList
mu <- matrix(10, 100, 4)
group <- factor(c(0,0,1,1))
design <- model.matrix(~group)
# First set of 10 genes that are genuinely differentially expressed
iset1 <- 1:10
mu[iset1,3:4] <- mu[iset1,3:4]+10
# Second set of 10 genes are not DE
iset2 <- 11:20
# Generate counts and create a DGEList object
y <- matrix(rnbinom(100*4, mu=mu, size=10),100,4)
y <- DGEList(counts=y, group=group)
# Estimate dispersions
y <- estimateDisp(y, design)
roast(y, iset1, design, contrast=2)
mroast(y, iset1, design, contrast=2)
mroast(y, list(set1=iset1, set2=iset2), design, contrast=2)
Run the code above in your browser using DataLab