# Issue with LEfSe Analysis in QIIME2 – IndexError

**URL:** https://forum.qiime2.org/t/issue-with-lefse-analysis-in-qiime2-indexerror/32433
**Category:** Other Bioinformatics Tools
**Created:** [January 30, 2025, 3:32pm UTC](https://forum.qiime2.org/t/issue-with-lefse-analysis-in-qiime2-indexerror/32433 "2025-01-30T15:32:50Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![bahlouli\_imane](https://forum.qiime2.org/user_avatar/forum.qiime2.org/bahlouli_imane/32/17454_2.png) [@bahlouli\_imane](https://forum.qiime2.org/u/bahlouli_imane)
#### Post date: [January 30, 2025, 3:32pm UTC](https://forum.qiime2.org/t/issue-with-lefse-analysis-in-qiime2-indexerror/32433/1 "2025-01-30T15:32:50Z")

</div>

Hello,

I am new to QIIME2 and encountering an issue while performing LEfSe analysis. I ran the lefse\_format\_input.py script but received the following error message:

Traceback (most recent call last):  
File "/home/cbbc/miniconda3/bin/lefse\_format\_input.py", line 10, in   
sys.exit(format\_input())  
File "/home/cbbc/miniconda3/lib/python3.12/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'])))  
File "/home/cbbc/miniconda3/lib/python3.12/site-packages/lefse/lefse\_format\_input.py", line 163, in get\_class\_slices  
previous\_class = data[0][0]  
IndexError: list index out of range

Could you please help me identify the issue and suggest a solution? Thank you

---

<div class="post-metadata">

### Author: ![SoilRotifer](https://forum.qiime2.org/user_avatar/forum.qiime2.org/soilrotifer/32/21071_2.png) [@SoilRotifer](https://forum.qiime2.org/u/SoilRotifer)
#### Post date: [January 30, 2025, 5:00pm UTC](https://forum.qiime2.org/t/issue-with-lefse-analysis-in-qiime2-indexerror/32433/2 "2025-01-30T17:00:45Z")

</div>

It appears that you are trying to run dokdo tools. Assuming you installed like so:

```auto
conda activate qiime2-amplicon-2024.10
pip install git+https://github.com/sbslee/dokdo

```

You can then run dokdo cli tools as outlined [here](https://dokdo.readthedocs.io/en/latest/dokdo_cli.html).

Basically, you'd run the following command (while in your qiime 2 environment) to read the help text:

```auto
dokdo prepare-lefse -h

```

-Cheers!
