<p>I agree with @devon-ryan that the design matrix looks reasonable, i.e. that it's okay to treat the new samples as biological replicates of the original batch, and that the batch number should be included in that matrix (assuming DESeq2 doesn't complain about it) to filter out most of the batch effects.</p>

<p>DESeq2 tends to be conservative in its differential expression calculations. While it's true that more replicates in one sample will increase the number of differentially-expressed genes that are statistically significant (because the biological variation can be better modelled), I wouldn't expect this to change the overall picture.</p>

<p>However, whole-genome differential expression testing should not be used on its own to demonstrate biological relevance. I recommend as a first-pass sanity check that people compare any differential expression results to what is seen on a genome browser to identify any quirky things going on (e.g. expression across only a part of the gene). Ideally, results should be confirmed with targeted analyses on the same (or similar) biological samples, either at the transcript level (e.g. qPCR) or at the protein level (e.g. Western Blot). When aggregating evidence from multiple analyses, the specific way in which one of those analyses was done is less important.</p>

<p>Aside: It'd obviously be better [in the future] to make sure that your sample replicates are both robust to drop-out, and allow for outliers to be noticed, reducing the batch-effect problem. In practise this means a <em>minimum</em> of four replicates per informative condition, but because funders / researchers are well known for only choosing the minimum, I'd just state that six replicates per sample as what is needed to produce good results.</p>

CC BY-SA 4.0
2018-09-20T01:57:23.900Z
Thanks for your comments.  I agree that it is important to validate any important findings by other methods like qPCR/Western.  And yes, I learned an important lesson about experimental design here when I had a sample drop out.  Its tough though when you want to do a time-series experiment comparing drugs and genotype because the amount of samples is x10 for each additional replicate.  Either way, I agree that in the future I will go for at least 4 replicates.  Thanks!
Reilstein
CC BY-SA 4.0
2018-09-20T01:44:46.113Z
2018-09-20T01:44:46.113Z
gringer
<p>I have RNAseq data from a relatively complicated experimental design with variables = genotype, treatment, time, and batch. I have 2 biological replicates for each genotype/condition, however unfortunately in the first iteration of the experiment one sample had poor RNA quality and is unusable. To get around this lack of a replicate, we repeated the experiment for the two biological replicates in the condition of the lost sample, and did a new library prep/sequencing from this repeated experiment.  The repeated experiment obviously lead to a batch effect, and although it isn't the main driver of variance, it is a significant factor.  I would like to model or remove the batch effect from the experiment using DESeq2 if possible, but after reading this similar post: <a href="https://bioinformatics.stackexchange.com/questions/232/can-i-model-technical-replicates-in-deseq2" title="Can I model technical replicates in DESeq2?">can I model technical replicates in DESeq2?</a> I am concerned about inflating the power of the test for those conditions that were replicated.</p>

<p><strong>Here is a diagram of the experimental design to make it more easy to understand:</strong></p>

<p><a href="https://i.sstatic.net/lzgEI.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/lzgEI.png" alt="experiment design diagram"></a></p>

<p>My "colData" for the DESeq2 object looks like this:</p>

<p><a href="https://i.sstatic.net/lcN17.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/lcN17.png" alt="colData image"></a></p>

<p>My previous thought was to simply collapse the genotype+time+treatment variables into a single combined factor "condition" and then model the batch effect using a design of "~batch + condition".  However this doesn't really address the concern of inflating the power of the tests due to technical replication.  </p>

<p>Should I Just collapse the counts of these replicated conditions even though the batch affect will affect the combined count values? Or should I use a different tool than DESeq2 ?  Or is there a way for me to remove the batch effect prior to collapsing the counts for replicates?</p>

<p><strong>What would  you guys recommend?</strong></p>

CC BY-SA 4.0
2018-09-19T21:21:17.777Z
Were the libraries in the second batch simply resequenced or were they actually recreated (presumably from the same samples, though I wonder if this is cell culture so these represent different passages).
Devon Ryan
CC BY-SA 4.0
2018-09-19T21:39:13.280Z
@DevonRyan The libraries in the second batch were actually recreated from the same samples --- this is indeed a cell culture experiment, so different passage number is a concern, however these repeated samples were within ~1 passage of the samples in the original experiment (they may have actually been from the same batch of cryopreserved aliquots).  So, the experiment was repeated for the two KO cell lines and then libraries were prepared using the same techniques/kits and sequenced on the same machine.
Reilstein
CC BY-SA 4.0
2018-09-19T21:45:46.137Z
Different passage numbers are actually a good thing in this case, since it makes them not technical replicates. I would suggest proceeding with your current design matrix.
Devon Ryan
CC BY-SA 4.0
2018-09-19T21:51:14.630Z
Good point.  It is likely that there were small variations in timing of samples that also would have affected the replication.  Are you aware of any biases that could arise from this type of experimental design? In the post I linked you and others mentioned that technical replicates could inflate the power of certain comparisons. I'm specifically concerned about comparing the # of DEG's between the wild-type and KO conditions for drug vs. mock treated conditions -- if power is inflated I may see more DEG's for the KO comparisons due to more replicates right?
Reilstein
<rna-seq><differential-expression><deseq2>
DESeq2 complicated design - effect of replicated samples
# DESeq2 complicated design - effect of replicated samples

