ts_ids_components.plate_reader package#

Submodules#

Module contents#

This module contains components for plate reader IDSs.

Plate reader samples and datacubes#

A common data usage pattern for plate reader data is to read measurement data, such as absorbance or fluorescence values, and analyse them along with metadata about the sample which was being measured.

To do this, use the samples common component to store information about the sample in each well of the plate, including a UUID primary key field named "pk". In datacubes, include a foreign key to samples with the name fk_sample. This structure is defined in PlateReaderSchema below, and that class can be used as a starting point for defining plate reader schemas.

When populating data into a plate reader IDS, store data from each well in a separate element of the datacubes array.

This convention exists to serve two goals:

  1. Data from many different plate readers is stored in the same format, so downstream code which consumes it does not need customizing per instrument.

  2. Measurement data can be joined to the metadata of the sample it came from in one standard way, which is the same for every plate reader.

The rest of this section explains how the convention achieves those goals, what it means for queries, and why other approaches were not chosen.

One datacube per well#

Each element of datacubes holds the data from a single well, for a single measure. Both of its dimensions are reserved for the axes the measurement varies along – time and wavelength – and the well it came from is identified by fk_sample, not by a dimension.

Fixing the granularity at one well is what allows a single datacube structure to cover plate readers which differ in modality (endpoint, kinetics, spectral scan), in assay type (absorbance, fluorescence, luminescence and others) and across different vendors and plate reader models.

Per-well datacubes also keep wells independent of each other. A well measured over a different set of timepoints or wavelengths than its neighbours carries its own scales, and a well which was not read is simply absent from datacubes. This allows measures[*].value to be a fully populated rectangular array matching the dimension scales: if the well were a dimension instead, every well on the plate would have to share one identical time scale and one identical wavelength scale, and an unread or masked well would have to be padded with nulls to keep the array rectangular.

A cost of this convention is duplication – the time and wavelength scales are repeated in the datacube of every well. Another cost is that, for non-spectral endpoint measurements, there is 1 time point and 1 wavelength per well, which can lead to a large number of datacubes containing a single measure value. These downsides are accepted in exchange for the consistency this approach enables.

Linking samples and datacubes with primary and foreign keys#

samples[*].pk and datacubes[*].fk_sample form a primary key and foreign key pair, following the general IDS conventions for describing relationships. samples is a dimension table, describing what was measured; datacubes is a fact table, holding the measurements themselves. Foreign keys belong on the fact table, so datacubes points at samples and not the other way around.

This gives the datacube one place to record which well it came from, and gives consumers everything about that well through a single join: samples already holds the well position, index, row and column, along with sample identifiers and any other sample metadata.

Because a foreign key is a single scalar value, one datacube can only relate to one well. The linking mechanism and the one-datacube-per-well granularity therefore imply each other – given fk_sample on datacubes, a well dimension would not be meaningful.

Foreign keys are not nullable, which keeps joins predictable: a nullable foreign key silently drops rows from an inner join, or produces all-null joined columns from a left join. Where a well has no sample information at all, populate an otherwise-empty samples element for it so there is still a row to link to.

A datacube can carry several foreign keys at once. PlateReaderDatacube2D has fk_sample, fk_protocol_step and fk_method for example. These can be modified for each IDS to join datacubes with any relevant metadata which is useful to join.

Here is an example of defining a schema which inherits from PlateReaderSchema and populating it in Python. This shows data being manually populated in the script itself, but in typical usage, this data would be parsed from a raw data file.

from typing import ClassVar

from ts_ids_core.annotations import Required
from ts_ids_core.schema import IdsField, Location, SchemaExtraMetadataType
from typing_extensions import Literal

from ts_ids_components.plate_reader import (
    Measure2D,
    PlateReaderDatacube2D,
    PlateReaderDimension,
    PlateReaderSample,
    PlateReaderSchema,
)
from ts_ids_components.plate_reader.methods import (
    PlateReaderMeasurementSetting,
    PlateReaderMethod,
    PlateReaderStep,
)

# Define a plate reader model which only uses the defaults provided by PlateReaderSchema
class DemoModel(PlateReaderSchema):
    schema_extra_metadata: ClassVar[SchemaExtraMetadataType] = {
        "$id": "https://ids.tetrascience.com/common/demo/v1.0.0/schema.json",
        "$schema": "http://json-schema.org/draft-07/schema#",
    }
    ids_type: Required[Literal["demo"]] = IdsField(default="demo", alias="@idsType")
    ids_version: Required[Literal["v1.0.0"]] = IdsField(
        default="v1.0.0", alias="@idsVersion"
    )
    ids_namespace: Required[Literal["common"]] = IdsField(
        default="common", alias="@idsNamespace"
    )

# Example UUIDs - these would come from a UUID generator in a task script
uuid1 = "abc00000-0000-0000-0000-000000000001"
uuid2 = "abc00000-0000-0000-0000-000000000002"
uuid3 = "abc00000-0000-0000-0000-000000000003"
uuid4 = "abc00000-0000-0000-0000-000000000004"
uuid5 = "abc00000-0000-0000-0000-000000000005"

# Populate the model with example data
instance = DemoModel(
    methods=[
        PlateReaderMethod(
            pk=uuid3,
            name="My Method",
        )
    ],
    protocol_steps=[
        PlateReaderStep(
            pk=uuid4,
            fk_method=uuid3,
            index=0,
            name="Absorbance",
        )
    ],
    measurement_settings=[
        PlateReaderMeasurementSetting(
            pk=uuid5,
            fk_method=uuid3,
            fk_protocol_step=uuid4,
            index=0,
            modality="Absorbance",
            number_of_readings=1,
            absorbance=Chromatics(
                type_=OpticalSetup.SPECTRAL_SCAN.value,
                start=RawValueUnit(raw_value="430", value=430.0, unit="Nanometer"),
                end=RawValueUnit(raw_value="440", value=440.0, unit="Nanometer"),
                step=RawValueUnit(raw_value="5", value=5.0, unit="Nanometer"),
            ),
        )
    ],
    samples=[
        PlateReaderSample(
            pk=uuid1,
            id_="sample_under_test_1",
            location=Location(position="A01"),
        ),
        PlateReaderSample(
            pk=uuid2,
            id_="sample_under_test_2",
            location=Location(position="A02"),
        ),
    ],
    datacubes=[
        # The first element contains data from well A01
        PlateReaderDatacube2D(
            fk_sample=uuid1,
            fk_method=uuid3,
            fk_protocol_step=uuid4,
            name="Absorbance: A01",
            measures=[
                Measure2D(
                    name="absorbance", unit="ArbitraryUnit", value=[[1, 2, 3]]
                )
            ],
            dimensions=[
                PlateReaderDimension(name="time", unit="SecondTime", scale=[0]),
                PlateReaderDimension(
                    name="wavelength", unit="Nanometer", scale=[430, 435, 440]
                ),
            ],
        ),
        # The second element contains data from well A02
        PlateReaderDatacube2D(
            fk_sample=uuid2,
            fk_method=uuid3,
            fk_protocol_step=uuid4,
            name="Absorbance: A02",
            measures=[
                Measure2D(
                    name="absorbance", unit="ArbitraryUnit", value=[[4, 5, 6]]
                )
            ],
            dimensions=[
                PlateReaderDimension(name="time", unit="SecondTime", scale=[0]),
                PlateReaderDimension(
                    name="wavelength", unit="Nanometer", scale=[430, 435, 440]
                ),
            ],
        ),
    ],
)

Then, the data could be dumped to JSON by calling instance.model_dump_json(indent=2) The resulting IDS JSON looks like this:

{
  "@idsType": "demo",
  "@idsVersion": "v1.0.0",
  "@idsNamespace": "common",
  "methods": [
    {
      "pk": "abc00000-0000-0000-0000-000000000003",
      "name": "My Method"
    }
  ],
  "protocol_steps": [
    {
      "pk": "abc00000-0000-0000-0000-000000000004",
      "fk_method": "abc00000-0000-0000-0000-000000000003",
      "index": 0,
      "name": "Absorbance"
    }
  ],
  "measurement_settings": [
    {
      "absorbance": {
        "start": {
          "value": 430.0,
          "unit": "Nanometer",
          "raw_value": "430"
        },
        "end": {
          "value": 440.0,
          "unit": "Nanometer",
          "raw_value": "440"
        },
        "step": {
          "value": 5.0,
          "unit": "Nanometer",
          "raw_value": "5"
        },
        "type": "spectral scan"
      },
      "pk": "abc00000-0000-0000-0000-000000000005",
      "fk_protocol_step": "abc00000-0000-0000-0000-000000000004",
      "fk_method": "abc00000-0000-0000-0000-000000000003",
      "index": 0,
      "modality": "Absorbance",
      "number_of_readings": 1
    }
  ],
  "samples": [
    {
      "id": "sample_under_test_1",
      "location": {
        "position": "A01"
      },
      "pk": "abc00000-0000-0000-0000-000000000001"
    },
    {
      "id": "sample_under_test_2",
      "location": {
        "position": "A02"
      },
      "pk": "abc00000-0000-0000-0000-000000000002"
    }
  ],
  "datacubes": [
    {
      "name": "Absorbance: A01",
      "measures": [
        {
          "name": "absorbance",
          "unit": "ArbitraryUnit",
          "value": [
            [
              1.0,
              2.0,
              3.0
            ]
          ]
        }
      ],
      "dimensions": [
        {
          "name": "time",
          "unit": "SecondTime",
          "scale": [
            0.0
          ]
        },
        {
          "name": "wavelength",
          "unit": "Nanometer",
          "scale": [
            430.0,
            435.0,
            440.0
          ]
        }
      ],
      "fk_sample": "abc00000-0000-0000-0000-000000000001",
      "fk_protocol_step": "abc00000-0000-0000-0000-000000000004",
      "fk_method": "abc00000-0000-0000-0000-000000000003"
    },
    {
      "name": "Absorbance: A02",
      "measures": [
        {
          "name": "absorbance",
          "unit": "ArbitraryUnit",
          "value": [
            [
              4.0,
              5.0,
              6.0
            ]
          ]
        }
      ],
      "dimensions": [
        {
          "name": "time",
          "unit": "SecondTime",
          "scale": [
            0.0
          ]
        },
        {
          "name": "wavelength",
          "unit": "Nanometer",
          "scale": [
            430.0,
            435.0,
            440.0
          ]
        }
      ],
      "fk_sample": "abc00000-0000-0000-0000-000000000002",
      "fk_protocol_step": "abc00000-0000-0000-0000-000000000004",
      "fk_method": "abc00000-0000-0000-0000-000000000003"
    }
  ]
}

