# Problem filtering features from a table

**URL:** https://forum.qiime2.org/t/problem-filtering-features-from-a-table/32153
**Category:** User Support
**Created:** [December 18, 2024, 9:54am UTC](https://forum.qiime2.org/t/problem-filtering-features-from-a-table/32153 "2024-12-18T09:54:34Z")
**Posts on this page:** 1
**Showing post:** 4

<div class="post-metadata">

### Author: ![salias](https://forum.qiime2.org/user_avatar/forum.qiime2.org/salias/32/18594_2.png) [@salias](https://forum.qiime2.org/u/salias)
#### Post date: [December 18, 2024, 3:52pm UTC](https://forum.qiime2.org/t/problem-filtering-features-from-a-table/32153/4 "2024-12-18T15:52:36Z")

</div>

> [@k.kujala](#):
>
> I had two types of Bacteria-taxa that didn't have taxonomy assigned at the phylum level

> [@k.kujala](#):
>
> 'd\_\_Bacteria; **' and 'd\_\_Bacteria;p**'

The first one is indeed a feature without phylum level classification (and the command I provided to you removes them). The second one is a feature that is actually classified at the phylum level, but it doesn't have a name. You can read more about this in [this post](https://forum.qiime2.org/t/otu-taxonomic-asssignment/4186).

If you also want to get rid of those, one idea that comes to my mind is to use [RESCRIPt](https://forum.qiime2.org/t/processing-filtering-and-evaluating-the-silva-database-and-other-reference-sequence-data-with-rescript/15494) first to edit the taxonomy:

```bash
qiime rescript edit-taxonomy \
    --i-taxonomy my_taxonomy.qza \
    --p-search-strings p__; \ 
    --p-replacement-strings p__ExcludeMe; \ 
    --o-edited-taxonomy my_taxonomy_edited.qza

```

And then exclude them directly with another `qiime taxa filter-table` (this time using `--p-exclude`):

```bash
qiime taxa filter-table \
  --i-table filtered_table.qza \
  --i-taxonomy my_taxonomy_edited.qza \
  --p-exclude p__ExcludeMe \
  --p-mode contains \
  --o-filtered-table double_filtered_table.qza

```

Best,

Sergio

---

_[View the full topic](https://forum.qiime2.org/t/problem-filtering-features-from-a-table/32153)._
