I am using ROAST. I am a little confused by the results, and I wanted to check if my syntax appears correct. I understand that geneSetTest is using a different method than ROAST. However, I am obtaining substantially different results. Also, I am how does one interpret "Active.Prop=1". Thanks.
# limma syntax
# stage has four levels, and I am interested in the difference between B and C design <- model.matrix(~0+key$stage) colnames(design) = c("A","B","C","D") head(design) # A B C D #1 1 0 0 0 #2 1 0 0 0 #3 1 0 0 0 #4 1 0 0 0 #5 1 0 0 0 #6 1 0 0 0 fit <- lmFit(e, design) fit <- eBayes(fit) cont.matrix <- makeContrasts(risk="B-C",levels=design) fit2 <- contrasts.fit(fit, cont.matrix) fit2 <- eBayes(fit2) tt2 <-topTable(fit2, number=Inf,coef=1) tt2$PROBEID = rownames(tt2) # use geneSetTest # read in probes (not shown) # tt2 is the topTable myIndex = rownames(tt2) %in% probes geneSetTest(myIndex, tt2$t) # 0.2439185 # use roast myIndex = rownames(e) %in% probes roast(e,myIndex,design,contrasts=cont.matrix,nrot=5000)
# the result differs substantially from geneSetTest
# what does it mean that "Active.Prop=1"
# Active.Prop P.Value
#Down 0 1.00000000
#Up 1 0.00019996
#Mixed 1 0.00019996
Thanks, as always, for your help. In this post ( limma roast syntax for overall anova ), I had a question about ROAST, and your answer directed me to geneSetTest, which I misinterpreted to mean that one could be substituted for another. I should have read the documentation more carefully. What I did not mention in my question is that looking at the upregulated genes, there does not appear to be much of a signal, which is why I couldn't see why ROAST would indicate one. I assumed I made a mistake somewhere.
For the last line of your code:
roast(e, myIndex, design, contrasts=cont.matrix, nrot=5000)
Shouldn't it be "contrast" instead of "contrasts"? And shouldn't the argument be a numerical vector corresponding to the columns of the design matrix instead of a full contrast matrix?
contrast
is fine as a single-column matrix, which is taken to be a numeric vector. Equivalently you could specify contrast=cont.matrix[,1].what exactly is e here (from "roast(e, myIndex, design, contrast=cont.matrix, nrot=5000)")?
e
is the same in my answer as in the original question. It is the expression object.