Filtering sequences by feature table

An older question to the forum wanted to filter sequences, and soon enough, QIIME developed a way to filter both sequences and features.

I’m starting with data that is imported into QIIME at the OTU-table level (importing a .biom file). I was using the qiime feature-table filter-features plugin to remove singleton features (--p-min-samples 2) as well as removing elements of the OTU table with fewer than 10 reads (--p-min-frequency 10). This resulted in a filtered feature table which I can use for taxonomic assignment and other analyses.

However, because my filtered feature-table now contains fewer features than I started with, the sequences that I started with that map to the original feature table now have more sequences than what remains in my filtered one (I dropped 346 features from my dataset). What I’d like to figure out is whether or not there is a trick in QIIME to pull down a list of the features that were dropped, so that I can then use that list to remove them from the sequences file too. I thought that running with --verbose might do the trick but it didn’t print out any additional info.

In any event, it would be a neat option to have within the filter-features argument set to retain the list of dropped features for exactly this purpose. Or maybe it already exists and I’m just missing it!

Thanks

Filtering sequences based on a table is easy peasy, but I suppose you need to be a QIIME 2 dev to know its secrets. :crystal_ball:

filter-seqs has an optional table input. If you input a table instead of metadata, it will filter the sequences to only contain those found in the table.

I agree, that could also be useful, but only in some cases. It is not super convenient, but you can always just re-run filter-features with the --p-exclude-ids parameter instead of --p-no-exclude-ids , or vice versa.

I hope that helps!

1 Like

It was staring me right in the face. [OPTIONAL, except for Devon]
Thanks @Nicholas_Bokulich. Happy Saturday.

3 Likes

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