Skip to content

Commit 32c6f9b

Browse files
authored
fix(docs): Update get_genomic_tx_data function (#445)
closes #443
1 parent 357090c commit 32c6f9b

File tree

5 files changed

+29
-10
lines changed

5 files changed

+29
-10
lines changed

src/cool_seq_tool/mappers/mane_transcript.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -324,7 +324,7 @@ async def _get_and_validate_genomic_tx_data(
324324
"""Get and validate genomic_tx_data
325325
326326
:param tx_ac: Accession on c. coordinate
327-
:param pos: (start pos, end pos)
327+
:param pos: (start pos, end pos). These are inter-residue coordinates
328328
:param annotation_layer: Annotation layer for ``ac`` and ``pos``
329329
:param coding_start_site: Coding start site
330330
:param alt_ac: Accession on g. coordinate

src/cool_seq_tool/sources/uta_database.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -621,7 +621,8 @@ async def get_genomic_tx_data(
621621
"""Get transcript mapping to genomic data.
622622
623623
:param tx_ac: Accession on c. coordinate
624-
:param pos: (start pos, end pos)
624+
:param pos: (start pos, end pos). These must describe the inter-residue
625+
coordinates that are being examined.
625626
:param annotation_layer: Annotation layer for ``ac`` and ``pos``
626627
:param alt_ac: Accession on g. coordinate
627628
:param target_genome_assembly: Genome assembly to get genomic data for.

tests/mappers/test_mane_transcript.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ def braf_mane_data():
3232
"""Create test fixture for BRAF MANE data."""
3333
return {
3434
"#NCBI_GeneID": "GeneID:673",
35-
"Ensembl_Gene": "ENSG00000157764.14",
35+
"Ensembl_Gene": "ENSG00000157764.16",
3636
"HGNC_ID": "HGNC:1097",
3737
"symbol": "BRAF",
3838
"name": "B-Raf proto-oncogene, serine/threonine kinase",

tests/sources/test_mane_transcript_mappings.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ def braf_select():
1313
"""Create test fixture for BRAF MANE Select Transcript data."""
1414
return {
1515
"#NCBI_GeneID": "GeneID:673",
16-
"Ensembl_Gene": "ENSG00000157764.14",
16+
"Ensembl_Gene": "ENSG00000157764.16",
1717
"HGNC_ID": "HGNC:1097",
1818
"symbol": "BRAF",
1919
"name": "B-Raf proto-oncogene, serine/threonine kinase",
@@ -34,7 +34,7 @@ def braf_plus_clinical():
3434
"""Create test fixture for BRAF MANE Plus Clinical data."""
3535
return {
3636
"#NCBI_GeneID": "GeneID:673",
37-
"Ensembl_Gene": "ENSG00000157764.14",
37+
"Ensembl_Gene": "ENSG00000157764.16",
3838
"HGNC_ID": "HGNC:1097",
3939
"symbol": "BRAF",
4040
"name": "B-Raf proto-oncogene, serine/threonine kinase",
@@ -55,7 +55,7 @@ def ercc6_plus_clinical():
5555
"""Create test fixture for ERCC6 MANE Plus Clinical Transcript data."""
5656
return {
5757
"#NCBI_GeneID": "GeneID:2074",
58-
"Ensembl_Gene": "ENSG00000225830.16",
58+
"Ensembl_Gene": "ENSG00000225830.18",
5959
"HGNC_ID": "HGNC:3438",
6060
"symbol": "ERCC6",
6161
"name": "ERCC excision repair 6, chromatin remodeling factor",
@@ -76,7 +76,7 @@ def ercc6_select():
7676
"""Create test fixture for ERCC6 MANE Select Transcript data."""
7777
return {
7878
"#NCBI_GeneID": "GeneID:2074",
79-
"Ensembl_Gene": "ENSG00000225830.16",
79+
"Ensembl_Gene": "ENSG00000225830.18",
8080
"HGNC_ID": "HGNC:3438",
8181
"symbol": "ERCC6",
8282
"name": "ERCC excision repair 6, chromatin remodeling factor",

tests/sources/test_uta_database.py

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,25 @@ async def test_mane_c_genomic_data(test_db):
202202
@pytest.mark.asyncio
203203
async def test_get_genomic_tx_data(test_db, genomic_tx_data):
204204
"""Test that get_genomic_tx_data works correctly."""
205-
resp = await test_db.get_genomic_tx_data("NM_004333.4", (2145, 2145))
205+
# Positive strand transcript
206+
resp = await test_db.get_genomic_tx_data("NM_004327.3", (3595, 3596))
207+
expected_params = {
208+
"gene": "BCR",
209+
"strand": Strand.POSITIVE,
210+
"tx_pos_range": (3476, 3608),
211+
"alt_pos_range": (23295023, 23295155),
212+
"alt_aln_method": "splign",
213+
"tx_exon_id": 956565,
214+
"alt_exon_id": 6619783,
215+
"tx_ac": "NM_004327.3",
216+
"alt_ac": "NC_000022.11",
217+
"pos_change": (119, 12),
218+
"alt_pos_change_range": (23295142, 23295143),
219+
}
220+
assert resp == GenomicTxMetadata(**expected_params)
221+
222+
# Negative strand transcript
223+
resp = await test_db.get_genomic_tx_data("NM_004333.4", (2144, 2145))
206224
expected_params = {
207225
"gene": "BRAF",
208226
"strand": Strand.NEGATIVE,
@@ -213,8 +231,8 @@ async def test_get_genomic_tx_data(test_db, genomic_tx_data):
213231
"alt_exon_id": 6619852,
214232
"tx_ac": "NM_004333.4",
215233
"alt_ac": "NC_000007.14",
216-
"pos_change": (92, 43),
217-
"alt_pos_change_range": (140739854, 140739854),
234+
"pos_change": (91, 43),
235+
"alt_pos_change_range": (140739855, 140739854),
218236
}
219237
assert resp == GenomicTxMetadata(**expected_params)
220238

0 commit comments

Comments
 (0)