# Cannot filter unassigned taxa: k\_\_Bacteria;\_\_;\_\_;\_\_;\_\_;\_\_;\_\_

**URL:** <https://forum.qiime2.org/t/cannot-filter-unassigned-taxa-k-bacteria/4275>\
**Category:** User Support\
**Created:** [May 23, 2018, 9:22pm UTC](https://forum.qiime2.org/t/cannot-filter-unassigned-taxa-k-bacteria/4275 "2018-05-23T21:22:34Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![nvtravan](https://forum.qiime2.org/user_avatar/forum.qiime2.org/nvtravan/32/5618_2.png) [@nvtravan](https://forum.qiime2.org/u/nvtravan)\
**Post date:** [May 23, 2018, 9:22pm UTC](https://forum.qiime2.org/t/cannot-filter-unassigned-taxa-k-bacteria/4275/1 "2018-05-23T21:22:34Z")

</div>

My data are 16S amplicons (515F-806R primers), sequenced on Mi-Seq, processed by q2 with dada2 for QC, taxonomy by Greengenes 99%OTU database. Unfortunately, many amplicons are of host genomic DNA, according to NCBI Blast searches! These were assigned to the (level-7) taxon:

k\_\_Bacteria; **;** ; **;** ; **;**

I am trying to use the feature-table filter to remove these based on taxonomy, but I cannot figure out what to enter for the --p-exclude parameter. I have tried:

--p-exclude "k\_\_Bacteria; **;** ; **;** ; **;**"

yet, the filter fails to remove sequences with that taxonomic assignment. I think the issue is the syntax I am using, but I am not sure of the error I am making. I bet this is easy to solve, I just don't know how... Any help would be much appreciated.

---

<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:** [May 24, 2018, 12:39pm UTC](https://forum.qiime2.org/t/cannot-filter-unassigned-taxa-k-bacteria/4275/2 "2018-05-24T12:39:52Z")

</div>



---

<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:** [May 24, 2018, 3:49pm UTC](https://forum.qiime2.org/t/cannot-filter-unassigned-taxa-k-bacteria/4275/3 "2018-05-24T15:49:59Z")

</div>

Hi @nvtravan,  
In the taxonomic assignment, those underscores are not present (they only appear when you visualize these data, e.g., as a barplot or collapse a feature table on taxonomy).

See [this post](https://forum.qiime2.org/t/error-while-using-metadata-based-filtering/3476/8)

So in your case you want something like this:

```auto
qiime feature-table filter-features \
  --i-table table.qza \
  --m-metadata-file taxonomy.qza \
  --p-where "Taxon='k__Bacteria' \
  --o-filtered-table filtered-table.qza

```

I hope that helps! Let me know if you're still having trouble.

---

<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:** [May 24, 2018, 3:50pm UTC](https://forum.qiime2.org/t/cannot-filter-unassigned-taxa-k-bacteria/4275/4 "2018-05-24T15:50:02Z")

</div>



---

<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:** [June 24, 2018, 9:50pm UTC](https://forum.qiime2.org/t/cannot-filter-unassigned-taxa-k-bacteria/4275/5 "2018-06-24T21:50:03Z")

</div>

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