1
$\begingroup$

I have a treatment and control in two time points like this

 > design
                                 X condition time
    1       CTRL_24_hrs_replicate1   control   24
    2       CTRL_24_hrs_replicate2   control   24
    3       CTRL_24_hrs_replicate3   control   24
    4  treatment_24_hrs_replicate1        t   24
    5  treatment_24_hrs_replicate2        t   24
    6  treatment_24_hrs_replicate3        t   24
    7       CTRL_48_hrs_replicate1   control   48
    8       CTRL_48_hrs_replicate2   control   48
    9       CTRL_48_hrs_replicate3   control   48
    10 treatment_48_hrs_replicate1        t   48
    11 treatment_48_hrs_replicate2        t   48
    12 treatment_48_hrs_replicate3        t   48
    > 

                                               
    

I want to test between between treatment and control considering time point 2 hours to 4 hours

I have done like this

dds <- DESeqDataSetFromMatrix(countData=a,colData=design, design=~time + condition + time:condition)

ddsTC <- DESeq(dds, test="LRT", reduced = ~ time + time:condition)

> resultsNames(ddsTC)
[1] "Intercept"                "condition_t_vs_control"  
[3] "time"                     "conditiont.time" 

 

What is the difference of the results of these codes

results(ddsTC, name="condition_t_vs_control", test="Wald")

versus

results(ddsTC, name="conditiont.time", test="Wald")

Actually I want to know what condition_t_vs_control gives and what conditiont.time gives

Thank you so much for any intuition

$\endgroup$

1 Answer 1

3
$\begingroup$

condition_t_vs_control gives the effect of condition, conditiont.time is the interaction of condition and time. If you wanted to test the effect of time, use name="time".

$\endgroup$
8
  • $\begingroup$ Thank you, using which contrast I can get the difference of IT versus control but considering time goes from 24 hours to 48 hours? $\endgroup$
    – Zizogolu
    Commented Oct 19, 2021 at 16:35
  • $\begingroup$ Just condition_IT_vs_control, since time is compensated for by fitting all coefficients at the same time (let me know if that phrasing is confusing). $\endgroup$
    – Devon Ryan
    Commented Oct 19, 2021 at 19:22
  • $\begingroup$ Sorry @Devon Ryan I get error for ddsTC <- DESeq(dds, test="LRT", reduced = ~ time + time:condition) error in nbinomLRT(object, full = full, reduced = reduced, quiet = quiet, : less than one degree of freedom, perhaps full and reduced models are not in the correct order what should I do please ? $\endgroup$
    – Zizogolu
    Commented Oct 26, 2021 at 16:06
  • $\begingroup$ Make sure to specify the full model, I don't know what that defaults to. $\endgroup$
    – Devon Ryan
    Commented Oct 26, 2021 at 16:24
  • $\begingroup$ Thank you so much for your answer, I think this is my full model dds <- DESeqDataSetFromMatrix(countData=a,colData=design, design=~time + condition + time:condition) am I right? design=~time + condition + time:condition When I try to reduce that by removing reduced = ~ time + time:condition I get error $\endgroup$
    – Zizogolu
    Commented Oct 26, 2021 at 17:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.