# Format Data for Lefse (Error Line8/437)

**URL:** <https://forum.biobakery.org/t/format-data-for-lefse-error-line8-437/5514>\
**Category:** LEfSe\
**Created:** [June 22, 2023, 5:16pm UTC](https://forum.biobakery.org/t/format-data-for-lefse-error-line8-437/5514 "2023-06-22T17:16:43Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![capsola](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.biobakery.org/capsola/32/2200_2.png) [@capsola](https://forum.biobakery.org/u/capsola)\
**Post date:** [June 22, 2023, 5:16pm UTC](https://forum.biobakery.org/t/format-data-for-lefse-error-line8-437/5514/1 "2023-06-22T17:16:43Z")

</div>

Hello! I am currently receiving an error around step A with my analysis. I have already compared my dataset to the sample dataset and found (so far) no differences in format.

[L7\_species\_relativeabundance\_modified2.txt](https://forum.biobakery.org/uploads/short-url/6BaxsjMVVeVWpiq7KvjTZJsQL9.txt) (28.8 KB)

When I put the sample dataset through however, it will work. When I put my txt file through Step A/Format data I receive the following message:

Traceback (most recent call last):  
File “/usr/bin/lefse\_format\_input.py”, line 8, in   
sys.exit(format\_input())  
File “/usr/lib/python3.6/site-packages/lefse/lefse\_format\_input.py”, line 437, in format\_input  
class\_sl,subclass\_sl,class\_hierarchy = get\_class\_slices(list(zip(cls[‘class’], cls[‘subclass’], cls[‘subject’])))  
KeyError: ‘subject’

Has there been something I’ve missed in my txt file, or is this an issue with the recent update in Lefse? Thank you!

---

<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:** [June 23, 2023, 4:04pm UTC](https://forum.biobakery.org/t/format-data-for-lefse-error-line8-437/5514/2 "2023-06-23T16:04:34Z")

</div>

Hello @capsola ,  
I just tried your input file and everything works as expected. Please make sure that you are passing the `Select which row to use as subject` and `Select which row to use as class` for your input file while running galaxy Lefse.

Please feel free to ignore `Unable to count lines` error in the step1 format input as it will not interfere with the run. We are working on fixing the error message asap.

Regards,  
Sagun
