Labware definitions¶
Every labware you use on Flex requires a labware definition that contains all the information Flex needs to work with the labware. This includes information about the physical shape of the labware, how pipettes and the gripper should interact with it, and what the labware should be called on the touchscreen and in the Opentrons App.
The Flex robot software and Opentrons App include the labware definitions for everything available in the Opentrons Labware Library.
Custom labware is labware that's not listed in the Opentrons Labware Library. You can use other common or unique labware items with the Flex by accurately measuring and recording the characteristics of that object and saving that data in a JSON file. When imported into the app, the Flex and the Python Protocol API use that JSON data to interact with your labware. Opentrons provides tools and services, which we'll examine below, to help you use the Flex with custom labware.
Note
While you cannot create custom labware within the Python Protocol API, you can use custom labware with the available API methods. However, you need to define your custom labware first and import it into the Opentrons App. Then your custom labware is available to the Python API and the robot.
Custom Labware Creator¶
The Custom Labware Creator is a no-code, web-based tool that uses a graphical interface to help you create a labware definition file. Labware Creator produces a JSON labware definition file that you import into the Opentrons App. After that, your custom labware is available to the Flex robot and the Python API.
You can use the Custom Labware Creator if your labware meets the following criteria:
- Wells and tubes are uniform and identical.
- All rows are evenly spaced (the space between rows is equal).
- All columns are evenly spaced (the space between columns is equal).
- The labware fits perfectly in one deck slot.
Layout | Description |
---|---|
Regular All columns are evenly spaced and all rows are evenly spaced. Columns do not need to have the same spacing as rows. |
|
Regular The grid does not have to be in the center of labware. |
For other labware, consider the Custom Labware Service, outlined below. Or you can reference the complete JSON schema to create a labware definition from scratch, although this is not recommended.
Custom Labware Service¶
Get in touch with us if the labware you'd like to use isn't available in the library, if you can't create your own definitions, or because a custom item includes different shapes, sizes, or other irregularities described below.
- Well or tube shapes vary.
- Rows are not evenly spaced.
- Columns are not evenly spaced.
- The labware is smaller than one deck slot (requires adapter) or spans multiple deck slots.
Layout | Description |
---|---|
Irregular Rows are evenly spaced but columns are not evenly spaced. |
|
Irregular Columns/rows are evenly spaced but wells are not identical. |
|
Irregular There is more than one grid. |
If you need help creating custom labware definitions, contact Opentrons Support (support@opentrons.com). They will work to design custom labware definitions based on your requirements. This is a fee-based service.
JSON labware schema¶
A JSON file is the blueprint for Opentrons standard and custom labware. This file contains and organizes labware data according to the design specifications set by the default schema.
A schema is a framework for organizing data. It sets the rules about what information is required or optional and how it’s organized in the JSON file. If you’re interested, take a moment to review our labware schema. For an actual example, see the definition for the Opentrons 96 PCR Adapter. The following table lists and defines the items in the Opentrons labware schema.
Property | Data type | Definition |
---|---|---|
schemaVersion |
Number | Schema version used by a labware. The current version is 2 . |
version |
Integer | An incrementing integer that identifies the labware version. Minimum version is 1 . |
namespace |
String | See safeString in the JSON definitions section below. |
metadata |
Object | Properties used for search and display. Accepts only:
|
brand |
Object | Information about the labware manufacturer or those products the labware is compatible with. |
parameters |
Object | Internal parameters that describe labware characteristics. Accepts only:
|
ordering |
Array | An array that tracks how wells should be ordered on a piece of labware. See the Opentrons 96 PCR Adapter example. |
cornerOffset FromSlot |
Object | Used for labware that spans multiple deck slots. Offset is the distance from the left-front-bottom corner of the slot to the left-front-bottom corner of the labware bounding box. Accepts only:
positiveNumber in the JSON definitions section below. |
dimensions |
Object | Outer dimensions (in mm) of a piece of labware. Accepts only:
|
wells |
Object | An unordered object of well objects, including position and dimensions. Each well object's key is the well's coordinates, which must be an uppercase letter followed by a number, e.g., A1, B1, H12. Each well object accepts the following properties:
For dimension, depth, and volume, see positiveNumber in the JSON definitions section below. |
groups |
Array | Logical well groupings for metadata and display purposes. Changes in groups do not affect protocol execution. Each item in the array accepts:
|
allowedRoles |
Array | Defines an item's role or purpose. If the allowedRoles field is missing from a definition, an item is treated as labware . Possible array items are only the following strings:
|
stackingOffset WithLabware |
Object | For labware that can stack on top of another piece of labware. Used to determine z-height (labware z height + adapter z height - overlap). See coordinates in the JSON definitions section below. |
stackingOffset WithModule |
Object | For labware that can stack on top of a module. Used to determine z-height (module labware offset z + labware z - overlap). See coordinates in the JSON definitions section below. |
gripperOffsets |
Object | Offsets added when calculating the coordinates the gripper should go to when picking up or dropping other labware on this labware. Includes a default object that includes two properties:
coordinates in the JSON definitions section below. |
gripForce |
Number | Measured in newtons, this is the force which the gripper uses to grasp labware. Recommended values are between 5 and 16. |
gripHeightFrom LabwareBottom |
Number | Recommended z-axis height, from the labware bottom to the center of the gripper pads. |
JSON labware definitions¶
Property | Data type | Definition |
---|---|---|
positiveNumber |
Number | Minimum: 0. |
brandData |
Object | Information about branded items. Accepts only:
|
displayCategory |
String | Must be one of:
|
safeString |
String | A string safe to use for load names and namespaces. Lowercase letters, numerals, periods, and underscores only. |
coordinates |
Object | Coordinates that specify a distance or position along the x-, y-, and z-axes. Accepts only:
|