# Problem with taxa-collapse: Please provide a DataFrame with a string-based Index

**URL:** https://forum.qiime2.org/t/problem-with-taxa-collapse-please-provide-a-dataframe-with-a-string-based-index/13946
**Category:** User Support
**Tags:** taxonomy, taxa, collapse
**Created:** [March 7, 2020, 10:19pm UTC](https://forum.qiime2.org/t/problem-with-taxa-collapse-please-provide-a-dataframe-with-a-string-based-index/13946 "2020-03-07T22:19:39Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![Lia\_Abramovitch](https://forum.qiime2.org/letter_avatar_proxy/v4/letter/l/aca169/32.png) [@Lia\_Abramovitch](https://forum.qiime2.org/u/Lia_Abramovitch)
#### Post date: [March 7, 2020, 10:19pm UTC](https://forum.qiime2.org/t/problem-with-taxa-collapse-please-provide-a-dataframe-with-a-string-based-index/13946/1 "2020-03-07T22:19:39Z")

</div>

Hello everyone!

I'm working with Qiime2 and running this command:

qiime taxa collapse --i-table id-filtered-table2.qza --i-taxonomy taxonomy.qza --p-level 2 --o-collapsed-table table-taxonomy-Phylum.qza

but I get this error:

**Plugin error from taxa:**

\*\* Please provide a DataFrame with a string-based Index\*\*

Prior to that I had to filter the table, because I got this error:

**Plugin error from taxa:**

\*\* Feature IDs found in the table are missing from the taxonomy: {'ebd23dbbb343ab6ae14a9551a6d1f99c', '44c119e00a6c9e7c231fc6d80aebbad7', 'a96cbbab429c69110fcfb8fe37322d96', 'dba87dd363101fdc91e55538f1eef976', '816303d868f90623bad0db9922d86fb1', 'abc84cf134fcbdafc015ce2d173a752a', '3b40488ce4fb31cbcdacfb96ca438714'}\*\*

And for that I used following command:

qiime feature-table filter-samples   
--i-table table-f.qza   
--m-metadata-file samples-to-keep.tsv   
--o-filtered-table id-filtered-table2.qza

In samples-to-keep.tsv I copied the contents of metadata.tsv file.

And I have checked all the files: they are not empty and ID's are strings.

Has anyone ever encountered such problem and could suggest a solution?  
Thank you guys!

---

<div class="post-metadata">

### Author: ![Nicholas\_Bokulich](https://forum.qiime2.org/user_avatar/forum.qiime2.org/nicholas_bokulich/32/19937_2.png) [@Nicholas\_Bokulich](https://forum.qiime2.org/u/Nicholas_Bokulich)
#### Post date: [March 9, 2020, 4:51pm UTC](https://forum.qiime2.org/t/problem-with-taxa-collapse-please-provide-a-dataframe-with-a-string-based-index/13946/2 "2020-03-09T16:51:47Z")

</div>

Welcome to the forum, @Lia_Abramovitch!

> [@Lia\_Abramovitch](#):
>
> \*\* Please provide a DataFrame with a string-based Index\*\*

Uh oh, sounds like maybe you are using sample IDs that consist of numbers. While this is allowed in QIIME 2, it is discouraged because some of the underlying dependencies can't handle numeric sample IDs. See this topic for more details and a workaround:

> [@Problem with 'taxa collapse'](https://forum.qiime2.org/t/problem-with-taxa-collapse/9081/2):
>
> Hi @allebiotech, Sounds like the problem may be that your sample IDs are all numbers? While this is not forbidden in QIIME 2 metadata formats, it is discouraged since it can cause cryptic bugs like this to emerge when some of the underlying packages that QIIME 2 uses cannot handle numeric sample IDs. If I am wrong, and your sample IDs are not numbers, please ignore what I have to say below and instead do the following: please report the full error message please run qiime feature-table summ…

Good luck!

---

<div class="post-metadata">

### Author: ![Lia\_Abramovitch](https://forum.qiime2.org/letter_avatar_proxy/v4/letter/l/aca169/32.png) [@Lia\_Abramovitch](https://forum.qiime2.org/u/Lia_Abramovitch)
#### Post date: [March 10, 2020, 12:41pm UTC](https://forum.qiime2.org/t/problem-with-taxa-collapse-please-provide-a-dataframe-with-a-string-based-index/13946/3 "2020-03-10T12:41:23Z")

</div>

Hello, thanks for the welcoming!

Thank you for the tip!

I have checked my sample-id's and they all look like this:

sample-id  
a9d18759853d110736a1361f87155daa  
e91deecb4eae2a4ebc4e071d2d1145bf  
e0fb84447aa11fbc6f66ca17f92ab7b8  
...

It appears to be a string, so I don't understand the persisting error message.

I have attached the 2 files involved in the first command listed. Maybe that will help.

[id-filtered-table2.qza](https://forum.qiime2.org/uploads/short-url/17hajJsHvm1kGAauqs8egrAflXr.qza) (228.2 KB) [taxonomy.qza](https://forum.qiime2.org/uploads/short-url/bNGxBmZMuKffIUtcHKJGt2gYhUe.qza) (432.7 KB)

---

<div class="post-metadata">

### Author: ![Nicholas\_Bokulich](https://forum.qiime2.org/user_avatar/forum.qiime2.org/nicholas_bokulich/32/19937_2.png) [@Nicholas\_Bokulich](https://forum.qiime2.org/u/Nicholas_Bokulich)
#### Post date: [March 10, 2020, 2:39pm UTC](https://forum.qiime2.org/t/problem-with-taxa-collapse-please-provide-a-dataframe-with-a-string-based-index/13946/4 "2020-03-10T14:39:44Z")

</div>

Thanks for sending the table!

The issue with the table is that it is totally empty: no samples, no features. I see you filtered the table a couple times; one of these filtering steps must have removed all samples and features.

To debug this issue: you can run `qiime feature-table summarize` on a feature table to check out the contents... use this on the feature table before each stage of filtering to figure out which step went wrong.

Good luck! Let me know if you figure this out or need more assistance.

---

<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: [April 10, 2020, 8:39pm UTC](https://forum.qiime2.org/t/problem-with-taxa-collapse-please-provide-a-dataframe-with-a-string-based-index/13946/5 "2020-04-10T20:39:47Z")

</div>

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