Skip to content

Commit

Permalink
DEVSU-1885 - fix malformed single deletion described as substitution …
Browse files Browse the repository at this point in the history
…of blank
  • Loading branch information
dustinbleile committed Apr 19, 2023
1 parent a93b2f6 commit 236a8b7
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion ipr/annotate.py
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,22 @@ def annotate_positional_variants(
if not variant:
continue
try:
matches = gkb_match.match_positional_variant(graphkb_conn, variant)
try:
matches = gkb_match.match_positional_variant(graphkb_conn, variant)
except HTTPError:
# DEVSU-1885 - fix malformed single deletion described as substitution of blank
# eg.
if (
variant[-1] == '>'
and 'g.' in variant
and variant[-2].isalpha()
and variant[-3].isnumeric()
):
logger.warning(
f"Assuming malformed deletion variant {variant} is {variant[:-2] + 'del'}"
)
variant = variant[:-2] + 'del'
matches = gkb_match.match_positional_variant(graphkb_conn, variant)

# GERO-299 - check for conflicting nonsense and missense categories
missense = [
Expand Down

0 comments on commit 236a8b7

Please sign in to comment.