(Asked by: username_0 on 2018-09-19)

I have RNAseq data from a relatively complicated experimental design with variables = genotype, treatment, time, and batch. I have 2 biological replicates for each genotype/condition, however unfortunately in the first iteration of the experiment one sample had poor RNA quality and is unusable. To get around this lack of a replicate, we repeated the experiment for the two biological replicates in the condition of the lost sample, and did a new library prep/sequencing from this repeated experiment. The repeated experiment obviously lead to a batch effect, and although it isn't the main driver of variance, it is a significant factor. I would like to model or remove the batch effect from the experiment using DESeq2 if possible, but after reading this similar post: [can I model technical replicates in DESeq2?](https://bioinformatics.stackexchange.com/questions/232/can-i-model-technical-replicates-in-deseq2 "Can I model technical replicates in DESeq2?") I am concerned about inflating the power of the test for those conditions that were replicated.

**Here is a diagram of the experimental design to make it more easy to understand:**

[![experiment design diagram](https://i.sstatic.net/lzgEI.png)](https://i.sstatic.net/lzgEI.png)

My "colData" for the DESeq2 object looks like this:

[![colData image](https://i.sstatic.net/lcN17.png)](https://i.sstatic.net/lcN17.png)

My previous thought was to simply collapse the genotype+time+treatment variables into a single combined factor "condition" and then model the batch effect using a design of "~batch + condition". However this doesn't really address the concern of inflating the power of the tests due to technical replication.

Should I Just collapse the counts of these replicated conditions even though the batch affect will affect the combined count values? Or should I use a different tool than DESeq2 ? Or is there a way for me to remove the batch effect prior to collapsing the counts for replicates?

**What would you guys recommend?**

**Tags:** rna-seq, differential-expression, deseq2
> **Comments:**
> **username_1**: Were the libraries in the second batch simply resequenced or were they actually recreated (presumably from the same samples, though I wonder if this is cell culture so these represent different passages).  
> **username_0**: @DevonRyan The libraries in the second batch were actually recreated from the same samples --- this is indeed a cell culture experiment, so different passage number is a concern, however these repeated samples were within ~1 passage of the samples in the original experiment (they may have actually been from the same batch of cryopreserved aliquots).  So, the experiment was repeated for the two KO cell lines and then libraries were prepared using the same techniques/kits and sequenced on the same machine.  
> **username_1**: Different passage numbers are actually a good thing in this case, since it makes them not technical replicates. I would suggest proceeding with your current design matrix.  
> **username_0**: Good point.  It is likely that there were small variations in timing of samples that also would have affected the replication.  Are you aware of any biases that could arise from this type of experimental design? In the post I linked you and others mentioned that technical replicates could inflate the power of certain comparisons. I'm specifically concerned about comparing the # of DEG's between the wild-type and KO conditions for drug vs. mock treated conditions -- if power is inflated I may see more DEG's for the KO comparisons due to more replicates right?  

---

## 1 answers

### Answer by username_2 on 2018-09-20. Score: 2

I agree with @devon-ryan that the design matrix looks reasonable, i.e. that it's okay to treat the new samples as biological replicates of the original batch, and that the batch number should be included in that matrix (assuming DESeq2 doesn't complain about it) to filter out most of the batch effects.

DESeq2 tends to be conservative in its differential expression calculations. While it's true that more replicates in one sample will increase the number of differentially-expressed genes that are statistically significant (because the biological variation can be better modelled), I wouldn't expect this to change the overall picture.

However, whole-genome differential expression testing should not be used on its own to demonstrate biological relevance. I recommend as a first-pass sanity check that people compare any differential expression results to what is seen on a genome browser to identify any quirky things going on (e.g. expression across only a part of the gene). Ideally, results should be confirmed with targeted analyses on the same (or similar) biological samples, either at the transcript level (e.g. qPCR) or at the protein level (e.g. Western Blot). When aggregating evidence from multiple analyses, the specific way in which one of those analyses was done is less important.

Aside: It'd obviously be better [in the future] to make sure that your sample replicates are both robust to drop-out, and allow for outliers to be noticed, reducing the batch-effect problem. In practise this means a *minimum* of four replicates per informative condition, but because funders / researchers are well known for only choosing the minimum, I'd just state that six replicates per sample as what is needed to produce good results.

> **Comments:**
> **username_0**: Thanks for your comments.  I agree that it is important to validate any important findings by other methods like qPCR/Western.  And yes, I learned an important lesson about experimental design here when I had a sample drop out.  Its tough though when you want to do a time-series experiment comparing drugs and genotype because the amount of samples is x10 for each additional replicate.  Either way, I agree that in the future I will go for at least 4 replicates.  Thanks!  

---

