Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/cool_seq_tool/mappers/mane_transcript.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion src/cool_seq_tool/sources/uta_database.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion tests/mappers/test_mane_transcript.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
8 changes: 4 additions & 4 deletions tests/sources/test_mane_transcript_mappings.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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",
Expand All @@ -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",
Expand All @@ -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",
Expand Down
24 changes: 21 additions & 3 deletions tests/sources/test_uta_database.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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)

Expand Down