How this affects queries#

In the Lakehouse, each top-level array of an IDS becomes one table, named {ids_type}_v{major_version}_{field} with hyphens replaced by underscores, inside a schema named after the IDS type. For an IDS type of plate-reader-acme-1000:v2.0.0, samples and datacubes become plate_reader_acme_1000_v2_samples and plate_reader_acme_1000_v2_datacubes. A datacube’s metadata and its numeric data are in that one _datacubes table, with the metadata repeated on each row of data.

Joining measurement data to sample metadata is then a single join on the key pair:

SELECT
    samples.location_position,
    samples.id,
    datacubes.dimension_0_value AS time_value,
    datacubes.dimension_1_value AS wavelength_value,
    datacubes.measure_0_value AS absorbance_value
FROM plate_reader_acme_1000_v2_datacubes AS datacubes
JOIN plate_reader_acme_1000_v2_samples AS samples
    ON samples.pk = datacubes.fk_sample

The important property is that this query is not scoped to one file. Primary keys are UUIDs generated per IDS instance, so they are unique across the whole table, and the join above is correct over data from every file of this IDS type at once. The same query shape works for any other plate reader IDS following this convention – only the table names change.

Measures and dimensions appear as measure_{n}_value and dimension_{n}_value columns, numbered by their position in the measures and dimensions arrays. This positional naming is one reason to keep the dimensions fixed and meaningful: with the convention above, dimension_0_value is always time and dimension_1_value is always wavelength.

Why not other approaches#

Expand: alternative ways of linking samples and datacubes

A sample index, well index, row or column as a dimension. This approach was used prior to the current convention. These are some of the reasons not to use that approach:

  • An index is only unique within one file. Sample index 0 in one IDS instance is a different well from sample index 0 in another, so joining samples to datacubes on the index alone is wrong as soon as more than one file is in scope. It can be made to work, but only by first joining data from a single instance together using the platform-generated uuid/parent_uuid columns, which do not exist in the IDS schema and are a common source of confusion:

    -- With a sample index dimension: correct only within one file
    SELECT samples.id, datacubes.measure_0_value
    FROM plate_reader_acme_1000_v2_datacubes AS datacubes
    JOIN plate_reader_acme_1000_v2_samples AS samples
        ON samples.parent_uuid = datacubes.parent_uuid
        AND samples.location_index = datacubes.dimension_0_value
    

    That second condition also hard-codes the knowledge that dimension_0 is the sample index, and relies on samples.location_index being available from the raw data, which is not always possible, as described below.

  • An index cannot always be derived from the raw data. If the raw file gives only a well position such as B02 and never states the plate size, there is no way to compute an index from it. An arbitrary number could be assigned, but that is not a well index and would not match any other system.

  • Dimension scales have to be numeric – all dimensions share a single data type, and Lakehouse transformations require numeric dimensions – so a well position like "B02" cannot be a dimension at all, only a derived index.

  • Some data has no unique index to use. On instruments which report aggregates alongside individual locations, the aggregate rows share a placeholder index, so a dimension would have to be populated with invented values and then documented.

  • Conceptually, a dimension scale describes a physical axis along which a measurement varies. Identity and metadata are a different kind of information, and belong in fields on datacubes[*] or behind a foreign key.

When to use 3D datacubes#

2D datacubes with time and wavelength dimensions are for data which has a single spectral axis, as in absorbance or a single emission scan. Use PlateReaderDatacube3D with dimensions of excitation wavelength and emission wavelength when an instrument is capable of spectrally scanning both excitation and emission wavelengths. For multi-modal instruments which don’t always need the third dimension, use the 3D datacube in the IDS and just populate two of the dimensions for single-scan data.

Not every measurement has a single wavelength to record. Luminescence, broadband illumination and multi-channel optical modules select an optic setting rather than a wavelength, so there is no nanometer value for the scale. Record the channel or optical module index (depending on the instrument) if one exists.

PlateReaderDimension(name="channel", unit="Unitless", scale=[1])

Other plate reader components#

There are components in this module which don’t have a predefined top-level path in an IDS because they may be used in multiple places throughout a plate reader schema, and their location in the schema may vary across data sources.

Typically, a specific instrument IDS can have more fields than the ones present in these models. For example, if the instrument filter has an additional value-unit field, such as a reference wavelength, this field can be added by inheriting from the Filter component:

class ReferenceFilter(Filter):
    reference: ValueUnit
Model LightSource[source]#

Bases: IdsElement

Definition of a general light source system

Show JSON schema
{
   "description": "Definition of a general light source system",
   "type": "object",
   "properties": {
      "type": {
         "description": "Light source type",
         "type": [
            "string",
            "null"
         ]
      },
      "system": {
         "$ref": "#/definitions/System",
         "description": "Light source system information"
      }
   },
   "additionalProperties": false,
   "definitions": {
      "System": {
         "additionalProperties": false,
         "description": "Metadata regarding the equipment, software, and firmware used in a run of an\ninstrument or experiment.",
         "properties": {
            "vendor": {
               "description": "The instrument vendor or manufacturer, like 'PerkinElmer' or 'Agilent'.",
               "type": [
                  "string",
                  "null"
               ]
            },
            "model": {
               "description": "A specific model instrument type from a vendor.",
               "type": [
                  "string",
                  "null"
               ]
            },
            "type": {
               "description": "Indicates the type of instrument that's generating data.",
               "type": [
                  "string",
                  "null"
               ]
            }
         },
         "required": [
            "vendor",
            "model",
            "type"
         ],
         "type": "object"
      }
   }
}

Validators:

field system: System#

Light source system information

field type_: str | None (alias 'type')#

Light source type

Model Lamp[source]#

Bases: LightSource

Lamp light source

Show JSON schema
{
   "description": "Lamp light source",
   "type": "object",
   "properties": {
      "type": {
         "description": "Light source type",
         "type": [
            "string",
            "null"
         ]
      },
      "system": {
         "$ref": "#/definitions/System",
         "description": "Light source system information"
      },
      "power": {
         "$ref": "#/definitions/ValueUnit",
         "description": "Nominal lamp power"
      }
   },
   "additionalProperties": false,
   "definitions": {
      "System": {
         "additionalProperties": false,
         "description": "Metadata regarding the equipment, software, and firmware used in a run of an\ninstrument or experiment.",
         "properties": {
            "vendor": {
               "description": "The instrument vendor or manufacturer, like 'PerkinElmer' or 'Agilent'.",
               "type": [
                  "string",
                  "null"
               ]
            },
            "model": {
               "description": "A specific model instrument type from a vendor.",
               "type": [
                  "string",
                  "null"
               ]
            },
            "type": {
               "description": "Indicates the type of instrument that's generating data.",
               "type": [
                  "string",
                  "null"
               ]
            }
         },
         "required": [
            "vendor",
            "model",
            "type"
         ],
         "type": "object"
      },
      "ValueUnit": {
         "additionalProperties": false,
         "description": "A quantity, represented by a value with a unit.",
         "properties": {
            "value": {
               "description": "A numerical value.",
               "type": [
                  "number",
                  "null"
               ]
            },
            "unit": {
               "description": "Unit for the numerical value.",
               "type": [
                  "string",
                  "null"
               ]
            }
         },
         "required": [
            "value",
            "unit"
         ],
         "type": "object"
      }
   }
}

Validators:

field power: ValueUnit#

Nominal lamp power

Model LED[source]#

Bases: LightSource

Light Emitting Diode light source

Related Open Microscopy Environment model: https://www.openmicroscopy.org/Schemas/Documentation/Generated/OME-2016-06/ome_xsd.html#LightEmittingDiode

