# Removing features assigned as bacteria (0\_Bacteria) but no other taxanomic classifications

**URL:** <https://forum.qiime2.org/t/removing-features-assigned-as-bacteria-0-bacteria-but-no-other-taxanomic-classifications/3261>\
**Category:** User Support\
**Tags:** feature-table\
**Created:** [March 1, 2018, 2:41pm UTC](https://forum.qiime2.org/t/removing-features-assigned-as-bacteria-0-bacteria-but-no-other-taxanomic-classifications/3261 "2018-03-01T14:41:32Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![smreyes](https://forum.qiime2.org/user_avatar/forum.qiime2.org/smreyes/32/4051_2.png) [@smreyes](https://forum.qiime2.org/u/smreyes)\
**Post date:** [March 1, 2018, 2:41pm UTC](https://forum.qiime2.org/t/removing-features-assigned-as-bacteria-0-bacteria-but-no-other-taxanomic-classifications/3261/1 "2018-03-01T14:41:32Z")

</div>

Dear QIIME 2 gurus,

Does anyone know how to remove features that are assigned as bacteria but have no other taxanomic classifications? I've used the code below. It successfully removed all non-bacterial sequences from my feature table. However, I'm still seeing some unclassified bacteria (see snapshot). Not sure how I can modify my code to exclude those as well.

qiime taxa filter-table   
--i-table table.qza   
--i-taxonomy taxonomy\_file.qza   
--p-exclude mitochondria, chloroplast, 0\_Unassigned, 1\_Unassigned   
--o-filtered-table filtered-table.qza

 ![image](https://forum-qiime2-org.s3.dualstack.us-west-2.amazonaws.com/original/2X/9/9d94243119af99ef9b09b442cf0fc8dd1e0b7303.jpg)

Any help would be much appreciated! Thanks!

---

<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:** [March 1, 2018, 4:02pm UTC](https://forum.qiime2.org/t/removing-features-assigned-as-bacteria-0-bacteria-but-no-other-taxanomic-classifications/3261/3 "2018-03-01T16:02:27Z")

</div>

> [@smreyes](#):
>
> Does anyone know how to remove features that are assigned as bacteria but have no other taxanomic classifications?

In your case, it looks like the best way to do this would be to add the following line:

```auto
--p-include D_1__

```

So that only features assigned to at least phylum level (or whatever taxonomic level you pass to the include parameter) will be retained.

The other option is to use `--p-mode exact` to specify that any include/exclude terms must be matched exactly. Then you can use `--p-exclude D_0__Bacteria` to explicitly drop any features with that exact label. But that requires a second step (since you could, but might not want to use exact terms for the other `exclude` patterns that you are currently using).

I hope that helps!

---

<div class="post-metadata">

**Author:** ![smreyes](https://forum.qiime2.org/user_avatar/forum.qiime2.org/smreyes/32/4051_2.png) [@smreyes](https://forum.qiime2.org/u/smreyes)\
**Post date:** [March 1, 2018, 4:04pm UTC](https://forum.qiime2.org/t/removing-features-assigned-as-bacteria-0-bacteria-but-no-other-taxanomic-classifications/3261/5 "2018-03-01T16:04:03Z")

</div>

Thanks, @Nicholas_Bokulich! I appreciate the help!

---

<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:** [April 1, 2018, 10:04pm UTC](https://forum.qiime2.org/t/removing-features-assigned-as-bacteria-0-bacteria-but-no-other-taxanomic-classifications/3261/6 "2018-04-01T22:04:19Z")

</div>

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