# Taxa barplot plugin error

**URL:** https://forum.qiime2.org/t/taxa-barplot-plugin-error/3219
**Category:** User Support
**Tags:** taxa, barplot
**Created:** [February 27, 2018, 3:00pm UTC](https://forum.qiime2.org/t/taxa-barplot-plugin-error/3219 "2018-02-27T15:00:52Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![hannah\_eps](https://forum.qiime2.org/letter_avatar_proxy/v4/letter/h/bc8723/32.png) [@hannah\_eps](https://forum.qiime2.org/u/hannah_eps)
#### Post date: [February 27, 2018, 3:00pm UTC](https://forum.qiime2.org/t/taxa-barplot-plugin-error/3219/1 "2018-02-27T15:00:52Z")

</div>

Hello! I am having a similar issue to a few other threads, but I still can't quite figure out what is wrong. I am trying to use the QIIME2 pipeline on ITS2 amplicons for the algae Symbiodinium (found in corals). There is a small Symbiodinium database that is available for this, which I have used to run closed-reference feature clustering at 97% (I first tried using a naive-bayes trained classifier, but with such a small database, my final taxa barplots did not give enough resolution, I believe due to the high number of single variant differences/features that were found that could not match the database).

From the clustering, I have been trying to create barplots using my clustered feature table and a taxonomy file that mirrors the features in the table, but have had some difficulty. I continue to get the following error:

> Plugin error from taxa:
> 
> 'float' object has no attribute 'split'

My command line is as follows:

> qiime taxa barplot   
> --i-table table\_cr\_97.qza   
> --i-taxonomy tax\_97.qza   
> --m-metadata-file ITS2\_metadata.txt   
> --o-visualization ITS2\_taxa-bar-plots\_97.qzv

Traceback is:

> Traceback (most recent call last):  
> File "/usr/local/miniconda/envs/qiime2-2017.10/lib/python3.5/site-packages/q2cli/commands.py", line 218, in **call**  
> results = action(\*\*arguments)  
> File "", line 2, in barplot  
> File "/usr/local/miniconda/envs/qiime2-2017.10/lib/python3.5/site-packages/qiime2/sdk/action.py", line 220, in bound\_callable  
> output\_types, provenance)  
> File "/usr/local/miniconda/envs/qiime2-2017.10/lib/python3.5/site-packages/qiime2/sdk/action.py", line 416, in _callable\_executor_  
> ret\_val = self.\_callable(output\_dir=temp\_dir, \*\*view\_args)  
> File "/usr/local/miniconda/envs/qiime2-2017.10/lib/python3.5/site-packages/q2\_taxa/\_visualizer.py", line 29, in barplot  
> collapsed\_tables = \_extract\_to\_level(taxonomy, table)  
> File "/usr/local/miniconda/envs/qiime2-2017.10/lib/python3.5/site-packages/q2\_taxa/\_util.py", line 30, in \_extract\_to\_level  
> max\_obs\_lvl = \_get\_max\_level(taxonomy)  
> File "/usr/local/miniconda/envs/qiime2-2017.10/lib/python3.5/site-packages/q2\_taxa/\_util.py", line 11, in \_get\_max\_level  
> return taxonomy.apply(lambda x: len(x.split(';'))).max()  
> File "/usr/local/miniconda/envs/qiime2-2017.10/lib/python3.5/site-packages/pandas/core/series.py", line 2355, in apply  
> mapped = lib.map\_infer(values, f, convert=convert\_dtype)  
> File "pandas/\_libs/src/inference.pyx", line 1574, in pandas.\_libs.lib.map\_infer (pandas/\_libs/lib.c:66645)  
> File "/usr/local/miniconda/envs/qiime2-2017.10/lib/python3.5/site-packages/q2\_taxa/\_util.py", line 11, in   
> return taxonomy.apply(lambda x: len(x.split(';'))).max()  
> AttributeError: 'float' object has no attribute 'split'

I have attached my input files here:

