View Single Post
Old 06-26-2015, 04:03 AM   #2
Michael Love
Senior Member
Location: Boston

Join Date: Jul 2013
Posts: 333

The best approach would be to combine both analyses into one, by using a DESeqDataSet with all the samples. The design would still be something like: ~ time + condition + condition:time. In order to test the two treatments separately, you can use the likelihood ratio test with different design matrices presented to the reduced argument (here you have to build the matrices outside of the DESeq() function, and pass them in, as is done with limma for example). Something like: <- model.matrix(~ time + condition + condition:time, data=colData(dds))

# now contruct 2 reduced matrices for treatment A and treatment B, by removing the columns for the interaction terms which contain treatment A and B respectively.

The for each reduced matrix, you run these lines to get a results table:

ddsA <- DESeq(dds,, reduced=reduced.mmA, test="LRT")
resA <- results(ddsA)
Michael Love is offline   Reply With Quote