goatools.mapslim module¶
Maps gene associations to a ‘slim’ ontology.
This roughly implements the functionality of the perl script map2slim. See: [http://search.cpan.org/~cmungall/go-perl/scripts/map2slim]
For a description of GO Slims look here: http://geneontology.org/GO.slims.shtml
For now this does not implement Bucket Terms.
- goatools.mapslim.mapslim(go_term, go_dag, goslim_dag)[source]¶
Maps a GO term (accession) to it’s GO slim terms.
Parameters: - go_term: the accession to be mapped to the slim terms - go_dag: the (full) Gene Ontology DAG - goslim_dag: the GO Slim DAG
- Returns:
direct_ancestors, all_ancestors
- Return type:
Two sets
- direct_ancestors: The direct ancestors of the given term that are in
the GO Slim. Those are the terms that are not covered by earlier ancestors of the GO Slims in _any_ path (from bottom to top).
- all_ancestors: All ancestors of the given term that are part of
the GO-Slim terms.