# Filtering out D\_0\_\_Bacteria;\_\_;\_\_;\_\_;\_\_;\_\_ from feature table

**URL:** https://forum.qiime2.org/t/filtering-out-d-0-bacteria-from-feature-table/6696
**Category:** User Support
**Created:** [October 30, 2018, 4:11pm UTC](https://forum.qiime2.org/t/filtering-out-d-0-bacteria-from-feature-table/6696 "2018-10-30T16:11:42Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![ChloeD93](https://forum.qiime2.org/letter_avatar_proxy/v4/letter/c/67e7ee/32.png) [@ChloeD93](https://forum.qiime2.org/u/ChloeD93)
#### Post date: [October 30, 2018, 4:11pm UTC](https://forum.qiime2.org/t/filtering-out-d-0-bacteria-from-feature-table/6696/1 "2018-10-30T16:11:42Z")

</div>

Hello,

I am quite new to qiime so was wondering if I could have some help. I have 16S V4 sequences, assigned taxonomy using SILVA 132 at 97%, and have a few samples that are majority D\_0\_\_Bacteria; **;** ; **;** ;\_\_ (level 6 taxa bar plot)

 ![image](https://forum-qiime2-org.s3.dualstack.us-west-2.amazonaws.com/original/2X/4/49cf5c88fa8ed01ee395c107551d544003664154.png)

I was wanting to remove these sequences from my feature table as I found most of them are human after BLASTing them.

However, I followed a forum answer from someone who had a similar issue but found that the command actually retained all those sequences rather than excluding them:

qiime feature-table filter-features  
--i-table table-filtered-s26.qza  
--m-metadata-file taxonomy-s26.qza  
--p-where "Taxon='D\_0\_\_Bacteria'"  
--o-filtered-table filtered-excluded-table-s26.qza

I realise that the --p-where refers to features to keep and was wondering if there was a way to exclude these instead? I know there is a way to exclude IDs from metadata files but I have over 5000 sequences being classified as D\_0\_\_Bacteria.

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

Thank you

---

<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: [October 30, 2018, 4:59pm UTC](https://forum.qiime2.org/t/filtering-out-d-0-bacteria-from-feature-table/6696/2 "2018-10-30T16:59:59Z")

</div>

Hi @ChloeD93,  
See the third example [here](https://docs.qiime2.org/2018.8/tutorials/filtering/#taxonomy-based-filtering-of-tables-and-sequences). `qiime taxa filter-table --p-include D_1__` should do exactly what you want! (it will exclude any sequences that are missing phylum-level classification)

Good luck!

---

<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: [November 30, 2018, 11:13pm UTC](https://forum.qiime2.org/t/filtering-out-d-0-bacteria-from-feature-table/6696/3 "2018-11-30T23:13:41Z")

</div>

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