# Taxabarplots error - missing samples "IDs"

**URL:** https://forum.qiime2.org/t/taxabarplots-error-missing-samples-ids/12645
**Category:** User Support
**Tags:** group, taxa, barplot
**Created:** [November 27, 2019, 7:52am UTC](https://forum.qiime2.org/t/taxabarplots-error-missing-samples-ids/12645 "2019-11-27T07:52:39Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![timanix](https://forum.qiime2.org/user_avatar/forum.qiime2.org/timanix/32/17879_2.png) [@timanix](https://forum.qiime2.org/u/timanix)
#### Post date: [November 27, 2019, 7:52am UTC](https://forum.qiime2.org/t/taxabarplots-error-missing-samples-ids/12645/1 "2019-11-27T07:52:39Z")

</div>

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
#taxabarplots    
    !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:

 ![Screenshot%20from%202019-11-27%2009-48-08](https://forum-qiime2-org.s3.dualstack.us-west-2.amazonaws.com/original/2X/e/e895995c626cb42a14beaacf13d1977c96722185.png)

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

---

<div class="post-metadata">

### Author: ![jwdebelius](https://forum.qiime2.org/user_avatar/forum.qiime2.org/jwdebelius/32/9655_2.png) [@jwdebelius](https://forum.qiime2.org/u/jwdebelius)
#### Post date: [November 27, 2019, 9:19am UTC](https://forum.qiime2.org/t/taxabarplots-error-missing-samples-ids/12645/2 "2019-11-27T09:19:01Z")

</div>

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.

Best,  
Justine

---

<div class="post-metadata">

### Author: ![timanix](https://forum.qiime2.org/user_avatar/forum.qiime2.org/timanix/32/17879_2.png) [@timanix](https://forum.qiime2.org/u/timanix)
#### Post date: [November 27, 2019, 9:21am UTC](https://forum.qiime2.org/t/taxabarplots-error-missing-samples-ids/12645/3 "2019-11-27T09:21:39Z")

</div>

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.

UPD  
That's worked. I missed some changes in Qiime2-2019.10 since Qiime2-2019.4 🧐

---

<div class="post-metadata">

### Author: ![system](https://forum-qiime2-org.s3.dualstack.us-west-2.amazonaws.com/original/3X/2/1/21af5fe23cb6f4579467c66a9ed94e55274ca7bd.svg) [@system](https://forum.qiime2.org/u/system)
#### Post date: [December 28, 2019, 3:21pm UTC](https://forum.qiime2.org/t/taxabarplots-error-missing-samples-ids/12645/4 "2019-12-28T15:21:40Z")

</div>

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