<p>I have to filter the raw sequencing reads based on the following criteria:</p>

<ol>
<li><p>Remove reads containing adapters</p></li>
<li><p>Remove reads containing N > 10% (N represents base that could not be determined)</p></li>
<li><p>Remove reads where the Qscore (Quality value) of over 50% bases of the read is &lt;= 5</p></li>
</ol>

<p>The reads are paired-end fastq files. I have been able to do the first part by using trimmomatic:</p>

<pre><code>trimmomatic \
  PE in_1.fq.gz in_2.fq.gz \
  pair_out_1 unpair_out_1 pair_out_2 unpair_out_2 \
  ILLUMINACLIP:adapter.fa:2:30:5
</code></pre>

<p>The other 2 steps are a bit more challenging since I have not found a tool that perform exactly what is required. I could write some custom code of course but I would like to use the existing tools if possible. No need to reinvent the wheel.</p>

<p>Do you have any suggestions on how to proceed?</p>

<fastq><quality-control><filtering>
Filtering raw sequencing reads
# Filtering raw sequencing reads

(Asked by: username_0 on 2020-03-02)

I have to filter the raw sequencing reads based on the following criteria:

Remove reads containing adapters
Remove reads containing N > 10% (N represents base that could not be determined)
Remove reads where the Qscore (Quality value) of over 50% bases of the read is <= 5

The reads are paired-end fastq files. I have been able to do the first part by using trimmomatic:
trimmomatic \
  PE in_1.fq.gz in_2.fq.gz \
  pair_out_1 unpair_out_1 pair_out_2 unpair_out_2 \
  ILLUMINACLIP:adapter.fa:2:30:5

The other 2 steps are a bit more challenging since I have not found a tool that perform exactly what is required. I could write some custom code of course but I would like to use the existing tools if possible. No need to reinvent the wheel.
Do you have any suggestions on how to proceed?

**Tags:** fastq, quality-control, filtering

---

## 0 answers

