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

summary.py fails when samples with 0% coverage are present #75

Open
psterk opened this issue Feb 21, 2019 · 0 comments
Open

summary.py fails when samples with 0% coverage are present #75

psterk opened this issue Feb 21, 2019 · 0 comments
Assignees

Comments

@psterk
Copy link

psterk commented Feb 21, 2019

I suggest to add a try / except clause around the output_file_write() statement so that summary.py does not fail when there are samples with 0% coverage. Of course, these samples are not useful, but you'd normally not be able to filter these out until after the run. Code change suggestion below:

    for k in dic_dp:
            dpt=dic_dp[k]
            dpt=str(dpt[:-1])
            try:
                    output_file.write(str(k)+"\t"+str(dic_cov[k])+"\t"+str(dpt) + ...... +str(dic_prio[k])+"\n")
            except KeyError as e:
                    print 'KeyError: reason "%s"' % str(e)
                    pass
@clody23 clody23 self-assigned this Jul 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants