text: user174: Let's say I have an RNA-Seq experiment, where I'm interested in the significantly differentiated genes between pre-treatment and post-treatment conditions. "rep" == biological replicate.
  Sample PreA (3 reps **all** in 2017) vs Sample PostA (3 reps **all** in 2018) 
  Sample PreB (3 reps **all** in 2017) vs Sample PostB (3 reps **all** in 2018) 
  Sample PreC (3 reps **all** in 2017) vs Sample PostC (3 reps **all** in 2018) 
  
  I also have a sample:
  Sample PreD (3 reps all in 2017) and Sample PreD (3 reps again in 2018)
  
  It is safe to assume the samples in sequenced in 2017 were done differently to 2018.
  Q1: Is there problem with batch effects in my study? When I do a test, there should't be any way to split variation from batch effects and biological variation?
  Q2: If Q1 is correct. How should I reduce batch effects?
  
  Can I add a batch factor to my model in DESeq2/edgeR?
  Should I use my PreD control samples to derive normalisation factor as in RUV? (assume PreD as a negative control)
  Should I use sva package?
  
  EDIT
  Devon suggested for adding a batch variable, but how? That's how I'm doing (ignoring batch effects):
  dds <- DESeqDataSetFromTximport(txi, data, ~Sample)
  
  data holds a data frame with a Sample column. Sample would be "PreA" and "PostA" in the first test. Very simple.
  I couldn't add Date to it, like:
  dds <- DESeqDataSetFromTximport(txi, data, ~Date + Sample)
  
  because the code crashed complaining of the 2017/2018 problem discussed above. I'm not sure how I should add PreD to the design.
  
  user77: 
  Yes, though thankfully Your 2018 PreD samples will help you resolve this.
  Simply add the batch effect to the design (~Batch + Treatment) and DESeq2 (or edgeR or Limma) will handle this for you.
  
  You do not need SVA or RUV, thankfully, since you quite cleverly sequenced one group in both batches.
  To clarify, your coldata will be something like:
  Group    Time    Batch
  A        Pre     A
  A        Pre     A
  A        Pre     A
  A        Post    B
  A        Post    B
  A        Post    B
  ...
  D        Pre     A
  D        Pre     A
  D        Pre     A
  D        Pre     B
  D        Pre     B
  D        Pre     B
  
  And the design is actually ~Batch + Group + Time. You can probably add an interaction term in if you then modify the model matrix manually to ensure it's full rank.
  
original_text: 174: <p>Let's say I have an RNA-Seq experiment, where I'm interested in the significantly differentiated genes between pre-treatment and post-treatment conditions. "rep" == biological replicate.</p>
  
  <pre><code>Sample PreA (3 reps **all** in 2017) vs Sample PostA (3 reps **all** in 2018) 
  Sample PreB (3 reps **all** in 2017) vs Sample PostB (3 reps **all** in 2018) 
  Sample PreC (3 reps **all** in 2017) vs Sample PostC (3 reps **all** in 2018) 
  </code></pre>
  
  <p>I also have a sample:</p>
  
  <pre><code>Sample PreD (3 reps all in 2017) and Sample PreD (3 reps again in 2018)
  </code></pre>
  
  <p>It is safe to assume the samples in sequenced in 2017 were done differently to 2018.</p>
  
  <p><strong>Q1:</strong> Is there problem with batch effects in my study? When I do a test, there should't be any way to split variation from batch effects and biological variation?</p>
  
  <p><strong>Q2:</strong> If Q1 is correct. How should I reduce batch effects?</p>
  
  <ul>
  <li>Can I add a batch factor to my model in DESeq2/edgeR?</li>
  <li>Should I use my <code>PreD</code> control samples to derive normalisation factor as in RUV? (assume PreD as a negative control)</li>
  <li>Should I use <code>sva</code> package?</li>
  </ul>
  
  <p><strong>EDIT</strong></p>
  
  <p>Devon suggested for adding a batch variable, but how? That's how I'm doing (ignoring batch effects):</p>
  
  <pre><code>dds &lt;- DESeqDataSetFromTximport(txi, data, ~Sample)
  </code></pre>
  
  <p><code>data</code> holds a data frame with a <code>Sample</code> column. <code>Sample</code> would be "PreA" and "PostA" in the first test. Very simple.</p>
  
  <p>I couldn't add <code>Date</code> to it, like:</p>
  
  <pre><code>dds &lt;- DESeqDataSetFromTximport(txi, data, ~Date + Sample)
  </code></pre>
  
  <p>because the code crashed complaining of the 2017/2018 problem discussed above. I'm not sure how I should add <code>PreD</code> to the design.</p>
   77: <ol>
  <li>Yes, though thankfully Your 2018 PreD samples will help you resolve this.</li>
  <li>Simply add the batch effect to the design (<code>~Batch + Treatment</code>) and DESeq2 (or edgeR or Limma) will handle this for you.</li>
  </ol>
  
  <p>You do not need SVA or RUV, thankfully, since you quite cleverly sequenced one group in both batches.</p>
  
  <p>To clarify, your coldata will be something like:</p>
  
  <pre><code>Group    Time    Batch
  A        Pre     A
  A        Pre     A
  A        Pre     A
  A        Post    B
  A        Post    B
  A        Post    B
  ...
  D        Pre     A
  D        Pre     A
  D        Pre     A
  D        Pre     B
  D        Pre     B
  D        Pre     B
  </code></pre>
  
  <p>And the design is actually <code>~Batch + Group + Time</code>. You can probably add an interaction term in if you then modify the model matrix manually to ensure it's full rank.</p>
  