From 7fb17cf926b68152033e3a23b44e7b8d6495a1a6 Mon Sep 17 00:00:00 2001 From: korikuzma Date: Mon, 16 Oct 2023 17:56:11 -0400 Subject: [PATCH] more cleanup --- cool_seq_tool/mappers/mane_transcript.py | 9 ++++----- tests/mappers/test_mane_transcript.py | 2 +- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/cool_seq_tool/mappers/mane_transcript.py b/cool_seq_tool/mappers/mane_transcript.py index bc2d6cf1..285839ea 100644 --- a/cool_seq_tool/mappers/mane_transcript.py +++ b/cool_seq_tool/mappers/mane_transcript.py @@ -1038,7 +1038,7 @@ async def grch38_to_mane_p( ) -> Optional[Dict]: """Given genomic representation, return protein representation. Will try MANE Select - :param ac: Genomic RefSeq accession on GRCh38 + :param alt_ac: Genomic RefSeq accession on GRCh38 :param start_pos: Start position :param end_pos: End position :param gene: HGNC gene symbol @@ -1047,8 +1047,8 @@ async def grch38_to_mane_p( :param try_longest_compatible: `True` if should try longest compatible remaining if mane transcript(s) not compatible. `False` otherwise. :return: If successful, return MANE data or longest compatible remaining (if - `try_longest_compatible` set to `True`). Will return inter-residue - coordinates. + `try_longest_compatible` set to `True`) protein representation. Will return + inter-residue coordinates. """ # Step 1: Get MANE data to map to if gene: @@ -1058,8 +1058,7 @@ async def grch38_to_mane_p( alt_ac, start_pos, end_pos ) - len_mane_data = len(mane_data) - if not len_mane_data and not try_longest_compatible: + if not mane_data and not try_longest_compatible: return None # Step 2: Get inter-residue position diff --git a/tests/mappers/test_mane_transcript.py b/tests/mappers/test_mane_transcript.py index 7ccb86e4..cf5fb930 100644 --- a/tests/mappers/test_mane_transcript.py +++ b/tests/mappers/test_mane_transcript.py @@ -781,7 +781,7 @@ async def test_grch38_to_mane_p(test_mane_transcript, mybpc3_s236g): "refseq": "NP_001265045.1", "ensembl": "ENSP00000359077.1", "pos": (239, 258), - "status": TranscriptPriority.MANE_PLUS_CLINICAL, + "status": TranscriptPriority.MANE_SELECT, "strand": "-", "gene": "L1CAM", }