# Filter feature table based on taxonomy

**URL:** https://forum.qiime2.org/t/filter-feature-table-based-on-taxonomy/19270
**Category:** Technical Support
**Tags:** feature-table
**Created:** [April 18, 2021, 7:10pm UTC](https://forum.qiime2.org/t/filter-feature-table-based-on-taxonomy/19270 "2021-04-18T19:10:20Z")
**Posts on this page:** 1
**Showing post:** 2

<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: [April 18, 2021, 9:27pm UTC](https://forum.qiime2.org/t/filter-feature-table-based-on-taxonomy/19270/2 "2021-04-18T21:27:23Z")

</div>

If I understand correctly you want to _keep_ only the features in `trim-table.qza` that are present in your `filtered-seqs1.qza`, and remove the rest. If so you can do the following:

```auto
qiime feature-table filter-features \
    --i-table ./trim-table.qza \
    --m-metadata-file ./filtered-seqs1.qza \
    --o-filtered-table ./trim-table1.qza

```

You can apply `--p-exclude-ids` if you want to remove the IDs present in `--m-metadata-file`. The default is to keep the IDs.

Also you can use RESCRIPt to filter the taxonomy files and the sequences by length too. Check out the tutorial here:

> [@Processing, filtering, and evaluating the SILVA database (and other reference sequence data) with RESCRIPt](https://forum.qiime2.org/t/processing-filtering-and-evaluating-the-silva-database-and-other-reference-sequence-data-with-rescript/15494):
>
> construction Please consider this tutorial a living document, which may change based upon community feedback and ongoing plugin development. RESCRIPt [RESCRIPt](https://github.com/bokulich-lab/RESCRIPt) (REference Sequence annotation and CuRatIon Pipeline) is a python package and QIIME 2 plugin for formatting, managing, and manipulating sequence reference databases. This package was designed for compiling, manipulating, and evaluating sequence reference databases from SILVA, NCBI, Greengenes, GTDB, and other sources, and for construc…

Check out ` qiime rescript filter-taxa ...` (I do not think it made it into the linked tutorial).

-Mike

---

_[View the full topic](https://forum.qiime2.org/t/filter-feature-table-based-on-taxonomy/19270)._
