Skip to content

Commit

Permalink
Catch invalid interval for guess-plausible-variant (biocommons#605)
Browse files Browse the repository at this point in the history
e.g., this dummy deletion was failing `ATM:c.8816_8817del` with an HGVSInvalidIntervalError
  • Loading branch information
jtratner authored Jul 21, 2020
1 parent fceff98 commit 15c3937
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions misc/experimental/hgvs-guess-plausible-transcripts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import copy
import logging
import sys

from hgvs.exceptions import HGVSInvalidVariantError
from hgvs.exceptions import HGVSInvalidVariantError, HGVSInvalidIntervalError
import hgvs.dataproviders.uta
import hgvs.normalizer
import hgvs.parser
Expand Down Expand Up @@ -58,8 +58,8 @@ def generate_plausible_variants(hdp, hv, v):
hv.validate(v2)
_logger.debug(" {}: validated".format(v2))
yield v2
except HGVSInvalidVariantError:
_logger.debug(" {}: failed".format(v2))
except (HGVSInvalidVariantError, HGVSInvalidIntervalError) as e:
_logger.debug(" {}: failed: {}: {}".format(v2, type(e).__name__, str(e)))
pass


Expand Down

0 comments on commit 15c3937

Please sign in to comment.