Show JSON schema
{
   "description": "Light Emitting Diode light source\n\nRelated Open Microscopy Environment model:\nhttps://www.openmicroscopy.org/Schemas/Documentation/Generated/OME-2016-06/ome_xsd.html#LightEmittingDiode",
   "type": "object",
   "properties": {
      "type": {
         "description": "Light source type",
         "type": [
            "string",
            "null"
         ]
      },
      "system": {
         "$ref": "#/definitions/System",
         "description": "Light source system information"
      },
      "power": {
         "$ref": "#/definitions/ValueUnit",
         "description": "Nominal LED power"
      }
   },
   "additionalProperties": false,
   "definitions": {
      "System": {
         "additionalProperties": false,
         "description": "Metadata regarding the equipment, software, and firmware used in a run of an\ninstrument or experiment.",
         "properties": {
            "vendor": {
               "description": "The instrument vendor or manufacturer, like 'PerkinElmer' or 'Agilent'.",
               "type": [
                  "string",
                  "null"
               ]
            },
            "model": {
               "description": "A specific model instrument type from a vendor.",
               "type": [
                  "string",
                  "null"
               ]
            },
            "type": {
               "description": "Indicates the type of instrument that's generating data.",
               "type": [
                  "string",
                  "null"
               ]
            }
         },
         "required": [
            "vendor",
            "model",
            "type"
         ],
         "type": "object"
      },
      "ValueUnit": {
         "additionalProperties": false,
         "description": "A quantity, represented by a value with a unit.",
         "properties": {
            "value": {
               "description": "A numerical value.",
               "type": [
                  "number",
                  "null"
               ]
            },
            "unit": {
               "description": "Unit for the numerical value.",
               "type": [
                  "string",
                  "null"
               ]
            }
         },
         "required": [
            "value",
            "unit"
         ],
         "type": "object"
      }
   }
}

Validators:

field power: ValueUnit#

Nominal LED power

Model Filter[source]#

Bases: IdsElement

Optical filter properties

Show JSON schema
{
   "description": "Optical filter properties",
   "type": "object",
   "properties": {
      "position": {
         "description": "Position of this filter in a container like a filter wheel",
         "type": [
            "string",
            "null"
         ]
      },
      "bandwidth": {
         "$ref": "#/definitions/ValueUnit",
         "description": "The range of frequencies associated with this filter"
      },
      "wavelength": {
         "$ref": "#/definitions/ValueUnit",
         "description": "Characteristic wavelength of this filter"
      }
   },
   "additionalProperties": false,
   "definitions": {
      "ValueUnit": {
         "additionalProperties": false,
         "description": "A quantity, represented by a value with a unit.",
         "properties": {
            "value": {
               "description": "A numerical value.",
               "type": [
                  "number",
                  "null"
               ]
            },
            "unit": {
               "description": "Unit for the numerical value.",
               "type": [
                  "string",
                  "null"
               ]
            }
         },
         "required": [
            "value",
            "unit"
         ],
         "type": "object"
      }
   }
}

Validators:

field bandwidth: ValueUnit#

The range of frequencies associated with this filter

field position: str | None#

Position of this filter in a container like a filter wheel

field wavelength: ValueUnit#

Characteristic wavelength of this filter

Model BeamSplitter[source]#

Bases: System

Beamsplitter properties

Show JSON schema
{
   "description": "Beamsplitter properties",
   "type": "object",
   "properties": {
      "vendor": {
         "description": "The instrument vendor or manufacturer, like 'PerkinElmer' or 'Agilent'.",
         "type": [
            "string",
            "null"
         ]
      },
      "model": {
         "description": "A specific model instrument type from a vendor.",
         "type": [
            "string",
            "null"
         ]
      },
      "type": {
         "description": "Indicates the type of instrument that's generating data.",
         "type": [
            "string",
            "null"
         ]
      }
   },
   "additionalProperties": false,
   "required": [
      "vendor",
      "model",
      "type"
   ]
}

Validators:

field model: Required[Nullable[str]]#

A specific model instrument type from a vendor.

field type_: Required[Nullable[str]] (alias 'type')#

Indicates the type of instrument that’s generating data.

field vendor: Required[Nullable[str]]#

The instrument vendor or manufacturer, like ‘PerkinElmer’ or ‘Agilent’.

Model DetectorSystem[source]#

Bases: System, Id

Definition of a detector system

Show JSON schema
{
   "description": "Definition of a detector system",
   "type": "object",
   "properties": {
      "id": {
         "description": "Identifier for the system. This is usually defined by the system owner or user, for example this may be created with a laboratory information management system or asset management software. Typically, an ID will not change over time, so that it can be used to track a particular system, unlike the system name which may change.",
         "type": [
            "string",
            "null"
         ]
      },
      "vendor": {
         "description": "The instrument vendor or manufacturer, like 'PerkinElmer' or 'Agilent'.",
         "type": [
            "string",
            "null"
         ]
      },
      "model": {
         "description": "A specific model instrument type from a vendor.",
         "type": [
            "string",
            "null"
         ]
      },
      "type": {
         "description": "Indicates the type of instrument that's generating data.",
         "type": [
            "string",
            "null"
         ]
      }
   },
   "additionalProperties": false,
   "required": [
      "vendor",
      "model",
      "type"
   ]
}

Validators:

field model: Required[Nullable[str]]#

A specific model instrument type from a vendor.

field type_: Required[Nullable[str]] (alias 'type')#

Indicates the type of instrument that’s generating data.

field vendor: Required[Nullable[str]]#

The instrument vendor or manufacturer, like ‘PerkinElmer’ or ‘Agilent’.

Model EnvironmentRun[source]#

Bases: IdsElement

Measured environment during a run

Show JSON schema
{
   "description": "Measured environment during a run",
   "type": "object",
   "properties": {
      "measured_temperature": {
         "$ref": "#/definitions/ValueUnit",
         "description": "Measured temperature during a run"
      }
   },
   "additionalProperties": false,
   "definitions": {
      "ValueUnit": {
         "additionalProperties": false,
         "description": "A quantity, represented by a value with a unit.",
         "properties": {
            "value": {
               "description": "A numerical value.",
               "type": [
                  "number",
                  "null"
               ]
            },
            "unit": {
               "description": "Unit for the numerical value.",
               "type": [
                  "string",
                  "null"
               ]
            }
         },
         "required": [
            "value",
            "unit"
         ],
         "type": "object"
      }
   }
}

Validators:

field measured_temperature: ValueUnit#

Measured temperature during a run

Model ShakingStep[source]#

Bases: IdsElement

Shaker methods and metadata

Show JSON schema
{
   "description": "Shaker methods and metadata",
   "type": "object",
   "properties": {
      "mode": {
         "description": "Shaking mode, such as 'orbital' or 'linear'",
         "type": [
            "string",
            "null"
         ]
      },
      "speed": {
         "$ref": "#/definitions/ValueUnit",
         "description": "Shaking speed, the angular speed or frequency of shaking"
      },
      "time": {
         "$ref": "#/definitions/Time",
         "description": "Shaking timing"
      }
   },
   "additionalProperties": false,
   "definitions": {
      "RawTime": {
         "additionalProperties": false,
         "description": "The base model for capturing common time fields found in primary data.",
         "properties": {
            "start": {
               "description": "Process/experiment/task start time.",
               "type": [
                  "string",
                  "null"
               ]
            },
            "created": {
               "description": "Data created time.",
               "type": [
                  "string",
                  "null"
               ]
            },
            "stop": {
               "description": "Process/experiment/task stop/finish time.",
               "type": [
                  "string",
                  "null"
               ]
            },
            "duration": {
               "description": "Process/experiment/task duration.",
               "type": [
                  "string",
                  "null"
               ]
            },
            "last_updated": {
               "description": "Data last updated time of a file/method.",
               "type": [
                  "string",
                  "null"
               ]
            },
            "acquired": {
               "description": "Data acquired/exported/captured time.",
               "type": [
                  "string",
                  "null"
               ]
            },
            "modified": {
               "description": "Data last modified/edited time.",
               "type": [
                  "string",
                  "null"
               ]
            },
            "lookup": {
               "description": "Data lookup time.",
               "type": [
                  "string",
                  "null"
               ]
            }
         },
         "type": "object"
      },
      "Time": {
         "additionalProperties": false,
         "description": "A model for datetime values converted to a standard ISO format and their\nrespective raw datetime values in the primary data.",
         "properties": {
            "start": {
               "description": "Process/experiment/task start time.",
               "type": [
                  "string",
                  "null"
               ]
            },
            "created": {
               "description": "Data created time.",
               "type": [
                  "string",
                  "null"
               ]
            },
            "stop": {
               "description": "Process/experiment/task stop/finish time.",
               "type": [
                  "string",
                  "null"
               ]
            },
            "duration": {
               "description": "Process/experiment/task duration.",
               "type": [
                  "string",
                  "null"
               ]
            },
            "last_updated": {
               "description": "Data last updated time of a file/method.",
               "type": [
                  "string",
                  "null"
               ]
            },
            "acquired": {
               "description": "Data acquired/exported/captured time.",
               "type": [
                  "string",
                  "null"
               ]
            },
            "modified": {
               "description": "Data last modified/edited time.",
               "type": [
                  "string",
                  "null"
               ]
            },
            "lookup": {
               "description": "Data lookup time.",
               "type": [
                  "string",
                  "null"
               ]
            },
            "raw": {
               "$ref": "#/definitions/RawTime",
               "description": "Raw time values from primary data."
            }
         },
         "type": "object"
      },
      "ValueUnit": {
         "additionalProperties": false,
         "description": "A quantity, represented by a value with a unit.",
         "properties": {
            "value": {
               "description": "A numerical value.",
               "type": [
                  "number",
                  "null"
               ]
            },
            "unit": {
               "description": "Unit for the numerical value.",
               "type": [
                  "string",
                  "null"
               ]
            }
         },
         "required": [
            "value",
            "unit"
         ],
         "type": "object"
      }
   }
}

Validators:

field mode: str | None#

Shaking mode, such as ‘orbital’ or ‘linear’

field speed: ValueUnit#

Shaking speed, the angular speed or frequency of shaking

