Issue with Format Data for LEfSe


I am running an issue with “Format Data for LEfSe” Step. Below are the error reports. Thank you for your help!

Dataset Error Report

An error occurred while running the tool LEfSe_for.


Execution resulted in the following messages:

Fatal error: Exit code 1 ()

Tool generated the following standard error:

Traceback (most recent call last): File “/usr/bin/”, line 8, in sys.exit(format_input()) File “/usr/lib/python3.6/site-packages/lefse/”, line 437, in format_input class_sl,subclass_sl,class_hierarchy = get_class_slices(list(zip(cls[‘class’], cls[‘subclass’], cls[‘subject’])))
KeyError: ‘subject’

Here is my .txt file
all_D6.txt (2.9 KB)

Hi @jing_liu ,
Thank you for providing the input file. I checked it out and it is missing headings. Please take the reference of the sample lefse input file and make the changes as needed to your input.

Samples LEfSe Input example link here.


Thank you very much for your reply! I tried the reference sample you provided, but still got the same error. Below are my settings: