Skip to content

Commit d70c96c

Browse files
committed
Support conversion from ter --> *
1 parent cb91f20 commit d70c96c

2 files changed

Lines changed: 3 additions & 1 deletion

File tree

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)