Skip to content

Commit

Permalink
change default behavior of ProteinConfig
Browse files Browse the repository at this point in the history
  • Loading branch information
andrasmatyassy committed Sep 25, 2024
1 parent e27fe4d commit 0fcba6a
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion CodonTransformer/CodonUtils.py
Original file line number Diff line number Diff line change
Expand Up @@ -667,7 +667,7 @@ def reset_config(self) -> None:
Reset the configuration to the default values.
"""
self._config = {
'ambiguous_aminoacid_behavior': 'raise_error',
'ambiguous_aminoacid_behavior': 'standardize_random',
'ambiguous_aminoacid_map_override': {}
}

Expand Down
1 change: 1 addition & 0 deletions tests/test_CodonData.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
class TestCodonData(unittest.TestCase):
def test_preprocess_protein_sequence(self):
with ProteinConfig() as config:
config.set("ambiguous_aminoacid_behavior", "raise_error")
protein = "Z_"
try:
preprocess_protein_sequence(protein)
Expand Down
2 changes: 1 addition & 1 deletion tests/test_CodonUtils.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ def test_config_manager(self):
with ProteinConfig() as config:
self.assertEqual(
config.get("ambiguous_aminoacid_behavior"),
"raise_error"
"standardize_random"
)
self.assertEqual(
config.get("ambiguous_aminoacid_map_override"),
Expand Down

0 comments on commit 0fcba6a

Please sign in to comment.