[table\_cr\_97.qza](https://cdck-file-uploads-global.s3.dualstack.us-west-2.amazonaws.com/flex002/uploads/qiime21/original/2X/0/0a72976d4ece876fedba575acc0180a402f4ccc2.qza) (94.5 KB)  
[tax\_97.qza](https://cdck-file-uploads-global.s3.dualstack.us-west-2.amazonaws.com/flex002/uploads/qiime21/original/2X/1/1cd8fa5ec1827dd419840e0a378dd3e9b58b6c89.qza) (3.2 KB)  
[ITS2\_metadata.txt](https://cdck-file-uploads-global.s3.dualstack.us-west-2.amazonaws.com/flex002/uploads/qiime21/original/2X/4/493e0570fcbae69dd8e5f6aec3b7b82725e07139.txt) (49.7 KB)

Any help with how I might be able to move forward with this would be greatly appreciated! Thank you so much 🙂

---

<div class="post-metadata">

### Author: ![ebolyen](https://forum.qiime2.org/user_avatar/forum.qiime2.org/ebolyen/32/11_2.png) [@ebolyen](https://forum.qiime2.org/u/ebolyen)
#### Post date: [February 27, 2018, 10:18pm UTC](https://forum.qiime2.org/t/taxa-barplot-plugin-error/3219/3 "2018-02-27T22:18:14Z")

</div>

Hi @hannah_eps!

I think there's a missing value in your taxonomy for feature `GS_C1`, which is probably being loaded as `np.NaN` (a floating point number).

If you add an annotation for that and it fixes the problem, let us know. I'll see about filing a bug-report to give a better error when a taxonomy file is missing annotations.

---

<div class="post-metadata">

### Author: ![hannah\_eps](https://forum.qiime2.org/letter_avatar_proxy/v4/letter/h/bc8723/32.png) [@hannah\_eps](https://forum.qiime2.org/u/hannah_eps)
#### Post date: [February 28, 2018, 3:16am UTC](https://forum.qiime2.org/t/taxa-barplot-plugin-error/3219/5 "2018-02-28T03:16:12Z")

</div>

Hi @ebolyen, thanks for the response!

It's all fixed, but not quite what I expected! I had a look at the tax\_97.qzv and you're right, there was no annotation for GS\_C1. The weird thing is that there is no feature called GS\_C1. Turns out, I had a feature called GS\_C1# that QIIME was reading of course as just GS\_C1, and then leaving out the annotation that was there for it. Once I changed the feature name, it all worked perfectly. Thank you so much for your help!!

---

<div class="post-metadata">

### Author: ![ebolyen](https://forum.qiime2.org/user_avatar/forum.qiime2.org/ebolyen/32/11_2.png) [@ebolyen](https://forum.qiime2.org/u/ebolyen)
#### Post date: [February 28, 2018, 2:12pm UTC](https://forum.qiime2.org/t/taxa-barplot-plugin-error/3219/6 "2018-02-28T14:12:34Z")

</div>

> [@hannah\_eps](#):
>
> Turns out, I had a feature called GS\_C1# that QIIME was reading of course as just GS\_C1, and then leaving out the annotation that was there for it.

Ah! That makes sense. If you update to 2018.2, problems like that shouldn't come up anymore as comments (`# like these`) can only appear at the beginning of a line now.

Glad we could help!

---

<div class="post-metadata">

### Author: ![ebolyen](https://forum.qiime2.org/user_avatar/forum.qiime2.org/ebolyen/32/11_2.png) [@ebolyen](https://forum.qiime2.org/u/ebolyen)
#### Post date: [February 28, 2018, 10:58pm UTC](https://forum.qiime2.org/t/taxa-barplot-plugin-error/3219/7 "2018-02-28T22:58:49Z")

</div>

Ran across an existing [issue for this](https://github.com/qiime2/q2-types/issues/165).

---

<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 1, 2018, 4:59am UTC](https://forum.qiime2.org/t/taxa-barplot-plugin-error/3219/8 "2018-04-01T04:59:02Z")

</div>

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