Skip to content

Commit

Permalink
handle missing or zero depth field in tumor
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisamiller committed Jun 17, 2019
1 parent e4850ef commit 0e40685
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion somatic_llr_filter.py
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,12 @@ def missingVals(arr):
if error_expect == 1:
error_expect = 1 - args.sequence_error_rate

tumor_freq = tumor_var/tumor_depth
#handle case where depth is zero or missing
if tumor_depth == 0:
tumor_freq = 0
else:
tumor_freq = tumor_var/tumor_depth

if tumor_freq == 0:
tumor_freq = args.sequence_error_rate
elif tumor_freq == 1:
Expand Down

0 comments on commit 0e40685

Please sign in to comment.