diff --git a/app/__init__.py b/app/__init__.py index f122a9d4..621c1b14 100644 --- a/app/__init__.py +++ b/app/__init__.py @@ -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(): diff --git a/tests/integration_tests/test_normalize_variant_utility.py b/tests/integration_tests/test_normalize_variant_utility.py index 2150ff7e..261786e0 100644 --- a/tests/integration_tests/test_normalize_variant_utility.py +++ b/tests/integration_tests/test_normalize_variant_utility.py @@ -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