Skip to content

Commit

Permalink
Disable HGVS strict bounds checks
Browse files Browse the repository at this point in the history
This is a workaround for some liftover failures: biocommons/hgvs#717
  • Loading branch information
mihaitodor committed Apr 2, 2024
1 parent 15d9c3b commit 14de3f1
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
2 changes: 2 additions & 0 deletions app/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
# Disable the hgvs LRU cache to avoid blowing up memory
# TODO: Revisit this, since this caching might not use a ton of memory.
hgvs.global_config.lru_cache.maxsize = 0
# Disable HGVS strict bounds checks as a workaround for liftover failures: https://github.com/biocommons/hgvs/issues/717
hgvs.global_config.mapping.strict_bounds = False


def create_app():
Expand Down
12 changes: 12 additions & 0 deletions tests/integration_tests/test_normalize_variant_utility.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,15 @@ def test_normalize_variant_utility(client):
response = client.get(url)

assert response.status_code == 200


def test_normalize_variant_utility_transcript_ref_disagree_position_variant(client):
"""
This is a specific corner case where liftover fails if HGVS strict bounds checks are enforced
Details here: https://github.com/biocommons/hgvs/issues/717
"""
url = tu.normalize_variant_query('variant=NC_000001.10:g.145592073A>T')

response = client.get(url)

assert response.status_code == 200

0 comments on commit 14de3f1

Please sign in to comment.