Skip to content

Commit

Permalink
fix bug where counting positions below minimum depth fails if 0 reads…
Browse files Browse the repository at this point in the history
… mapped to a locus
  • Loading branch information
Alan-Collins committed Dec 10, 2024
1 parent 134823d commit 81b3a34
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions el_gato/el_gato.py
Original file line number Diff line number Diff line change
Expand Up @@ -1209,13 +1209,13 @@ def process_reads(contig_dict: dict, read_info_dict: dict, ref: Ref, outdir: str
a = Allele()
a.allele_id = '-'
alleles[gene] = [a]
del ref.REF_POSITIONS[gene]
cov_results_report[gene] = {
cov_results[gene] = {
"Percent_covered": "0",
"Mean_depth": "0",
"Min_depth": 0,
"Num_below_min_depth": ref.REF_POSITIONS[gene]["end_pos"] - ref.REF_POSITIONS[gene]["start_pos"]
}
del ref.REF_POSITIONS[gene]

cov_msg = ""
cov_results_report = cov_results.copy() # keep all coverage information for reporting
Expand Down

0 comments on commit 81b3a34

Please sign in to comment.