# Unable to filter reads of particular length

**URL:** <https://forum.qiime2.org/t/unable-to-filter-reads-of-particular-length/23074>\
**Category:** User Support\
**Tags:** dada2\
**Created:** [May 15, 2022, 10:40pm UTC](https://forum.qiime2.org/t/unable-to-filter-reads-of-particular-length/23074 "2022-05-15T22:40:04Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![himadri2007](https://forum.qiime2.org/user_avatar/forum.qiime2.org/himadri2007/32/13555_2.png) [@himadri2007](https://forum.qiime2.org/u/himadri2007)\
**Post date:** [May 15, 2022, 10:40pm UTC](https://forum.qiime2.org/t/unable-to-filter-reads-of-particular-length/23074/1 "2022-05-15T22:40:04Z")

</div>

Dear All  
I am using qiime2 for analysing my 16S rRNA gene sequence data (single end), generated from IonS5 sequencer. I want to select reads of particular length (200 - 300 bps) for my further analysis. But I am unable to do so during sequence quality control and feature table construction using DADA2. Could you please suggest the best way to do it. Also, if possible suggest the same for Debular as well.  
I have used this command as mentioned below

qiime dada2 denoise-single --i-demultiplexed-seqs demux.qza --p-trunc-len 200 --p-trim-left 0 --o-representative-sequences rep-seqs-dada2.qza --o-table table-dada2.qza --output-dir dada2-dmx-pe\_data

 ![Screenshot 2022-05-15 135551](https://forum-qiime2-org.s3.dualstack.us-west-2.amazonaws.com/original/2X/c/c1af07e1e31907b966036cec1f4811e599363040.jpeg)

---

<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:** [June 1, 2022, 5:07am UTC](https://forum.qiime2.org/t/unable-to-filter-reads-of-particular-length/23074/2 "2022-06-01T05:07:40Z")

</div>

Hi @himadri2007 ,

There is a QIIME 2 plugin called RESCRIPt (which needs to be installed separately, follow instructions at the link below). It has an action for filtering sequences by both minimum and maximum lengths:

> [@Processing, filtering, and evaluating the SILVA database (and other reference sequence data) with RESCRIPt](https://forum.qiime2.org/t/processing-filtering-and-evaluating-the-silva-database-and-other-reference-sequence-data-with-rescript/15494#heading--twelfth-header):
>
> construction Please consider this tutorial a living document, which may change based upon community feedback and ongoing plugin development. RESCRIPt [RESCRIPt](https://github.com/bokulich-lab/RESCRIPt) (REference Sequence annotation and CuRatIon Pipeline) is a python package and QIIME 2 plugin for formatting, managing, and manipulating sequence reference databases. This package was designed for compiling, manipulating, and evaluating sequence reference databases from SILVA, NCBI, Greengenes, GTDB, and other sources, and for construc…

This will need to be run after denoising, however, so may or may not help your use case.

> [@himadri2007](#):
>
> qiime dada2 denoise-single --i-demultiplexed-seqs demux.qza --p-trunc-len 200 --p-trim-left 0 --o-representative-sequences rep-seqs-dada2.qza --o-table table-dada2.qza --output-dir dada2-dmx-pe\_data

This will truncate all reads at position 200, and filter out any that are shorter. But indeed this will not filter out reads that are too long (it will only trim them).

Good luck!

---

<div class="post-metadata">

**Author:** ![himadri2007](https://forum.qiime2.org/user_avatar/forum.qiime2.org/himadri2007/32/13555_2.png) [@himadri2007](https://forum.qiime2.org/u/himadri2007)\
**Post date:** [June 1, 2022, 6:25am UTC](https://forum.qiime2.org/t/unable-to-filter-reads-of-particular-length/23074/3 "2022-06-01T06:25:36Z")

</div>

Hi @Nicholas_Bokulich

Thank you so much for your suggestion I will use the RESCRIPt for filtering the sequences.

---

<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:** [July 2, 2022, 12:26pm UTC](https://forum.qiime2.org/t/unable-to-filter-reads-of-particular-length/23074/4 "2022-07-02T12:26:15Z")

</div>

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