Skip to content

Commit

Permalink
fixed black formatting and failing test
Browse files Browse the repository at this point in the history
  • Loading branch information
veenarajaraman committed Sep 28, 2023
1 parent e781234 commit 6144de7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
4 changes: 1 addition & 3 deletions src/bioutils/sequences.py
Original file line number Diff line number Diff line change
Expand Up @@ -231,8 +231,6 @@
dna_to_aa1_vmito["TGA"] = "W"




complement_transtable = bytes.maketrans(b"ACGT", b"TGCA")


Expand Down Expand Up @@ -518,7 +516,7 @@ class TranslationTable(StrEnum):

standard = "standard"
selenocysteine = "sec"
vertebrate_mitochondrial = 'vmito'
vertebrate_mitochondrial = "vmito"


def translate_cds(seq, full_codons=True, ter_symbol="*", translation_table=TranslationTable.standard):
Expand Down
3 changes: 2 additions & 1 deletion tests/test_sequences.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,11 @@ def test_translate_selenoproteins():
with pytest.raises(ValueError):
translate_cds("AUGTGATA", translation_table=TranslationTable.selenocysteine)


def test_translate_vertebrate_mitochondrial():
"""unit test for vertebrate mitochondrial codons"""
assert translate_cds("AUGTGATAA") == "M**"
assert translate_cds("ATATGAAGGAGA", translation_table=TranslationTable.standard) == "MW**"
assert translate_cds("ATATGAAGGAGA", translation_table=TranslationTable.vertebrate_mitochondrial) == "MW**"
assert (
translate_cds(
"ATAAG",
Expand Down

0 comments on commit 6144de7

Please sign in to comment.