Is it possible to filter features with unassigned taxonomy and create new rep_seqs artificat?

Hey everyone,

I'm interested in filtering out features with unassigned taxonomy from one workflow (they look like this in my assigned taxonomy sheet: Unassigned;__ ;__ ;__ ;__ ;__ ;__) and extracting them into their own representative sequences artifact, so I can classify them using a different database. Going off of previous posts on the forum, I tried using running the following q2 command:

qiime taxa filter-table --i-table dada2_freq_table.qza --i-taxonomy BLAST_assigned_taxonomy.qza --p-include Unassigned --output-dir filter_taxa_table

This produced a filtered feature frequency table, which is not very useful for my inteded analysis.

I also tried:

qiime feature-table filter-seqs --i-table dada2_freq_table.qza --i-data dada2_rep_seqs.qza --p-include Unassigned --output-dir filtered_seqs

But the parameter --p-include is not applicable here. I know there is an --m-metadata-file parameter, but there is no given example. So if this is the solution, where can I find an example metadata file?

Hi @emmzee!

Please see this tutorial:

https://docs.qiime2.org/2020.2/tutorials/filtering/#taxonomy-based-filtering-of-tables-and-sequences

1 Like

Thank you for the great tutorial @thermokarst! If you don't mind, I have a follow up question using the filtration method suggested in the tutorial. I ran taxa filter-seqs as follows:

qiime taxa filter-seqs --i-sequences dada2_rep_seqs.qza --i-taxonomy BLAST_assigned_taxonomy.qza --p-include Unassigned --o-filtered-sequences filtered_seqs.qza

From here, I used BLAST to assign taxonomy to these sequences, and then generated barplots but I run into this issue:

Plugin error from taxa:

Feature IDs found in the table are missing from the taxonomy:

What might be causing this issue?

You have filtered out features from your FeatureData[Sequence] Artifact (filtered_seqs.qza) - you will need to filter those same features out of your FeatureTable[Frequency].

1 Like

Thanks @thermokarst. The problem has been solved!

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