Term
- class Term(reference, definition=None, relationships=<factory>, _axioms=<factory>, properties=<factory>, parents=<factory>, intersection_of=<factory>, union_of=<factory>, equivalent_to=<factory>, disjoint_from=<factory>, synonyms=<factory>, xrefs=<factory>, namespace=None, is_obsolete=None, type='Term', builtin=None, is_anonymous=None, subsets=<factory>)[source]
Bases:
StanzaA term in OBO.
Attributes Summary
A description of the entity
An annotation for obsolescence.
The sub-namespace within the ontology
Relationships with the default "is_a"
The primary reference for the entity
Object properties
Synonyms of this term
Database cross-references, see
get_mappings()for access to all mappings in an SSSOM-like interfaceMethods Summary
append_broad_match(reference, *[, ...])Append a broad match, also adding an xref.
append_exact_match(reference, *[, ...])Append an exact match, also adding a cross-reference.
append_narrow_match(reference, *[, ...])Append a narrow match, also adding an xref.
append_related_match(reference, *[, ...])Append a related match, also adding an xref.
append_see_also_uri(uri)Add a see also property.
default(prefix, identifier[, name])Create a default term.
extend_parents(references)Add a collection of parents to this entity.
extend_relationship(typedef, references)Append several relationships.
from_triple(prefix, identifier[, name, ...])Create a term from a reference.
get_property(prop)Get a single property of the given key.
get_property_literals(prop)Get properties from the given key.
Get the species if it exists.
iterate_obo_lines(*, ontology_prefix, typedefs)Iterate over the lines to write in an OBO file.
set_species(identifier[, name])Append the from_species relation.
Attributes Documentation
- Parameters:
reference (Reference)
definition (str | None)
relationships (RelationsHint)
_axioms (AnnotationsDict)
properties (PropertiesHint)
parents (list[Reference])
intersection_of (IntersectionOfHint)
union_of (UnionOfHint)
equivalent_to (list[Reference])
disjoint_from (list[Reference])
xrefs (list[Reference])
namespace (str | None)
is_obsolete (bool | None)
type (StanzaType)
builtin (bool | None)
is_anonymous (bool | None)
subsets (list[Reference])
- intersection_of: IntersectionOfHint = <dataclasses._MISSING_TYPE object>
- is_obsolete: bool | None = None
An annotation for obsolescence. By default, is None, but this means that it is not obsolete.
- parents: list[Reference] = <dataclasses._MISSING_TYPE object>
Relationships with the default “is_a”
- properties: PropertiesHint = <dataclasses._MISSING_TYPE object>
- reference: Reference = <dataclasses._MISSING_TYPE object>
The primary reference for the entity
- relationships: RelationsHint = <dataclasses._MISSING_TYPE object>
Object properties
- type: StanzaType = 'Term'
- union_of: UnionOfHint = <dataclasses._MISSING_TYPE object>
- xrefs: list[Reference] = <dataclasses._MISSING_TYPE object>
Database cross-references, see
get_mappings()for access to all mappings in an SSSOM-like interface
Methods Documentation
- append_broad_match(reference, *, mapping_justification=None, confidence=None, contributor=None)[source]
Append a broad match, also adding an xref.
- append_exact_match(reference, *, mapping_justification=None, confidence=None, contributor=None)[source]
Append an exact match, also adding a cross-reference.
- append_narrow_match(reference, *, mapping_justification=None, confidence=None, contributor=None)[source]
Append a narrow match, also adding an xref.
Append a related match, also adding an xref.
- extend_parents(references)[source]
Add a collection of parents to this entity.
- Parameters:
references (Collection[NormalizedNamableReference])
- Return type:
None
- classmethod from_triple(prefix, identifier, name=None, definition=None, **kwargs)[source]
Create a term from a reference.
- get_species(prefix: str = 'ncbitaxon', *, strict: Literal[True] = False) NormalizedNamableReference[source]
- get_species(prefix: str = 'ncbitaxon', *, strict: Literal[False] = False) NormalizedNamableReference | None
Get the species if it exists.
- Parameters:
prefix – The prefix to use in case the term has several species annotations.
strict – If true, raises when no species reference is available
- Returns:
A species reference, if available