Beispiel #1
0
 def test_module_for_orphans(self):
     for name in [
             NRPS_START, NRPS_LOAD, PKS_START, PKS_LOAD, "cMT", "ACP",
             "Trans-AT_docking"
     ]:
         modules = build_modules_for_cds([DummyHMMResult(name)],
                                         [DummyHMMResult("")])
         assert len(modules) == 1
         assert not modules[0].is_complete()
Beispiel #2
0
 def test_starters(self):
     for domain_type in [NRPS_LOAD, PKS_LOAD]:
         domains = [DummyHMMResult(i) for i in [domain_type, "ACP", domain_type, "ACP"]]
         modules = build_modules_for_cds(domains, [])
         print(modules)
         assert len(modules) == 2
         assert modules[0]._first_in_cds
         assert modules[0].is_complete()
         assert not modules[1]._first_in_cds
         print(modules[1], modules[1].is_complete())
         print(modules[1]._starter, modules[1]._loader, modules[1]._carrier_protein, modules[1]._starter is modules[1]._loader)
         assert not modules[1].is_complete()
Beispiel #3
0
 def test_bad_add_makes_new_module(self):
     modules = build_modules_for_cds([DummyHMMResult(NRPS_LOAD)] * 2, [])
     assert len(modules) == 2
     assert not modules[0].is_complete()
Beispiel #4
0
 def test_module_for_each_starter(self):
     modules = build_modules_for_cds([
         DummyHMMResult("Condensation_DCL"),
         DummyHMMResult("Condensation_LCL")
     ], [])
     assert len(modules) == 2
Beispiel #5
0
 def test_unclassifiable(self):
     with self.assertRaisesRegex(ValueError, "could not classify domain"):
         build_modules_for_cds([DummyHMMResult("UNCLASSIFIABLE")], [])
Beispiel #6
0
 def test_no_empties(self):
     assert build_modules_for_cds([], []) == []
     assert build_modules_for_cds([DummyHMMResult("ACPS")], []) == []
Beispiel #7
0
 def test_mismatching_ks_subtypes(self):
     with self.assertRaises(StopIteration):
         build_modules_for_cds([DummyHMMResult(PKS_START)], [])