# Plugin error from diversity (on rarefaction)

**URL:** https://forum.qiime2.org/t/plugin-error-from-diversity-on-rarefaction/2609
**Category:** User Support
**Tags:** alpha-rarefaction, metadata
**Created:** [January 17, 2018, 4:38pm UTC](https://forum.qiime2.org/t/plugin-error-from-diversity-on-rarefaction/2609 "2018-01-17T16:38:40Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![Restuadi](https://forum.qiime2.org/letter_avatar_proxy/v4/letter/r/f17d59/32.png) [@Restuadi](https://forum.qiime2.org/u/Restuadi)
#### Post date: [January 17, 2018, 4:38pm UTC](https://forum.qiime2.org/t/plugin-error-from-diversity-on-rarefaction/2609/1 "2018-01-17T16:38:40Z")

</div>

Hello,

I guess there were some discussion about my error here, but they are closed, and my situation is somewhat different, I got errors on rarefaction.

Ok this is my command and what I got :  
(qiime2-2017.11) [r.restuadi@delta017 fastq\_2]$ qiime diversity alpha-rarefaction \

> --i-table table\_sh\_10thr\_2.qza   
> --i-phylogeny rooted-tree.qza   
> --p-max-depth 4000   
> --m-metadata-file mapping\_16Jan2018.txt   
> --o-visualization alpha-rarefaction\_4k.qzv

Plugin error from diversity:

Missing samples in metadata: {'R4286', 'R2406'}

Debug info has been saved to /scratch/tmp/pbs.1509491.delta/qiime2-q2cli-err-27usq86l.log

I've checked that my mapping is containing those 2 samples, and they are in table\_sh\_10thr\_2.qza too.

Could you help me to figure out, what's wrong here?

Thank you very much,

Restu

---

<div class="post-metadata">

### Author: ![thermokarst](https://forum.qiime2.org/letter_avatar_proxy/v4/letter/t/8e7dd6/32.png) [@thermokarst](https://forum.qiime2.org/u/thermokarst)
#### Post date: [January 17, 2018, 5:33pm UTC](https://forum.qiime2.org/t/plugin-error-from-diversity-on-rarefaction/2609/3 "2018-01-17T17:33:57Z")

</div>

Hi @Restuadi!

Are those sample ids listed in exactly the same way in the metadata file and your table? ID matching is exact, so if you have hyphens versus underscores, or upper/lowercase letters, those will be read as different IDs (please note, the metadata behavior described here might not be applicable in future releases of QIIME 2 - we are currently overhauling the metadata handling in the framework).

Some ways you can make sure your IDs match:

- Run [`feature-table summarize`](https://docs.qiime2.org/2017.12/plugins/available/feature-table/summarize/) on your feature table, without your metadata, you will have a list of sample IDs in there.
- Run [`feature-table summarize`](https://docs.qiime2.org/2017.12/plugins/available/feature-table/summarize/) on your feature table, with your metadata. Compare the sample IDs in this step with the sample IDs in the previous step.
- Run [`metadata tabulate`](https://docs.qiime2.org/2017.12/plugins/available/metadata/tabulate/) on your metadata.

If you are still stuck after investigating those three files, can you please provide us with the three visualizations above? Thanks! 🦖

---

<div class="post-metadata">

### Author: ![Restuadi](https://forum.qiime2.org/letter_avatar_proxy/v4/letter/r/f17d59/32.png) [@Restuadi](https://forum.qiime2.org/u/Restuadi)
#### Post date: [January 18, 2018, 4:01am UTC](https://forum.qiime2.org/t/plugin-error-from-diversity-on-rarefaction/2609/5 "2018-01-18T04:01:11Z")

</div>

Hi,

Yes, I guess, I'm still pretty stuck, since the number seems to match.

I cannot find any attachment functionality in this forum, so for the time being, I put the visualization here:  
[https://drive.google.com/open?id=1pVzHVuFq0kTzTavdIPQbbOdXJaIEef-w](https://drive.google.com/open?id=1pVzHVuFq0kTzTavdIPQbbOdXJaIEef-w)

Please let me know if you need anything else,  
thank you very much,

Restu

---

<div class="post-metadata">

### Author: ![thermokarst](https://forum.qiime2.org/letter_avatar_proxy/v4/letter/t/8e7dd6/32.png) [@thermokarst](https://forum.qiime2.org/u/thermokarst)
#### Post date: [January 18, 2018, 4:05am UTC](https://forum.qiime2.org/t/plugin-error-from-diversity-on-rarefaction/2609/6 "2018-01-18T04:05:02Z")

</div>

Hi @Restuadi! Thanks for the files - that was super helpful!

You have extra spaces (`' '`) after the listed sample IDs in your metadata file (`'R4286 '` instead of `'R4286'` & `'R2406 '` instead of `'R2406'`). If you delete those spaces in your metadata file, you should be good to go.

We are currently in the middle of overhauling metadata handling in QIIME 2 --- once those changes land, one important change is that leading and trailing whitespace will not be significant --- it will be stripped off, so this wouldn't have even been an issue for you. We will let you know when this is made available in a future release - stay tuned!

Thanks 🦖

PS - you can attach files by clicking this icon in the edit menu bar:  
 ![54 PM](https://forum-qiime2-org.s3.dualstack.us-west-2.amazonaws.com/original/2X/7/7a782b699e924326574113dd3d34cf3aa312bf78.png)

---

<div class="post-metadata">

### Author: ![Restuadi](https://forum.qiime2.org/letter_avatar_proxy/v4/letter/r/f17d59/32.png) [@Restuadi](https://forum.qiime2.org/u/Restuadi)
#### Post date: [January 18, 2018, 12:42pm UTC](https://forum.qiime2.org/t/plugin-error-from-diversity-on-rarefaction/2609/7 "2018-01-18T12:42:36Z")

</div>

YES...! It Works.  
Awesome, Thank you very much.

Restu

---

<div class="post-metadata">

### Author: ![jairideout](https://forum.qiime2.org/user_avatar/forum.qiime2.org/jairideout/32/9_2.png) [@jairideout](https://forum.qiime2.org/u/jairideout)
#### Post date: [February 16, 2018, 5:12pm UTC](https://forum.qiime2.org/t/plugin-error-from-diversity-on-rarefaction/2609/9 "2018-02-16T17:12:35Z")

</div>

In the QIIME 2 `2018.2` release, Metadata ignores any leading or trailing whitespace characters in cells, avoiding the issue reported in this topic.

There are a number of other changes to QIIME 2 Metadata in the `2018.2` release. See [this forum announcement](https://forum.qiime2.org/t/summary-of-changes-to-metadata-in-qiime-2-2018-2-release/2884) for details on what changed, as well as the updated [Metadata tutorial](https://docs.qiime2.org/2018.2/tutorials/metadata/). 🌞

---

<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: [March 19, 2018, 11:12pm UTC](https://forum.qiime2.org/t/plugin-error-from-diversity-on-rarefaction/2609/11 "2018-03-19T23:12:44Z")

</div>

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