Skip to content

Commit

Permalink
fix: add ref_n to AARefAlt class
Browse files Browse the repository at this point in the history
I make the changes to fix the issue described at biocommons#727
  • Loading branch information
markgene authored Feb 7, 2024
1 parent 4fe8342 commit 16682e8
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/hgvs/edit.py
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,16 @@ def type(self):
edit_type = "ins"
return edit_type

@property
def ref_n(self):
"""
returns an integer.
"""
try:
return len(self.ref)
except ValueError:
return None

def _del_ins_lengths(self, ilen):
"""returns (del_len, ins_len).
Unspecified ref or alt returns None for del_len or ins_len respectively.
Expand Down

0 comments on commit 16682e8

Please sign in to comment.