Qiime feature-table filter-features removes all reads

I've finally finished running my fastq files through the Qiime2 pipeline. However, when I used the code:

qiime taxa barplot \
--i-filtered-table /center1/AMPLICON/jecohen/QiimePlate002_18S/filtered/table.qza \
--i-taxonomy /center1/AMPLICON/jecohen/QiimePlate002_18S/filtered/core-metrics-results/classify/classification.qza \
--m-metadata-file /center1/AMPLICON/jecohen/QiimePlate002_18S/filtered/core-metrics-results/QiimePlate002_18S_metadata.tsv \
--output-dir visualization

I got a blank barplot. I looked at the filtered table in Qiime2view, and it had no reads. I'm assuming they were removed in the qiime feature-table filter-features step, which I did to ensure that all sequences were aligned for visualization and analysis. The code for my filtered table was:

qiime feature-table filter-features \
--i-table /center1/AMPLICON/jecohen/QiimePlate002_18S/filtered/table.qza \
--m-metadata-file /center1/AMPLICON/jecohen/QiimePlate002_18S/filtered/core-metrics-results/QiimePlate002_18S_metadata.tsv \
--o-filtered-table filtered-table.qza

Am I performing this step correctly? I feel like the metadata.tsv, which I had been using for multiple steps in my pipeline, may have simply removed all the sequences as it listed all the samples in the plate. Any help would be appreciated, thanks!

Hello!

As I understood, you provided a sample-metadata as a metadata for feature filtering. As a result, plugin searched for the features from feature table in your metadata file in order to keep them, and remove any features that are not presented in the metadata file. Since it is sample metadata, it does not contain any features and plugin removed all features from your table.
If you will use the table that you used as an input in filtering step, or apply filtering providing a metadata file with feature IDs to keep (if you have such file and want to implement it) it should produce a proper barplot.

2 Likes

Thanks for your quick response! You were right, I should have been using my taxonomy file instead of metadata for --metadata-file. I had been confused as that had previously correlated with my .tsv file in the rest of my Qiime2 pipeline.

1 Like

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