Taxabarplots error - missing samples "IDs"

Dear all!
I want to group my table by some columns and then make a taxa barplot.
I have the following code:

outdir = 'Results/Taxa_barplots'
tabin  = 'Data/tables/All_table.qza'
groups = ['Group_TP', 'Group_Treat']

!mkdir -p $outdir

for group in groups:
    grouped = 'Data/tables/All_%s_grouped.qza' % group
    taxabar = outdir + '/%s_taxabarplot.qzv'   % group
#Group tables    
    !qiime feature-table group \
        --i-table $tabin \
        --p-axis 'sample' \
        --m-metadata-file Metadata/metadata.tsv \
        --m-metadata-column $group \
        --p-mode 'mean-ceiling' \
        --o-grouped-table $grouped
    !qiime taxa barplot \
        --i-table $grouped \
        --i-taxonomy Data/combo_taxonomy.qza \
        --m-metadata-file Metadata/metadata.tsv \
        --o-visualization $taxabar

And I am getting the error:

Saved FeatureTable[Frequency] to: Data/tables/All_Group_TP_grouped.qza
Plugin error from taxa:

  Sample IDs found in the table are missing in the metadata: {'S_4', 'J_4', 'R_3', 'SC_6', 'S_1', 'G_5', 'R_4', 'S_5', 'G_2', 'R_2', 'R_5', 'S_3', 'S_2', 'J_3', 'R_1', 'RC_6', 'G_4', 'G_6', 'J_6', 'R_6', 'J_2', 'G_3', 'S_6'}.

And here is the screen of my metadata:

The same code worked for me in Qiime2019.4, but recently I reinstalled my system and downloaded Qiime2-2019.10. I wanted to redo this part and encountered the error. All missing values are present in metadata file, since grouping of my table worked fine. Where is the problem?
Thank you in advance

Hi @timanix,

I think you need to collapse your metadata the same way you’ve collapsed your feature table. Right now, the code sees your sample names as the #SampleID column, but you want ot index from the Group_TP column (I think), so you need to collapse your metadata that way.



Hi @jwdebelius
I just surprised that the same commands worked already in Qiime2-2019.4 without collapsing metadata file. So something changed in the Qiime2. Thank you for suggestion, I’ll try it.

That’s worked. I missed some changes in Qiime2-2019.10 since Qiime2-2019.4 :face_with_monocle:


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