Term
- class pyobo.Term(reference, definition=None, provenance=<factory>, relationships=<factory>, properties=<factory>, parents=<factory>, synonyms=<factory>, xrefs=<factory>, xref_types=<factory>, alt_ids=<factory>, namespace=None, is_obsolete=None)[source]
Bases:
Referenced
A term in OBO.
Attributes Summary
A description of the entity
An annotation for obsolescence.
The sub-namespace within the ontology
Methods Summary
append_alt
(alt)Add an alternative identifier.
append_parent
(reference)Add a parent to this entity.
append_property
(prop, value)Append a property.
append_provenance
(reference)Add a provenance reference.
append_relationship
(typedef, reference)Append a relationship.
append_synonym
(synonym[, type])Add a synonym.
append_xref
(reference)Append an xref.
auto
(prefix, identifier)Create a term from a reference.
extend_parents
(references)Add a collection of parents to this entity.
extend_relationship
(typedef, references)Append several relationships.
from_curie
(curie[, name])Create a term directly from a CURIE and optional name.
from_triple
(prefix, identifier[, name, ...])Create a term from a reference.
get_properties
(prop)Get properties from the given key.
get_property
(prop)Get a single property of the given key.
get_relationship
(typedef)Get a single relationship of the given type.
get_relationships
(typedef)Get relationships from the given type.
get_species
([prefix])Get the species if it exists.
get_url
()Return a URL for this term's reference, if possible.
iterate_obo_lines
([write_relation_comments])Iterate over the lines to write in an OBO file.
Iterate over pairs of property and values.
Iterate over pairs of typedefs and targets.
set_species
(identifier[, name])Append the from_species relation.
Attributes Documentation
-
is_obsolete:
Optional
[bool
] = None An annotation for obsolescence. By default, is None, but this means that it is not obsolete.
Methods Documentation
- classmethod from_curie(curie, name=None)[source]
Create a term directly from a CURIE and optional name.
- Return type:
- classmethod from_triple(prefix, identifier, name=None, definition=None)[source]
Create a term from a reference.
- Return type:
- iterate_obo_lines(write_relation_comments=True)[source]
Iterate over the lines to write in an OBO file.
-
is_obsolete: