diff --git a/strkit/call/call_locus.py b/strkit/call/call_locus.py index 7b002e2..7238b09 100644 --- a/strkit/call/call_locus.py +++ b/strkit/call/call_locus.py @@ -878,6 +878,7 @@ def call_locus( ref_right_flank_seq, motif, ref_size=right_coord-left_coord, # reference size, in terms of coordinates (not TRF-recorded size) + vcf_anchor_size=vcf_anchor_size, # guarantee we still have some flanking stuff left to anchor with max_iters=ref_max_iters, respect_coords=respect_ref, local_search_range=ref_local_search_range, diff --git a/strkit/call/repeats.py b/strkit/call/repeats.py index 381c353..1b286e8 100644 --- a/strkit/call/repeats.py +++ b/strkit/call/repeats.py @@ -81,6 +81,7 @@ def get_ref_repeat_count( flank_right_seq: str, motif: str, ref_size: int, + vcf_anchor_size: int, max_iters: int, respect_coords: bool = False, local_search_range: int = DEFAULT_LOCAL_SEARCH_RANGE, # TODO: Parametrize for user @@ -154,7 +155,7 @@ def get_ref_repeat_count( l_offset = rev_top_res[1][1] r_offset = fwd_top_res[1][1] - if l_offset >= len(flank_left_seq): + if l_offset >= len(flank_left_seq) - vcf_anchor_size: # don't do anything weird if we're removing the entire flank sequence # TODO: this can be caused by NNNNNNN - see chr5:139453668-139454525 in GRCh38 l_offset = 0