diff --git a/src/cool_seq_tool/mappers/mane_transcript.py b/src/cool_seq_tool/mappers/mane_transcript.py index ea2a6b2..94c2d76 100644 --- a/src/cool_seq_tool/mappers/mane_transcript.py +++ b/src/cool_seq_tool/mappers/mane_transcript.py @@ -324,7 +324,7 @@ async def _get_and_validate_genomic_tx_data( """Get and validate genomic_tx_data :param tx_ac: Accession on c. coordinate - :param pos: (start pos, end pos) + :param pos: (start pos, end pos). These are inter-residue coordinates :param annotation_layer: Annotation layer for ``ac`` and ``pos`` :param coding_start_site: Coding start site :param alt_ac: Accession on g. coordinate diff --git a/src/cool_seq_tool/sources/uta_database.py b/src/cool_seq_tool/sources/uta_database.py index 724ed40..2f15fb4 100644 --- a/src/cool_seq_tool/sources/uta_database.py +++ b/src/cool_seq_tool/sources/uta_database.py @@ -621,7 +621,8 @@ async def get_genomic_tx_data( """Get transcript mapping to genomic data. :param tx_ac: Accession on c. coordinate - :param pos: (start pos, end pos) + :param pos: (start pos, end pos). These must describe the inter-residue + coordinates that are being examined. :param annotation_layer: Annotation layer for ``ac`` and ``pos`` :param alt_ac: Accession on g. coordinate :param target_genome_assembly: Genome assembly to get genomic data for. diff --git a/tests/mappers/test_mane_transcript.py b/tests/mappers/test_mane_transcript.py index df439be..0bcf357 100644 --- a/tests/mappers/test_mane_transcript.py +++ b/tests/mappers/test_mane_transcript.py @@ -32,7 +32,7 @@ def braf_mane_data(): """Create test fixture for BRAF MANE data.""" return { "#NCBI_GeneID": "GeneID:673", - "Ensembl_Gene": "ENSG00000157764.14", + "Ensembl_Gene": "ENSG00000157764.16", "HGNC_ID": "HGNC:1097", "symbol": "BRAF", "name": "B-Raf proto-oncogene, serine/threonine kinase", diff --git a/tests/sources/test_mane_transcript_mappings.py b/tests/sources/test_mane_transcript_mappings.py index f0e51be..4af38c5 100644 --- a/tests/sources/test_mane_transcript_mappings.py +++ b/tests/sources/test_mane_transcript_mappings.py @@ -13,7 +13,7 @@ def braf_select(): """Create test fixture for BRAF MANE Select Transcript data.""" return { "#NCBI_GeneID": "GeneID:673", - "Ensembl_Gene": "ENSG00000157764.14", + "Ensembl_Gene": "ENSG00000157764.16", "HGNC_ID": "HGNC:1097", "symbol": "BRAF", "name": "B-Raf proto-oncogene, serine/threonine kinase", @@ -34,7 +34,7 @@ def braf_plus_clinical(): """Create test fixture for BRAF MANE Plus Clinical data.""" return { "#NCBI_GeneID": "GeneID:673", - "Ensembl_Gene": "ENSG00000157764.14", + "Ensembl_Gene": "ENSG00000157764.16", "HGNC_ID": "HGNC:1097", "symbol": "BRAF", "name": "B-Raf proto-oncogene, serine/threonine kinase", @@ -55,7 +55,7 @@ def ercc6_plus_clinical(): """Create test fixture for ERCC6 MANE Plus Clinical Transcript data.""" return { "#NCBI_GeneID": "GeneID:2074", - "Ensembl_Gene": "ENSG00000225830.16", + "Ensembl_Gene": "ENSG00000225830.18", "HGNC_ID": "HGNC:3438", "symbol": "ERCC6", "name": "ERCC excision repair 6, chromatin remodeling factor", @@ -76,7 +76,7 @@ def ercc6_select(): """Create test fixture for ERCC6 MANE Select Transcript data.""" return { "#NCBI_GeneID": "GeneID:2074", - "Ensembl_Gene": "ENSG00000225830.16", + "Ensembl_Gene": "ENSG00000225830.18", "HGNC_ID": "HGNC:3438", "symbol": "ERCC6", "name": "ERCC excision repair 6, chromatin remodeling factor", diff --git a/tests/sources/test_uta_database.py b/tests/sources/test_uta_database.py index 7f96c78..c077320 100644 --- a/tests/sources/test_uta_database.py +++ b/tests/sources/test_uta_database.py @@ -202,7 +202,25 @@ async def test_mane_c_genomic_data(test_db): @pytest.mark.asyncio async def test_get_genomic_tx_data(test_db, genomic_tx_data): """Test that get_genomic_tx_data works correctly.""" - resp = await test_db.get_genomic_tx_data("NM_004333.4", (2145, 2145)) + # Positive strand transcript + resp = await test_db.get_genomic_tx_data("NM_004327.3", (3595, 3596)) + expected_params = { + "gene": "BCR", + "strand": Strand.POSITIVE, + "tx_pos_range": (3476, 3608), + "alt_pos_range": (23295023, 23295155), + "alt_aln_method": "splign", + "tx_exon_id": 956565, + "alt_exon_id": 6619783, + "tx_ac": "NM_004327.3", + "alt_ac": "NC_000022.11", + "pos_change": (119, 12), + "alt_pos_change_range": (23295142, 23295143), + } + assert resp == GenomicTxMetadata(**expected_params) + + # Negative strand transcript + resp = await test_db.get_genomic_tx_data("NM_004333.4", (2144, 2145)) expected_params = { "gene": "BRAF", "strand": Strand.NEGATIVE, @@ -213,8 +231,8 @@ async def test_get_genomic_tx_data(test_db, genomic_tx_data): "alt_exon_id": 6619852, "tx_ac": "NM_004333.4", "alt_ac": "NC_000007.14", - "pos_change": (92, 43), - "alt_pos_change_range": (140739854, 140739854), + "pos_change": (91, 43), + "alt_pos_change_range": (140739855, 140739854), } assert resp == GenomicTxMetadata(**expected_params)