Skip to content

Commit

Permalink
tests: proteolytic_cleavage
Browse files Browse the repository at this point in the history
  • Loading branch information
ibludau committed Jan 22, 2024
1 parent c9b593e commit 61447c0
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
1 change: 1 addition & 0 deletions tests/run_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,6 @@ python -m unittest test_preprocessing
python -m unittest test_sequenceplot
python -m unittest test_uniprot_integration
python -m unittest test_organisms_data
python -m unittest test_proteolytic_cleavage
python -m unittest test_gui
conda deactivate
23 changes: 23 additions & 0 deletions tests/test_proteolytic_cleavage.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#!python -m unittest tests.test_utils
"""This module provides unit tests for alphamap.cli."""

# builtin
import unittest
import numpy as np

# local
from alphamap.proteolytic_cleavage import get_cleavage_sites

class TestProteolytic(unittest.TestCase):
def test_get_cleavage_sites(self, ):
cleavage_sites = get_cleavage_sites("PEPTIDERANGEKATRAT", "trypsin")
np.testing.assert_equal(cleavage_sites, [7, 12, 15])
cleavage_sites2 = get_cleavage_sites("PEPTIDERANGEKATRAT", "lysc")
np.testing.assert_equal(cleavage_sites2, [12])
cleavage_sites3 = get_cleavage_sites("PEPTIDERANGEKATRAT", "caspase 2")
np.testing.assert_equal(cleavage_sites3, [])
cleavage_sites4 = get_cleavage_sites("PEPVDVADTIDE", "caspase 2")
np.testing.assert_equal(cleavage_sites4, [7])

if __name__ == "__main__":
unittest.main()

0 comments on commit 61447c0

Please sign in to comment.