Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make_kreports.py breaks if all reads unclassified #86

Open
mattheatley opened this issue Sep 27, 2023 · 1 comment
Open

Make_kreports.py breaks if all reads unclassified #86

mattheatley opened this issue Sep 27, 2023 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@mattheatley
Copy link

if all sequences have a taxid of 0 then I get the following

Traceback (most recent call last):
File "/home/OXFORDNANOLABS/mheatley/miniconda3/envs/krakentools_v1.2/bin/make_kreport.py", line 199, in
main()
File "/home/OXFORDNANOLABS/mheatley/miniconda3/envs/krakentools_v1.2/bin/make_kreport.py", line 174, in main
o_file.write("%6.2f\t" % (float(taxid2allcounts[curr_tid])/float(read_count)*100))
KeyError: '1'

The obvious answer is probably "just don't generate a kreport for such data!". however I'm benchmarking a bunch of different samples and settings in a pipeline so it would be great if these instances didn't break it and instead produced a really simple kreport instead (i.e. a single row of counts for taxid 0)

@jenniferlu717
Copy link
Owner

Got it, I'll try to change the script to allow for that

@jenniferlu717 jenniferlu717 self-assigned this Sep 27, 2023
@jenniferlu717 jenniferlu717 added the enhancement New feature or request label Sep 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants