KrakenTools icon indicating copy to clipboard operation
KrakenTools copied to clipboard

error running kreport2mpa.py script

Open hillms opened this issue 1 year ago • 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

hillms avatar Oct 05 '22 17:10 hillms

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 avatar Oct 06 '22 09:10 MAXINELSX

@MAXINELSX That worked perfectly - thanks a ton!

hillms avatar Oct 06 '22 19:10 hillms

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

nickp60 avatar Feb 17 '23 03:02 nickp60

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

hillms avatar Feb 24 '23 22:02 hillms