Skip to content

Commit

Permalink
more cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
korikuzma committed Oct 16, 2023
1 parent 3d4c54e commit 7fb17cf
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
9 changes: 4 additions & 5 deletions cool_seq_tool/mappers/mane_transcript.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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:
Expand All @@ -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
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 @@ -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",
}
Expand Down

0 comments on commit 7fb17cf

Please sign in to comment.