field time: Time#

Shaking timing

Model InjectionStep[source]#

Bases: IdsElement

Injection method for a single injection, including pump and volume settings

Show JSON schema
{
   "description": "Injection method for a single injection, including pump and volume settings",
   "type": "object",
   "properties": {
      "pump_id": {
         "description": "Identifier for pump being used",
         "type": [
            "string",
            "null"
         ]
      },
      "flow_rate": {
         "$ref": "#/definitions/ValueUnit",
         "description": "Flow speed of the injector pump"
      },
      "volume": {
         "$ref": "#/definitions/ValueUnit",
         "description": "Volume of injection"
      },
      "time": {
         "$ref": "#/definitions/Time",
         "description": "Injection timing"
      }
   },
   "additionalProperties": false,
   "definitions": {
      "RawTime": {
         "additionalProperties": false,
         "description": "The base model for capturing common time fields found in primary data.",
         "properties": {
            "start": {
               "description": "Process/experiment/task start time.",
               "type": [
                  "string",
                  "null"
               ]
            },
            "created": {
               "description": "Data created time.",
               "type": [
                  "string",
                  "null"
               ]
            },
            "stop": {
               "description": "Process/experiment/task stop/finish time.",
               "type": [
                  "string",
                  "null"
               ]
            },
            "duration": {
               "description": "Process/experiment/task duration.",
               "type": [
                  "string",
                  "null"
               ]
            },
            "last_updated": {
               "description": "Data last updated time of a file/method.",
               "type": [
                  "string",
                  "null"
               ]
            },
            "acquired": {
               "description": "Data acquired/exported/captured time.",
               "type": [
                  "string",
                  "null"
               ]
            },
            "modified": {
               "description": "Data last modified/edited time.",
               "type": [
                  "string",
                  "null"
               ]
            },
            "lookup": {
               "description": "Data lookup time.",
               "type": [
                  "string",
                  "null"
               ]
            }
         },
         "type": "object"
      },
      "Time": {
         "additionalProperties": false,
         "description": "A model for datetime values converted to a standard ISO format and their\nrespective raw datetime values in the primary data.",
         "properties": {
            "start": {
               "description": "Process/experiment/task start time.",
               "type": [
                  "string",
                  "null"
               ]
            },
            "created": {
               "description": "Data created time.",
               "type": [
                  "string",
                  "null"
               ]
            },
            "stop": {
               "description": "Process/experiment/task stop/finish time.",
               "type": [
                  "string",
                  "null"
               ]
            },
            "duration": {
               "description": "Process/experiment/task duration.",
               "type": [
                  "string",
                  "null"
               ]
            },
            "last_updated": {
               "description": "Data last updated time of a file/method.",
               "type": [
                  "string",
                  "null"
               ]
            },
            "acquired": {
               "description": "Data acquired/exported/captured time.",
               "type": [
                  "string",
                  "null"
               ]
            },
            "modified": {
               "description": "Data last modified/edited time.",
               "type": [
                  "string",
                  "null"
               ]
            },
            "lookup": {
               "description": "Data lookup time.",
               "type": [
                  "string",
                  "null"
               ]
            },
            "raw": {
               "$ref": "#/definitions/RawTime",
               "description": "Raw time values from primary data."
            }
         },
         "type": "object"
      },
      "ValueUnit": {
         "additionalProperties": false,
         "description": "A quantity, represented by a value with a unit.",
         "properties": {
            "value": {
               "description": "A numerical value.",
               "type": [
                  "number",
                  "null"
               ]
            },
            "unit": {
               "description": "Unit for the numerical value.",
               "type": [
                  "string",
                  "null"
               ]
            }
         },
         "required": [
            "value",
            "unit"
         ],
         "type": "object"
      }
   }
}

Validators:

field flow_rate: ValueUnit#

Flow speed of the injector pump

field pump_id: str | None#

Identifier for pump being used

field time: Time#

Injection timing

field volume: ValueUnit#

Volume of injection

Model MeasurementPattern[source]#

Bases: IdsElement

The measurement pattern, including which plate is being measured, which wells are measured, and in what order

Show JSON schema
{
   "description": "The measurement pattern, including which plate is being measured, which wells are\nmeasured, and in what order",
   "type": "object",
   "properties": {
      "plate": {
         "type": [
            "string",
            "null"
         ]
      },
      "wells": {
         "description": "References to the wells being measured, in order",
         "items": {
            "type": "string"
         },
         "type": "array"
      }
   },
   "additionalProperties": false
}

Validators:

field plate: str | None#
field wells: List[str]#

References to the wells being measured, in order

Model MeasurementPatternByArea[source]#

Bases: MeasurementPattern

Measurement pattern for plate readers which specify a plate area to measure

Show JSON schema
{
   "description": "Measurement pattern for plate readers which specify a plate area to measure",
   "type": "object",
   "properties": {
      "plate": {
         "type": [
            "string",
            "null"
         ]
      },
      "wells": {
         "description": "References to the wells being measured, in order",
         "items": {
            "type": "string"
         },
         "type": "array"
      },
      "area": {
         "description": "An area of the plate as a string, e.g. 'A1-F4'",
         "type": [
            "string",
            "null"
         ]
      },
      "reading_direction": {
         "description": "A description of the direction that wells are read from a plate",
         "type": "string"
      }
   },
   "additionalProperties": false
}

Validators:

field area: str | None#

An area of the plate as a string, e.g. ‘A1-F4’

field reading_direction: str#

A description of the direction that wells are read from a plate

Model PlateReaderSample[source]#

Bases: Sample

A sample stored in a well on a plate

