pypath.utils.go.GOCustomAnnotation§
- class pypath.utils.go.GOCustomAnnotation(categories, go_annot=None, ncbi_tax_id=9606)[source]§
Bases:
Logger
- __init__(categories, go_annot=None, ncbi_tax_id=9606)[source]§
Provides annotations by a custom set of GO terms or expressions built from multiple terms.
- Parameters:
categories (dict) – A dict with custom category labels as keys and single GO terms or names or complex expressions as values. Alternatively a set of GO terms, in this case the term names will be used as labels.
go_annot (pypath.go.GOAnnotation) – A :class:
pypath.go.GOAnnotation
object.
Methods
__init__
(categories[, go_annot, ncbi_tax_id])Provides annotations by a custom set of GO terms or expressions built from multiple terms.
get_annotation
(category[, uniprots])For a category name returns a set of UniProt IDs annotated with the corresponding Gene Ontology terms or expression.
get_annotations
([uniprots])Returns a dict with set of UniProt IDs for each category.
Translates GO term names listed in categories to GO terms ACs.
reload
()Reloads the object from the module level.
- get_annotation(category, uniprots=None)[source]§
For a category name returns a set of UniProt IDs annotated with the corresponding Gene Ontology terms or expression.
- Parameters:
category (str) – The category name, should be a key in the
categories
dict.uniprots (set) – A set or list of UniProt IDs. If
None
, annotations based on all UniProts in GO annotation will be returned.