jenniferlu717/KrakenTools

error running kreport2mpa.py script

Opened this issue · 4 comments

Hello,

I am getting the below error. I did try the script on two datasets with the same result. Could you please help me troubleshoot this? I also copied my submission script below the error messages.

error output

Traceback (most recent call last):
File "/home/mthoemmes/kreport2mpa.py", line 188, in
main()
File "/home/mthoemmes/kreport2mpa.py", line 143, in main
report_vals = process_kraken_report(line)
File "/home/mthoemmes/kreport2mpa.py", line 80, in process_kraken_report
taxid = int(l_vals[-3])
NameError: name 'l_vals' is not defined. Did you mean: 'locals'?

submission script

for i in *_report_species.txt

do
filename=$(basename "$i")
fname="${filename%_report_species.txt}"
python /home/username/kreport2mpa.py -r $i -o ${fname}_mpa.txt --display-header

done

Kindly,

Megan

Hi, I got the same bug with you using the new kreport2mpa.py
But I used the former one before and didn't get this bug.
I attached the file for you below;
Cheers!
github would allown't .py uploading, you can just change this plain txt to .py
kreport2mpa.txt

@MAXINELSX That worked perfectly - thanks a ton!

@hillms I think this should be reopened, and I think the fix is as simple as replacing l_vals with split_str

@jenniferlu717 Can you please fix the error in this file? @nickp60 reopened until resolved.