Format input file for Lefse

Hi,
Even using the website suggested input file, I was unable to pass from the format step: Error:
error
An error occurred with this dataset:
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 441, in format_input
feats = add_missing_levels(f

Hello @Josias ,
Please make sure that you are passing the subclass and subjectId parameters as well in the lefse galaxy run.

Regards,
Sagun

Dear Sagun,
Thanks for your quick response. Yet, it seems no to be the case. I have running galaxy tools for over one year, facing no major issue. I am having problems with the workflow just now.
Josias


I am also having the same issue. I have run Lefse many times in the last 2 years, and like @Josias I am only now running into this error.

I cannot identify any formatting issue on my end.

Please let me know if I can supply any information to help you identify the problem.

Hi,
I have the same problem. I cannot get past the LEfSe formatting step. I used previous files that used to work perfectly on here. I even tried to use the example file that is given on the galaxy module, and it does not work either.
Thanks.

Hello @archaea , @Lauren and @Josias ,

Can you please attach your lefse input file? I can check the formatting from my side. Please note that the galaxy LEfSe version was updated from v1.1 to v1.1.2.

Regards,
Sagun

Here is a file that used to work and does not at the moment.
Thanks for your help!
crbac_genus_sex.txt (287.3 KB)

test.txt (531.3 KB)

My data is working again today for some reason, not sure why if others are still having issues, but it appears fixed on my end for now.

1 Like

Hello @Josias ,

Please replace all the “,” with “.” in the input file.
Error: ValueError: could not convert string to float: '4,34E-01'
eg. 4,34E-01 => 4.34E-01

Regards,
Sagun

Hello @archaea ,

Can you make sure that you are selecting the all 3 options parameters for input columns i.e.

  • Select which row to use as class
  • Select which row to use as subclass
  • Select which row to use as subject
    When you provide the column names for each one of the above options in galaxy LEfSe, your input file works fine.

Regards,
Sagun

It still isn’t working for me. I have no subclass and subject rows. When I leave it as ‘no subclass’ and ‘no subject’, I get the error message. Should I add empty rows to my input files ?
Thanks.


Hi @Josias ,

Here is your initial input file(after changes) which works. Please try it out and let me know if any issues.
test.txt (531.3 KB)

Regards,
Sagun

Hi @archaea,
Yes, both subclass and subject rows are required parameters. Try adding empty rows please.

Regards,
Sagun

Great Sagun!
It really worked on my end, as well. Now I need to work on my own file. So, could you please inform was was wrong with the “test.txt”?
regards

Hello @Josias ,
I replaced all the “,” (commas) with “.” (dot) for you input file that worked out for me.

Regards,
Sagun

Yes it works now. FYI, empty rows don’t work, they have to be filled.
Thanks!

Hlo guys, i am running the same problem. It’s not working for me also. Can someone tell me what’s the problem in my file also?
fecal galaxy3.txt (41.7 KB)
I have run this file one time and it worked but now its not working. couldn’t pass formating in galaxy.