Show JSON schema
{
   "description": "A sample stored in a well on a plate",
   "type": "object",
   "properties": {
      "id": {
         "description": "Unique identifier assigned to a sample.",
         "type": [
            "string",
            "null"
         ]
      },
      "name": {
         "description": "Sample name.",
         "type": [
            "string",
            "null"
         ]
      },
      "barcode": {
         "description": "Barcode assigned to a sample.",
         "type": [
            "string",
            "null"
         ]
      },
      "batch": {
         "$ref": "#/definitions/Batch"
      },
      "set": {
         "$ref": "#/definitions/Set",
         "description": "Sample set."
      },
      "location": {
         "$ref": "#/definitions/Location",
         "description": "Sample location information."
      },
      "compound": {
         "$ref": "#/definitions/Compound",
         "description": "Sample compound information."
      },
      "properties": {
         "type": "array",
         "items": {
            "$ref": "#/definitions/Property"
         },
         "description": "Sample properties."
      },
      "labels": {
         "description": "Sample labels.",
         "items": {
            "$ref": "#/definitions/Label"
         },
         "type": "array"
      },
      "pk": {
         "@primary_key": true,
         "type": "string"
      }
   },
   "additionalProperties": false,
   "required": [
      "pk"
   ],
   "definitions": {
      "Batch": {
         "additionalProperties": false,
         "description": "A Batch is the result of a single manufacturing run for a drug product that is made as specified groups or amounts,  within a specific time frame from the same raw materials that is intended to have uniform character and quality, within specified limits.",
         "properties": {
            "id": {
               "description": "Unique identifier assigned to a batch.",
               "type": [
                  "string",
                  "null"
               ]
            },
            "name": {
               "description": "Batch name",
               "type": [
                  "string",
                  "null"
               ]
            },
            "barcode": {
               "description": "Barcode assigned to a batch",
               "type": [
                  "string",
                  "null"
               ]
            }
         },
         "type": "object"
      },
      "Compound": {
         "additionalProperties": false,
         "description": "A Compound is a specific chemical or biochemical structure or substance that is being investigated. A Compound may be any drug substance, drug product intermediate, or drug product across small molecules, and cell and gene therapy (CGT).",
         "properties": {
            "id": {
               "description": "Unique identifier assigned to a compound.",
               "type": [
                  "string",
                  "null"
               ]
            },
            "name": {
               "description": "Compound name.",
               "type": [
                  "string",
                  "null"
               ]
            }
         },
         "type": "object"
      },
      "Holder": {
         "additionalProperties": false,
         "description": "A sample container such as a microplate or a vial.",
         "properties": {
            "name": {
               "description": "Holder name.",
               "type": [
                  "string",
                  "null"
               ]
            },
            "type": {
               "description": "Holder type.",
               "type": [
                  "string",
                  "null"
               ]
            },
            "barcode": {
               "description": "Barcode assigned to a holder.",
               "type": [
                  "string",
                  "null"
               ]
            }
         },
         "type": "object"
      },
      "Label": {
         "additionalProperties": false,
         "description": "A Label associated with a sample, along with metadata about the label including\nthe source of the label and times associated with the label such as when it was\ncreated or looked up.",
         "properties": {
            "source": {
               "$ref": "#/definitions/Source",
               "description": "Sample label data source information."
            },
            "name": {
               "description": "Sample label name.",
               "type": "string"
            },
            "value": {
               "description": "Sample label value.",
               "type": "string"
            },
            "time": {
               "$ref": "#/definitions/SampleTime",
               "description": "Time associated with the sample label."
            }
         },
         "required": [
            "source",
            "name",
            "value",
            "time"
         ],
         "type": "object"
      },
      "Location": {
         "additionalProperties": false,
         "description": "The Location of the sample within the holder, such as the location of a well in a microplate.",
         "properties": {
            "position": {
               "description": "Raw position string.",
               "type": [
                  "string",
                  "null"
               ]
            },
            "row": {
               "description": "Row index of sample location in a plate or holder.",
               "type": [
                  "number",
                  "null"
               ]
            },
            "column": {
               "description": "Column index of sample location in a plate or holder.",
               "type": [
                  "number",
                  "null"
               ]
            },
            "index": {
               "description": "Index of sample location flattened to a single dimension.",
               "type": [
                  "number",
                  "null"
               ]
            },
            "holder": {
               "$ref": "#/definitions/Holder",
               "description": "Sample holder information"
            }
         },
         "type": "object"
      },
      "Property": {
         "additionalProperties": false,
         "description": "A property has a name and a value of any type, with metadata about the\nproperty including the source of the property and times associated with it\nsuch as when the property was created or looked up.",
         "properties": {
            "source": {
               "$ref": "#/definitions/Source",
               "description": "Sample property data source information."
            },
            "name": {
               "description": "Sample Property name.",
               "type": "string"
            },
            "value": {
               "description": "The original string value of the property.",
               "type": "string"
            },
            "value_data_type": {
               "$ref": "#/definitions/ValueDataType",
               "description": "This is the type of the original value."
            },
            "string_value": {
               "description": "If string_value has a value, then numerical_value, numerical_value_unit, and boolean_value all have to be null.",
               "type": [
                  "string",
                  "null"
               ]
            },
            "numerical_value": {
               "description": "If numerical_value has a value, then string_value and boolean_value both have to be null.",
               "type": [
                  "number",
                  "null"
               ]
            },
            "numerical_value_unit": {
               "description": "Unit for the numerical value.",
               "type": [
                  "string",
                  "null"
               ]
            },
            "boolean_value": {
               "description": "If boolean_value has a value, then numerical_value, numerical_value_unit, and string_value all have to be null.",
               "type": [
                  "boolean",
                  "null"
               ]
            },
            "time": {
               "$ref": "#/definitions/SampleTime",
               "description": "Time associated with the sample property."
            }
         },
         "required": [
            "source",
            "name",
            "value",
            "value_data_type",
            "string_value",
            "numerical_value",
            "numerical_value_unit",
            "boolean_value",
            "time"
         ],
         "type": "object"
      },
      "RawSampleTime": {
         "additionalProperties": false,
         "description": "The base model for time associated with a specific sample.",
         "properties": {
            "start": {
               "description": "Process/experiment/task start time.",
               "type": [
                  "string",
                  "null"
               ]
            },
            "created": {
               "description": "Data created time.",
               "type": [
                  "string",
                  "null"
               ]
            },
            "stop": {
               "description": "Process/experiment/task stop/finish time.",
               "type": [
                  "string",
                  "null"
               ]
            },
            "duration": {
               "description": "Process/experiment/task duration.",
               "type": [
                  "string",
                  "null"
               ]
            },
            "last_updated": {
               "description": "Data last updated time of a file/method.",
               "type": [
                  "string",
                  "null"
               ]
            },
            "acquired": {
               "description": "Data acquired/exported/captured time.",
               "type": [
                  "string",
                  "null"
               ]
            },
            "modified": {
               "description": "Data last modified/edited time.",
               "type": [
                  "string",
                  "null"
               ]
            },
            "lookup": {
               "description": "Raw sample data lookup time.",
               "type": [
                  "string",
                  "null"
               ]
            }
         },
         "required": [
            "lookup"
         ],
         "type": "object"
      },
      "SampleTime": {
         "additionalProperties": false,
         "description": "A model for experiment sample datetime values converted to a standard ISO format\nand their respective raw datetime values in the primary data.",
         "properties": {
            "start": {
               "description": "Process/experiment/task start time.",
               "type": [
                  "string",
                  "null"
               ]
            },
            "created": {
               "description": "Data created time.",
               "type": [
                  "string",
                  "null"
               ]
            },
            "stop": {
               "description": "Process/experiment/task stop/finish time.",
               "type": [
                  "string",
                  "null"
               ]
            },
            "duration": {
               "description": "Process/experiment/task duration.",
               "type": [
                  "string",
                  "null"
               ]
            },
            "last_updated": {
               "description": "Data last updated time of a file/method.",
               "type": [
                  "string",
                  "null"
               ]
            },
            "acquired": {
               "description": "Data acquired/exported/captured time.",
               "type": [
                  "string",
                  "null"
               ]
            },
            "modified": {
               "description": "Data last modified/edited time.",
               "type": [
                  "string",
                  "null"
               ]
            },
            "lookup": {
               "description": "Raw sample data lookup time.",
               "type": [
                  "string",
                  "null"
               ]
            },
            "raw": {
               "$ref": "#/definitions/RawSampleTime",
               "description": "Raw sample time values from primary data."
            }
         },
         "required": [
            "lookup"
         ],
         "type": "object"
      },
      "Set": {
         "additionalProperties": false,
         "description": "A group of Samples.",
         "properties": {
            "id": {
               "description": "Unique identifier assigned to a set.",
               "type": [
                  "string",
                  "null"
               ]
            },
            "name": {
               "description": "Set name.",
               "type": [
                  "string",
                  "null"
               ]
            }
         },
         "type": "object"
      },
      "Source": {
         "additionalProperties": false,
         "description": "The Source of information, such as a data file or a sample database.",
         "properties": {
            "name": {
               "description": "Source name.",
               "type": [
                  "string",
                  "null"
               ]
            },
            "type": {
               "description": "Source type.",
               "type": [
                  "string",
                  "null"
               ]
            }
         },
         "required": [
            "name",
            "type"
         ],
         "type": "object"
      },
      "ValueDataType": {
         "description": "Allowed data type values.",
         "enum": [
            "string",
            "number",
            "boolean"
         ],
         "type": "string"
      }
   }
}

Validators:

field pk: str#
Constraints:
  • func = <function validate_uuid at 0x7f1493ac61f0>

  • json_schema_input_type = PydanticUndefined

class PlateReaderDimensionNames(value)[source]#

Bases: str, Enum

A limited set of possible names for plate reader dimensions

Model PlateReaderDimension[source]#

Bases: Dimension

A plate reader dimension with a limited set of possible names

Show JSON schema
{
   "description": "A plate reader dimension with a limited set of possible names",
   "type": "object",
   "properties": {
      "name": {
         "type": [
            "string",
            "null"
         ]
      },
      "unit": {
         "type": [
            "string",
            "null"
         ]
      },
      "scale": {
         "items": {
            "type": [
               "number",
               "null"
            ]
         },
         "type": "array"
      }
   },
   "additionalProperties": false,
   "required": [
      "unit",
      "scale"
   ]
}

Validators:

field name: str | None#
Model Measure2D[source]#

Bases: Measure

A two-dimensional datacube measure

Show JSON schema
{
   "description": "A two-dimensional datacube measure",
   "type": "object",
   "properties": {
      "name": {
         "type": [
            "string",
            "null"
         ]
      },
      "unit": {
         "type": [
            "string",
            "null"
         ]
      },
      "value": {
         "items": {
            "items": {
               "type": [
                  "number",
                  "null"
               ]
            },
            "type": "array"
         },
         "type": "array"
      }
   },
   "additionalProperties": false,
   "required": [
      "name",
      "unit",
      "value"
   ]
}

Validators:
  • validate_value_shape » value

field value: List[List[float | None]]#
num_dimensions: ClassVar[int] = 2#
Model Measure3D[source]#

Bases: Measure

A three-dimensional datacube measure

Show JSON schema
{
   "description": "A three-dimensional datacube measure",
   "type": "object",
   "properties": {
      "name": {
         "type": [
            "string",
            "null"
         ]
      },
      "unit": {
         "type": [
            "string",
            "null"
         ]
      },
      "value": {
         "items": {
            "items": {
               "items": {
                  "type": [
                     "number",
                     "null"
                  ]
               },
               "type": "array"
            },
            "type": "array"
         },
         "type": "array"
      }
   },
   "additionalProperties": false,
   "required": [
      "name",
      "unit",
      "value"
   ]
}

Validators:
  • validate_value_shape » value

field value: List[List[List[float | None]]]#
num_dimensions: ClassVar[int] = 3#
Model PlateReaderDatacube2D[source]#

Bases: DataCube

A plate reader datacube containing two dimensions and one measure.

The dimensions must be time and wavelength

Show JSON schema
{
   "description": "A plate reader datacube containing two dimensions and one measure.\n\nThe dimensions must be `time` and `wavelength`",
   "type": "object",
   "properties": {
      "name": {
         "type": [
            "string",
            "null"
         ]
      },
      "measures": {
         "items": {
            "$ref": "#/definitions/Measure2D"
         },
         "maxItems": 1,
         "minItems": 1,
         "type": "array"
      },
      "dimensions": {
         "items": {
            "$ref": "#/definitions/PlateReaderDimension"
         },
         "maxItems": 2,
         "minItems": 2,
         "type": "array"
      },
      "fk_sample": {
         "@foreign_key": "/properties/samples/items/properties/pk",
         "description": "A foreign key linking datacubes to samples[*].",
         "type": "string"
      },
      "fk_protocol_step": {
         "@foreign_key": "/properties/protocol_steps/items/properties/pk",
         "description": "A foreign key linking datacubes to protocol_steps[*].",
         "type": "string"
      },
      "fk_method": {
         "@foreign_key": "/properties/methods/items/properties/pk",
         "description": "A foreign key linking datacubes to methods[*].",
         "type": "string"
      }
   },
   "additionalProperties": false,
   "required": [
      "name",
      "measures",
      "dimensions",
      "fk_sample",
      "fk_protocol_step",
      "fk_method"
   ],
   "definitions": {
      "Measure2D": {
         "additionalProperties": false,
         "description": "A two-dimensional datacube measure",
         "properties": {
            "name": {
               "type": [
                  "string",
                  "null"
               ]
            },
            "unit": {
               "type": [
                  "string",
                  "null"
               ]
            },
            "value": {
               "items": {
                  "items": {
                     "type": [
                        "number",
                        "null"
                     ]
                  },
                  "type": "array"
               },
               "type": "array"
            }
         },
         "required": [
            "name",
            "unit",
            "value"
         ],
         "type": "object"
      },
      "PlateReaderDimension": {
         "additionalProperties": false,
         "description": "A plate reader dimension with a limited set of possible names",
         "properties": {
            "name": {
               "type": [
                  "string",
                  "null"
               ]
            },
            "unit": {
               "type": [
                  "string",
                  "null"
               ]
            },
            "scale": {
               "items": {
                  "type": [
                     "number",
                     "null"
                  ]
               },
               "type": "array"
            }
         },
         "required": [
            "unit",
            "scale"
         ],
         "type": "object"
      }
   }
}

