From 26d845a19673c0b0e02450e504923708128658ae Mon Sep 17 00:00:00 2001 From: Jeremy Arbesfeld Date: Wed, 16 Oct 2024 09:53:27 -0400 Subject: [PATCH] Check if start and end bounds an exon --- src/dcd_mapping/lookup.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/dcd_mapping/lookup.py b/src/dcd_mapping/lookup.py index c0d5a4d..ad1e0c6 100644 --- a/src/dcd_mapping/lookup.py +++ b/src/dcd_mapping/lookup.py @@ -186,7 +186,8 @@ async def get_transcripts( SELECT tx_ac FROM {uta.schema}.tx_exon_aln_v WHERE hgnc = '{gene_symbol}' - AND ({start} BETWEEN alt_start_i AND alt_end_i OR {end} BETWEEN alt_start_i AND alt_end_i) + AND ({start} BETWEEN alt_start_i AND alt_end_i OR {end} BETWEEN alt_start_i AND + alt_end_i OR (alt_start_i >= {start} AND alt_end_i <= {end})) AND alt_ac = '{chromosome_ac}' AND tx_ac NOT LIKE 'NR_%'; """ # noqa: S608