Hi,
After using decontam in R, I exported the OTU table in biom format and imported it into qiime2:
!qiime tools import \
--input-path $decontam \
--type 'FeatureTable[Frequency]' \
--input-format BIOMV100Format \
--output-path decontam-feature-table.qza
Then when I proceeded to barplot:
!qiime taxa barplot \
--i-table decontam-feature-table.qza \
--i-taxonomy taxonomy/taxonomy_mcm_16s.qza \
--m-metadata-file ../../metadata/metadata_16s.tsv \
--o-visualization taxonomy/decontam_barplot_mcm_16s.qzv
It would generate error: "missing following feature IDs" because I think decontam has dropped some the ID, and those are not found in the orignal classifier and provenance.
Question1: The taxonomy.qza should contain the existing IDs, why not just mapping those instead of requiring all IDs?
My workaround is to generate a list of contaminant features and filter those out in the original feature table:
!qiime feature-table filter-features \
--i-table table_mcm_16s.qza \
--m-metadata-file decontam/contaminates.txt \
--p-exclude-ids True \
--o-filtered-table decontam_filtered_table.qza
!qiime taxa barplot \
--i-table decontam_filtered_table.qza \
--i-taxonomy taxonomy/taxonomy_mcm_16s.qza \
--m-metadata-file ../../metadata/metadata_16s.tsv \
--o-visualization taxonomy/decontammed_barplot_mcm_16s.qzv
Q2: This would work, but I am not sure if it is correct?
Q3: In the decontam-feature-table.qza and decontam_filtered_table.qza have different sample size (605 vs 606) and median frequency (17861 vs 19122 ) . Can you shed some lights into that?
Thank youdecontam-feature-table.qzv (4.1 MB) decontam_filtered_table.qzv (4.5 MB)