SynonymMacro

class SynonymMacro(subject: URIRef | Reference | Referenced | str | IdentifierBox, value: str | Literal, scope: Literal['EXACT', 'NARROW', 'BROAD', 'RELATED'] | URIRef | Reference | Referenced | str | IdentifierBox | None = None, *, language: str | None = None, annotations: list[Annotation] | None = None, synonym_type: URIRef | Reference | Referenced | str | IdentifierBox | None = None, provenance: Sequence[URIRef | Reference | Referenced | str | IdentifierBox | LiteralBox | Literal | int | float | bool | date | datetime | OBOLiteral] | None = None)[source]

Bases: Macro

A macro for synonym assertion.

You can just make a quick assertion, which defaults to RELATED:

>>> SynonymMacro("hgnc:16793", "ULBP4").to_funowl()
'AnnotationAssertion(oboInOwl:hasRelatedSynonym hgnc:16793 "ULBP4")'

You can make the predicate more explicit either with OBO-style scoping (EXACT, BROAD, NARROW, RELATED) or a CURIE/curies.Reference/URIRef

>>> SynonymMacro("hgnc:16793", "ULBP4", "EXACT").to_funowl()
'AnnotationAssertion(oboInOwl:hasExactSynonym hgnc:16793 "ULBP4")'

You can add a synonym type from OMO:

>>> SynonymMacro("hgnc:16793", "ULBP4", "EXACT", synonym_type="OMO:0003008").to_funowl()
'AnnotationAssertion(Annotation(oboInOwl:hasSynonymType OMO:0003008) oboInOwl:hasExactSynonym hgnc:16793 "ULBP4")'

Instatitate the synonym annotation assertion macro.