Validators:

field dimensions: List[PlateReaderDimension]#
Constraints:
  • min_length = 2

  • max_length = 2

field fk_method: str#

A foreign key linking datacubes to methods[*].

Constraints:
  • func = <function validate_uuid at 0x7f1493ac61f0>

  • json_schema_input_type = PydanticUndefined

  • ids_field_arg = primary_key

  • pk_reference_field = @foreign_key

field fk_protocol_step: str#

A foreign key linking datacubes to protocol_steps[*].

Constraints:
  • func = <function validate_uuid at 0x7f1493ac61f0>

  • json_schema_input_type = PydanticUndefined

  • ids_field_arg = primary_key

  • pk_reference_field = @foreign_key

field fk_sample: str#

A foreign key linking datacubes to samples[*].

Constraints:
  • func = <function validate_uuid at 0x7f1493ac61f0>

  • json_schema_input_type = PydanticUndefined

  • ids_field_arg = primary_key

  • pk_reference_field = @foreign_key

field measures: List[Measure2D]#
Constraints:
  • min_length = 1

  • max_length = 1

Model PlateReaderDatacube3D[source]#

Bases: DataCube

A plate reader datacube containing three dimensions and one measure.

Show JSON schema
{
   "description": "A plate reader datacube containing three dimensions and one measure.",
   "type": "object",
   "properties": {
      "name": {
         "type": [
            "string",
            "null"
         ]
      },
      "measures": {
         "items": {
            "$ref": "#/definitions/Measure3D"
         },
         "maxItems": 1,
         "minItems": 1,
         "type": "array"
      },
      "dimensions": {
         "items": {
            "$ref": "#/definitions/PlateReaderDimension"
         },
         "maxItems": 3,
         "minItems": 3,
         "type": "array"
      },
      "fk_sample": {
         "@foreign_key": "/properties/samples/items/properties/pk",
         "description": "A foreign key linking datacubes to samples[*].",
         "type": "string"
      },
      "fk_protocol_step": {
         "@foreign_key": "/properties/protocol_steps/items/properties/pk",
         "description": "A foreign key linking datacubes to protocol_steps[*].",
         "type": "string"
      },
      "fk_method": {
         "@foreign_key": "/properties/methods/items/properties/pk",
         "description": "A foreign key linking datacubes to methods[*].",
         "type": "string"
      }
   },
   "additionalProperties": false,
   "required": [
      "name",
      "measures",
      "dimensions",
      "fk_sample",
      "fk_protocol_step",
      "fk_method"
   ],
   "definitions": {
      "Measure3D": {
         "additionalProperties": false,
         "description": "A three-dimensional datacube measure",
         "properties": {
            "name": {
               "type": [
                  "string",
                  "null"
               ]
            },
            "unit": {
               "type": [
                  "string",
                  "null"
               ]
            },
            "value": {
               "items": {
                  "items": {
                     "items": {
                        "type": [
                           "number",
                           "null"
                        ]
                     },
                     "type": "array"
                  },
                  "type": "array"
               },
               "type": "array"
            }
         },
         "required": [
            "name",
            "unit",
            "value"
         ],
         "type": "object"
      },
      "PlateReaderDimension": {
         "additionalProperties": false,
         "description": "A plate reader dimension with a limited set of possible names",
         "properties": {
            "name": {
               "type": [
                  "string",
                  "null"
               ]
            },
            "unit": {
               "type": [
                  "string",
                  "null"
               ]
            },
            "scale": {
               "items": {
                  "type": [
                     "number",
                     "null"
                  ]
               },
               "type": "array"
            }
         },
         "required": [
            "unit",
            "scale"
         ],
         "type": "object"
      }
   }
}

Validators:

field dimensions: List[PlateReaderDimension]#
Constraints:
  • min_length = 3

  • max_length = 3

field fk_method: str#

A foreign key linking datacubes to methods[*].

Constraints:
  • func = <function validate_uuid at 0x7f1493ac61f0>

  • json_schema_input_type = PydanticUndefined

  • ids_field_arg = primary_key

  • pk_reference_field = @foreign_key

field fk_protocol_step: str#

A foreign key linking datacubes to protocol_steps[*].

Constraints:
  • func = <function validate_uuid at 0x7f1493ac61f0>

  • json_schema_input_type = PydanticUndefined

  • ids_field_arg = primary_key

  • pk_reference_field = @foreign_key

field fk_sample: str#

A foreign key linking datacubes to samples[*].

Constraints:
  • func = <function validate_uuid at 0x7f1493ac61f0>

  • json_schema_input_type = PydanticUndefined

  • ids_field_arg = primary_key

  • pk_reference_field = @foreign_key

field measures: List[Measure3D]#
Constraints:
  • min_length = 1

  • max_length = 1

Model PlateReaderSchema[source]#

Bases: TetraDataSchema

A schema for a plate reader.

