Skip to content

omnipy.components.isa.models.ontology_annotation_schema

ISA model representing an ontology annotation in an investigation.

ISA is the Investigation/Study/Assay metadata standard, serialized here as ISA-JSON with JSON-LD conventions.

CLASS DESCRIPTION
FieldType

JSON-LD type labels used for ISA ontology-annotation entities.

IsaOntologyReferenceModel

Omnipy model wrapper for ISA ontology annotations.

IsaOntologyReferenceSchema

Schema for ontology terms referenced in ISA metadata.

FieldType

Bases: Enum


              flowchart BT
              omnipy.components.isa.models.ontology_annotation_schema.FieldType[FieldType]

              

              click omnipy.components.isa.models.ontology_annotation_schema.FieldType href "" "omnipy.components.isa.models.ontology_annotation_schema.FieldType"
            

JSON-LD type labels used for ISA ontology-annotation entities.

ATTRIBUTE DESCRIPTION
OntologyAnnotation

Marks a JSON object as an ontology annotation.

Source code in src/omnipy/components/isa/models/ontology_annotation_schema.py
class FieldType(Enum):
    """JSON-LD type labels used for ISA ontology-annotation entities.

    Attributes:
        OntologyAnnotation: Marks a JSON object as an ontology annotation.
    """

    OntologyAnnotation = 'OntologyAnnotation'

OntologyAnnotation class-attribute instance-attribute

OntologyAnnotation = 'OntologyAnnotation'

IsaOntologyReferenceModel

Bases: Model[IsaOntologyReferenceSchema]


              flowchart BT
              omnipy.components.isa.models.ontology_annotation_schema.IsaOntologyReferenceModel[IsaOntologyReferenceModel]
              omnipy.data.model.Model[Model]
              omnipy.data._mixins.display.ModelDisplayMixin[ModelDisplayMixin]
              omnipy.data._mixins.display.BaseDisplayMixin[BaseDisplayMixin]
              omnipy.data._data_class_creator.DataClassBase[DataClassBase]

                              omnipy.data.model.Model --> omnipy.components.isa.models.ontology_annotation_schema.IsaOntologyReferenceModel
                                omnipy.data._mixins.display.ModelDisplayMixin --> omnipy.data.model.Model
                                omnipy.data._mixins.display.BaseDisplayMixin --> omnipy.data._mixins.display.ModelDisplayMixin
                

                omnipy.data._data_class_creator.DataClassBase --> omnipy.data.model.Model
                
                omnipy.util.pydantic.GenericModel --> omnipy.data.model.Model
                



              click omnipy.components.isa.models.ontology_annotation_schema.IsaOntologyReferenceModel href "" "omnipy.components.isa.models.ontology_annotation_schema.IsaOntologyReferenceModel"
              click omnipy.data.model.Model href "" "omnipy.data.model.Model"
              click omnipy.data._mixins.display.ModelDisplayMixin href "" "omnipy.data._mixins.display.ModelDisplayMixin"
              click omnipy.data._mixins.display.BaseDisplayMixin href "" "omnipy.data._mixins.display.BaseDisplayMixin"
              click omnipy.data._data_class_creator.DataClassBase href "" "omnipy.data._data_class_creator.DataClassBase"
            

Omnipy model wrapper for ISA ontology annotations.

Wraps :class:IsaOntologyReferenceSchema for typed integration in ISA model graphs.

Source code in src/omnipy/components/isa/models/ontology_annotation_schema.py
class IsaOntologyReferenceModel(Model[IsaOntologyReferenceSchema]):
    """Omnipy model wrapper for ISA ontology annotations.

    Wraps :class:`IsaOntologyReferenceSchema` for typed integration in ISA
    model graphs.
    """

    ...

IsaOntologyReferenceSchema

Bases: pyd.BaseModel


              flowchart BT
              omnipy.components.isa.models.ontology_annotation_schema.IsaOntologyReferenceSchema[IsaOntologyReferenceSchema]

                              omnipy.util.pydantic.BaseModel --> omnipy.components.isa.models.ontology_annotation_schema.IsaOntologyReferenceSchema
                


              click omnipy.components.isa.models.ontology_annotation_schema.IsaOntologyReferenceSchema href "" "omnipy.components.isa.models.ontology_annotation_schema.IsaOntologyReferenceSchema"
            

Schema for ontology terms referenced in ISA metadata.

ATTRIBUTE DESCRIPTION
annotationValue

Free-text or numeric value associated with the term.

TYPE: str | float | None

termSource

Short name of the ontology source.

TYPE: str | None

termAccession

Accession identifier for the ontology term.

TYPE: str | None

comments

Optional comments attached to the annotation.

TYPE: list[comment_schema.IsaCommentModel] | None

CLASS DESCRIPTION
Config

Validation settings for ISA ontology-annotation parsing.

Source code in src/omnipy/components/isa/models/ontology_annotation_schema.py
class IsaOntologyReferenceSchema(pyd.BaseModel):
    """Schema for ontology terms referenced in ISA metadata.

    Attributes:
        annotationValue: Free-text or numeric value associated with the term.
        termSource: Short name of the ontology source.
        termAccession: Accession identifier for the ontology term.
        comments: Optional comments attached to the annotation.
    """
    class Config:
        """Validation settings for ISA ontology-annotation parsing.

        Attributes:
            extra: Rejects keys that are not defined by the schema.
            use_enum_values: Outputs enum fields as value strings.
        """

        extra = pyd.Extra.forbid
        use_enum_values = True

    field_id: Optional[str] = pyd.Field(None, alias='@id')
    field_context: Optional[str] = pyd.Field(None, alias='@context')
    field_type: Optional[FieldType] = pyd.Field(None, alias='@type')
    annotationValue: Optional[Union[str, float]] = None
    termSource: Optional[str] = pyd.Field(
        None,
        description='The abbreviated ontology name. It should correspond to one of the sources as '
        'specified in the ontologySourceReference section of the Investigation.',
    )
    termAccession: Optional[str] = None
    comments: Optional[List[comment_schema.IsaCommentModel]] = None

annotationValue class-attribute instance-attribute

annotationValue: str | float | None = None

comments class-attribute instance-attribute

comments: list[comment_schema.IsaCommentModel] | None = None

field_context class-attribute instance-attribute

field_context: str | None = pyd.Field(None, alias='@context')

field_id class-attribute instance-attribute

field_id: str | None = pyd.Field(None, alias='@id')

field_type class-attribute instance-attribute

field_type: FieldType | None = pyd.Field(None, alias='@type')

termAccession class-attribute instance-attribute

termAccession: str | None = None

termSource class-attribute instance-attribute

termSource: str | None = pyd.Field(
    None,
    description="The abbreviated ontology name. It should correspond to one of the sources as specified in the ontologySourceReference section of the Investigation.",
)

Config

Validation settings for ISA ontology-annotation parsing.

ATTRIBUTE DESCRIPTION
extra

Rejects keys that are not defined by the schema.

use_enum_values

Outputs enum fields as value strings.

Source code in src/omnipy/components/isa/models/ontology_annotation_schema.py
class Config:
    """Validation settings for ISA ontology-annotation parsing.

    Attributes:
        extra: Rejects keys that are not defined by the schema.
        use_enum_values: Outputs enum fields as value strings.
    """

    extra = pyd.Extra.forbid
    use_enum_values = True

extra class-attribute instance-attribute

extra = pyd.Extra.forbid

use_enum_values class-attribute instance-attribute

use_enum_values = True