From 3d6eed327acf6f0f0561065e90ee7e2d0a41dc89 Mon Sep 17 00:00:00 2001 From: Katie Stahl Date: Thu, 26 Sep 2024 12:45:37 -0400 Subject: [PATCH] test: add test case for get exon coordinates where genomic coord occurs between exons --- server/tests/integration/test_utilities.py | 26 ++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/server/tests/integration/test_utilities.py b/server/tests/integration/test_utilities.py index c027335b..8ff4b3a8 100644 --- a/server/tests/integration/test_utilities.py +++ b/server/tests/integration/test_utilities.py @@ -219,6 +219,32 @@ def check_coords_response(response: dict, expected_response: dict): check_coords_response, ) + # check correct response for genomic coordinate that occurs between exons (should get nearest junction) + await check_response( + "/api/utilities/get_exon?chromosome=NC_000001.11&end=154191900&transcript=NM_152263.3", + { + "coordinates_data": { + "gene": "TPM3", + "genomic_ac": "NC_000001.11", + "tx_ac": "NM_152263.3", + "seg_end": { + "exon_ord": 0, + "offset": 1, + "genomic_location": { + "type": "SequenceLocation", + "sequenceReference": { + "type": "SequenceReference", + "refgetAccession": "SQ.Ya6Rs7DHhDeg7YaOSg1EoNi3U_nQ9SvO", + }, + "start": 154191900, + }, + }, + "errors": [], + } + }, + check_coords_response, + ) + @pytest.mark.asyncio() async def test_get_sequence_id(check_response):