text: user4595: I need help with some clarifications please
  I have control versus treatment in two time points like
  > y
                               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 see the difference of treatment versus control from 24 hours to 48 hours, so this is not just the difference of treatment versus control or difference between 24 versus 48 hours rather the treatment versus control from 24 hours to 48 hours
  This is what I have done so far
  >  dds <- DESeqDataSetFromMatrix(countData=count, 
  +                                 colData=design, 
  +                                 design=~condition, tidy = FALSE)
  Warning message:
  In DESeqDataSet(se, design = design, ignoreRank) :
    some variables in design formula are characters, converting to factors
  >   dds$group <- factor(paste0(dds$time, dds$condition))
  >   design(dds) <- ~ group
  >   dds <- DESeq(dds)
  estimating size factors
  estimating dispersions
  gene-wise dispersion estimates
  mean-dispersion relationship
  final dispersion estimates
  fitting model and testing
  >   resultsNames(dds)
  "Intercept"                    "group_24IT_vs_24control"         "group_48control_vs_24control" "group_48IT_vs_24control"     
  > 
  
  How to find the difference at time point 24 vs 48 in condition ?
  I searched and I found a similar thing but I don't know how to adopt that to my data
  results(dds, contrast=list(c("time_4_vs_0", "conditionLD.time4")), test="Wald")
  
  I tried this and I got error
  > results(dds, contrast=list(c("time_48_vs_24", "conditionIT.time24")), test="Wald")
  Error in checkContrast(contrast, resNames) : 
    all elements of the contrast as a list of length 2 should be elements of 'resultsNames(object)'
  > 
  
  Can you help me in adopting this to my data please?
  
  user2388: You can't figure out how to adapt this to your data?
  http://bioconductor.org/packages/release/bioc/vignettes/DESeq2/inst/doc/DESeq2.html#contrasts
  Ignore resultsNames.  You don't need them for simple comparisons like you want to do.
  
  user11884: you can do:
  data$condition_new <- as.factor(paste0(data$condition, " - ", data$time))
  dds <- DESeqDataSetFromMatrix(countData=count, 
                               colData=design, 
                               design=~condition_new
                               , tidy = FALSE)
  enter code here
  results(dds, contrast=c("condition_new", "control - 24", "condition - 4"))
  
  I hope it helps.
  
original_text: 4595: <p>I need help with some clarifications please</p>
  <p>I have control versus treatment in two time points like</p>
  <pre><code>&gt; y
                               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
  &gt; 
  </code></pre>
  <p>I want to see the difference of treatment versus control from 24 hours to 48 hours, so this is not just the difference of treatment versus control or difference between 24 versus 48 hours rather the treatment versus control from 24 hours to 48 hours</p>
  <p>This is what I have done so far</p>
  <pre><code>&gt;  dds &lt;- DESeqDataSetFromMatrix(countData=count, 
  +                                 colData=design, 
  +                                 design=~condition, tidy = FALSE)
  Warning message:
  In DESeqDataSet(se, design = design, ignoreRank) :
    some variables in design formula are characters, converting to factors
  &gt;   dds<span class="math-container">$group &lt;- factor(paste0(dds$</span>time, dds$condition))
  &gt;   design(dds) &lt;- ~ group
  &gt;   dds &lt;- DESeq(dds)
  estimating size factors
  estimating dispersions
  gene-wise dispersion estimates
  mean-dispersion relationship
  final dispersion estimates
  fitting model and testing
  &gt;   resultsNames(dds)
  &quot;Intercept&quot;                    &quot;group_24IT_vs_24control&quot;         &quot;group_48control_vs_24control&quot; &quot;group_48IT_vs_24control&quot;     
  &gt; 
  </code></pre>
  <p>How to find the difference at time point 24 vs 48 in condition ?</p>
  <p>I searched and I found a similar thing but I don't know how to adopt that to my data</p>
  <pre><code>results(dds, contrast=list(c(&quot;time_4_vs_0&quot;, &quot;conditionLD.time4&quot;)), test=&quot;Wald&quot;)
  </code></pre>
  <p>I tried this and I got error</p>
  <pre><code>&gt; results(dds, contrast=list(c(&quot;time_48_vs_24&quot;, &quot;conditionIT.time24&quot;)), test=&quot;Wald&quot;)
  Error in checkContrast(contrast, resNames) : 
    all elements of the contrast as a list of length 2 should be elements of 'resultsNames(object)'
  &gt; 
  </code></pre>
  <p>Can you help me in adopting this to my data please?</p>
   2388: <p>You can't figure out how to adapt this to your data?</p>
  <p><a href="http://bioconductor.org/packages/release/bioc/vignettes/DESeq2/inst/doc/DESeq2.html#contrasts" rel="nofollow noreferrer">http://bioconductor.org/packages/release/bioc/vignettes/DESeq2/inst/doc/DESeq2.html#contrasts</a></p>
  <p>Ignore resultsNames.  You don't need them for simple comparisons like you want to do.</p>
   11884: <p>you can do:</p>
  <pre><code>data<span class="math-container">$condition_new &lt;- as.factor(paste0(data$</span>condition, &quot; - &quot;, data$time))
  dds &lt;- DESeqDataSetFromMatrix(countData=count, 
                               colData=design, 
                               design=~condition_new
                               , tidy = FALSE)
  enter code here
  results(dds, contrast=c(&quot;condition_new&quot;, &quot;control - 24&quot;, &quot;condition - 4&quot;))
  </code></pre>
  <p>I hope it helps.</p>
  