Skip to content

Commit

Permalink
ui fix, api param
Browse files Browse the repository at this point in the history
  • Loading branch information
ACEnglish committed Sep 21, 2024
1 parent ed551cc commit a1521c1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
4 changes: 2 additions & 2 deletions truvari/annotations/chunks.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ def parse_args(args):
parser.add_argument("-c", "--chunksize", type=int, default=500,
help="Distance between variants to split chunks (%(default)s)")
parser.add_argument("-s", "--sizemin", type=int, default=50,
help="Minimum SV length")
help="Minimum SV length (%(default)s)")
parser.add_argument("-S", "--sizemax", type=int, default=50000,
help="Maximum SV length")
help="Maximum SV length (%(default)s)")
args = parser.parse_args(args)
truvari.setup_logging(show_version=True)
return args
Expand Down
8 changes: 5 additions & 3 deletions truvari/comparisons.py
Original file line number Diff line number Diff line change
Expand Up @@ -258,14 +258,16 @@ def entry_seq_similarity(entryA, entryB, ref=None, min_len=0):
return max(unroll_compare(a_seq, b_seq, st_dist), unroll_compare(b_seq, a_seq, -st_dist), seqsim(a_seq, b_seq))


def entry_reciprocal_overlap(entry1, entry2):
def entry_reciprocal_overlap(entry1, entry2, ins_inflate=True):
"""
Calculates reciprocal overlap of two entries
:param `entry1`: First entry
:type `entry1`: :class:`pysam.VariantRecord`
:param `entry2`: Second entry
:type `entry2`: :class:`pysam.VariantRecord`
:param `ins_inflate`: inflate entry boundaries
:type `ins_inflate`: bool
:return: The reciprocal overlap
:rtype: float
Expand All @@ -279,8 +281,8 @@ def entry_reciprocal_overlap(entry1, entry2):
>>> truvari.entry_reciprocal_overlap(a, b)
0
"""
astart, aend = entry_boundaries(entry1, True)
bstart, bend = entry_boundaries(entry2, True)
astart, aend = entry_boundaries(entry1, ins_inflate)
bstart, bend = entry_boundaries(entry2, ins_inflate)
return reciprocal_overlap(astart, aend, bstart, bend)


Expand Down

0 comments on commit a1521c1

Please sign in to comment.