Skip to content

Commit

Permalink
Merge pull request #98 from dufeiyu/bugfix
Browse files Browse the repository at this point in the history
Fix another bug of division by zero
  • Loading branch information
dufeiyu authored Oct 13, 2023
2 parents 9e5c135 + 1edb108 commit 370dc54
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion dockerfiles/docker-myeloseq/filterHaloplex.py
Original file line number Diff line number Diff line change
Expand Up @@ -503,7 +503,12 @@ def revcomp(seq):

ro = rec.samples[0]['AD'][0]
ao = rec.samples[0]['AD'][1]
rawvaf = round(ao / (ao + ro),4) #rec.samples[0]['AF'][0]

if ao + ro == 0:
rawvaf = 0
else:
rawvaf = round(ao / (ao + ro),4) #rec.samples[0]['AF'][0]

for v in rec.filter.keys():
nrec.filter.add(v)

Expand Down

0 comments on commit 370dc54

Please sign in to comment.