mihcsme_py.models#
mihcsme_py.models
#
Pydantic models for MIHCSME metadata structure.
Assay
pydantic-model
#
Bases: BaseModel
Assay information.
Show JSON schema:
{
"description": "Assay information.",
"properties": {
"Assay Title": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Screen name",
"title": "Assay Title"
},
"Assay internal ID": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Experimental ID, e.g. aMV-010, linked to ELN or labjournal",
"title": "Assay Internal Id"
},
"Assay Description": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Description of screen plus additional unstructured information",
"title": "Assay Description"
},
"Assay number of biological replicates": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Total number of biol. Repl.",
"title": "Assay Number Of Biological Replicates"
},
"Number of plates": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Total number of plates, n-plates",
"title": "Number Of Plates"
},
"Assay Technology Type": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Imaging method, Fbbi terms",
"title": "Assay Technology Type"
},
"Assay Type": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "List of options: sub types of HCS e.g. Gene Knock down, RNAi, compound, EFO terms",
"title": "Assay Type"
},
"Assay External URL": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "ELN or any other external url link to this screen",
"title": "Assay External Url"
},
"Assay data URL": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "OMERO url link to this screen",
"title": "Assay Data Url"
}
},
"title": "Assay",
"type": "object"
}
Config:
populate_by_name:True
Fields:
-
assay_title(Optional[str]) -
assay_internal_id(StringCoerced) -
assay_description(Optional[str]) -
assay_number_of_biological_replicates(StringCoerced) -
number_of_plates(StringCoerced) -
assay_technology_type(Optional[str]) -
assay_type(Optional[str]) -
assay_external_url(Optional[str]) -
assay_data_url(Optional[str])
assay_data_url: Optional[str] = None
pydantic-field
#
OMERO url link to this screen
assay_description: Optional[str] = None
pydantic-field
#
Description of screen plus additional unstructured information
assay_external_url: Optional[str] = None
pydantic-field
#
ELN or any other external url link to this screen
assay_internal_id: StringCoerced = None
pydantic-field
#
Experimental ID, e.g. aMV-010, linked to ELN or labjournal
assay_number_of_biological_replicates: StringCoerced = None
pydantic-field
#
Total number of biol. Repl.
assay_technology_type: Optional[str] = None
pydantic-field
#
Imaging method, Fbbi terms
assay_title: Optional[str] = None
pydantic-field
#
Screen name
assay_type: Optional[str] = None
pydantic-field
#
List of options: sub types of HCS e.g. Gene Knock down, RNAi, compound, EFO terms
number_of_plates: StringCoerced = None
pydantic-field
#
Total number of plates, n-plates
AssayComponent
pydantic-model
#
Bases: BaseModel
Assay component information.
Show JSON schema:
{
"description": "Assay component information.",
"properties": {
"Imaging protocol": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Url to protocols.io or protocols in ELN, at least protocol file name",
"title": "Imaging Protocol"
},
"Sample preparation protocol": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Sample preparation method (Formaldahyde (PFA) fixed tissue, Live cells, unfixed tissue)",
"title": "Sample Preparation Protocol"
}
},
"title": "AssayComponent",
"type": "object"
}
Config:
populate_by_name:True
Fields:
-
imaging_protocol(Optional[str]) -
sample_preparation_protocol(Optional[str])
AssayCondition
pydantic-model
#
Bases: BaseModel
Single well condition from AssayConditions sheet.
All metadata fields (Treatment, Dose, CellLine, etc.) are stored in the conditions dictionary for maximum flexibility.
Attributes:
| Name | Type | Description |
|---|---|---|
plate |
str
|
Plate identifier/name |
well |
str
|
Well identifier (e.g., A01, B12) - auto-normalized |
conditions |
Dict[str, Any]
|
Dictionary of all metadata key-value pairs for this well |
Show JSON schema:
{
"description": "Single well condition from AssayConditions sheet.\n\nAll metadata fields (Treatment, Dose, CellLine, etc.) are stored in the\nconditions dictionary for maximum flexibility.\n\nAttributes:\n plate: Plate identifier/name\n well: Well identifier (e.g., A01, B12) - auto-normalized\n conditions: Dictionary of all metadata key-value pairs for this well",
"example": {
"conditions": {
"CellLine": "HeLa",
"Dose": "0.1",
"DoseUnit": "\u00b5M",
"Treatment": "DMSO"
},
"plate": "Plate1",
"well": "A01"
},
"properties": {
"plate": {
"description": "Plate identifier/name",
"title": "Plate",
"type": "string"
},
"well": {
"description": "Well identifier (e.g., A01, B12)",
"title": "Well",
"type": "string"
},
"conditions": {
"additionalProperties": true,
"description": "All metadata fields for this well (Treatment, Dose, etc.)",
"title": "Conditions",
"type": "object"
}
},
"required": [
"plate",
"well"
],
"title": "AssayCondition",
"type": "object"
}
Config:
populate_by_name:Truejson_schema_extra:{'example': {'plate': 'Plate1', 'well': 'A01', 'conditions': {'Treatment': 'DMSO', 'Dose': '0.1', 'DoseUnit': 'µM', 'CellLine': 'HeLa'}}}
Fields:
-
plate(str) -
well(str) -
conditions(Dict[str, Any])
Validators:
conditions: Dict[str, Any]
pydantic-field
#
All metadata fields for this well (Treatment, Dose, etc.)
plate: str
pydantic-field
#
Plate identifier/name
well: str
pydantic-field
#
Well identifier (e.g., A01, B12)
normalize_well_name(v: str) -> str
pydantic-validator
#
Normalize well names to zero-padded format (A01).
Source code in src/mihcsme_py/models.py
to_dict() -> Dict[str, Any]
#
Convert AssayCondition to a flat dictionary for upload/export.
Returns:
| Type | Description |
|---|---|
Dict[str, Any]
|
Dictionary with Plate, Well, and all condition fields |
Source code in src/mihcsme_py/models.py
AssayInformation
pydantic-model
#
Bases: BaseModel
Assay-level metadata with structured fields.
Show JSON schema:
{
"$defs": {
"Assay": {
"description": "Assay information.",
"properties": {
"Assay Title": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Screen name",
"title": "Assay Title"
},
"Assay internal ID": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Experimental ID, e.g. aMV-010, linked to ELN or labjournal",
"title": "Assay Internal Id"
},
"Assay Description": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Description of screen plus additional unstructured information",
"title": "Assay Description"
},
"Assay number of biological replicates": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Total number of biol. Repl.",
"title": "Assay Number Of Biological Replicates"
},
"Number of plates": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Total number of plates, n-plates",
"title": "Number Of Plates"
},
"Assay Technology Type": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Imaging method, Fbbi terms",
"title": "Assay Technology Type"
},
"Assay Type": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "List of options: sub types of HCS e.g. Gene Knock down, RNAi, compound, EFO terms",
"title": "Assay Type"
},
"Assay External URL": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "ELN or any other external url link to this screen",
"title": "Assay External Url"
},
"Assay data URL": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "OMERO url link to this screen",
"title": "Assay Data Url"
}
},
"title": "Assay",
"type": "object"
},
"AssayComponent": {
"description": "Assay component information.",
"properties": {
"Imaging protocol": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Url to protocols.io or protocols in ELN, at least protocol file name",
"title": "Imaging Protocol"
},
"Sample preparation protocol": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Sample preparation method (Formaldahyde (PFA) fixed tissue, Live cells, unfixed tissue)",
"title": "Sample Preparation Protocol"
}
},
"title": "AssayComponent",
"type": "object"
},
"BiosampleAssay": {
"description": "Biosample information specific to assay.",
"properties": {
"Cell lines storage location": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Storage location according to Database used or at least location",
"title": "Cell Lines Storage Location"
},
"Cell lines clone number": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Storage location DB info",
"title": "Cell Lines Clone Number"
},
"Cell lines Passage number": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Passage number of your cells",
"title": "Cell Lines Passage Number"
}
},
"title": "BiosampleAssay",
"type": "object"
},
"Channel": {
"description": "Single channel information for specimen imaging.",
"properties": {
"visualization_method": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Visualization method (e.g., Hoechst staining, GFP)",
"title": "Visualization Method"
},
"entity": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Entity visualized (e.g., DNA, MAP1LC3B)",
"title": "Entity"
},
"label": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Label used for entity (e.g., Nuclei, GFP-LC3)",
"title": "Label"
},
"id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Sequential id of channel order in your image",
"title": "Id"
}
},
"title": "Channel",
"type": "object"
},
"ImageAcquisition": {
"description": "Image acquisition information.",
"properties": {
"Microscope id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Url to micrometa app file link or other url describing your microscope",
"title": "Microscope Id"
}
},
"title": "ImageAcquisition",
"type": "object"
},
"ImageData": {
"description": "Image data information.",
"properties": {
"Image number of pixelsX": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Indicate number of pixels in x in images",
"title": "Image Number Of Pixelsx"
},
"Image number of pixelsY": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Indicate number of pixels in y in images",
"title": "Image Number Of Pixelsy"
},
"Image number of z-stacks": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Indicate number z stacks in image, single image is z=1",
"title": "Image Number Of Z-Stacks"
},
"Image number of channels": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Indicate number of channels in your image",
"title": "Image Number Of Channels"
},
"Image number of timepoints": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Indicate number of time point(s) in your image",
"title": "Image Number Of Timepoints"
},
"Image sites per well": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Number of fields, numeric value",
"title": "Image Sites Per Well"
}
},
"title": "ImageData",
"type": "object"
},
"Specimen": {
"description": "Specimen/channel information with dynamic channel support.\n\nChannels are stored as a list internally but can be converted to/from\nthe flat Excel format (Channel 1 visualization method, etc.).",
"properties": {
"Channel Transmission id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Channel id is dependent on different machines, first or last. If No transmission is acquired state NA",
"title": "Channel Transmission Id"
},
"channels": {
"description": "List of channel information (supports up to 8 channels)",
"items": {
"$ref": "#/$defs/Channel"
},
"title": "Channels",
"type": "array"
}
},
"title": "Specimen",
"type": "object"
}
},
"additionalProperties": true,
"description": "Assay-level metadata with structured fields.",
"example": {
"assay": {
"assay_internal_id": "ASY-001",
"assay_title": "Example Screen"
},
"image_data": {
"image_number_of_channels": "3"
}
},
"properties": {
"assay": {
"anyOf": [
{
"$ref": "#/$defs/Assay"
},
{
"type": "null"
}
],
"default": null,
"description": "Assay information"
},
"assay_component": {
"anyOf": [
{
"$ref": "#/$defs/AssayComponent"
},
{
"type": "null"
}
],
"default": null,
"description": "Assay component information"
},
"biosample": {
"anyOf": [
{
"$ref": "#/$defs/BiosampleAssay"
},
{
"type": "null"
}
],
"default": null,
"description": "Biosample information"
},
"image_data": {
"anyOf": [
{
"$ref": "#/$defs/ImageData"
},
{
"type": "null"
}
],
"default": null,
"description": "Image data information"
},
"image_acquisition": {
"anyOf": [
{
"$ref": "#/$defs/ImageAcquisition"
},
{
"type": "null"
}
],
"default": null,
"description": "Image acquisition information"
},
"specimen": {
"anyOf": [
{
"$ref": "#/$defs/Specimen"
},
{
"type": "null"
}
],
"default": null,
"description": "Specimen/channel information"
}
},
"title": "AssayInformation",
"type": "object"
}
Config:
extra:allowjson_schema_extra:{'example': {'assay': {'assay_title': 'Example Screen', 'assay_internal_id': 'ASY-001'}, 'image_data': {'image_number_of_channels': '3'}}}
Fields:
-
assay(Optional[Assay]) -
assay_component(Optional[AssayComponent]) -
biosample(Optional[BiosampleAssay]) -
image_data(Optional[ImageData]) -
image_acquisition(Optional[ImageAcquisition]) -
specimen(Optional[Specimen])
assay: Optional[Assay] = None
pydantic-field
#
Assay information
assay_component: Optional[AssayComponent] = None
pydantic-field
#
Assay component information
biosample: Optional[BiosampleAssay] = None
pydantic-field
#
Biosample information
groups: Dict[str, Dict[str, Any]]
property
#
Convert to groups dictionary format for OMERO upload.
image_acquisition: Optional[ImageAcquisition] = None
pydantic-field
#
Image acquisition information
image_data: Optional[ImageData] = None
pydantic-field
#
Image data information
specimen: Optional[Specimen] = None
pydantic-field
#
Specimen/channel information
from_groups_dict(groups: Dict[str, Dict[str, Any]]) -> 'AssayInformation'
classmethod
#
Create from groups dictionary format.
Source code in src/mihcsme_py/models.py
to_groups_dict() -> Dict[str, Dict[str, Any]]
#
Convert to groups dictionary format.
Source code in src/mihcsme_py/models.py
Biosample
pydantic-model
#
Bases: BaseModel
Biosample information.
Show JSON schema:
{
"description": "Biosample information.",
"properties": {
"Biosample Taxon": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "NCBI-taxon id, human = NCBITAXON:9606",
"title": "Biosample Taxon"
},
"Biosample description": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Description of biosample genotype",
"title": "Biosample Description"
},
"Biosample Organism": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Which organism is your cell lines or tissue from. Examples: Human or mouse",
"title": "Biosample Organism"
},
"Number of cell lines used": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "In case multiple cell lines are used indicate here",
"title": "Number Of Cell Lines Used"
}
},
"title": "Biosample",
"type": "object"
}
Config:
populate_by_name:True
Fields:
-
biosample_taxon(Optional[str]) -
biosample_description(Optional[str]) -
biosample_organism(Optional[str]) -
number_of_cell_lines_used(StringCoerced)
biosample_description: Optional[str] = None
pydantic-field
#
Description of biosample genotype
biosample_organism: Optional[str] = None
pydantic-field
#
Which organism is your cell lines or tissue from. Examples: Human or mouse
biosample_taxon: Optional[str] = None
pydantic-field
#
NCBI-taxon id, human = NCBITAXON:9606
number_of_cell_lines_used: StringCoerced = None
pydantic-field
#
In case multiple cell lines are used indicate here
BiosampleAssay
pydantic-model
#
Bases: BaseModel
Biosample information specific to assay.
Show JSON schema:
{
"description": "Biosample information specific to assay.",
"properties": {
"Cell lines storage location": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Storage location according to Database used or at least location",
"title": "Cell Lines Storage Location"
},
"Cell lines clone number": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Storage location DB info",
"title": "Cell Lines Clone Number"
},
"Cell lines Passage number": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Passage number of your cells",
"title": "Cell Lines Passage Number"
}
},
"title": "BiosampleAssay",
"type": "object"
}
Config:
populate_by_name:True
Fields:
-
cell_lines_storage_location(Optional[str]) -
cell_lines_clone_number(StringCoerced) -
cell_lines_passage_number(StringCoerced)
cell_lines_clone_number: StringCoerced = None
pydantic-field
#
Storage location DB info
cell_lines_passage_number: StringCoerced = None
pydantic-field
#
Passage number of your cells
cell_lines_storage_location: Optional[str] = None
pydantic-field
#
Storage location according to Database used or at least location
Channel
pydantic-model
#
Bases: BaseModel
Single channel information for specimen imaging.
Show JSON schema:
{
"description": "Single channel information for specimen imaging.",
"properties": {
"visualization_method": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Visualization method (e.g., Hoechst staining, GFP)",
"title": "Visualization Method"
},
"entity": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Entity visualized (e.g., DNA, MAP1LC3B)",
"title": "Entity"
},
"label": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Label used for entity (e.g., Nuclei, GFP-LC3)",
"title": "Label"
},
"id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Sequential id of channel order in your image",
"title": "Id"
}
},
"title": "Channel",
"type": "object"
}
Config:
populate_by_name:True
Fields:
-
visualization_method(Optional[str]) -
entity(Optional[str]) -
label(Optional[str]) -
id(StringCoerced)
entity: Optional[str] = None
pydantic-field
#
Entity visualized (e.g., DNA, MAP1LC3B)
id: StringCoerced = None
pydantic-field
#
Sequential id of channel order in your image
label: Optional[str] = None
pydantic-field
#
Label used for entity (e.g., Nuclei, GFP-LC3)
visualization_method: Optional[str] = None
pydantic-field
#
Visualization method (e.g., Hoechst staining, GFP)
DataCollaborator
pydantic-model
#
Bases: BaseModel
Data collaborator information.
Show JSON schema:
{
"description": "Data collaborator information.",
"properties": {
"ORCID Data Collaborator": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "ORCID ID of collaborator with experimental, collection or analysis part of this investigation",
"title": "Orcid Data Collaborator"
}
},
"title": "DataCollaborator",
"type": "object"
}
Config:
populate_by_name:True
Fields:
-
orcid(OrcidUrl)
orcid: OrcidUrl = None
pydantic-field
#
ORCID ID of collaborator with experimental, collection or analysis part of this investigation
DataOwner
pydantic-model
#
Bases: BaseModel
Data owner information.
Show JSON schema:
{
"description": "Data owner information.",
"properties": {
"First Name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "First Name",
"title": "First Name"
},
"Middle Name(s)": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Middle Name(s) if any",
"title": "Middle Name(S)"
},
"Last Name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Last Name",
"title": "Last Name"
},
"User name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Institutional user name",
"title": "User Name"
},
"Institute": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Institute level, e.g. Universiteit Leiden, Faculty of Science, Institute of Biology",
"title": "Institute"
},
"E-Mail Address": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Institution email address",
"title": "E-Mail Address"
},
"ORCID investigator": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "ORCID ID as URL, e.g. https://orcid.org/0000-0002-3704-3675",
"title": "Orcid Investigator"
}
},
"title": "DataOwner",
"type": "object"
}
Config:
populate_by_name:True
Fields:
-
first_name(Optional[str]) -
middle_names(Optional[str]) -
last_name(Optional[str]) -
user_name(Optional[str]) -
institute(Optional[str]) -
email(Optional[str]) -
orcid(OrcidUrl)
email: Optional[str] = None
pydantic-field
#
Institution email address
first_name: Optional[str] = None
pydantic-field
#
First Name
institute: Optional[str] = None
pydantic-field
#
Institute level, e.g. Universiteit Leiden, Faculty of Science, Institute of Biology
last_name: Optional[str] = None
pydantic-field
#
Last Name
middle_names: Optional[str] = None
pydantic-field
#
Middle Name(s) if any
orcid: OrcidUrl = None
pydantic-field
#
ORCID ID as URL, e.g. https://orcid.org/0000-0002-3704-3675
user_name: Optional[str] = None
pydantic-field
#
Institutional user name
ImageAcquisition
pydantic-model
#
Bases: BaseModel
Image acquisition information.
Show JSON schema:
{
"description": "Image acquisition information.",
"properties": {
"Microscope id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Url to micrometa app file link or other url describing your microscope",
"title": "Microscope Id"
}
},
"title": "ImageAcquisition",
"type": "object"
}
Config:
populate_by_name:True
Fields:
-
microscope_id(StringCoerced)
microscope_id: StringCoerced = None
pydantic-field
#
Url to micrometa app file link or other url describing your microscope
ImageData
pydantic-model
#
Bases: BaseModel
Image data information.
Show JSON schema:
{
"description": "Image data information.",
"properties": {
"Image number of pixelsX": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Indicate number of pixels in x in images",
"title": "Image Number Of Pixelsx"
},
"Image number of pixelsY": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Indicate number of pixels in y in images",
"title": "Image Number Of Pixelsy"
},
"Image number of z-stacks": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Indicate number z stacks in image, single image is z=1",
"title": "Image Number Of Z-Stacks"
},
"Image number of channels": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Indicate number of channels in your image",
"title": "Image Number Of Channels"
},
"Image number of timepoints": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Indicate number of time point(s) in your image",
"title": "Image Number Of Timepoints"
},
"Image sites per well": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Number of fields, numeric value",
"title": "Image Sites Per Well"
}
},
"title": "ImageData",
"type": "object"
}
Config:
populate_by_name:True
Fields:
-
image_number_of_pixelsx(StringCoerced) -
image_number_of_pixelsy(StringCoerced) -
image_number_of_z_stacks(StringCoerced) -
image_number_of_channels(StringCoerced) -
image_number_of_timepoints(StringCoerced) -
image_sites_per_well(StringCoerced)
image_number_of_channels: StringCoerced = None
pydantic-field
#
Indicate number of channels in your image
image_number_of_pixelsx: StringCoerced = None
pydantic-field
#
Indicate number of pixels in x in images
image_number_of_pixelsy: StringCoerced = None
pydantic-field
#
Indicate number of pixels in y in images
image_number_of_timepoints: StringCoerced = None
pydantic-field
#
Indicate number of time point(s) in your image
image_number_of_z_stacks: StringCoerced = None
pydantic-field
#
Indicate number z stacks in image, single image is z=1
image_sites_per_well: StringCoerced = None
pydantic-field
#
Number of fields, numeric value
InvestigationInfo
pydantic-model
#
Bases: BaseModel
Core investigation information.
Show JSON schema:
{
"description": "Core investigation information.",
"properties": {
"Project ID": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "EU/NWO/consortium ID \u2013 Examples: EuTOX",
"title": "Project Id"
},
"Investigation Title": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "High level concept to link related studies",
"title": "Investigation Title"
},
"Investigation internal ID": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Corresponding internal ID for your investigation",
"title": "Investigation Internal Id"
},
"Investigation description": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Short description for your investigation",
"title": "Investigation Description"
}
},
"title": "InvestigationInfo",
"type": "object"
}
Config:
populate_by_name:True
Fields:
-
project_id(StringCoerced) -
investigation_title(Optional[str]) -
investigation_internal_id(StringCoerced) -
investigation_description(Optional[str])
investigation_description: Optional[str] = None
pydantic-field
#
Short description for your investigation
investigation_internal_id: StringCoerced = None
pydantic-field
#
Corresponding internal ID for your investigation
investigation_title: Optional[str] = None
pydantic-field
#
High level concept to link related studies
project_id: StringCoerced = None
pydantic-field
#
EU/NWO/consortium ID – Examples: EuTOX
InvestigationInformation
pydantic-model
#
Bases: BaseModel
Investigation-level metadata with structured fields.
Show JSON schema:
{
"$defs": {
"DataCollaborator": {
"description": "Data collaborator information.",
"properties": {
"ORCID Data Collaborator": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "ORCID ID of collaborator with experimental, collection or analysis part of this investigation",
"title": "Orcid Data Collaborator"
}
},
"title": "DataCollaborator",
"type": "object"
},
"DataOwner": {
"description": "Data owner information.",
"properties": {
"First Name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "First Name",
"title": "First Name"
},
"Middle Name(s)": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Middle Name(s) if any",
"title": "Middle Name(S)"
},
"Last Name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Last Name",
"title": "Last Name"
},
"User name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Institutional user name",
"title": "User Name"
},
"Institute": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Institute level, e.g. Universiteit Leiden, Faculty of Science, Institute of Biology",
"title": "Institute"
},
"E-Mail Address": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Institution email address",
"title": "E-Mail Address"
},
"ORCID investigator": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "ORCID ID as URL, e.g. https://orcid.org/0000-0002-3704-3675",
"title": "Orcid Investigator"
}
},
"title": "DataOwner",
"type": "object"
},
"InvestigationInfo": {
"description": "Core investigation information.",
"properties": {
"Project ID": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "EU/NWO/consortium ID \u2013 Examples: EuTOX",
"title": "Project Id"
},
"Investigation Title": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "High level concept to link related studies",
"title": "Investigation Title"
},
"Investigation internal ID": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Corresponding internal ID for your investigation",
"title": "Investigation Internal Id"
},
"Investigation description": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Short description for your investigation",
"title": "Investigation Description"
}
},
"title": "InvestigationInfo",
"type": "object"
}
},
"additionalProperties": true,
"description": "Investigation-level metadata with structured fields.",
"example": {
"data_owner": {
"email": "j.doe@example.com",
"first_name": "Jane",
"last_name": "Doe",
"orcid": "https://orcid.org/0000-0002-3704-3675"
},
"investigation_info": {
"investigation_title": "Example Investigation",
"project_id": "EuTOX"
}
},
"properties": {
"data_owner": {
"anyOf": [
{
"$ref": "#/$defs/DataOwner"
},
{
"type": "null"
}
],
"default": null,
"description": "Data owner information"
},
"data_collaborators": {
"description": "List of data collaborators",
"items": {
"$ref": "#/$defs/DataCollaborator"
},
"title": "Data Collaborators",
"type": "array"
},
"investigation_info": {
"anyOf": [
{
"$ref": "#/$defs/InvestigationInfo"
},
{
"type": "null"
}
],
"default": null,
"description": "Core investigation information"
}
},
"title": "InvestigationInformation",
"type": "object"
}
Config:
extra:allowjson_schema_extra:{'example': {'data_owner': {'first_name': 'Jane', 'last_name': 'Doe', 'email': 'j.doe@example.com', 'orcid': 'https://orcid.org/0000-0002-3704-3675'}, 'investigation_info': {'investigation_title': 'Example Investigation', 'project_id': 'EuTOX'}}}
Fields:
-
data_owner(Optional[DataOwner]) -
data_collaborators(List[DataCollaborator]) -
investigation_info(Optional[InvestigationInfo])
data_collaborators: List[DataCollaborator]
pydantic-field
#
List of data collaborators
data_owner: Optional[DataOwner] = None
pydantic-field
#
Data owner information
groups: Dict[str, Dict[str, Any]]
property
#
Convert to groups dictionary format for OMERO upload.
investigation_info: Optional[InvestigationInfo] = None
pydantic-field
#
Core investigation information
from_groups_dict(groups: Dict[str, Dict[str, Any]]) -> 'InvestigationInformation'
classmethod
#
Create from groups dictionary format.
Source code in src/mihcsme_py/models.py
to_groups_dict() -> Dict[str, Dict[str, Any]]
#
Convert to groups dictionary format.
Source code in src/mihcsme_py/models.py
Library
pydantic-model
#
Bases: BaseModel
Library information.
Show JSON schema:
{
"description": "Library information.",
"properties": {
"Library File Name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Library file info",
"title": "Library File Name"
},
"Library File Format": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Library file info",
"title": "Library File Format"
},
"Library Type": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Library file info",
"title": "Library Type"
},
"Library Manufacturer": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Library file info",
"title": "Library Manufacturer"
},
"Library Version": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Library file info",
"title": "Library Version"
},
"Library Experimental Conditions": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Any experimental conditions some cells were grown under as part of the study",
"title": "Library Experimental Conditions"
},
"Quality Control Description": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "A brief description of the kind of quality control measures that were taken",
"title": "Quality Control Description"
}
},
"title": "Library",
"type": "object"
}
Config:
populate_by_name:True
Fields:
-
library_file_name(Optional[str]) -
library_file_format(Optional[str]) -
library_type(Optional[str]) -
library_manufacturer(Optional[str]) -
library_version(StringCoerced) -
library_experimental_conditions(Optional[str]) -
quality_control_description(Optional[str])
library_experimental_conditions: Optional[str] = None
pydantic-field
#
Any experimental conditions some cells were grown under as part of the study
library_file_format: Optional[str] = None
pydantic-field
#
Library file info
library_file_name: Optional[str] = None
pydantic-field
#
Library file info
library_manufacturer: Optional[str] = None
pydantic-field
#
Library file info
library_type: Optional[str] = None
pydantic-field
#
Library file info
library_version: StringCoerced = None
pydantic-field
#
Library file info
quality_control_description: Optional[str] = None
pydantic-field
#
A brief description of the kind of quality control measures that were taken
MIHCSMEMetadata
pydantic-model
#
Bases: BaseModel
Complete MIHCSME metadata structure.
Show JSON schema:
{
"$defs": {
"Assay": {
"description": "Assay information.",
"properties": {
"Assay Title": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Screen name",
"title": "Assay Title"
},
"Assay internal ID": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Experimental ID, e.g. aMV-010, linked to ELN or labjournal",
"title": "Assay Internal Id"
},
"Assay Description": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Description of screen plus additional unstructured information",
"title": "Assay Description"
},
"Assay number of biological replicates": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Total number of biol. Repl.",
"title": "Assay Number Of Biological Replicates"
},
"Number of plates": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Total number of plates, n-plates",
"title": "Number Of Plates"
},
"Assay Technology Type": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Imaging method, Fbbi terms",
"title": "Assay Technology Type"
},
"Assay Type": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "List of options: sub types of HCS e.g. Gene Knock down, RNAi, compound, EFO terms",
"title": "Assay Type"
},
"Assay External URL": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "ELN or any other external url link to this screen",
"title": "Assay External Url"
},
"Assay data URL": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "OMERO url link to this screen",
"title": "Assay Data Url"
}
},
"title": "Assay",
"type": "object"
},
"AssayComponent": {
"description": "Assay component information.",
"properties": {
"Imaging protocol": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Url to protocols.io or protocols in ELN, at least protocol file name",
"title": "Imaging Protocol"
},
"Sample preparation protocol": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Sample preparation method (Formaldahyde (PFA) fixed tissue, Live cells, unfixed tissue)",
"title": "Sample Preparation Protocol"
}
},
"title": "AssayComponent",
"type": "object"
},
"AssayCondition": {
"description": "Single well condition from AssayConditions sheet.\n\nAll metadata fields (Treatment, Dose, CellLine, etc.) are stored in the\nconditions dictionary for maximum flexibility.\n\nAttributes:\n plate: Plate identifier/name\n well: Well identifier (e.g., A01, B12) - auto-normalized\n conditions: Dictionary of all metadata key-value pairs for this well",
"example": {
"conditions": {
"CellLine": "HeLa",
"Dose": "0.1",
"DoseUnit": "\u00b5M",
"Treatment": "DMSO"
},
"plate": "Plate1",
"well": "A01"
},
"properties": {
"plate": {
"description": "Plate identifier/name",
"title": "Plate",
"type": "string"
},
"well": {
"description": "Well identifier (e.g., A01, B12)",
"title": "Well",
"type": "string"
},
"conditions": {
"additionalProperties": true,
"description": "All metadata fields for this well (Treatment, Dose, etc.)",
"title": "Conditions",
"type": "object"
}
},
"required": [
"plate",
"well"
],
"title": "AssayCondition",
"type": "object"
},
"AssayInformation": {
"additionalProperties": true,
"description": "Assay-level metadata with structured fields.",
"example": {
"assay": {
"assay_internal_id": "ASY-001",
"assay_title": "Example Screen"
},
"image_data": {
"image_number_of_channels": "3"
}
},
"properties": {
"assay": {
"anyOf": [
{
"$ref": "#/$defs/Assay"
},
{
"type": "null"
}
],
"default": null,
"description": "Assay information"
},
"assay_component": {
"anyOf": [
{
"$ref": "#/$defs/AssayComponent"
},
{
"type": "null"
}
],
"default": null,
"description": "Assay component information"
},
"biosample": {
"anyOf": [
{
"$ref": "#/$defs/BiosampleAssay"
},
{
"type": "null"
}
],
"default": null,
"description": "Biosample information"
},
"image_data": {
"anyOf": [
{
"$ref": "#/$defs/ImageData"
},
{
"type": "null"
}
],
"default": null,
"description": "Image data information"
},
"image_acquisition": {
"anyOf": [
{
"$ref": "#/$defs/ImageAcquisition"
},
{
"type": "null"
}
],
"default": null,
"description": "Image acquisition information"
},
"specimen": {
"anyOf": [
{
"$ref": "#/$defs/Specimen"
},
{
"type": "null"
}
],
"default": null,
"description": "Specimen/channel information"
}
},
"title": "AssayInformation",
"type": "object"
},
"Biosample": {
"description": "Biosample information.",
"properties": {
"Biosample Taxon": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "NCBI-taxon id, human = NCBITAXON:9606",
"title": "Biosample Taxon"
},
"Biosample description": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Description of biosample genotype",
"title": "Biosample Description"
},
"Biosample Organism": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Which organism is your cell lines or tissue from. Examples: Human or mouse",
"title": "Biosample Organism"
},
"Number of cell lines used": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "In case multiple cell lines are used indicate here",
"title": "Number Of Cell Lines Used"
}
},
"title": "Biosample",
"type": "object"
},
"BiosampleAssay": {
"description": "Biosample information specific to assay.",
"properties": {
"Cell lines storage location": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Storage location according to Database used or at least location",
"title": "Cell Lines Storage Location"
},
"Cell lines clone number": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Storage location DB info",
"title": "Cell Lines Clone Number"
},
"Cell lines Passage number": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Passage number of your cells",
"title": "Cell Lines Passage Number"
}
},
"title": "BiosampleAssay",
"type": "object"
},
"Channel": {
"description": "Single channel information for specimen imaging.",
"properties": {
"visualization_method": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Visualization method (e.g., Hoechst staining, GFP)",
"title": "Visualization Method"
},
"entity": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Entity visualized (e.g., DNA, MAP1LC3B)",
"title": "Entity"
},
"label": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Label used for entity (e.g., Nuclei, GFP-LC3)",
"title": "Label"
},
"id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Sequential id of channel order in your image",
"title": "Id"
}
},
"title": "Channel",
"type": "object"
},
"DataCollaborator": {
"description": "Data collaborator information.",
"properties": {
"ORCID Data Collaborator": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "ORCID ID of collaborator with experimental, collection or analysis part of this investigation",
"title": "Orcid Data Collaborator"
}
},
"title": "DataCollaborator",
"type": "object"
},
"DataOwner": {
"description": "Data owner information.",
"properties": {
"First Name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "First Name",
"title": "First Name"
},
"Middle Name(s)": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Middle Name(s) if any",
"title": "Middle Name(S)"
},
"Last Name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Last Name",
"title": "Last Name"
},
"User name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Institutional user name",
"title": "User Name"
},
"Institute": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Institute level, e.g. Universiteit Leiden, Faculty of Science, Institute of Biology",
"title": "Institute"
},
"E-Mail Address": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Institution email address",
"title": "E-Mail Address"
},
"ORCID investigator": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "ORCID ID as URL, e.g. https://orcid.org/0000-0002-3704-3675",
"title": "Orcid Investigator"
}
},
"title": "DataOwner",
"type": "object"
},
"ImageAcquisition": {
"description": "Image acquisition information.",
"properties": {
"Microscope id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Url to micrometa app file link or other url describing your microscope",
"title": "Microscope Id"
}
},
"title": "ImageAcquisition",
"type": "object"
},
"ImageData": {
"description": "Image data information.",
"properties": {
"Image number of pixelsX": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Indicate number of pixels in x in images",
"title": "Image Number Of Pixelsx"
},
"Image number of pixelsY": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Indicate number of pixels in y in images",
"title": "Image Number Of Pixelsy"
},
"Image number of z-stacks": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Indicate number z stacks in image, single image is z=1",
"title": "Image Number Of Z-Stacks"
},
"Image number of channels": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Indicate number of channels in your image",
"title": "Image Number Of Channels"
},
"Image number of timepoints": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Indicate number of time point(s) in your image",
"title": "Image Number Of Timepoints"
},
"Image sites per well": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Number of fields, numeric value",
"title": "Image Sites Per Well"
}
},
"title": "ImageData",
"type": "object"
},
"InvestigationInfo": {
"description": "Core investigation information.",
"properties": {
"Project ID": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "EU/NWO/consortium ID \u2013 Examples: EuTOX",
"title": "Project Id"
},
"Investigation Title": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "High level concept to link related studies",
"title": "Investigation Title"
},
"Investigation internal ID": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Corresponding internal ID for your investigation",
"title": "Investigation Internal Id"
},
"Investigation description": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Short description for your investigation",
"title": "Investigation Description"
}
},
"title": "InvestigationInfo",
"type": "object"
},
"InvestigationInformation": {
"additionalProperties": true,
"description": "Investigation-level metadata with structured fields.",
"example": {
"data_owner": {
"email": "j.doe@example.com",
"first_name": "Jane",
"last_name": "Doe",
"orcid": "https://orcid.org/0000-0002-3704-3675"
},
"investigation_info": {
"investigation_title": "Example Investigation",
"project_id": "EuTOX"
}
},
"properties": {
"data_owner": {
"anyOf": [
{
"$ref": "#/$defs/DataOwner"
},
{
"type": "null"
}
],
"default": null,
"description": "Data owner information"
},
"data_collaborators": {
"description": "List of data collaborators",
"items": {
"$ref": "#/$defs/DataCollaborator"
},
"title": "Data Collaborators",
"type": "array"
},
"investigation_info": {
"anyOf": [
{
"$ref": "#/$defs/InvestigationInfo"
},
{
"type": "null"
}
],
"default": null,
"description": "Core investigation information"
}
},
"title": "InvestigationInformation",
"type": "object"
},
"Library": {
"description": "Library information.",
"properties": {
"Library File Name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Library file info",
"title": "Library File Name"
},
"Library File Format": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Library file info",
"title": "Library File Format"
},
"Library Type": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Library file info",
"title": "Library Type"
},
"Library Manufacturer": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Library file info",
"title": "Library Manufacturer"
},
"Library Version": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Library file info",
"title": "Library Version"
},
"Library Experimental Conditions": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Any experimental conditions some cells were grown under as part of the study",
"title": "Library Experimental Conditions"
},
"Quality Control Description": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "A brief description of the kind of quality control measures that were taken",
"title": "Quality Control Description"
}
},
"title": "Library",
"type": "object"
},
"Plate": {
"description": "Plate information.",
"properties": {
"Plate type": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Example: uclear",
"title": "Plate Type"
},
"Plate type Manufacturer": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Example: Greiner Bio-One",
"title": "Plate Type Manufacturer"
},
"Plate type Catalog number": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Example: 781081",
"title": "Plate Type Catalog Number"
}
},
"title": "Plate",
"type": "object"
},
"Protocols": {
"description": "Protocol information.",
"properties": {
"HCS library protocol": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Url/doi protocols.io or ELN associated url. At least SOP/protocol filename",
"title": "Hcs Library Protocol"
},
"growth protocol": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Url/doi protocols.io or ELN associated url. At least SOP/protocol filename",
"title": "Growth Protocol"
},
"treatment protocol": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Url/doi protocols.io or ELN associated url. At least SOP/protocol filename",
"title": "Treatment Protocol"
},
"HCS data analysis protocol": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Url/doi protocols.io or ELN associated url. At least SOP/protocol filename",
"title": "Hcs Data Analysis Protocol"
}
},
"title": "Protocols",
"type": "object"
},
"ReferenceSheet": {
"description": "Reference sheet data (sheets starting with '_').",
"example": {
"data": {
"Human": "Homo sapiens",
"Mouse": "Mus musculus"
},
"name": "_Organisms"
},
"properties": {
"name": {
"description": "Sheet name (including '_' prefix)",
"title": "Name",
"type": "string"
},
"data": {
"additionalProperties": true,
"description": "Key-value pairs from reference sheet",
"title": "Data",
"type": "object"
}
},
"required": [
"name"
],
"title": "ReferenceSheet",
"type": "object"
},
"Specimen": {
"description": "Specimen/channel information with dynamic channel support.\n\nChannels are stored as a list internally but can be converted to/from\nthe flat Excel format (Channel 1 visualization method, etc.).",
"properties": {
"Channel Transmission id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Channel id is dependent on different machines, first or last. If No transmission is acquired state NA",
"title": "Channel Transmission Id"
},
"channels": {
"description": "List of channel information (supports up to 8 channels)",
"items": {
"$ref": "#/$defs/Channel"
},
"title": "Channels",
"type": "array"
}
},
"title": "Specimen",
"type": "object"
},
"Study": {
"description": "Study information.",
"properties": {
"Study Title": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Manuscript/chapter/publication/paragraph title describing purpose or intention for one or multiple assays",
"title": "Study Title"
},
"Study internal ID": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Study ID, linked to ELN or lab journal",
"title": "Study Internal Id"
},
"Study Description": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Description of study with additional unstructured information",
"title": "Study Description"
},
"Study Key Words": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "List of key words associated with your study (EFO-terms)",
"title": "Study Key Words"
}
},
"title": "Study",
"type": "object"
},
"StudyInformation": {
"additionalProperties": true,
"description": "Study-level metadata with structured fields.",
"example": {
"biosample": {
"biosample_organism": "Human"
},
"study": {
"study_internal_id": "STD-001",
"study_title": "Example Study"
}
},
"properties": {
"study": {
"anyOf": [
{
"$ref": "#/$defs/Study"
},
{
"type": "null"
}
],
"default": null,
"description": "Study information"
},
"biosample": {
"anyOf": [
{
"$ref": "#/$defs/Biosample"
},
{
"type": "null"
}
],
"default": null,
"description": "Biosample information"
},
"library": {
"anyOf": [
{
"$ref": "#/$defs/Library"
},
{
"type": "null"
}
],
"default": null,
"description": "Library information"
},
"protocols": {
"anyOf": [
{
"$ref": "#/$defs/Protocols"
},
{
"type": "null"
}
],
"default": null,
"description": "Protocol information"
},
"plate": {
"anyOf": [
{
"$ref": "#/$defs/Plate"
},
{
"type": "null"
}
],
"default": null,
"description": "Plate information"
}
},
"title": "StudyInformation",
"type": "object"
}
},
"description": "Complete MIHCSME metadata structure.",
"example": {
"assay_conditions": [
{
"conditions": {
"Compound": "DMSO"
},
"plate": "Plate1",
"well": "A01"
}
],
"investigation_information": {
"groups": {
"Investigation": {
"Investigation Identifier": "INV-001"
}
}
}
},
"properties": {
"investigation_information": {
"anyOf": [
{
"$ref": "#/$defs/InvestigationInformation"
},
{
"type": "null"
}
],
"default": null
},
"study_information": {
"anyOf": [
{
"$ref": "#/$defs/StudyInformation"
},
{
"type": "null"
}
],
"default": null
},
"assay_information": {
"anyOf": [
{
"$ref": "#/$defs/AssayInformation"
},
{
"type": "null"
}
],
"default": null
},
"assay_conditions": {
"items": {
"$ref": "#/$defs/AssayCondition"
},
"title": "Assay Conditions",
"type": "array"
},
"reference_sheets": {
"items": {
"$ref": "#/$defs/ReferenceSheet"
},
"title": "Reference Sheets",
"type": "array"
}
},
"title": "MIHCSMEMetadata",
"type": "object"
}
Config:
json_schema_extra:{'example': {'investigation_information': {'groups': {'Investigation': {'Investigation Identifier': 'INV-001'}}}, 'assay_conditions': [{'plate': 'Plate1', 'well': 'A01', 'conditions': {'Compound': 'DMSO'}}]}}
Fields:
-
investigation_information(Optional[InvestigationInformation]) -
study_information(Optional[StudyInformation]) -
assay_information(Optional[AssayInformation]) -
assay_conditions(List[AssayCondition]) -
reference_sheets(List[ReferenceSheet])
from_dataframe(df: 'pd.DataFrame', **kwargs: Any) -> 'MIHCSMEMetadata'
classmethod
#
Create MIHCSMEMetadata from a pandas DataFrame of assay conditions.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
df
|
'pd.DataFrame'
|
DataFrame with at minimum 'Plate' and 'Well' columns. All other columns become condition fields in the conditions dict. |
required |
**kwargs
|
Any
|
Additional fields for MIHCSMEMetadata (investigation_information, etc.) |
{}
|
Returns:
| Type | Description |
|---|---|
'MIHCSMEMetadata'
|
MIHCSMEMetadata instance with assay conditions from DataFrame |
Example
import pandas as pd df = pd.DataFrame({ ... "Plate": ["Plate1", "Plate1"], ... "Well": ["A01", "A02"], ... "Treatment": ["DMSO", "Drug"], ... "Dose": ["0.1", "10"], ... "DoseUnit": ["µM", "µM"], ... }) metadata = MIHCSMEMetadata.from_dataframe(df)
Source code in src/mihcsme_py/models.py
1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 | |
from_omero_dict(data: Dict[str, Any]) -> 'MIHCSMEMetadata'
classmethod
#
Create a MIHCSMEMetadata instance from OMERO dictionary format.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
data
|
Dict[str, Any]
|
Dictionary in OMERO format |
required |
Returns:
| Type | Description |
|---|---|
'MIHCSMEMetadata'
|
MIHCSMEMetadata instance |
Source code in src/mihcsme_py/models.py
to_dataframe() -> 'pd.DataFrame'
#
Convert assay conditions to a pandas DataFrame.
All condition fields (both standard and custom) are included as columns.
Returns:
| Type | Description |
|---|---|
'pd.DataFrame'
|
DataFrame with columns: Plate, Well, and all condition fields |
Source code in src/mihcsme_py/models.py
to_omero_dict(namespace_base: str = 'MIHCSME') -> Dict[str, Any]
#
Convert the Pydantic model to dictionary format for OMERO upload.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
namespace_base
|
str
|
Base namespace for OMERO annotations |
'MIHCSME'
|
Returns:
| Type | Description |
|---|---|
Dict[str, Any]
|
Dictionary in the format expected by the OMERO upload function |
Source code in src/mihcsme_py/models.py
update_conditions_from_dataframe(df: 'pd.DataFrame') -> 'MIHCSMEMetadata'
#
Update assay conditions from a DataFrame while preserving other metadata.
This is a convenience method that creates a new MIHCSMEMetadata instance with updated assay conditions from the DataFrame, while preserving all other metadata (investigation_information, study_information, etc.) from the current instance.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
df
|
'pd.DataFrame'
|
DataFrame with at minimum 'Plate' and 'Well' columns. All other columns become condition fields. |
required |
Returns:
| Type | Description |
|---|---|
'MIHCSMEMetadata'
|
New MIHCSMEMetadata instance with updated conditions |
Example
df = metadata.to_dataframe() df['New Column'] = df['Old Column'].str.lower() updated = metadata.update_conditions_from_dataframe(df)
updated has the new column, plus all original metadata#
Source code in src/mihcsme_py/models.py
MIHCSMEMetadataLLM
pydantic-model
#
Bases: BaseModel
Subset of MIHCSMEMetadata for LLM extraction.
This model excludes assay_conditions and reference_sheets as they are too large/complex for LLM context. Use this model when passing metadata schema to an LLM for extraction or modification.
Show JSON schema:
{
"$defs": {
"Assay": {
"description": "Assay information.",
"properties": {
"Assay Title": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Screen name",
"title": "Assay Title"
},
"Assay internal ID": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Experimental ID, e.g. aMV-010, linked to ELN or labjournal",
"title": "Assay Internal Id"
},
"Assay Description": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Description of screen plus additional unstructured information",
"title": "Assay Description"
},
"Assay number of biological replicates": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Total number of biol. Repl.",
"title": "Assay Number Of Biological Replicates"
},
"Number of plates": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Total number of plates, n-plates",
"title": "Number Of Plates"
},
"Assay Technology Type": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Imaging method, Fbbi terms",
"title": "Assay Technology Type"
},
"Assay Type": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "List of options: sub types of HCS e.g. Gene Knock down, RNAi, compound, EFO terms",
"title": "Assay Type"
},
"Assay External URL": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "ELN or any other external url link to this screen",
"title": "Assay External Url"
},
"Assay data URL": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "OMERO url link to this screen",
"title": "Assay Data Url"
}
},
"title": "Assay",
"type": "object"
},
"AssayComponent": {
"description": "Assay component information.",
"properties": {
"Imaging protocol": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Url to protocols.io or protocols in ELN, at least protocol file name",
"title": "Imaging Protocol"
},
"Sample preparation protocol": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Sample preparation method (Formaldahyde (PFA) fixed tissue, Live cells, unfixed tissue)",
"title": "Sample Preparation Protocol"
}
},
"title": "AssayComponent",
"type": "object"
},
"AssayInformation": {
"additionalProperties": true,
"description": "Assay-level metadata with structured fields.",
"example": {
"assay": {
"assay_internal_id": "ASY-001",
"assay_title": "Example Screen"
},
"image_data": {
"image_number_of_channels": "3"
}
},
"properties": {
"assay": {
"anyOf": [
{
"$ref": "#/$defs/Assay"
},
{
"type": "null"
}
],
"default": null,
"description": "Assay information"
},
"assay_component": {
"anyOf": [
{
"$ref": "#/$defs/AssayComponent"
},
{
"type": "null"
}
],
"default": null,
"description": "Assay component information"
},
"biosample": {
"anyOf": [
{
"$ref": "#/$defs/BiosampleAssay"
},
{
"type": "null"
}
],
"default": null,
"description": "Biosample information"
},
"image_data": {
"anyOf": [
{
"$ref": "#/$defs/ImageData"
},
{
"type": "null"
}
],
"default": null,
"description": "Image data information"
},
"image_acquisition": {
"anyOf": [
{
"$ref": "#/$defs/ImageAcquisition"
},
{
"type": "null"
}
],
"default": null,
"description": "Image acquisition information"
},
"specimen": {
"anyOf": [
{
"$ref": "#/$defs/Specimen"
},
{
"type": "null"
}
],
"default": null,
"description": "Specimen/channel information"
}
},
"title": "AssayInformation",
"type": "object"
},
"Biosample": {
"description": "Biosample information.",
"properties": {
"Biosample Taxon": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "NCBI-taxon id, human = NCBITAXON:9606",
"title": "Biosample Taxon"
},
"Biosample description": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Description of biosample genotype",
"title": "Biosample Description"
},
"Biosample Organism": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Which organism is your cell lines or tissue from. Examples: Human or mouse",
"title": "Biosample Organism"
},
"Number of cell lines used": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "In case multiple cell lines are used indicate here",
"title": "Number Of Cell Lines Used"
}
},
"title": "Biosample",
"type": "object"
},
"BiosampleAssay": {
"description": "Biosample information specific to assay.",
"properties": {
"Cell lines storage location": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Storage location according to Database used or at least location",
"title": "Cell Lines Storage Location"
},
"Cell lines clone number": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Storage location DB info",
"title": "Cell Lines Clone Number"
},
"Cell lines Passage number": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Passage number of your cells",
"title": "Cell Lines Passage Number"
}
},
"title": "BiosampleAssay",
"type": "object"
},
"Channel": {
"description": "Single channel information for specimen imaging.",
"properties": {
"visualization_method": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Visualization method (e.g., Hoechst staining, GFP)",
"title": "Visualization Method"
},
"entity": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Entity visualized (e.g., DNA, MAP1LC3B)",
"title": "Entity"
},
"label": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Label used for entity (e.g., Nuclei, GFP-LC3)",
"title": "Label"
},
"id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Sequential id of channel order in your image",
"title": "Id"
}
},
"title": "Channel",
"type": "object"
},
"DataCollaborator": {
"description": "Data collaborator information.",
"properties": {
"ORCID Data Collaborator": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "ORCID ID of collaborator with experimental, collection or analysis part of this investigation",
"title": "Orcid Data Collaborator"
}
},
"title": "DataCollaborator",
"type": "object"
},
"DataOwner": {
"description": "Data owner information.",
"properties": {
"First Name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "First Name",
"title": "First Name"
},
"Middle Name(s)": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Middle Name(s) if any",
"title": "Middle Name(S)"
},
"Last Name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Last Name",
"title": "Last Name"
},
"User name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Institutional user name",
"title": "User Name"
},
"Institute": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Institute level, e.g. Universiteit Leiden, Faculty of Science, Institute of Biology",
"title": "Institute"
},
"E-Mail Address": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Institution email address",
"title": "E-Mail Address"
},
"ORCID investigator": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "ORCID ID as URL, e.g. https://orcid.org/0000-0002-3704-3675",
"title": "Orcid Investigator"
}
},
"title": "DataOwner",
"type": "object"
},
"ImageAcquisition": {
"description": "Image acquisition information.",
"properties": {
"Microscope id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Url to micrometa app file link or other url describing your microscope",
"title": "Microscope Id"
}
},
"title": "ImageAcquisition",
"type": "object"
},
"ImageData": {
"description": "Image data information.",
"properties": {
"Image number of pixelsX": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Indicate number of pixels in x in images",
"title": "Image Number Of Pixelsx"
},
"Image number of pixelsY": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Indicate number of pixels in y in images",
"title": "Image Number Of Pixelsy"
},
"Image number of z-stacks": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Indicate number z stacks in image, single image is z=1",
"title": "Image Number Of Z-Stacks"
},
"Image number of channels": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Indicate number of channels in your image",
"title": "Image Number Of Channels"
},
"Image number of timepoints": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Indicate number of time point(s) in your image",
"title": "Image Number Of Timepoints"
},
"Image sites per well": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Number of fields, numeric value",
"title": "Image Sites Per Well"
}
},
"title": "ImageData",
"type": "object"
},
"InvestigationInfo": {
"description": "Core investigation information.",
"properties": {
"Project ID": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "EU/NWO/consortium ID \u2013 Examples: EuTOX",
"title": "Project Id"
},
"Investigation Title": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "High level concept to link related studies",
"title": "Investigation Title"
},
"Investigation internal ID": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Corresponding internal ID for your investigation",
"title": "Investigation Internal Id"
},
"Investigation description": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Short description for your investigation",
"title": "Investigation Description"
}
},
"title": "InvestigationInfo",
"type": "object"
},
"InvestigationInformation": {
"additionalProperties": true,
"description": "Investigation-level metadata with structured fields.",
"example": {
"data_owner": {
"email": "j.doe@example.com",
"first_name": "Jane",
"last_name": "Doe",
"orcid": "https://orcid.org/0000-0002-3704-3675"
},
"investigation_info": {
"investigation_title": "Example Investigation",
"project_id": "EuTOX"
}
},
"properties": {
"data_owner": {
"anyOf": [
{
"$ref": "#/$defs/DataOwner"
},
{
"type": "null"
}
],
"default": null,
"description": "Data owner information"
},
"data_collaborators": {
"description": "List of data collaborators",
"items": {
"$ref": "#/$defs/DataCollaborator"
},
"title": "Data Collaborators",
"type": "array"
},
"investigation_info": {
"anyOf": [
{
"$ref": "#/$defs/InvestigationInfo"
},
{
"type": "null"
}
],
"default": null,
"description": "Core investigation information"
}
},
"title": "InvestigationInformation",
"type": "object"
},
"Library": {
"description": "Library information.",
"properties": {
"Library File Name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Library file info",
"title": "Library File Name"
},
"Library File Format": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Library file info",
"title": "Library File Format"
},
"Library Type": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Library file info",
"title": "Library Type"
},
"Library Manufacturer": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Library file info",
"title": "Library Manufacturer"
},
"Library Version": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Library file info",
"title": "Library Version"
},
"Library Experimental Conditions": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Any experimental conditions some cells were grown under as part of the study",
"title": "Library Experimental Conditions"
},
"Quality Control Description": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "A brief description of the kind of quality control measures that were taken",
"title": "Quality Control Description"
}
},
"title": "Library",
"type": "object"
},
"Plate": {
"description": "Plate information.",
"properties": {
"Plate type": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Example: uclear",
"title": "Plate Type"
},
"Plate type Manufacturer": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Example: Greiner Bio-One",
"title": "Plate Type Manufacturer"
},
"Plate type Catalog number": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Example: 781081",
"title": "Plate Type Catalog Number"
}
},
"title": "Plate",
"type": "object"
},
"Protocols": {
"description": "Protocol information.",
"properties": {
"HCS library protocol": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Url/doi protocols.io or ELN associated url. At least SOP/protocol filename",
"title": "Hcs Library Protocol"
},
"growth protocol": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Url/doi protocols.io or ELN associated url. At least SOP/protocol filename",
"title": "Growth Protocol"
},
"treatment protocol": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Url/doi protocols.io or ELN associated url. At least SOP/protocol filename",
"title": "Treatment Protocol"
},
"HCS data analysis protocol": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Url/doi protocols.io or ELN associated url. At least SOP/protocol filename",
"title": "Hcs Data Analysis Protocol"
}
},
"title": "Protocols",
"type": "object"
},
"Specimen": {
"description": "Specimen/channel information with dynamic channel support.\n\nChannels are stored as a list internally but can be converted to/from\nthe flat Excel format (Channel 1 visualization method, etc.).",
"properties": {
"Channel Transmission id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Channel id is dependent on different machines, first or last. If No transmission is acquired state NA",
"title": "Channel Transmission Id"
},
"channels": {
"description": "List of channel information (supports up to 8 channels)",
"items": {
"$ref": "#/$defs/Channel"
},
"title": "Channels",
"type": "array"
}
},
"title": "Specimen",
"type": "object"
},
"Study": {
"description": "Study information.",
"properties": {
"Study Title": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Manuscript/chapter/publication/paragraph title describing purpose or intention for one or multiple assays",
"title": "Study Title"
},
"Study internal ID": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Study ID, linked to ELN or lab journal",
"title": "Study Internal Id"
},
"Study Description": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Description of study with additional unstructured information",
"title": "Study Description"
},
"Study Key Words": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "List of key words associated with your study (EFO-terms)",
"title": "Study Key Words"
}
},
"title": "Study",
"type": "object"
},
"StudyInformation": {
"additionalProperties": true,
"description": "Study-level metadata with structured fields.",
"example": {
"biosample": {
"biosample_organism": "Human"
},
"study": {
"study_internal_id": "STD-001",
"study_title": "Example Study"
}
},
"properties": {
"study": {
"anyOf": [
{
"$ref": "#/$defs/Study"
},
{
"type": "null"
}
],
"default": null,
"description": "Study information"
},
"biosample": {
"anyOf": [
{
"$ref": "#/$defs/Biosample"
},
{
"type": "null"
}
],
"default": null,
"description": "Biosample information"
},
"library": {
"anyOf": [
{
"$ref": "#/$defs/Library"
},
{
"type": "null"
}
],
"default": null,
"description": "Library information"
},
"protocols": {
"anyOf": [
{
"$ref": "#/$defs/Protocols"
},
{
"type": "null"
}
],
"default": null,
"description": "Protocol information"
},
"plate": {
"anyOf": [
{
"$ref": "#/$defs/Plate"
},
{
"type": "null"
}
],
"default": null,
"description": "Plate information"
}
},
"title": "StudyInformation",
"type": "object"
}
},
"description": "MIHCSME metadata for LLM extraction (excludes per-well assay conditions)",
"properties": {
"investigation_information": {
"anyOf": [
{
"$ref": "#/$defs/InvestigationInformation"
},
{
"type": "null"
}
],
"default": null
},
"study_information": {
"anyOf": [
{
"$ref": "#/$defs/StudyInformation"
},
{
"type": "null"
}
],
"default": null
},
"assay_information": {
"anyOf": [
{
"$ref": "#/$defs/AssayInformation"
},
{
"type": "null"
}
],
"default": null
}
},
"title": "MIHCSMEMetadataLLM",
"type": "object"
}
Config:
json_schema_extra:{'description': 'MIHCSME metadata for LLM extraction (excludes per-well assay conditions)'}
Fields:
-
investigation_information(Optional[InvestigationInformation]) -
study_information(Optional[StudyInformation]) -
assay_information(Optional[AssayInformation])
to_full_metadata(assay_conditions: Optional[List[AssayCondition]] = None, reference_sheets: Optional[List[ReferenceSheet]] = None) -> MIHCSMEMetadata
#
Convert to full MIHCSMEMetadata with optional conditions.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
assay_conditions
|
Optional[List[AssayCondition]]
|
Optional list of assay conditions to include |
None
|
reference_sheets
|
Optional[List[ReferenceSheet]]
|
Optional list of reference sheets to include |
None
|
Returns:
| Type | Description |
|---|---|
MIHCSMEMetadata
|
Full MIHCSMEMetadata instance |
Source code in src/mihcsme_py/models.py
Plate
pydantic-model
#
Bases: BaseModel
Plate information.
Show JSON schema:
{
"description": "Plate information.",
"properties": {
"Plate type": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Example: uclear",
"title": "Plate Type"
},
"Plate type Manufacturer": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Example: Greiner Bio-One",
"title": "Plate Type Manufacturer"
},
"Plate type Catalog number": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Example: 781081",
"title": "Plate Type Catalog Number"
}
},
"title": "Plate",
"type": "object"
}
Config:
populate_by_name:True
Fields:
-
plate_type(Optional[str]) -
plate_type_manufacturer(Optional[str]) -
plate_type_catalog_number(StringCoerced)
Protocols
pydantic-model
#
Bases: BaseModel
Protocol information.
Show JSON schema:
{
"description": "Protocol information.",
"properties": {
"HCS library protocol": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Url/doi protocols.io or ELN associated url. At least SOP/protocol filename",
"title": "Hcs Library Protocol"
},
"growth protocol": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Url/doi protocols.io or ELN associated url. At least SOP/protocol filename",
"title": "Growth Protocol"
},
"treatment protocol": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Url/doi protocols.io or ELN associated url. At least SOP/protocol filename",
"title": "Treatment Protocol"
},
"HCS data analysis protocol": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Url/doi protocols.io or ELN associated url. At least SOP/protocol filename",
"title": "Hcs Data Analysis Protocol"
}
},
"title": "Protocols",
"type": "object"
}
Config:
populate_by_name:True
Fields:
-
hcs_library_protocol(Optional[str]) -
growth_protocol(Optional[str]) -
treatment_protocol(Optional[str]) -
hcs_data_analysis_protocol(Optional[str])
growth_protocol: Optional[str] = None
pydantic-field
#
Url/doi protocols.io or ELN associated url. At least SOP/protocol filename
hcs_data_analysis_protocol: Optional[str] = None
pydantic-field
#
Url/doi protocols.io or ELN associated url. At least SOP/protocol filename
hcs_library_protocol: Optional[str] = None
pydantic-field
#
Url/doi protocols.io or ELN associated url. At least SOP/protocol filename
treatment_protocol: Optional[str] = None
pydantic-field
#
Url/doi protocols.io or ELN associated url. At least SOP/protocol filename
ReferenceSheet
pydantic-model
#
Bases: BaseModel
Reference sheet data (sheets starting with '_').
Show JSON schema:
{
"description": "Reference sheet data (sheets starting with '_').",
"example": {
"data": {
"Human": "Homo sapiens",
"Mouse": "Mus musculus"
},
"name": "_Organisms"
},
"properties": {
"name": {
"description": "Sheet name (including '_' prefix)",
"title": "Name",
"type": "string"
},
"data": {
"additionalProperties": true,
"description": "Key-value pairs from reference sheet",
"title": "Data",
"type": "object"
}
},
"required": [
"name"
],
"title": "ReferenceSheet",
"type": "object"
}
Config:
json_schema_extra:{'example': {'name': '_Organisms', 'data': {'Human': 'Homo sapiens', 'Mouse': 'Mus musculus'}}}
Fields:
Specimen
pydantic-model
#
Bases: BaseModel
Specimen/channel information with dynamic channel support.
Channels are stored as a list internally but can be converted to/from the flat Excel format (Channel 1 visualization method, etc.).
Show JSON schema:
{
"$defs": {
"Channel": {
"description": "Single channel information for specimen imaging.",
"properties": {
"visualization_method": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Visualization method (e.g., Hoechst staining, GFP)",
"title": "Visualization Method"
},
"entity": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Entity visualized (e.g., DNA, MAP1LC3B)",
"title": "Entity"
},
"label": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Label used for entity (e.g., Nuclei, GFP-LC3)",
"title": "Label"
},
"id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Sequential id of channel order in your image",
"title": "Id"
}
},
"title": "Channel",
"type": "object"
}
},
"description": "Specimen/channel information with dynamic channel support.\n\nChannels are stored as a list internally but can be converted to/from\nthe flat Excel format (Channel 1 visualization method, etc.).",
"properties": {
"Channel Transmission id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Channel id is dependent on different machines, first or last. If No transmission is acquired state NA",
"title": "Channel Transmission Id"
},
"channels": {
"description": "List of channel information (supports up to 8 channels)",
"items": {
"$ref": "#/$defs/Channel"
},
"title": "Channels",
"type": "array"
}
},
"title": "Specimen",
"type": "object"
}
Config:
populate_by_name:True
Fields:
-
channel_transmission_id(StringCoerced) -
channels(List[Channel])
channel_transmission_id: StringCoerced = None
pydantic-field
#
Channel id is dependent on different machines, first or last. If No transmission is acquired state NA
channels: List[Channel]
pydantic-field
#
List of channel information (supports up to 8 channels)
from_flat_dict(data: Dict[str, Any]) -> 'Specimen'
classmethod
#
Create Specimen from flat dictionary format (Excel/OMERO).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
data
|
Dict[str, Any]
|
Dictionary with keys like 'Channel 1 visualization method', etc. |
required |
Returns:
| Type | Description |
|---|---|
'Specimen'
|
Specimen instance with channels list populated |
Source code in src/mihcsme_py/models.py
to_flat_dict() -> Dict[str, Any]
#
Convert to flat dictionary format for Excel/OMERO export.
Returns:
| Type | Description |
|---|---|
Dict[str, Any]
|
Dictionary with keys like 'Channel Transmission id', |
Dict[str, Any]
|
'Channel 1 visualization method', 'Channel 1 entity', etc. |
Source code in src/mihcsme_py/models.py
Study
pydantic-model
#
Bases: BaseModel
Study information.
Show JSON schema:
{
"description": "Study information.",
"properties": {
"Study Title": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Manuscript/chapter/publication/paragraph title describing purpose or intention for one or multiple assays",
"title": "Study Title"
},
"Study internal ID": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Study ID, linked to ELN or lab journal",
"title": "Study Internal Id"
},
"Study Description": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Description of study with additional unstructured information",
"title": "Study Description"
},
"Study Key Words": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "List of key words associated with your study (EFO-terms)",
"title": "Study Key Words"
}
},
"title": "Study",
"type": "object"
}
Config:
populate_by_name:True
Fields:
-
study_title(Optional[str]) -
study_internal_id(StringCoerced) -
study_description(Optional[str]) -
study_key_words(Optional[str])
study_description: Optional[str] = None
pydantic-field
#
Description of study with additional unstructured information
study_internal_id: StringCoerced = None
pydantic-field
#
Study ID, linked to ELN or lab journal
study_key_words: Optional[str] = None
pydantic-field
#
List of key words associated with your study (EFO-terms)
study_title: Optional[str] = None
pydantic-field
#
Manuscript/chapter/publication/paragraph title describing purpose or intention for one or multiple assays
StudyInformation
pydantic-model
#
Bases: BaseModel
Study-level metadata with structured fields.
Show JSON schema:
{
"$defs": {
"Biosample": {
"description": "Biosample information.",
"properties": {
"Biosample Taxon": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "NCBI-taxon id, human = NCBITAXON:9606",
"title": "Biosample Taxon"
},
"Biosample description": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Description of biosample genotype",
"title": "Biosample Description"
},
"Biosample Organism": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Which organism is your cell lines or tissue from. Examples: Human or mouse",
"title": "Biosample Organism"
},
"Number of cell lines used": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "In case multiple cell lines are used indicate here",
"title": "Number Of Cell Lines Used"
}
},
"title": "Biosample",
"type": "object"
},
"Library": {
"description": "Library information.",
"properties": {
"Library File Name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Library file info",
"title": "Library File Name"
},
"Library File Format": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Library file info",
"title": "Library File Format"
},
"Library Type": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Library file info",
"title": "Library Type"
},
"Library Manufacturer": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Library file info",
"title": "Library Manufacturer"
},
"Library Version": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Library file info",
"title": "Library Version"
},
"Library Experimental Conditions": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Any experimental conditions some cells were grown under as part of the study",
"title": "Library Experimental Conditions"
},
"Quality Control Description": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "A brief description of the kind of quality control measures that were taken",
"title": "Quality Control Description"
}
},
"title": "Library",
"type": "object"
},
"Plate": {
"description": "Plate information.",
"properties": {
"Plate type": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Example: uclear",
"title": "Plate Type"
},
"Plate type Manufacturer": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Example: Greiner Bio-One",
"title": "Plate Type Manufacturer"
},
"Plate type Catalog number": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Example: 781081",
"title": "Plate Type Catalog Number"
}
},
"title": "Plate",
"type": "object"
},
"Protocols": {
"description": "Protocol information.",
"properties": {
"HCS library protocol": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Url/doi protocols.io or ELN associated url. At least SOP/protocol filename",
"title": "Hcs Library Protocol"
},
"growth protocol": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Url/doi protocols.io or ELN associated url. At least SOP/protocol filename",
"title": "Growth Protocol"
},
"treatment protocol": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Url/doi protocols.io or ELN associated url. At least SOP/protocol filename",
"title": "Treatment Protocol"
},
"HCS data analysis protocol": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Url/doi protocols.io or ELN associated url. At least SOP/protocol filename",
"title": "Hcs Data Analysis Protocol"
}
},
"title": "Protocols",
"type": "object"
},
"Study": {
"description": "Study information.",
"properties": {
"Study Title": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Manuscript/chapter/publication/paragraph title describing purpose or intention for one or multiple assays",
"title": "Study Title"
},
"Study internal ID": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Study ID, linked to ELN or lab journal",
"title": "Study Internal Id"
},
"Study Description": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Description of study with additional unstructured information",
"title": "Study Description"
},
"Study Key Words": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "List of key words associated with your study (EFO-terms)",
"title": "Study Key Words"
}
},
"title": "Study",
"type": "object"
}
},
"additionalProperties": true,
"description": "Study-level metadata with structured fields.",
"example": {
"biosample": {
"biosample_organism": "Human"
},
"study": {
"study_internal_id": "STD-001",
"study_title": "Example Study"
}
},
"properties": {
"study": {
"anyOf": [
{
"$ref": "#/$defs/Study"
},
{
"type": "null"
}
],
"default": null,
"description": "Study information"
},
"biosample": {
"anyOf": [
{
"$ref": "#/$defs/Biosample"
},
{
"type": "null"
}
],
"default": null,
"description": "Biosample information"
},
"library": {
"anyOf": [
{
"$ref": "#/$defs/Library"
},
{
"type": "null"
}
],
"default": null,
"description": "Library information"
},
"protocols": {
"anyOf": [
{
"$ref": "#/$defs/Protocols"
},
{
"type": "null"
}
],
"default": null,
"description": "Protocol information"
},
"plate": {
"anyOf": [
{
"$ref": "#/$defs/Plate"
},
{
"type": "null"
}
],
"default": null,
"description": "Plate information"
}
},
"title": "StudyInformation",
"type": "object"
}
Config:
extra:allowjson_schema_extra:{'example': {'study': {'study_title': 'Example Study', 'study_internal_id': 'STD-001'}, 'biosample': {'biosample_organism': 'Human'}}}
Fields:
-
study(Optional[Study]) -
biosample(Optional[Biosample]) -
library(Optional[Library]) -
protocols(Optional[Protocols]) -
plate(Optional[Plate])
biosample: Optional[Biosample] = None
pydantic-field
#
Biosample information
groups: Dict[str, Dict[str, Any]]
property
#
Convert to groups dictionary format for OMERO upload.
library: Optional[Library] = None
pydantic-field
#
Library information
plate: Optional[Plate] = None
pydantic-field
#
Plate information
protocols: Optional[Protocols] = None
pydantic-field
#
Protocol information
study: Optional[Study] = None
pydantic-field
#
Study information
from_groups_dict(groups: Dict[str, Dict[str, Any]]) -> 'StudyInformation'
classmethod
#
Create from groups dictionary format.
Source code in src/mihcsme_py/models.py
to_groups_dict() -> Dict[str, Dict[str, Any]]
#
Convert to groups dictionary format.