I have a RNAseq and a microarray dataset in which I am trying to determine whether there is an interaction between age and diagnosis. Using DESeq2 I did a likelihood ratio test. The full design was ~Dx + Age +Dx:Age + otherConfounders(sex,race…) and the reduced design was ~Dx + Age + otherConfounders(sex,race…). What is the correct way to replicate the LRT analysis on the microarray data using the limma package? I am unable to figure out the appropriate commands.
In limma, you only need to create the full design matrix, not the reduced. The following code will give a table of the top DE genes for the interaction:
design <- model.matrix(~Dx + Age + Dx:Age + otherCounders)
fit <- lmFit(y, design)
fit <- eBayes(fit)
topTable(fit, coef=4)
The reason for "coef=4" is that the interaction term is the 4th column of the design matrix. (The intercept is first, then Dx, then Age, then Dx:Age.)
Also useful is
decideTests(fit)
which gives the number of DE genes for every column of the design matrix.
Yes, of course, changing the design matrix or the contrast would change everything. Neither of the tests you suggest above seem at all useful or sensible to me.
If you have another question, please post it as a fresh question to this website rather than adding it as a comment here.
Thanks Gordon,
Is there a difference between the analysis you suggest and setting the design to
design<-model.matrix(~Dx:Age+otherConfounders)?
Obviously coef in topTable would be 2.
Also, what would I get if I were to run:
design <- model.matrix(~Dx + Age + Dx:Age + otherCounders)
fit <- lmFit(y, design)
cont.matrix=makeContrasts(Dx-Dx.Age)
fit2 <- contrasts.fit(fit, cont.matrix)
fit2 <- eBayes(fit2)
topTable(fit2)
Thanks again for your help.
Best
Sarven
Yes, of course, changing the design matrix or the contrast would change everything. Neither of the tests you suggest above seem at all useful or sensible to me.
If you have another question, please post it as a fresh question to this website rather than adding it as a comment here.