Skip to content

Commit 1f2da41

Browse files
authored
Merge pull request #67 from cancervariants/issue-66
Support conversion from ter --> *
2 parents cb91f20 + d70c96c commit 1f2da41

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

variant/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import os
44
import logging
55

6-
__version__ = "0.1.4"
6+
__version__ = "0.1.5"
77

88
APP_ROOT = Path(__file__).resolve().parents[0]
99

variant/tokenizers/caches/amino_acid_cache.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@ def _convert_three_to_one(self, three_letter_amino_acid):
3636
:param str three_letter_amino_acid: Amino Acid Code to convert
3737
:return: A str of the one letter amino acid code
3838
"""
39+
if three_letter_amino_acid.upper() == 'TER':
40+
return '*'
3941
for one_letter, three_letter in self._amino_acid_code_conversion.items(): # noqa: E501
4042
if three_letter.upper() == three_letter_amino_acid.upper():
4143
return one_letter.upper()

0 commit comments

Comments
 (0)