Skip to content

Commit

Permalink
Prevent another DivisionByZero
Browse files Browse the repository at this point in the history
  • Loading branch information
lrvdijk committed Jan 18, 2023
1 parent 85af847 commit 83f1835
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/strainge/variant_caller.py
Original file line number Diff line number Diff line change
Expand Up @@ -604,7 +604,7 @@ def summarize(self):
}

summed_abun = sum(abun.values())
abun = {k: v / summed_abun for k, v in abun.items()}
abun = {k: v / summed_abun if summed_abun else 0 for k, v in abun.items()}

# abundance of all references relative to whole metagenome
total_aln_reads = self.passing_reads + self.lowmq_reads
Expand Down

0 comments on commit 83f1835

Please sign in to comment.