LEfSe input file formating error

857 views
Skip to first unread message

Jen Bowen

unread,
Dec 2, 2015, 2:38:20 PM12/2/15
to LEfSe-users, Jennifer Bowen
Hi LEfSe Group:

I am hoping someone can identify the error in my input file (attached).  Briefly, I used PiCRUST to predict metagenomes from 16S rRNA illumina data.  I then used Humann2 to calculate pathway abundances of for my different samples following the description here: 


I stitched together each pathway abundance using humann2_join_tables and then I modified those tables to include a couple of rows of metadata for my samples.  I loaded those samples onto the Galaxy server using Get Data (tabular).  I then ran Format Data fro LEfSe and I got the following message:

Traceback (most recent call last):
  File "/net/rcstore02/ifs/rc_labs/galaxy/www/galaxy_hutlab14/shed_tools/toolshed.g2.bx.psu.edu/repos/george-weingart/lefse/db64b6287cd6/lefse/home/ubuntu/lefse_to_export/format_input.py", line 435, in <module>
    feats = numerical_values(feats,params['norm_v'])
  File "/net/rcstore02/ifs/rc_labs/galaxy/www/galaxy_hutlab14/shed_tools/toolshed.g2.bx.psu.edu/repos/george-weingart/lefse/db64b6287cd6/lefse/home/ubuntu/lefse_to_export/format_input.py", line 174, in numerical_values
    feats[k] = [float(val) for val in v]
ValueError: could not convert string to float: GULF.6B.RNA_Abundance

As far as I can tell, however, my matrix is complete, no missing spaces, etc. so I am not sure what I am missing. Any advice would be much appreciated. 

Best, 
Jen 
lefse.txt

Jen Bowen

unread,
Dec 3, 2015, 8:22:27 PM12/3/15
to LEfSe-users, jennife...@umb.edu
I should add that I tried the same thing using the galaxy server with the data file that I downloaded from the tutorial here:https://bitbucket.org/biobakery/biobakery/wiki/lefse 

and I received the same error message (could not convert string to float) this makes me think the issue is a Galaxy one and not an issue with my file...

George Weingart

unread,
Dec 3, 2015, 8:40:54 PM12/3/15
to Jen Bowen, LEfSe-users, jennife...@umb.edu
Hi Jen,

I tried and it worked for me, selecting the subclass and subject - perhaps that was the problem you encountered?

Best regards,
George Weingart  PhD
Huttenhower Lab


Inline image 1

Inline image 2

Jennifer Lang

unread,
Jun 13, 2017, 5:28:35 PM6/13/17
to LEfSe-users, jb2...@gmail.com, jennife...@umb.edu
Hi all,

I also ran into this problem and had the HARDEST time figuring it out but it was so simple. George kind of touched on it but wasn't very explicit.

Basically it comes down to you can ONLY have 2 class variables, and if you have class variables they MUST be specified. I think of it as all data must be accounted for and used when running the program.

I have three class categories in my study and was trying to use a master file that contained all that information that I selected one at a time to analyze each category. That did not work at all. I knew I didn't have a problem with the program because I had previously used it with a study that had only two categories so it took a little fiddling to figure out.

Hope this helps others!
Jennifer
Reply all
Reply to author
Forward
0 new messages