GOTerm
A GOTerm object represents a single term in the Gene Ontology.
Fields:
Field |
Type |
Description |
|---|---|---|
id |
str |
GO term identifier (e.g., |
name |
str |
Human-readable name (e.g., |
namespace |
str |
Ontology namespace ( |
definition |
str |
Textual definition of the term |
parents |
list[str] |
List of parent GO term IDs (is_a relationships) |
children |
list[str] |
List of child GO term IDs (is_a relationships) |
depth |
int or None |
Maximum distance to a root term (None if not computed) |
level |
int or None |
Minimum distance to a root term (None if not computed) |
is_obsolete |
bool |
True if the term is obsolete |
alt_ids |
list[str] |
Alternative GO IDs for this term |
replaced_by |
str or None |
If obsolete, the term that replaces this one |
consider |
list[str] |
Suggested replacement terms if obsolete |
synonyms |
list[str] |
List of synonyms |
xrefs |
list[str] |
Cross-references to other databases |
relationships |
list[(str, str)] |
Other relationships (e.g., |
comment |
str or None |
Additional comments |
- 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
import go3
go3.load_go_terms()
term = go3.get_term_by_id("GO:0006397")
print(term.name)
print(term.parents)