Ejemplo n.º 1
0
 def test_prediction_with_core_class2(self, _patched_rodeo):
     # the cleavage result adjusted to leave at least one amino in core
     cleavage_result = CleavageSiteHit(end=40, score=-6.8, lantype="Class-II")
     with patch.object(lanthi, "predict_cleavage_site", return_value=cleavage_result):
         results = run_lanthipred(DummyRecord(features=[self.cds]),
                                  self.cds, "Class-II", self.domains)
     assert results is not None
     assert str(results).startswith("Lanthipeptide(..40, -6.8, 'Class-II', 'LSQGLGGC', 1, 715")
Ejemplo n.º 2
0
    def test_prediction_with_no_core(self):
        # the real cleavage site result (+1 at end for the C)
        cleavage_result = CleavageSiteHit(end=48,
                                          score=-6.8,
                                          lantype="Class-II")
        mock("lanthi.predict_cleavage_site", returns=cleavage_result)

        for part in ["I", "II"]:
            assert run_lanthipred(None, self.cds, "Class-%s" % part,
                                  self.domains) is None
Ejemplo n.º 3
0
 def test_prediction_with_core_class1(self):
     # the cleavage result adjusted to leave at least one amino in core
     cleavage_result = CleavageSiteHit(end=40,
                                       score=-6.8,
                                       lantype="Class-I")
     mock("lanthi.predict_cleavage_site", returns=cleavage_result)
     results = run_lanthipred(DummyRecord(features=[self.cds]), self.cds,
                              "Class-I", self.domains)
     assert results
     assert str(results).startswith(
         "Lanthipeptide(..40, -6.8, 'Class-I', 'LSQGLGGC', 1, 715")
Ejemplo n.º 4
0
 def test_prediction_with_no_core(self, _patched_rodeo):
     # the real cleavage site result (+1 at end for the C)
     cleavage_result = CleavageSiteHit(end=48,
                                       score=-6.8,
                                       lantype="Class-II")
     with patch.object(lanthi,
                       "predict_cleavage_site",
                       return_value=cleavage_result):
         for part in ["I", "II"]:
             assert run_lanthipred(None, self.cds, "Class-%s" % part,
                                   self.domains) is None
Ejemplo n.º 5
0
 def test_prediction_with_core(self):
     # the cleavage result adjusted to leave at least one amino in core
     cleavage_result = CleavageSiteHit(start=38,
                                       end=40,
                                       score=-6.8,
                                       lantype="Class-II")
     mock("lanthi.predict_cleavage_site", returns=cleavage_result)
     for part in ["I", "II"]:
         results = run_lanthipred(DummyRecord(features=[self.cds]),
                                  self.cds, "Class-%s" % part, self.domains)
         assert results is not None