Skip to content

Commit

Permalink
don't divide by 0
Browse files Browse the repository at this point in the history
  • Loading branch information
brentp committed Feb 2, 2024
1 parent 94f9cab commit 2cd39d3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/somalierpkg/relate.nim
Original file line number Diff line number Diff line change
Expand Up @@ -480,7 +480,7 @@ proc high_quality(gt_counts: array[5, seq[uint16]], i: int): bool {.inline.} =
return false

# should have fewer hom-alts[2] than hets[1]
result = gt_counts[2][i].float / gt_counts[1][i].float < 0.7
result = gt_counts[2][i].float / max(1, gt_counts[1][i].float) < 0.7


proc samples_have_y_depth(stats: seq[Stat4]): bool =
Expand Down

0 comments on commit 2cd39d3

Please sign in to comment.