Skip to content

omnipy.components.isa.models.material_schema

ISA model representing a material in an investigation.

ISA stands for Investigation/Study/Assay, and this module mirrors ISA-JSON JSON-LD material records.

CLASS DESCRIPTION
FieldType

JSON-LD type labels used for ISA material entities.

IsaMaterialModel

Omnipy model wrapper for ISA material records.

IsaMaterialSchema

Schema for non-sample materials in ISA studies.

Type

Allowed ISA material category labels.

FieldType

Bases: Enum


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

              

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

JSON-LD type labels used for ISA material entities.

ATTRIBUTE DESCRIPTION
Material

Marks a JSON object as an ISA material.

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

    Attributes:
        Material: Marks a JSON object as an ISA material.
    """

    Material = 'Material'

Material class-attribute instance-attribute

Material = 'Material'

IsaMaterialModel

Bases: Model[IsaMaterialSchema]


              flowchart BT
              omnipy.components.isa.models.material_schema.IsaMaterialModel[IsaMaterialModel]
              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.material_schema.IsaMaterialModel
                                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.material_schema.IsaMaterialModel href "" "omnipy.components.isa.models.material_schema.IsaMaterialModel"
              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 material records.

Provides Omnipy model semantics on top of :class:IsaMaterialSchema validation.

Source code in src/omnipy/components/isa/models/material_schema.py
class IsaMaterialModel(Model[IsaMaterialSchema]):
    """Omnipy model wrapper for ISA material records.

    Provides Omnipy model semantics on top of
    :class:`IsaMaterialSchema` validation.
    """

    ...

IsaMaterialSchema

Bases: pyd.BaseModel


              flowchart BT
              omnipy.components.isa.models.material_schema.IsaMaterialSchema[IsaMaterialSchema]

                              omnipy.util.pydantic.BaseModel --> omnipy.components.isa.models.material_schema.IsaMaterialSchema
                


              click omnipy.components.isa.models.material_schema.IsaMaterialSchema href "" "omnipy.components.isa.models.material_schema.IsaMaterialSchema"
            

Schema for non-sample materials in ISA studies.

ATTRIBUTE DESCRIPTION
name

Material name or identifier.

TYPE: str | None

type

Controlled label for material category.

TYPE: Type | None

characteristics

Assigned material attribute values.

TYPE: list[material_attribute_value_schema.IsaMaterialAttributeValueModel] | None

derivesFrom

Parent materials from which this material was derived.

TYPE: list[IsaMaterialModel] | None

comments

Optional comments attached to the material.

TYPE: list[comment_schema.IsaCommentModel] | None

CLASS DESCRIPTION
Config

Validation settings for ISA material schema parsing.

Source code in src/omnipy/components/isa/models/material_schema.py
class IsaMaterialSchema(pyd.BaseModel):
    """Schema for non-sample materials in ISA studies.

    Attributes:
        name: Material name or identifier.
        type: Controlled label for material category.
        characteristics: Assigned material attribute values.
        derivesFrom: Parent materials from which this material was derived.
        comments: Optional comments attached to the material.
    """
    class Config:
        """Validation settings for ISA material schema parsing.

        Attributes:
            extra: Rejects unknown fields.
            use_enum_values: Serializes enum fields by raw values.
        """

        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')
    name: Optional[str] = None
    type: Optional[Type] = None
    characteristics: Optional[List[
        material_attribute_value_schema.IsaMaterialAttributeValueModel]] = None
    derivesFrom: Optional[List['IsaMaterialModel']] = None
    comments: Optional[List[comment_schema.IsaCommentModel]] = None

characteristics class-attribute instance-attribute

comments class-attribute instance-attribute

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

derivesFrom class-attribute instance-attribute

derivesFrom: list[IsaMaterialModel] | 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')

name class-attribute instance-attribute

name: str | None = None

type class-attribute instance-attribute

type: Type | None = None

Config

Validation settings for ISA material schema parsing.

ATTRIBUTE DESCRIPTION
extra

Rejects unknown fields.

use_enum_values

Serializes enum fields by raw values.

Source code in src/omnipy/components/isa/models/material_schema.py
class Config:
    """Validation settings for ISA material schema parsing.

    Attributes:
        extra: Rejects unknown fields.
        use_enum_values: Serializes enum fields by raw values.
    """

    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

Type

Bases: Enum


              flowchart BT
              omnipy.components.isa.models.material_schema.Type[Type]

              

              click omnipy.components.isa.models.material_schema.Type href "" "omnipy.components.isa.models.material_schema.Type"
            

Allowed ISA material category labels.

ATTRIBUTE DESCRIPTION
Extract_Name

Label for an extract material.

Labeled_Extract_Name

Label for a labeled extract material.

Source code in src/omnipy/components/isa/models/material_schema.py
class Type(Enum):
    """Allowed ISA material category labels.

    Attributes:
        Extract_Name: Label for an extract material.
        Labeled_Extract_Name: Label for a labeled extract material.
    """

    Extract_Name = 'Extract Name'
    Labeled_Extract_Name = 'Labeled Extract Name'

Extract_Name class-attribute instance-attribute

Extract_Name = 'Extract Name'

Labeled_Extract_Name class-attribute instance-attribute

Labeled_Extract_Name = 'Labeled Extract Name'