Provides concrete functionalities related to processing of Gene Ontology (GO) information as prior knowledge source.
Provides concrete implementation of Gene Ontology (GO) manager that manages individual GO terms as prior knowledge concepts. Also provides various constants specific for GO.
Internal KDVS symbol that refers to Biological Process (BP) domain of GO.
Internal KDVS symbol that refers to Molecular Function (MF) domain of GO.
Internal KDVS symbol that refers to Cellular Component (CC) domain of GO.
Descriptive identifiers for GO domains.
Symbols of GO domains recognized by KDVS.
Root terms of GO domains.
Mapping of recognized GO evidence codes: {code : description}.
Inverted mapping of recognized GO evidence codes: {description : code}.
KDVS–specific artificial ‘unknown evidence code’ used when non recognized evidence code is encountered.
Default inter–term relation recognized by KDVS.
Standard root tag of GO release encoded as OBO-XML file.
Return True if goid is valid GO term ID, False othwerwise.
Resolve numerical part of GO term ID into full GO term ID.
Parameters : | num : integer/string
|
---|---|
Returns : | termID : string
|
Raises : | Error :
|
Extract numerical part of full GO term ID.
Parameters : | goid : string
numint : boolean
|
---|---|
Returns : | num : integer/string
|
Bases: kdvs.fw.PK.PKCManager
Concrete prior knowledge manager that parses GO release encoded in OBO-XML file and keeps track of all individual GO terms (i.e. prior knowledge concepts). The following content is exposed through public attributes after load() method finishes successfully:
- terms – dictionary of individual term data
- synonyms – SetBDMap of synonymous terms
- termsPlainHierarchy – SetBDMap of term hierarchy {parent : children} independent of relations
- termsRelationsHierarchy – {relation_name : setBDMap} mapping of term hierarchies grouped by recognized relations
- obsolete_terms – iterable of obsolete terms IDs
- valid_terms – iterable of valid terms names IDs
- domain2validTerms – valid terms grouped by domains
Configure this manager.
Parameters : | domains : iterable of string/None
recognized_relations : iterable of string/None
|
---|
Read GO release from OBO-XML file and build all data structures. XML parsing is done with xml.etree.ElementTree (xml.etree.cElementTree if possible).
Parameters : | fh : file–like
root_tag : string/None
|
---|---|
Raises : | Error :
Error :
Error :
|
See also
Get PKC instance for specified concept ID (i.e. GO term ID). This method resolves synonymous GO terms.
Parameters : | conceptID : string
|
---|---|
Returns : | pkc : PriorKnowledgeConcept / None
|
Raises : | Warn :
|
Build dictionary dump of all the information produced by this manager, if possible in textual format, and return it. The dump dictionary contains representations of data structures keyed by the names of relevant public attributes. For bi–directional mappings, forward and backward parts are separated into ‘fwd’ and ‘bwd’ subkeyed parts.
Get recognized synonymous term IDs for specified GO term ID.
Parameters : | termID : string
|
---|---|
Returns : | synonyms : iterable of string / None
|
Follow term hierarchy and return descendant terms for specified GO term ID. Optionally, return numerical depth information.
Parameters : | parentTermID : string
depth : boolean
|
---|---|
Returns : | descendants : iterable of string
descendants_with_depth : iterable of (string, int) tuples
|
Follow term hierarchy and return ancestor terms for specified GO term ID. Optionally, return numerical depth information.
Parameters : | childTermID : string
depth : boolean
|
---|---|
Returns : | ancestors : iterable of string
ancestors_with_depth : iterable of (string, int) tuples
|