# Rescript filter-taxa error

**URL:** https://forum.qiime2.org/t/rescript-filter-taxa-error/18499
**Category:** Library Support
**Tags:** filtering, rescript
**Created:** [February 16, 2021, 7:24pm UTC](https://forum.qiime2.org/t/rescript-filter-taxa-error/18499 "2021-02-16T19:24:03Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Newt](https://forum.qiime2.org/letter_avatar_proxy/v4/letter/n/c68b51/32.png) [@Newt](https://forum.qiime2.org/u/Newt)
#### Post date: [February 16, 2021, 7:24pm UTC](https://forum.qiime2.org/t/rescript-filter-taxa-error/18499/1 "2021-02-16T19:24:03Z")

</div>

Hi there!

I am currently attempting to use Rescript to filter my reference database but have run into some issues with the include parameter. Here is an example of how the reference database is formatted:

 ![referencedatabase](https://forum-qiime2-org.s3.dualstack.us-west-2.amazonaws.com/original/2X/1/1a7293cbbb9c3af3a1122d721471bf2c4116b277.png)

To test this out I have used the following command to only keep p\_\_Chordata and p\_\_Echinodermata and received an error:

qiime rescript filter-taxa   
--i-taxonomy midori-ref-taxa.qza   
--p-include 'p\_\_Chordata\_7711','p\_\_Echinodermata\_7586'   
--o-filtered-taxonomy test.qza

Plugin error from rescript:

All features were filtered, resulting in an empty collection of taxonomies.

Debug info has been saved to /tmp/qiime2-q2cli-err-x6mkv0am.log

My other attempts have also resulted in only the one phylum being retained, or nothing being filtered out. I think I am simply inputting the string incorrectly, but I would like to only keep both phyla. Any help would be greatly appreciated!

---

<div class="post-metadata">

### Author: ![SoilRotifer](https://forum.qiime2.org/user_avatar/forum.qiime2.org/soilrotifer/32/21071_2.png) [@SoilRotifer](https://forum.qiime2.org/u/SoilRotifer)
#### Post date: [February 16, 2021, 7:51pm UTC](https://forum.qiime2.org/t/rescript-filter-taxa-error/18499/2 "2021-02-16T19:51:19Z")

</div>

Hi @Newt,

Thank you for using RESCRIPt!

Try using:  
`–p-include p __Chordata_7711 p__ Echinodermata_7586`

Note that the `--p-include` and `--p-exclude` flags are set up as `List[Str]`, which means you do not use commas to separate the taxonomies you'd like to filter. Just add a space in between each 🙂

---

<div class="post-metadata">

### Author: ![Newt](https://forum.qiime2.org/letter_avatar_proxy/v4/letter/n/c68b51/32.png) [@Newt](https://forum.qiime2.org/u/Newt)
#### Post date: [February 16, 2021, 8:22pm UTC](https://forum.qiime2.org/t/rescript-filter-taxa-error/18499/3 "2021-02-16T20:22:09Z")

</div>

> [@SoilRotifer](#):
>
> p\_\_Chordata\_7711 p\_\_Echinodermata\_7586

Ah, that worked! I had a feeling a was doing something silly. Thank you so much. 🙂

---

<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 20, 2021, 2:22am UTC](https://forum.qiime2.org/t/rescript-filter-taxa-error/18499/4 "2021-03-20T02:22:11Z")

</div>

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