Differential Expression with Factorial Design and adjust for Lane+Batch Effect
0
0
Entering edit mode
8.4 years ago
Sam ★ 4.7k

Hi, so recently we have got a data back with the following design

Condition     Treatment     Lane     Batch
Case          Treated       1        1
Case          Treated       2        1
Case          Treated       1        4
Control       Treated       2        4
Control       Treated       1        1
Control       Treated       2        1
Case          Untreated     1        4
Case          Untreated     2        3
Case          Untreated     2        2
Control       Untreated     2        1
Control       Untreated     1        3
Control       Untreated     1        2
data.frame(
  Condition = rep(
                rep(
                  c("Case","Control"),
                  each = 3
                  )
              ,2),
  Treatment = rep(
                c("Treated", "Untreated"),
                each=6
                ),
  Lane = c(1,2,1,2,1,2,1,2,2,2,1,1),
  Batch=c(1,1,4,4,1,1,4,3,2,1,3,2)
  )

And we would like to test the following

  1. Compare effect of treatment in case
  2. Compare effect of treatment in control
  3. Compare and contrast the effect of treatment in case when compared to control.

With DESeq, we have used the design ~Batch+Lane+Condition+Treatment+Condition:Treatment where

dds$Condition<- relevel(dds$Condition, ref="Control")
dds$Treatment<- relevel(dds$Treatment, ref="Untreated")

And from reading the documentation of DESeq2 and limma user guide, my understanding is that the following usage of results might provide the desire statistic outcome

  1. Compare effect of treatment in case:

    results(dds, list(c("Condition_Case_vs_Control","ConditionCase.TreatmentTreated")))
    
  2. Compare effect of treatment in control:

    results(dds, contrast=c("Treatment", "Treated", "Untreated"))
    
  3. Compare and contrast the effect of treatment in case when compared to control.

    results(dds, name="ConditionCase.TreatmentTreated")
    

Or for 1, will it be better if we

dds$Condition<- relevel(dds$Condition, ref="Case")

and do

results(dds, contrast=c("Treatment", "Treated", "Untreated"))

instead?

Is my understanding correct?

deseq2 RNA-Seq • 3.1k views
ADD COMMENT
1
Entering edit mode

I'm pretty sure you want "batch" to be a factor (likewise with "lane", though that won't have a big effect in this case)...

ADD REPLY
0
Entering edit mode

Oh, right, forgot to set them to factor in this snappy. So other than that, is my use of those code correct??

So for example, in

results(dds, list(c("Condition_Case_vs_Control","ConditionCase.TreatmentTreated")))

I am not sure if DESeq2 will return the p-value of effect of treatment in case adjusting for batch and lane or will DESeq2 return the p-value of effect of treatment in case under the base case of batch and base case of lane. What we would like to get will be the former results but are worry that the later is what we get

ADD REPLY
1
Entering edit mode

If you include "batch" and "lane" in the design then you will only ever receive results corrected for them. I'd need to double check whether the contrasts you're using do what you want, though, since you're using a factorial design but then aren't asking factorial questions (yes, you can do this, but at least I personally find it more confusing to do that).

ADD REPLY
0
Entering edit mode

Thank you Devon, will it be better if the design is:

~Batch+Lane+Condition+Condition:Treatment
ADD REPLY

Login before adding your answer.

Traffic: 2698 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6