Skip to content

Commit

Permalink
addede tests for msfragger modstring
Browse files Browse the repository at this point in the history
  • Loading branch information
picciama committed Nov 9, 2023
1 parent 0c8dc0f commit e024c59
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions tests/unit_tests/test_mod_string.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,25 @@ def test_maxquant_to_internal_silac(self):
)


class TestMSFraggerToInternal(unittest.TestCase):
"""Class to test MSFragger to internal."""

def test_msfragger_to_internal_carbamidomethylation(self):
"""Test msfragger_to_internal_carbamidomethylation."""
self.assertEqual(mod.msfragger_to_internal(["ABCDEFGH"]), ["ABC[UNIMOD:4]DEFGH"])

def test_msfragger_to_internal_variable_oxidation(self):
"""Test msfragger_to_internal_variable_oxidation."""
self.assertEqual(mod.msfragger_to_internal(["ABCDM[147]EFGH"]), ["ABC[UNIMOD:4]DM[UNIMOD:35]EFGH"])

def test_msfragger_to_internal_tmt(self):
"""Test msfragger_to_internal_tmt."""
fixed_mods = {"C": "C[UNIMOD:4]", r"n[\d+]": "[UNIMOD:737]-", "K": "K[UNIMOD:737]"}
self.assertEqual(
mod.msfragger_to_internal(["n[230]ABCDEFGHK"], fixed_mods), ["[UNIMOD:737]-ABC[UNIMOD:4]DEFGHK[UNIMOD:737]"]
)


class TestInternalToSpectronaut(unittest.TestCase):
"""Class to test Internal to Spectronaut."""

Expand Down

0 comments on commit e024c59

Please sign in to comment.