Extractor Format
schemas/labware.schema.json
Source file coverage
Path:
schemas/labware.schema.json
Lines:
270
Non-empty lines:
270
Non-empty lines covered with requirements:
204 / 270 (75.6%)
Functions:
0
Functions covered by requirements:
0 / 0 (0.0%)
1
{
2
  "$schema": "https://json-schema.org/draft/2020-12/schema",
3
  "$id": "urn:syntol:extractor-format:schema:labware:1",
4
  "title": "Extractor labware definition",
5
  "description": "Catalog definition of a plate or protective-sleeve comb",
6
  "$comment": "Semantic validation must additionally check rows * columns = total_wells; total_volume_ul > effective_volume_ul; strictly increasing volume_ul and height_mm in liquid_height_curve; range ordering; and references, revisions and hashes in documents that use this definition.",
7
  "oneOf": [
8
    {
9
      "$ref": "#/$defs/plate"
10
    },
11
    {
12
      "$ref": "#/$defs/sleeve_comb"
13
    }
14
  ],
15
  "$defs": {
16
    "nullable_nonempty_string": {
17
      "type": [ "string", "null" ],
18
      "minLength": 1
19
    },
20
    "nullable_nonnegative_number": {
21
      "type": [ "number", "null" ],
22
      "minimum": 0
23
    },
24
    "positive_number": {
25
      "type": "number",
26
      "exclusiveMinimum": 0
27
    },
28
    "dimensions": {
29
      "description": "Overall dimensions in millimeters",
30
      "type": "object",
31
      "required": [ "width", "depth", "overall_height" ],
32
      "properties": {
33
        "width": {
34
          "$ref": "#/$defs/positive_number"
35
        },
36
        "depth": {
37
          "$ref": "#/$defs/positive_number"
38
        },
39
        "overall_height": {
40
          "$ref": "#/$defs/positive_number"
41
        }
42
      },
43
      "additionalProperties": false
44
    },
45
    "extensions": {
46
      "type": "object",
47
      "propertyNames": {
48
        "pattern": "^[a-z][a-z0-9]*(?:[._-][a-z0-9]+)+$"
49
      },
50
      "additionalProperties": true
51
    },
52
    "plate_layout": {
53
      "type": "object",
54
      "required": [ "rows", "columns", "total_wells" ],
55
      "properties": {
56
        "rows": {
57
          "type": "integer",
58
          "minimum": 1
59
        },
60
        "columns": {
61
          "type": "integer",
62
          "minimum": 1
63
        },
64
        "total_wells": {
65
          "type": "integer",
66
          "minimum": 1
67
        }
68
      },
69
      "additionalProperties": false
70
    },
71
    "liquid_height_curve": {
72
      "description": "Measured relation between liquid volume and height in a well",
73
      "type": "object",
74
      "required": [ "points" ],
75
      "properties": {
76
        "points": {
77
          "type": "array",
78
          "minItems": 2,
79
          "items": {
80
            "type": "object",
81
            "required": [ "volume_ul", "height_mm" ],
82
            "properties": {
83
              "volume_ul": {
84
                "type": "number",
85
                "minimum": 0
86
              },
87
              "height_mm": {
88
                "type": "number",
89
                "minimum": 0
90
              }
91
            },
92
            "additionalProperties": false
93
          }
94
        }
95
      },
96
      "additionalProperties": false
97
    },
98
    "plate": {
99
      "type": "object",
100
      "required": [
101
        "schema",
102
        "revision",
103
        "uid",
104
        "title",
105
        "manufacturer",
106
        "catalog_number",
107
        "labware_kind",
108
        "package_type",
109
        "dimensions_mm",
110
        "well_layout",
111
        "well"
112
      ],
113
      "properties": {
114
        "schema": {
115
          "type": "object",
116
          "required": [ "name", "revision" ],
117
          "properties": {
118
            "name": {
119
              "const": "syntol.labware.plate"
120
            },
121
            "revision": {
122
              "const": 1
123
            }
124
          },
125
          "additionalProperties": false
126
        },
127
        "revision": {
128
          "type": "integer",
129
          "minimum": 1
130
        },
131
        "uid": {
132
          "type": "string",
133
          "format": "uuid"
134
        },
135
        "title": {
136
          "type": "string",
137
          "minLength": 1
138
        },
139
        "manufacturer": {
140
          "$ref": "#/$defs/nullable_nonempty_string"
141
        },
142
        "catalog_number": {
143
          "$ref": "#/$defs/nullable_nonempty_string"
144
        },
145
        "labware_kind": {
146
          "const": "plate"
147
        },
148
        "package_type": {
149
          "$ref": "#/$defs/nullable_nonempty_string"
150
        },
151
        "dimensions_mm": {
152
          "$ref": "#/$defs/dimensions"
153
        },
154
        "well_layout": {
155
          "$ref": "#/$defs/plate_layout"
156
        },
157
        "well": {
158
          "type": "object",
159
          "required": [
160
            "bottom_offset_mm",
161
            "top_offset_mm",
162
            "total_volume_ul",
163
            "effective_volume_ul",
164
            "liquid_height_curve"
165
          ],
166
          "properties": {
167
            "bottom_offset_mm": {
168
              "description": "Height of the inner well bottom above the labware support surface, in millimeters",
169
              "$ref": "#/$defs/nullable_nonnegative_number"
170
            },
171
            "top_offset_mm": {
172
              "description": "Height of the well top above the labware support surface, in millimeters",
173
              "$ref": "#/$defs/nullable_nonnegative_number"
174
            },
175
            "total_volume_ul": {
176
              "description": "Total physical capacity of one well, in microliters",
177
              "$ref": "#/$defs/positive_number"
178
            },
179
            "effective_volume_ul": {
180
              "description": "Maximum fill volume that does not overflow when a supported protective sleeve is fully immersed, in microliters",
181
              "$ref": "#/$defs/positive_number"
182
            },
183
            "liquid_height_curve": {
184
              "$ref": "#/$defs/liquid_height_curve"
185
            }
186
          },
187
          "additionalProperties": false
188
        },
189
        "extensions": {
190
          "$ref": "#/$defs/extensions"
191
        }
192
      },
193
      "unevaluatedProperties": false
194
    },
195
    "sleeve_comb": {
196
      "type": "object",
197
      "required": [
198
        "schema",
199
        "revision",
200
        "uid",
201
        "title",
202
        "manufacturer",
203
        "mpn",
204
        "labware_kind",
205
        "rows",
206
        "columns",
207
        "overall_height_mm",
208
        "working_length_mm",
209
        "rod_diameter_mm"
210
      ],
211
      "properties": {
212
        "schema": {
213
          "type": "object",
214
          "required": [ "name", "revision" ],
215
          "properties": {
216
            "name": {
217
              "const": "syntol.labware.sleeve-comb"
218
            },
219
            "revision": {
220
              "const": 1
221
            }
222
          },
223
          "additionalProperties": false
224
        },
225
        "revision": {
226
          "type": "integer",
227
          "minimum": 1
228
        },
229
        "uid": {
230
          "type": "string",
231
          "format": "uuid"
232
        },
233
        "title": {
234
          "type": "string",
235
          "minLength": 1
236
        },
237
        "manufacturer": {
238
          "$ref": "#/$defs/nullable_nonempty_string"
239
        },
240
        "mpn": {
241
          "$ref": "#/$defs/nullable_nonempty_string"
242
        },
243
        "labware_kind": {
244
          "const": "sleeve_comb"
245
        },
246
        "rows": {
247
          "type": "integer",
248
          "minimum": 1
249
        },
250
        "columns": {
251
          "type": "integer",
252
          "minimum": 1
253
        },
254
        "overall_height_mm": {
255
          "$ref": "#/$defs/positive_number"
256
        },
257
        "working_length_mm": {
258
          "$ref": "#/$defs/positive_number"
259
        },
260
        "rod_diameter_mm": {
261
          "$ref": "#/$defs/positive_number"
262
        },
263
        "extensions": {
264
          "$ref": "#/$defs/extensions"
265
        }
266
      },
267
      "unevaluatedProperties": false
268
    }
269
  }
270
}