# DADA2 and quality filtering?

**URL:** https://forum.qiime2.org/t/dada2-and-quality-filtering/2903
**Category:** User Support
**Tags:** dada2, quality-filter
**Created:** [February 6, 2018, 3:34am UTC](https://forum.qiime2.org/t/dada2-and-quality-filtering/2903 "2018-02-06T03:34:14Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![jessicalmetcalf](https://forum.qiime2.org/user_avatar/forum.qiime2.org/jessicalmetcalf/32/7328_2.png) [@jessicalmetcalf](https://forum.qiime2.org/u/jessicalmetcalf)
#### Post date: [February 6, 2018, 3:34am UTC](https://forum.qiime2.org/t/dada2-and-quality-filtering/2903/1 "2018-02-06T03:34:14Z")

</div>

Hi, I was trying to better understand why we don't use the q-score quality filter plugin when using Dada2 and came across this thread and your post below. Still, there must be just some occasional, really crappy sequences that should be removed from the data set. In the dada2 plugin, I was wondering if " --p-max-ee FLOAT" gets rid of really poor quality sequences? I am not sure what a default value of 2 means. Is this the estimated number of errors? Is the q-score of the read used at all (that seems like a good indicator)?

> [@Quality-filter paired end illumina](https://forum.qiime2.org/t/quality-filter-paired-end-illumina/2339/7):
>
> DADA2
> 
> Generally speaking, we don’t recommend quality-filtering reads prior to processing in DADA2, because DADA2 performs error correction prior to filtering reads. If you want to use DADA2, I would use your imported sequences (paired-end-demux.qza) and run those right into q2-dada2. If you did that, please let me know (see my note above about your filenames).

---

<div class="post-metadata">

### Author: ![Nicholas\_Bokulich](https://forum.qiime2.org/user_avatar/forum.qiime2.org/nicholas_bokulich/32/19937_2.png) [@Nicholas\_Bokulich](https://forum.qiime2.org/u/Nicholas_Bokulich)
#### Post date: [February 6, 2018, 1:57pm UTC](https://forum.qiime2.org/t/dada2-and-quality-filtering/2903/3 "2018-02-06T13:57:42Z")

</div>

Hi @jessicalmetcalf,

> [@jessicalmetcalf](#):
>
> I was trying to better understand why we don’t use the q-score quality filter plugin when using Dada2

dada2 uses the q-scores to model error frequency in your reads, and remove reads with \> `max-ee` predicted errors. So yes, dada2 does use the q-scores, yes, it does remove very low-quality sequences, and yes, `max-ee` can be used to adjust your predicted error threshold.

I am not 100% certain how quality-filter would impact this (have not benchmarked it myself), but pre-filtering very noisy reads would:

1. At best, be an entirely redundant step creating an unnecessary intermediate file, since those reads will be filtered anyway
2. At worst, losing those erroneous reads might disturb the error model. Whether this could lead to more stringent or permissive filtering, I just don't know.

@benjjneb, do you have any advice to add?

---

<div class="post-metadata">

### Author: ![benjjneb](https://forum.qiime2.org/user_avatar/forum.qiime2.org/benjjneb/32/1602_2.png) [@benjjneb](https://forum.qiime2.org/u/benjjneb)
#### Post date: [February 6, 2018, 2:13pm UTC](https://forum.qiime2.org/t/dada2-and-quality-filtering/2903/5 "2018-02-06T14:13:59Z")

</div>

> [@Nicholas\_Bokulich](#):
>
> and remove reads with \> max-ee predicted errors

This. The current `denoise-single` and `denoise-paired` functions are full workflow calls, which includes an initial error filtering step controlled primarily by the `max-ee` parameter. So pre-filtering is redundant.

Also, in the case of paired reads, pre-filtering will break `denoise-paired` if the filter doesn't maintain matching between filtered forward/reverse reads.

> [@jessicalmetcalf](#):
>
> I was wondering if " --p-max-ee FLOAT" gets rid of really poor quality sequences? I am not sure what a default value of 2 means. Is this the estimated number of errors?

Yep, exactly. That's the estimated number of errors based on the quality scores in the read. You can read more on that here: [Expected errors predicted by Phred (Q) scores](https://drive5.com/usearch/manual/exp_errs.html)

---

<div class="post-metadata">

### Author: ![system](https://forum-qiime2-org.s3.dualstack.us-west-2.amazonaws.com/original/3X/2/1/21af5fe23cb6f4579467c66a9ed94e55274ca7bd.svg) [@system](https://forum.qiime2.org/u/system)
#### Post date: [March 9, 2018, 8:14pm UTC](https://forum.qiime2.org/t/dada2-and-quality-filtering/2903/6 "2018-03-09T20:14:28Z")

</div>

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.
