Ejemplo n.º 1
0
 def test_secmet(self):
     self.ref.cdses["A"].components["secmet"] = ["name1", "name2"]
     result = components.gather_reference_components(self.ref)
     assert result is self.ref._components is self.ref.get_component_data()
     assert components.gather_reference_components(self.ref) is result
     assert result.secmet == {"name1": 1, "name2": 1}
     assert not any([result.functions, result.nrps, result.pks])
Ejemplo n.º 2
0
 def test_pks(self):
     module1 = {
         "complete": True,
         "type": "pks",
         "domains": ["PKS_KS", "AT", "PP-binding"],
     }
     module2 = {
         "complete": False,
         "type": "pks",
         "domains": ["AT", "PP-binding"],
     }
     self.ref.cdses["A"].components["modules"] = [module1, module2]
     result = components.gather_reference_components(self.ref)
     assert result.pks == {tuple(module1["domains"]): 1}
     assert not any([result.functions, result.secmet, result.nrps])
Ejemplo n.º 3
0
 def test_function(self):
     self.ref.cdses["A"].function = "biosynthetic"
     result = components.gather_reference_components(self.ref)
     assert result.functions == {"biosynthetic": 1}
     assert not any([result.pks, result.secmet, result.nrps])
Ejemplo n.º 4
0
 def test_empty(self):
     result = components.gather_reference_components(self.ref)
     assert result is self.ref._components is self.ref.get_component_data()
     assert components.gather_reference_components(self.ref) is result
     assert result == components.Components({}, {}, {}, {})