Filtering features

Hi!
Hope you’re doing fine.
I have question regarding filtering. I use this command:

qiime taxa filter-table
--i-table table.qza
--i-taxonomy taxonomy.qza
--p-exclude Alveolata
--o-filtered-table table-filt.qza

But I struggle to remove features like this:
d__Eukaryota;;;;;__ (only general taxa)
without removing all features like this: d__Eukaryota;p__Apicomplexa;c__Conoidasida;o__Coccidia;f__Eimeriorina;g__Cystoisospora

Best,
Joanna

Edited August 28, 2024

Hello!

If you want to remove general taxa, you can use the command so it keeps only annotations with at least a given taxonomic level. For example, if you want your annotations to have at least the phylum level (i.e., we don't want annotations that only say d__Eukaryota;;;;;;, or d__Eukaryota;p__;;;;;), you can do something similar to:

qiime taxa filter-table
  --i-table table.qza \
  --i-taxonomy taxonomy.qza \
  --p-mode contains \
  --p-include p__ \
  --p-exclude 'p__;' \
  --o-filtered-table table-filt.qza

The qiime taxa filter-table command allows you to be creative with your filters. There are parameters like --p-mode that you may find helpful in further filtering. You can check the official documentation for more info. Moreover, here you can find more useful tips and use cases.

Let us know if that works for you!

Cheers,

Sergio

4 Likes

It was exactly what I needed! Thanks:)

Best,
Joanna

1 Like

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