Show JSON schema
{
   "description": "A schema for a plate reader.",
   "type": "object",
   "properties": {
      "@idsType": {
         "description": "Also known as IDS slug. Defined by TetraScience.",
         "type": "string"
      },
      "@idsVersion": {
         "description": "IDS version. Defined by TetraScience.",
         "type": "string"
      },
      "@idsNamespace": {
         "description": "IDS namespace. Defined by TetraScience.",
         "type": "string"
      },
      "methods": {
         "items": {
            "$ref": "#/definitions/PlateReaderMethod"
         },
         "type": "array"
      },
      "protocol_steps": {
         "items": {
            "$ref": "#/definitions/PlateReaderStep"
         },
         "type": "array"
      },
      "measurement_settings": {
         "items": {
            "$ref": "#/definitions/PlateReaderMeasurementSetting"
         },
         "type": "array"
      },
      "samples": {
         "items": {
            "$ref": "#/definitions/PlateReaderSample"
         },
         "type": "array"
      },
      "datacubes": {
         "items": {
            "$ref": "#/definitions/PlateReaderDatacube2D"
         },
         "type": "array"
      }
   },
   "$id": "NotImplemented",
   "$schema": "http://json-schema.org/draft-07/schema#",
   "additionalProperties": false,
   "is_tetra_data_schema": true,
   "required": [
      "@idsType",
      "@idsVersion",
      "@idsNamespace"
   ],
   "definitions": {
      "Batch": {
         "additionalProperties": false,
         "description": "A Batch is the result of a single manufacturing run for a drug product that is made as specified groups or amounts,  within a specific time frame from the same raw materials that is intended to have uniform character and quality, within specified limits.",
         "properties": {
            "id": {
               "description": "Unique identifier assigned to a batch.",
               "type": [
                  "string",
                  "null"
               ]
            },
            "name": {
               "description": "Batch name",
               "type": [
                  "string",
                  "null"
               ]
            },
            "barcode": {
               "description": "Barcode assigned to a batch",
               "type": [
                  "string",
                  "null"
               ]
            }
         },
         "type": "object"
      },
      "Chromatics": {
         "additionalProperties": false,
         "description": "Properties of a chromatic setup, e.g. a filter or spectrum",
         "properties": {
            "name": {
               "description": "The name of the optical setup used",
               "type": [
                  "string",
                  "null"
               ]
            },
            "position": {
               "description": "Position of a filter in a container like a filter wheel",
               "type": [
                  "string",
                  "null"
               ]
            },
            "bandwidth": {
               "$ref": "#/definitions/RawValueUnit",
               "description": "The range of frequencies around the target wavelength which are measured"
            },
            "wavelength": {
               "$ref": "#/definitions/RawValueUnit",
               "description": "The target wavelength of the filter or monochromator"
            },
            "start": {
               "$ref": "#/definitions/RawValueUnit",
               "description": "The start of the spectrum"
            },
            "end": {
               "$ref": "#/definitions/RawValueUnit",
               "description": "The end of the spectrum"
            },
            "step": {
               "$ref": "#/definitions/RawValueUnit",
               "description": "The step of the spectrum"
            },
            "type": {
               "description": "The type of optical setup, e.g. filter or spectrum",
               "type": [
                  "string",
                  "null"
               ]
            }
         },
         "type": "object"
      },
      "Compound": {
         "additionalProperties": false,
         "description": "A Compound is a specific chemical or biochemical structure or substance that is being investigated. A Compound may be any drug substance, drug product intermediate, or drug product across small molecules, and cell and gene therapy (CGT).",
         "properties": {
            "id": {
               "description": "Unique identifier assigned to a compound.",
               "type": [
                  "string",
                  "null"
               ]
            },
            "name": {
               "description": "Compound name.",
               "type": [
                  "string",
                  "null"
               ]
            }
         },
         "type": "object"
      },
      "Gain": {
         "additionalProperties": false,
         "description": "The gain of a detector",
         "properties": {
            "mode": {
               "description": "The gain mode used for the measurement",
               "type": [
                  "string",
                  "null"
               ]
            },
            "raw_value": {
               "description": "The raw, untransformed value from the primary data.",
               "type": [
                  "string",
                  "null"
               ]
            },
            "value": {
               "description": "The gain value transformed to a numerical value",
               "type": [
                  "number",
                  "null"
               ]
            },
            "unit": {
               "description": "The unit of the gain value",
               "type": [
                  "string",
                  "null"
               ]
            }
         },
         "type": "object"
      },
      "Holder": {
         "additionalProperties": false,
         "description": "A sample container such as a microplate or a vial.",
         "properties": {
            "name": {
               "description": "Holder name.",
               "type": [
                  "string",
                  "null"
               ]
            },
            "type": {
               "description": "Holder type.",
               "type": [
                  "string",
                  "null"
               ]
            },
            "barcode": {
               "description": "Barcode assigned to a holder.",
               "type": [
                  "string",
                  "null"
               ]
            }
         },
         "type": "object"
      },
      "Label": {
         "additionalProperties": false,
         "description": "A Label associated with a sample, along with metadata about the label including\nthe source of the label and times associated with the label such as when it was\ncreated or looked up.",
         "properties": {
            "source": {
               "$ref": "#/definitions/Source",
               "description": "Sample label data source information."
            },
            "name": {
               "description": "Sample label name.",
               "type": "string"
            },
            "value": {
               "description": "Sample label value.",
               "type": "string"
            },
            "time": {
               "$ref": "#/definitions/SampleTime",
               "description": "Time associated with the sample label."
            }
         },
         "required": [
            "source",
            "name",
            "value",
            "time"
         ],
         "type": "object"
      },
      "Location": {
         "additionalProperties": false,
         "description": "The Location of the sample within the holder, such as the location of a well in a microplate.",
         "properties": {
            "position": {
               "description": "Raw position string.",
               "type": [
                  "string",
                  "null"
               ]
            },
            "row": {
               "description": "Row index of sample location in a plate or holder.",
               "type": [
                  "number",
                  "null"
               ]
            },
            "column": {
               "description": "Column index of sample location in a plate or holder.",
               "type": [
                  "number",
                  "null"
               ]
            },
            "index": {
               "description": "Index of sample location flattened to a single dimension.",
               "type": [
                  "number",
                  "null"
               ]
            },
            "holder": {
               "$ref": "#/definitions/Holder",
               "description": "Sample holder information"
            }
         },
         "type": "object"
      },
      "Measure2D": {
         "additionalProperties": false,
         "description": "A two-dimensional datacube measure",
         "properties": {
            "name": {
               "type": [
                  "string",
                  "null"
               ]
            },
            "unit": {
               "type": [
                  "string",
                  "null"
               ]
            },
            "value": {
               "items": {
                  "items": {
                     "type": [
                        "number",
                        "null"
                     ]
                  },
                  "type": "array"
               },
               "type": "array"
            }
         },
         "required": [
            "name",
            "unit",
            "value"
         ],
         "type": "object"
      },
      "PathLengthCorrection": {
         "additionalProperties": false,
         "description": "Properties for path length correction",
         "properties": {
            "test": {
               "$ref": "#/definitions/SingleChromatic",
               "description": "The test wavelength for the path length correction"
            },
            "reference": {
               "$ref": "#/definitions/SingleChromatic",
               "description": "The reference wavelength for the path length correction"
            }
         },
         "type": "object"
      },
      "PlateReaderDatacube2D": {
         "additionalProperties": false,
         "description": "A plate reader datacube containing two dimensions and one measure.\n\nThe dimensions must be `time` and `wavelength`",
         "properties": {
            "name": {
               "type": [
                  "string",
                  "null"
               ]
            },
            "measures": {
               "items": {
                  "$ref": "#/definitions/Measure2D"
               },
               "maxItems": 1,
               "minItems": 1,
               "type": "array"
            },
            "dimensions": {
               "items": {
                  "$ref": "#/definitions/PlateReaderDimension"
               },
               "maxItems": 2,
               "minItems": 2,
               "type": "array"
            },
            "fk_sample": {
               "@foreign_key": "/properties/samples/items/properties/pk",
               "description": "A foreign key linking datacubes to samples[*].",
               "type": "string"
            },
            "fk_protocol_step": {
               "@foreign_key": "/properties/protocol_steps/items/properties/pk",
               "description": "A foreign key linking datacubes to protocol_steps[*].",
               "type": "string"
            },
            "fk_method": {
               "@foreign_key": "/properties/methods/items/properties/pk",
               "description": "A foreign key linking datacubes to methods[*].",
               "type": "string"
            }
         },
         "required": [
            "name",
            "measures",
            "dimensions",
            "fk_sample",
            "fk_protocol_step",
            "fk_method"
         ],
         "type": "object"
      },
      "PlateReaderDimension": {
         "additionalProperties": false,
         "description": "A plate reader dimension with a limited set of possible names",
         "properties": {
            "name": {
               "type": [
                  "string",
                  "null"
               ]
            },
            "unit": {
               "type": [
                  "string",
                  "null"
               ]
            },
            "scale": {
               "items": {
                  "type": [
                     "number",
                     "null"
                  ]
               },
               "type": "array"
            }
         },
         "required": [
            "unit",
            "scale"
         ],
         "type": "object"
      },
      "PlateReaderMeasurementSetting": {
         "additionalProperties": false,
         "description": "The settings related to a particular measurement by a step in the protocol/method",
         "properties": {
            "integration_delay": {
               "$ref": "#/definitions/RawValueUnit",
               "description": "The delay before the integration of the detected signal begins"
            },
            "integration_time": {
               "$ref": "#/definitions/RawValueUnit",
               "description": "The duration of the signal integration"
            },
            "emission": {
               "$ref": "#/definitions/Chromatics",
               "description": "The emission optical setup"
            },
            "excitation": {
               "$ref": "#/definitions/Chromatics",
               "description": "The excitation optical setup"
            },
            "number_of_flashes": {
               "description": "The number of flashes used for the measurement",
               "type": [
                  "integer",
                  "null"
               ]
            },
            "excitation_time": {
               "$ref": "#/definitions/RawValueUnit",
               "description": "The time for which the sample is illuminated by the excitation source"
            },
            "alpha_type": {
               "description": "The type of alpha technology used for the measurement",
               "type": [
                  "string",
                  "null"
               ]
            },
            "channel": {
               "description": "The channel of the measurement when there can be multiple, e.g. forfluorescence polarization measurements the channels are parallel or perpendicular",
               "type": [
                  "string",
                  "null"
               ]
            },
            "absorbance": {
               "$ref": "#/definitions/Chromatics",
               "description": "The absorbance filter or spectrum"
            },
            "pathlength_correction": {
               "$ref": "#/definitions/PathLengthCorrection",
               "description": "The path length correction metadata for the measurement"
            },
            "pk": {
               "@primary_key": true,
               "description": "Primary key of a measurement setting",
               "type": "string"
            },
            "fk_protocol_step": {
               "@foreign_key": "/properties/protocol_steps/items/properties/pk",
               "description": "Foreign key to the step that this measurement setting belongs to",
               "type": "string"
            },
            "fk_method": {
               "@foreign_key": "/properties/methods/items/properties/pk",
               "description": "Foreign key to the method that this measurement setting belongs to",
               "type": "string"
            },
            "index": {
               "description": "The index of the measurement setting in the step",
               "type": "integer"
            },
            "modality": {
               "description": "The modality of the measurement",
               "type": [
                  "string",
                  "null"
               ]
            },
            "type": {
               "description": "The type of the measurement",
               "type": [
                  "string",
                  "null"
               ]
            },
            "measurement_duration": {
               "$ref": "#/definitions/RawValueUnit",
               "description": "The duration of the measurement"
            },
            "number_of_readings": {
               "description": "The number of readings for a measurement",
               "type": [
                  "integer",
                  "null"
               ]
            },
            "gain": {
               "$ref": "#/definitions/Gain",
               "description": "The gain of the detector"
            },
            "dynamic_range": {
               "description": "The dynamic range of the detector",
               "type": [
                  "string",
                  "null"
               ]
            },
            "optics": {
               "description": "The name or position of the optics used for the measurement",
               "type": [
                  "string",
                  "null"
               ]
            }
         },
         "required": [
            "pk",
            "fk_protocol_step",
            "fk_method"
         ],
         "type": "object"
      },
      "PlateReaderMethod": {
         "additionalProperties": false,
         "description": "A protocol followed during a plate reader experiment",
         "properties": {
            "pk": {
               "@primary_key": true,
               "description": "Primary key of a plate reader method",
               "type": "string"
            },
            "name": {
               "description": "The name of the method",
               "type": [
                  "string",
                  "null"
               ]
            },
            "id": {
               "description": "The ID of the method",
               "type": [
                  "string",
                  "null"
               ]
            }
         },
         "required": [
            "pk"
         ],
         "type": "object"
      },
      "PlateReaderSample": {
         "additionalProperties": false,
         "description": "A sample stored in a well on a plate",
         "properties": {
            "id": {
               "description": "Unique identifier assigned to a sample.",
               "type": [
                  "string",
                  "null"
               ]
            },
            "name": {
               "description": "Sample name.",
               "type": [
                  "string",
                  "null"
               ]
            },
            "barcode": {
               "description": "Barcode assigned to a sample.",
               "type": [
                  "string",
                  "null"
               ]
            },
            "batch": {
               "$ref": "#/definitions/Batch"
            },
            "set": {
               "$ref": "#/definitions/Set",
               "description": "Sample set."
            },
            "location": {
               "$ref": "#/definitions/Location",
               "description": "Sample location information."
            },
            "compound": {
               "$ref": "#/definitions/Compound",
               "description": "Sample compound information."
            },
            "properties": {
               "type": "array",
               "items": {
                  "$ref": "#/definitions/Property"
               },
               "description": "Sample properties."
            },
            "labels": {
               "description": "Sample labels.",
               "items": {
                  "$ref": "#/definitions/Label"
               },
               "type": "array"
            },
            "pk": {
               "@primary_key": true,
               "type": "string"
            }
         },
         "required": [
            "pk"
         ],
         "type": "object"
      },
      "PlateReaderStep": {
         "additionalProperties": false,
         "description": "A step in a protocol",
         "properties": {
            "pk": {
               "@primary_key": true,
               "description": "Primary key of a step in the protocol",
               "type": "string"
            },
            "fk_method": {
               "@foreign_key": "/properties/methods/items/properties/pk",
               "description": "Foreign key to the method that the step belongs to",
               "type": "string"
            },
            "parent_step": {
               "description": "Name of the parent step in the protocol, if this step belongs to a kinetic loop",
               "type": [
                  "string",
                  "null"
               ]
            },
            "index": {
               "description": "The index of the step in the protocol",
               "type": "integer"
            },
            "name": {
               "description": "The name of the step in the protocol",
               "type": [
                  "string",
                  "null"
               ]
            },
            "kinetics": {
               "$ref": "#/definitions/StepKinetics"
            }
         },
         "required": [
            "pk",
            "fk_method"
         ],
         "type": "object"
      },
      "Property": {
         "additionalProperties": false,
         "description": "A property has a name and a value of any type, with metadata about the\nproperty including the source of the property and times associated with it\nsuch as when the property was created or looked up.",
         "properties": {
            "source": {
               "$ref": "#/definitions/Source",
               "description": "Sample property data source information."
            },
            "name": {
               "description": "Sample Property name.",
               "type": "string"
            },
            "value": {
               "description": "The original string value of the property.",
               "type": "string"
            },
            "value_data_type": {
               "$ref": "#/definitions/ValueDataType",
               "description": "This is the type of the original value."
            },
            "string_value": {
               "description": "If string_value has a value, then numerical_value, numerical_value_unit, and boolean_value all have to be null.",
               "type": [
                  "string",
                  "null"
               ]
            },
            "numerical_value": {
               "description": "If numerical_value has a value, then string_value and boolean_value both have to be null.",
               "type": [
                  "number",
                  "null"
               ]
            },
            "numerical_value_unit": {
               "description": "Unit for the numerical value.",
               "type": [
                  "string",
                  "null"
               ]
            },
            "boolean_value": {
               "description": "If boolean_value has a value, then numerical_value, numerical_value_unit, and string_value all have to be null.",
               "type": [
                  "boolean",
                  "null"
               ]
            },
            "time": {
               "$ref": "#/definitions/SampleTime",
               "description": "Time associated with the sample property."
            }
         },
         "required": [
            "source",
            "name",
            "value",
            "value_data_type",
            "string_value",
            "numerical_value",
            "numerical_value_unit",
            "boolean_value",
            "time"
         ],
         "type": "object"
      },
      "RawSampleTime": {
         "additionalProperties": false,
         "description": "The base model for time associated with a specific sample.",
         "properties": {
            "start": {
               "description": "Process/experiment/task start time.",
               "type": [
                  "string",
                  "null"
               ]
            },
            "created": {
               "description": "Data created time.",
               "type": [
                  "string",
                  "null"
               ]
            },
            "stop": {
               "description": "Process/experiment/task stop/finish time.",
               "type": [
                  "string",
                  "null"
               ]
            },
            "duration": {
               "description": "Process/experiment/task duration.",
               "type": [
                  "string",
                  "null"
               ]
            },
            "last_updated": {
               "description": "Data last updated time of a file/method.",
               "type": [
                  "string",
                  "null"
               ]
            },
            "acquired": {
               "description": "Data acquired/exported/captured time.",
               "type": [
                  "string",
                  "null"
               ]
            },
            "modified": {
               "description": "Data last modified/edited time.",
               "type": [
                  "string",
                  "null"
               ]
            },
            "lookup": {
               "description": "Raw sample data lookup time.",
               "type": [
                  "string",
                  "null"
               ]
            }
         },
         "required": [
            "lookup"
         ],
         "type": "object"
      },
      "RawValueUnit": {
         "additionalProperties": false,
         "description": "A value with a unit, including the raw representation of the value from the primary data.",
         "properties": {
            "value": {
               "description": "A numerical value.",
               "type": [
                  "number",
                  "null"
               ]
            },
            "unit": {
               "description": "Unit for the numerical value.",
               "type": [
                  "string",
                  "null"
               ]
            },
            "raw_value": {
               "description": "The raw, untransformed value from the primary data.",
               "type": [
                  "string",
                  "null"
               ]
            }
         },
         "required": [
            "value",
            "unit",
            "raw_value"
         ],
         "type": "object"
      },
      "SampleTime": {
         "additionalProperties": false,
         "description": "A model for experiment sample datetime values converted to a standard ISO format\nand their respective raw datetime values in the primary data.",
         "properties": {
            "start": {
               "description": "Process/experiment/task start time.",
               "type": [
                  "string",
                  "null"
               ]
            },
            "created": {
               "description": "Data created time.",
               "type": [
                  "string",
                  "null"
               ]
            },
            "stop": {
               "description": "Process/experiment/task stop/finish time.",
               "type": [
                  "string",
                  "null"
               ]
            },
            "duration": {
               "description": "Process/experiment/task duration.",
               "type": [
                  "string",
                  "null"
               ]
            },
            "last_updated": {
               "description": "Data last updated time of a file/method.",
               "type": [
                  "string",
                  "null"
               ]
            },
            "acquired": {
               "description": "Data acquired/exported/captured time.",
               "type": [
                  "string",
                  "null"
               ]
            },
            "modified": {
               "description": "Data last modified/edited time.",
               "type": [
                  "string",
                  "null"
               ]
            },
            "lookup": {
               "description": "Raw sample data lookup time.",
               "type": [
                  "string",
                  "null"
               ]
            },
            "raw": {
               "$ref": "#/definitions/RawSampleTime",
               "description": "Raw sample time values from primary data."
            }
         },
         "required": [
            "lookup"
         ],
         "type": "object"
      },
      "Set": {
         "additionalProperties": false,
         "description": "A group of Samples.",
         "properties": {
            "id": {
               "description": "Unique identifier assigned to a set.",
               "type": [
                  "string",
                  "null"
               ]
            },
            "name": {
               "description": "Set name.",
               "type": [
                  "string",
                  "null"
               ]
            }
         },
         "type": "object"
      },
      "SingleChromatic": {
         "additionalProperties": false,
         "description": "Optical properties for a single chromatic e.g. filter or monochromator",
         "properties": {
            "name": {
               "description": "The name of the filter or monochromator",
               "type": [
                  "string",
                  "null"
               ]
            },
            "position": {
               "description": "Position of a filter in a container like a filter wheel",
               "type": [
                  "string",
                  "null"
               ]
            },
            "bandwidth": {
               "$ref": "#/definitions/RawValueUnit",
               "description": "The range of frequencies around the target wavelength which are measured"
            },
            "wavelength": {
               "$ref": "#/definitions/RawValueUnit",
               "description": "The target wavelength of the filter or monochromator"
            }
         },
         "type": "object"
      },
      "Source": {
         "additionalProperties": false,
         "description": "The Source of information, such as a data file or a sample database.",
         "properties": {
            "name": {
               "description": "Source name.",
               "type": [
                  "string",
                  "null"
               ]
            },
            "type": {
               "description": "Source type.",
               "type": [
                  "string",
                  "null"
               ]
            }
         },
         "required": [
            "name",
            "type"
         ],
         "type": "object"
      },
      "StepKinetics": {
         "additionalProperties": false,
         "description": "The kinetic metadata for the step",
         "properties": {
            "number_of_cycles": {
               "description": "The number of cycles of the kinetic loop",
               "type": [
                  "integer",
                  "null"
               ]
            },
            "total_duration": {
               "$ref": "#/definitions/RawValueUnit",
               "description": "The total time of the kinetic loop"
            },
            "interval": {
               "$ref": "#/definitions/RawValueUnit",
               "description": "The interval between cycles in the kinetic loop"
            }
         },
         "type": "object"
      },
      "ValueDataType": {
         "description": "Allowed data type values.",
         "enum": [
            "string",
            "number",
            "boolean"
         ],
         "type": "string"
      }
   }
}

Validators:

field datacubes: List[PlateReaderDatacube2D]#
field measurement_settings: List[PlateReaderMeasurementSetting]#
field methods: List[PlateReaderMethod]#
field protocol_steps: List[PlateReaderStep]#
field samples: List[PlateReaderSample]#