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

calculateCallability fails when none pass: ValueError: could not convert string to float #5

Open
f73chen opened this issue Aug 10, 2020 · 0 comments

Comments

@f73chen
Copy link

f73chen commented Aug 10, 2020

Problem: When PASS= , the WDL crashes because it tries to cast an empty line to float
PASS="$(bedtools intersect -a normal.callable -b tumor.callable -wao | awk '{sum+=$9} END{print sum}')"

pass_count = int(float("${PASS}"))

Solution: Replace PASS with this line instead so it starts at 0:
PASS="$(bedtools intersect -a normal.callable -b tumor.callable -wao | awk 'BEGIN{sum=0} {sum+=$9} END{print sum}')"

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

1 participant