<p>I don't think this has anything to do with batch correction.</p>
<p>The averages of that gene are distinctly different between groups, so it's correct that the gene is statistically significant.  But with one sample driving all the difference, it's likely to be an artifact, or otherwise not fruitful to follow up on.</p>
<p>As geek_y suggested, a filter like &quot;omit genes unless 2 samples have &gt; 10 counts&quot; would drop that gene.</p>

CC BY-SA 4.0
2020-09-30T19:34:05.417Z
2020-09-30T19:34:05.417Z
swbarnes2
<p>When (as a mistake) I did <strong>not</strong> remove low counts at all (beside those that equal zero for all samples), I got the following ma plot (using Glimma) :</p>
<p><a href="https://i.sstatic.net/s5far.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/s5far.png" alt="enter image description here" /></a></p>
<p>On  the right you see the individual counts. The gene that is displayed <strong>is</strong> signficant. However, the reality seems that the gene is not expressed both in treatment and in control. The batch I have corrected for made it a significantly DE however.</p>
<p>The batch correction algorithm of DESeq2 doesn't care whether the counts of the gene are almost all zeroes, and does not take this as a special case.
In reality, it seems to me that it <strong>is</strong> a special case - if it is questionable whether the gene is expressed in the first place, it makes no sense to apply batch correction to zero counts.</p>
<p>The solution to this seems to be to make sure to remove low counts when applying batch correction. Usually it's only a recommendation; but when applying batch, it seems a necessity.</p>
<p>Would you agree?</p>
<p>I even wonder if one should remove counts that are low per-condition. Suppose that a gene is not expressed in treatment (and only in treatment), does it really make sense to apply batch correction to this gene?</p>

CC BY-SA 4.0
2020-09-30T17:41:58.857Z
Usually removing genes that are not expressed in atleast n samples might help. E.g If you have  3 replicates per condition, keeping genes that are expressed in atleast 2 samples of one of the conditions.
geek_y
CC BY-SA 4.0
2020-10-31T07:50:43.223Z
DESeq2 doesn't have any built-in way to remove batch effects. Did you use `limma::removeBatchEffect` to do that, or are you referring to _modelling the batch effect_ in the design formula, e.q. `~batch+condition`? The only reason to filter genes before running DESeq2 is to speed up the process. The package already performs independant filtering when you run the `deseq()` function unless you explicitly turn that off. Can you share your data/pipeline here? This gene should not show up with that much of a fold change, so there is something else going on.
Bastian Schiffthaler
<batch-effects>
Should one be especially conscious of removing low counts, when applying batch correction?
# Should one be especially conscious of removing low counts, when applying batch correction?

(Asked by: username_0 on 2020-09-30)

When (as a mistake) I did **not** remove low counts at all (beside those that equal zero for all samples), I got the following ma plot (using Glimma) :

[![enter image description here](https://i.sstatic.net/s5far.png)](https://i.sstatic.net/s5far.png)

On the right you see the individual counts. The gene that is displayed **is** signficant. However, the reality seems that the gene is not expressed both in treatment and in control. The batch I have corrected for made it a significantly DE however.

The batch correction algorithm of DESeq2 doesn't care whether the counts of the gene are almost all zeroes, and does not take this as a special case.
In reality, it seems to me that it **is** a special case - if it is questionable whether the gene is expressed in the first place, it makes no sense to apply batch correction to zero counts.

The solution to this seems to be to make sure to remove low counts when applying batch correction. Usually it's only a recommendation; but when applying batch, it seems a necessity.

Would you agree?

I even wonder if one should remove counts that are low per-condition. Suppose that a gene is not expressed in treatment (and only in treatment), does it really make sense to apply batch correction to this gene?

**Tags:** batch-effects
> **Comments:**
> **username_1**: Usually removing genes that are not expressed in atleast n samples might help. E.g If you have  3 replicates per condition, keeping genes that are expressed in atleast 2 samples of one of the conditions.  
> **username_2**: DESeq2 doesn't have any built-in way to remove batch effects. Did you use `limma::removeBatchEffect` to do that, or are you referring to _modelling the batch effect_ in the design formula, e.q. `~batch+condition`? The only reason to filter genes before running DESeq2 is to speed up the process. The package already performs independant filtering when you run the `deseq()` function unless you explicitly turn that off. Can you share your data/pipeline here? This gene should not show up with that much of a fold change, so there is something else going on.  

---

## 1 answers

### Answer by username_3 on 2020-09-30. Score: 1

I don't think this has anything to do with batch correction.

The averages of that gene are distinctly different between groups, so it's correct that the gene is statistically significant. But with one sample driving all the difference, it's likely to be an artifact, or otherwise not fruitful to follow up on.

As geek\_y suggested, a filter like "omit genes unless 2 samples have > 10 counts" would drop that gene.


---

