generated from fastai/nbdev_template
-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
24 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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() |