Filter OTUs from features table using OTU IDs?

I’d like to filter specific OTU’s from my Feature Table a la Qiime 1 with -e. Ultimately, I am trying to remove a particular taxa at the order level. I have determined which taxa/OTU IDs are associated with this particular order and made a .tsv file with these IDs. Can I use the index-based filtering? If so, what should the header for the column be?

(I have upgraded to Q2 2017.6)

Thank you!

Hi @Diana_Williams! To exclude a set of features (e.g. OTUs) from your feature table based on feature ID you can use qiime feature-table filter-features with the new --p-exclude-ids option added in QIIME 2 2017.6.

Yep, you can use either index-based filtering or metadata-based filtering with --p-exclude-ids.

The header can be named whatever you’d like – in the filtering docs I linked above the example file had its column named “Index”.

For example, if you wanted to exclude OTUs with IDs “OTU1”, “OTU2”, and “OTU3”, you could supply this file via --m-metadata-file and pass the --p-exclude-ids flag:


Thank you so much! I got it to work.


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