Skip to content

Commit

Permalink
bnd progress
Browse files Browse the repository at this point in the history
allow bnd to be turned off. stop bnd from breaking collapse
  • Loading branch information
ACEnglish committed Jan 5, 2025
1 parent 5dfa309 commit f7845a9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
7 changes: 4 additions & 3 deletions truvari/bench.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@ def parse_args(args):
help="Number of matches reported per-call (%(default)s)")
thresg.add_argument("--dup-to-ins", action="store_true",
help="Assume DUP svtypes are INS (%(default)s)")
thresg.add_argument("-B", "--bnddist", type=truvari.restricted_int, default=defaults.bnddist,
help="Maximum distance allowed between BNDs")
thresg.add_argument("-B", "--bnddist", type=int, default=defaults.bnddist,
help="Maximum distance allowed between BNDs (%(default)s; -1=off)")
thresg.add_argument("-C", "--chunksize", type=truvari.restricted_int, default=defaults.chunksize,
help="Max reference distance to compare calls (%(default)s)")

Expand Down Expand Up @@ -520,7 +520,8 @@ def compare_chunk(self, chunk):
chunk_dict["base"], chunk_dict["comp"], chunk_id)
self.check_refine_candidate(result)
# Check BNDs separately
result.extend(self.bnd_compare(chunk_dict['base_BND'], chunk_dict['comp_BND'], chunk_id))
if self.matcher.params.bnddist != -1:
result.extend(self.bnd_compare(chunk_dict['base_BND'], chunk_dict['comp_BND'], chunk_id))
return result

def compare_calls(self, base_variants, comp_variants, chunk_id=0):
Expand Down
2 changes: 1 addition & 1 deletion truvari/matching.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ def make_match_params_from_args(args):
ret.bSample = args.bSample if args.bSample else 0
ret.cSample = args.cSample if args.cSample else 0
ret.dup_to_ins = args.dup_to_ins if "dup_to_ins" in args else False
ret.bnddist = args.bnddist
ret.bnddist = args.bnddist if 'bnddist' in args else -1
# filtering properties
ret.sizemin = args.sizemin
ret.sizefilt = args.sizefilt
Expand Down

0 comments on commit f7845a9

Please sign in to comment.