This is a test version of Biostars. For the public version, visit https://www.biostars.org.
DESeq2: design and/or results for 2 groups and 2 treatments

I have RNAseq data from 4 samples with 3 replicates each:

Treated A, Vehicle A, Treated B, Vehicle B,

I have defined sampleCondition as T or V and sampleGroup as A or B and created a sampleTable accordingly. I am interested in obtaining results for the differentially expressed genes due to treatment in group A and B (TA vs VA and TB vs VB), as well as the differentially expressed genes in the groups, treatment aside (VA vs VB and TA vs TB).

I'm unsure how to define design so I can obtain these comparisons? I suspect it may be design=~group + condition + condition:group?

Additionally, I'm unsure how I should write results() in order to obtain the specific data comparisons.

deseq2 design results interactions contrast

1 answer

For anyone looking for this answer: I decided to define them differently so they had unique identifiers (TA, VA, TS, VS). Therefore I could define the comparisons I wanted to obtain that way by listing design as design=~group and results as follows:

res_TVA<- results(dds, contrast=c("group","TA","VA")) 
res_TVS<- results(dds, contrast=c("group","TS","VS")) 
res_VAS<- results(dds, contrast=c("group","VA","VS")) 
res_TAS<- results(dds, contrast=c("group","TA","TS"))

Log in to answer this question.