Filtering out ASVs from DADA2 based on length

Just wanted to toss out one more option for length-based filtering:

qiime feature-table filter-seqs \
    --i-data seqs.qza \
    --m-metadata-file seqs.qza \
    --p-where 'length(sequence) > 4' \
    --o-filtered-data filtered-seqs.qza 

This works by viewing the FeatureData[Sequence] as Metadata, and then using a SQL-where clause to compute the length. The advantage here is then you don't have to export anything. This command above would keep any sequences longer than 4 nts.

:qiime2:

12 Likes