Beispiel #1
0
 def declare_entities(self, model):
     uri = model.declare_individual("GO:0032991")
     model.writer.writer.graph.add((uri, RDFS.label, Literal(str(self.name))))
     for entity in self.entities:
         entity_full_id = NamingConvention.full_id(entity)
         entity_uri = model.declare_individual(entity_full_id)
         part_of_stmt = model.writer.emit(uri, HAS_PART, entity_uri)
         model.add_axiom(part_of_stmt)
         "uri BFO:0000051 entity_uri"
     return uri
Beispiel #2
0
 def uri_in_model(self, model):
     graph = model.writer.writer.graph
     complex_term = "GO:0032991"
     complex_uris = model.uri_list_for_individual(complex_term)
     for c_uri in complex_uris:
         found_entities = [] # Collect connected entities for set comparison
         for entity in self.entities:
             for entity_uri in model.uri_list_for_individual(NamingConvention.full_id(entity)):
                 if (c_uri, HAS_PART, entity_uri) in graph:
                     found_entities.append(entity)
         if set(self.entities) == set(found_entities):
             print(c_uri)
             return c_uri
Beispiel #3
0
 def full_id_b(self):
     return NamingConvention.full_id(self.id_b)