TypeDef
- class TypeDef(reference, is_anonymous=None, namespace=None, definition=None, comment=None, subsets=<factory>, synonyms=<factory>, xrefs=<factory>, _axioms=<factory>, properties=<factory>, domain=None, range=None, builtin=None, holds_over_chain=<factory>, is_anti_symmetric=None, is_cyclic=None, is_reflexive=None, is_symmetric=None, is_transitive=None, is_functional=None, is_inverse_functional=None, parents=<factory>, intersection_of=<factory>, union_of=<factory>, equivalent_to=<factory>, disjoint_from=<factory>, inverse=None, transitive_over=<factory>, equivalent_to_chain=<factory>, disjoint_over=<factory>, relationships=<factory>, is_obsolete=None, created_by=None, creation_date=None, predicate_type=None, is_class_level=None, type='TypeDef')[source]
Bases:
StanzaA type definition in OBO.
See the subsection of https://owlcollab.github.io/oboformat/doc/GO.format.obo-1_4.html#S.2.2.
Attributes Summary
A description of the entity
From the OBO spec:
An annotation for obsolescence.
Whether this relationship is a metadata tag.
Methods Summary
default(prefix, identifier, *[, name])Construct a default type definition from within the OBO namespace.
from_triple(prefix, identifier[, name])Create a typedef from a reference.
iterate_obo_lines(ontology_prefix[, ...])Iterate over the lines to write in an OBO file.
Attributes Documentation
- Parameters:
reference (Annotated[Reference, 1])
is_anonymous (Annotated[bool | None, 2])
namespace (Annotated[str | None, 4])
definition (Annotated[str | None, 6])
comment (Annotated[str | None, 7])
subsets (Annotated[list[Reference], 8])
xrefs (Annotated[list[Reference], 10])
_axioms (AnnotationsDict)
properties (Annotated[PropertiesHint, 11])
domain (Annotated[Reference | None, 12, 'typedef-only'])
range (Annotated[Reference | None, 13, 'typedef-only'])
builtin (Annotated[bool | None, 14])
holds_over_chain (Annotated[list[list[Reference]], 15, 'typedef-only'])
is_anti_symmetric (Annotated[bool | None, 16, 'typedef-only'])
is_cyclic (Annotated[bool | None, 17, 'typedef-only'])
is_reflexive (Annotated[bool | None, 18, 'typedef-only'])
is_symmetric (Annotated[bool | None, 19, 'typedef-only'])
is_transitive (Annotated[bool | None, 20, 'typedef-only'])
is_functional (Annotated[bool | None, 21, 'typedef-only'])
is_inverse_functional (Annotated[bool | None, 22, 'typedef-only'])
parents (Annotated[list[Reference], 23])
intersection_of (Annotated[IntersectionOfHint, 24])
union_of (Annotated[list[Reference], 25])
equivalent_to (Annotated[list[Reference], 26])
disjoint_from (Annotated[list[Reference], 27])
inverse (Annotated[Reference | None, 28, 'typedef-only'])
transitive_over (Annotated[list[Reference], 29, 'typedef-only'])
equivalent_to_chain (Annotated[list[list[Reference]], 30, 'typedef-only'])
disjoint_over (Annotated[list[Reference], 31])
relationships (Annotated[RelationsHint, 32])
is_obsolete (Annotated[bool | None, 33])
created_by (Annotated[str | None, 34])
creation_date (Annotated[datetime.datetime | None, 35])
predicate_type (Annotated[TypeDefType | None, 40, 'typedef-only'])
is_class_level (Annotated[bool | None, 41])
type (StanzaType)
- creation_date: Annotated[datetime.datetime | None, 35] = None
- disjoint_over: Annotated[list[Reference], 31] = <dataclasses._MISSING_TYPE object>
From the OBO spec:
For example: spatially_disconnected_from is disjoint_over part_of, in that two disconnected entities have no parts in common. This can be translated to OWL as:
disjoint_over(R S), R(A B) ==> (S some A) disjointFrom (S some B)
- equivalent_to_chain: Annotated[list[list[Reference]], 30, 'typedef-only'] = <dataclasses._MISSING_TYPE object>
- holds_over_chain: Annotated[list[list[Reference]], 15, 'typedef-only'] = <dataclasses._MISSING_TYPE object>
- intersection_of: Annotated[IntersectionOfHint, 24] = <dataclasses._MISSING_TYPE object>
- is_obsolete: Annotated[bool | None, 33] = None
An annotation for obsolescence. By default, is None, but this means that it is not obsolete.
- predicate_type: Annotated[TypeDefType | None, 40, 'typedef-only'] = None
Whether this relationship is a metadata tag. Properties that are marked as metadata tags are used to record object metadata. Object metadata is additional information about an object that is useful to track, but does not impact the definition of the object or how it should be treated by a reasoner. Metadata tags might be used to record special term synonyms or structured notes about a term, for example.
- properties: Annotated[PropertiesHint, 11] = <dataclasses._MISSING_TYPE object>
- reference: Annotated[Reference, 1] = <dataclasses._MISSING_TYPE object>
- relationships: Annotated[RelationsHint, 32] = <dataclasses._MISSING_TYPE object>
- transitive_over: Annotated[list[Reference], 29, 'typedef-only'] = <dataclasses._MISSING_TYPE object>
- type: StanzaType = 'TypeDef'
Methods Documentation
- classmethod default(prefix, identifier, *, name=None, predicate_type)[source]
Construct a default type definition from within the OBO namespace.
- iterate_obo_lines(ontology_prefix, synonym_typedefs=None, typedefs=None)[source]
Iterate over the lines to write in an OBO file.
- Parameters:
ontology_prefix (str) – The prefix of the ontology into which the type definition is being written. This is used for compressing builtin identifiers
synonym_typedefs (Mapping[ReferenceTuple, SynonymTypeDef] | None)
- Yield:
The lines to write to an OBO file
- Return type:
S.3.5.5 of the OBO Flat File Specification v1.4 says tags should appear in the following order:
id
is_anonymous
name
namespace
alt_id
def
comment
subset
synonym
xref
property_value
domain
range
builtin
holds_over_chain
is_anti_symmetric
is_cyclic
is_reflexive
is_symmetric
is_transitive
is_functional
is_inverse_functional
is_a
intersection_of
union_of
equivalent_to
disjoint_from
inverse_of
transitive_over
equivalent_to_chain
disjoint_over
relationship
is_obsolete
created_by
creation_date
replaced_by
consider
expand_assertion_to
expand_expression_to
is_metadata_tag
is_class_level