Synonym

class Synonym(name, specificity=None, type=None, provenance=<factory>, annotations=<factory>, language=None)[source]

Bases: HasReferencesMixin

A synonym with optional specificity and references.

Attributes Summary

annotations

Extra annotations

language

Language tag for the synonym

name

The string representing the synonym

predicate

Get the specificity reference.

provenance

References to articles where the synonym appears

specificity

The specificity of the synonym

type

The type of synonym.

Methods Summary

to_obo(ontology_prefix[, synonym_typedefs])

Write this synonym as an OBO line to appear in a [Term] stanza.

Attributes Documentation

Parameters:
  • name (str)

  • specificity (Literal['EXACT', 'NARROW', 'BROAD', 'RELATED'] | None)

  • type (NormalizedNamableReference | None)

  • provenance (Sequence[NormalizedNamableReference | OBOLiteral])

  • annotations (list[Annotation])

  • language (str | None)

annotations: list[Annotation] = <dataclasses._MISSING_TYPE object>

Extra annotations

language: str | None = None

Language tag for the synonym

name: str = <dataclasses._MISSING_TYPE object>

The string representing the synonym

predicate

Get the specificity reference.

provenance: Sequence[NormalizedNamableReference | OBOLiteral] = <dataclasses._MISSING_TYPE object>

References to articles where the synonym appears

specificity: Literal['EXACT', 'NARROW', 'BROAD', 'RELATED'] | None = None

The specificity of the synonym

type: NormalizedNamableReference | None = None

The type of synonym. Must be defined in OBO document!

Methods Documentation

to_obo(ontology_prefix, synonym_typedefs=None)[source]

Write this synonym as an OBO line to appear in a [Term] stanza.

Parameters:
Return type:

str