GOTerm Object¶
A PyGOTerm represents one term in the loaded Gene Ontology.
Main fields¶
Field |
Type |
Description |
|---|---|---|
|
|
GO identifier (for example |
|
|
Human-readable label |
|
|
One of |
|
|
GO definition text |
|
|
Immediate |
|
|
Immediate |
|
|
Maximum distance to root |
|
|
Minimum distance to root |
|
|
Obsolescence flag |
|
|
Alternate GO IDs |
|
|
Suggested canonical replacement for obsolete terms |
|
|
Alternative replacements |
|
|
Synonym strings |
|
|
Cross-references |
|
|
Additional relationships (for example |
|
|
GO comment field |
Example¶
import go3
go3.load_go_terms("go-basic.obo")
term = go3.get_term_by_id("GO:0006397")
print(term.id)
print(term.name)
print(term.namespace)
print(term.parents[:5])
API reference¶
- class PyGOTerm¶
Bases:
objectPython-exposed struct representing a GO term (for use in the Python API).
Fields¶
- idstr
GO term identifier.
- namestr
Human-readable name of the term.
- namespacestr
Ontology namespace.
- definitionstr
Textual definition of the term.
- parentslist of str
List of parent GO term IDs.
- childrenlist of str
List of child GO term IDs.
- depthOptional[int]
Maximum distance to a root term.
- levelOptional[int]
Minimum distance to a root term.
- is_obsoletebool
True if the term is obsolete.
- alt_idslist of str
Alternative GO IDs for this term.
- replaced_byOptional[str]
If obsolete, the term that replaces this one.
- considerlist of str
Suggested replacement terms if obsolete.
- synonymslist of str
List of synonyms.
- xrefslist of str
Cross-references to other databases.
- relationshipslist of (str, str)
Other relationships (e.g., part_of).
- commentOptional[str]
Additional comments.
- alt_ids¶
- children¶
- comment¶
- consider¶
- definition¶
- depth¶
- id¶
- is_obsolete¶
- level¶
- name¶
- namespace¶
- parents¶
- relationships¶
- replaced_by¶
- synonyms¶
- xrefs¶