1
2
4 '''
5 Represents all L{ElementAnnotations}s (each contains a list of L{Annotation}s)
6 functions that operate on multiple L{ElementAnnotations}s
7 '''
9 '''
10 Read the SBML file elements that could be annoated.
11 Elements are stored as L{ElementAnnotations}s
12 @param suppress_errors:
13 @type suppress_errors: bool
14 '''
15 self._annotationElements = [ElementAnnotations(x) for x in list_of_annotations]
16 self.libsbml_model = None
17 self.libsbml_document = None
18
20 '''
21 return a list of L{ElementAnnotations} that can contain MIRIAM annotations
22 @return: return all annotatable elements of the model
23 @rtype: [L{ElementAnnotations}]
24 '''
25 return self._annotationElements
26
29 self._annotations = annotations
30 self.libsbml_element = FakeLibsbmlElement(annotations[0].id)
31 self.type = 'species'
33 return self._annotations
34
37 self.id = id
38 self.name = name or id
45
48 self.db = db
49 self.id = id
50 self.qualifier = qualifier
51
52 if __name__ == "__main__":
53 import cluster
54 cluster.similarity_measure_version = 4
55 cluster.apply_caching = False
56 da=cluster.DatabaseAnnotation()
57 da.load_from_path("curated/")
58 ma = cluster.ModelAnnotation(ModelElementsAnnotations([[Annotation("ChEBI","CHEBI:17234","is")],
59 [Annotation("ChEBI","CHEBI:4170","is")],
60 [Annotation("ChEBI","CHEBI:28013","is")],
61 [Annotation("ChEBI","CHEBI:16108","is")],
62 [Annotation("KEGG Compound","C00197","is")],
63 [Annotation("KEGG Compound","C00031","is")]
64 ]),"current query")
65 ma = cluster.ModelAnnotation(ModelElementsAnnotations([[Annotation("KEGG Compound","C00002","is")
66 ]]),"current query")
67 print da.compare_model_annotation_object(ma)
68
69