Skip to content

Commit

Permalink
Use indels for coverage estimation if <100 SNPs found
Browse files Browse the repository at this point in the history
  • Loading branch information
martinghunt committed Jul 6, 2021
1 parent e955f16 commit 84d8955
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion minos/gramtools.py
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ def load_gramtools_vcf_and_allele_coverage_files(vcf_file, quasimap_dir):
# By default, we only counted read depth at SNPs, so in this edge case we
# get no read depths. Do the coverage estimate again, but use indels to
# estimate. Is likely to be a little less accurate, but we have no choice.
if len(coverages) == 0 or max(coverages) == 0:
if len(coverages) < 100 or max(coverages) == 0:
coverages = _coverage_list_from_allele_coverage(
all_allele_coverage, vcf_lines=vcf_lines, use_indels=True
)
Expand Down

0 comments on commit 84d8955

Please sign in to comment.