# LEfSe error making plot with data containing only 2 classes

**URL:** <https://forum.biobakery.org/t/lefse-error-making-plot-with-data-containing-only-2-classes/474>\
**Category:** LEfSe\
**Created:** [May 14, 2020, 10:49pm UTC](https://forum.biobakery.org/t/lefse-error-making-plot-with-data-containing-only-2-classes/474 "2020-05-14T22:49:23Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kevin\_Rey](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.biobakery.org/kevin_rey/32/208_2.png) [@Kevin\_Rey](https://forum.biobakery.org/u/Kevin_Rey)\
**Post date:** [May 14, 2020, 10:49pm UTC](https://forum.biobakery.org/t/lefse-error-making-plot-with-data-containing-only-2-classes/474/1 "2020-05-14T22:49:23Z")

</div>

Hi all,

I’m getting an error when using the last step of the LEfSe galaxy module ( Plot LEfSe results). Error text posted below

Traceback (most recent call last):  
File “/shed\_tools/testtoolshed.g2.bx.psu.edu/repos/george-weingart/lefse/a6284ef17bf3/lefse/./plot\_res.py”, line 151, in   
else: plot\_histo\_hor(params[‘output\_file’],params,data,len(data[‘cls’]) == 2)  
File “/shed\_tools/testtoolshed.g2.bx.psu.edu/repos/george-weingart/lefse/a6284ef17bf3/lefse/./plot\_res.py”, line 54, in plot\_histo\_hor  
if bcl: data[‘rows’].sort(key=lambda ab: fabs(float(ab[3]))\*(cls.index(ab[2])_2-1))  
File “/shed\_tools/testtoolshed.g2.bx.psu.edu/repos/george-weingart/lefse/a6284ef17bf3/lefse/./plot\_res.py”, line 54, in   
if bcl: data[‘rows’].sort(key=lambda ab: fabs(float(ab[3]))_(cls.index(ab[2])\*2-1))  
ValueError: invalid literal for float(): 3wo

I’ve encountered the same error before, but that was due to having more than 2 classes in the data. This set only has 2, and otherwise worked for a different subset that I entered just a few minutes prior.

Any help would be great, thank you so much!

---

<div class="post-metadata">

**Author:** ![sagunmaharjann](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.biobakery.org/sagunmaharjann/32/168_2.png) [@sagunmaharjann](https://forum.biobakery.org/u/sagunmaharjann)\
**Post date:** [October 2, 2020, 3:56pm UTC](https://forum.biobakery.org/t/lefse-error-making-plot-with-data-containing-only-2-classes/474/2 "2020-10-02T15:56:18Z")

</div>

Hello,

Apologies for the late reply. Would it be possible for you to provide us your input file?

Thanks,  
Sagun
