You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
docs(api): re-add creating a liquid class (#19000)
<!--
Thanks for taking the time to open a Pull Request (PR)! Please make sure
you've read the "Opening Pull Requests" section of our Contributing
Guide:
https://github.com/Opentrons/opentrons/blob/edge/CONTRIBUTING.md#opening-pull-requests
GitHub provides robust markdown to format your PR. Links, diagrams,
pictures, and videos along with text formatting make it possible to
create a rich and informative PR. For more information on GitHub
markdown, see:
https://docs.github.com/en/get-started/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax
To ensure your code is reviewed quickly and thoroughly, please fill out
the sections below to the best of your ability!
-->
# Overview
adding back our defining/creating liquid class sections to the API docs
for the 8.5.1 release. this text was taken out ~ a week ago because of a
multi-dispense bug with custom liquid class definitions.
this text also includes some changes to clarify _how_ to customize a
liquid class, including a full dictionary example for users creating a
liquid class definition from scratch.
<!--
Describe your PR at a high level. State acceptance criteria and how this
PR fits into other work. Link issues, PRs, and other relevant resources.
-->
## Test Plan and Hands on Testing
<!--
Describe your testing of the PR. Emphasize testing not reflected in the
code. Attach protocols, logs, screenshots and any other assets that
support your testing.
-->
sandbox:
http://sandbox.docs.opentrons.com/docs-creating-liquid-class/v2/
## Changelog
<!--
List changes introduced by this PR considering future developers and the
end user. Give careful thought and clear documentation to breaking
changes.
-->
## Review requests
<!--
- What do you need from reviewers to feel confident this PR is ready to
merge?
- Ask questions.
-->
triple check dictionary example.
## Risk assessment
<!--
- Indicate the level of attention this PR needs.
- Provide context to guide reviewers.
- Discuss trade-offs, coupling, and side effects.
- Look for the possibility, even if you think it's small, that your
change may affect some other part of the system.
- For instance, changing return tip behavior may also change the
behavior of labware calibration.
- How do your unit tests and on hands on testing mitigate this PR's
risks and the risk of future regressions?
- Especially in high risk PRs, explain how you know your testing is
enough.
-->
low- adding in text that was previously in API docs.
Copy file name to clipboardExpand all lines: api/docs/v2/liquid_class_definitions.rst
+6Lines changed: 6 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,6 +10,12 @@ A *liquid class definition* specifies nearly all transfer behavior a Flex pipett
10
10
11
11
This section details specific changes to transfer behavior for each Opentrons-verified liquid class. The transfer steps are listed in the order the robot performs them. Advanced settings like mix, pre-wet tip, touch tip, and blowout are automatically disabled in Opentrons-verified liquid class definitions.
12
12
13
+
.. note::
14
+
15
+
You can customize a liquid class definition for your workflow, either by customizing individual properties of an Opentrons-verified liquid class definition or by creating your own definition from scratch.
16
+
17
+
For more information, see :ref:`customizing-liquid-classes`.
18
+
13
19
To use the tables below, select your liquid class: :ref:`aqueous`, :ref:`viscous`, or :ref:`volatile`. Then, click different tabs to view your pipette and tip combination.
14
20
15
21
In a liquid class transfer, flow rates and air gap or push out volumes vary based on the pipette and tip combination used in your protocol. Let's say you use a Flex P1000 1-channel pipette and Flex 200 µL tips to aspirate a volatile liquid. The transfer volume specifies the flow rate:
Copy file name to clipboardExpand all lines: api/docs/v2/liquid_classes.rst
+129-3Lines changed: 129 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,7 +8,7 @@ Liquid Classes
8
8
9
9
Accounting for properties of liquids in your protocol can increase pipetting accuracy on the Flex. For example, a slower flow rate can improve pipetting for a viscous liquid, and an air gap can prevent a volatile liquid from dripping onto the deck.
10
10
11
-
This page covers the properties of Opentrons-verified liquid classes and how to use them in your protocols.
11
+
This page covers the properties of Opentrons-verified liquid classes, how to use a verified liquid class in your protocol, and how to customize a liquid class.
12
12
13
13
14
14
.. _opentrons-verified-liquid-classes:
@@ -190,15 +190,15 @@ Here, the ``glycerol_50`` viscous liquid class definition accounts for all other
190
190
191
191
* Moves to 2 mm above the top of the source well at 4 mm/sec.
192
192
* Submerges to 2 mm above the bottom of the source well at 4mm/sec.
193
-
* Aspirates 50 µL at 50 µL/sec with a correction of -0.2 µL.
193
+
* Aspirates 50 µL at 50 µL/sec with a volume correction.
194
194
* Delays for 1 second.
195
195
* Retracts to 2 mm above the top of the well at 4 mm/sec.
196
196
197
197
And for each dispense, the pipette:
198
198
199
199
* Moves to 2 mm above the top of the destination well at 4 mm/sec.
200
200
* Submerges to 2 mm above the top of the destination well at 4 mm/sec.
201
-
* Dispenses 50 µL at 25 µL/sec with a correction of -0.2 µL.
201
+
* Dispenses 50 µL at 25 µL/sec with a volume correction.
202
202
* Pushes out a volume of air equivalent to 3.9 µL
203
203
* Delays for 0.5 second.
204
204
* Retracts to 2 mm above the top of the well at 4 mm/sec.
@@ -212,4 +212,130 @@ In many cases, the liquid class definition represents fine-tuned changes optimiz
212
212
213
213
Not all transfer behavior is easily visible. See :ref:`liquid-class-definitions` for a full list of changes based on liquid class, pipette, and tip combination. For more detail on individual transfer settings, see :ref:`liquid-control`.
214
214
215
+
.. _customizing-liquid-classes:
216
+
217
+
Customizing Liquid Classes
218
+
===========================
219
+
220
+
You can create your own liquid class to customize transfer behavior for any liquid in a Flex protocol. To make changes, you can edit individual properties of an existing liquid class, or add properties to a new liquid class.
221
+
222
+
To customize an Opentrons-verified liquid class, first add your pipettes, tips, trash, and labware. Then, use :py:meth:`~.ProtocolContext.get_liquid_class` to specify the liquid class you'll make changes to::
Then, complete your transfers with the modified ``custom_water`` liquid class.
245
+
246
+
All Opentrons-verified liquid classes position the pipette relative to the well. To customize your liquid class to use :ref:`meniscus-relative <well-meniscus>` locations, set the ``positionReference`` to ``"liquid-meniscus"``for actions like an aspirate or dispense.
247
+
248
+
.. _new-liquid-classes:
249
+
250
+
Defining New Liquid Classes
251
+
============================
252
+
253
+
You can also create a new liquid classfor your Flex protocols. Instead of using an Opentrons-verified liquid class, you'll start from scratch, providing a value for every required property in your liquid class.
Then, use the defined properties and :py:meth:`~.ProtocolContext.define_liquid_class` to create your new liquid class::
324
+
325
+
# create a new liquid class
326
+
custom_viscous = protocol.define_liquid_class(
327
+
name="custom_viscous",
328
+
properties=custom_liquid_class_properties,
329
+
display_name="Custom Viscous"
330
+
)
331
+
332
+
.. versionadded:: 2.24
333
+
334
+
You'll need to define values for all required properties in your new liquid class, like submerging before aspirating or after dispensing, speeds and flow rates, and position offsets. See the Opentrons-verified `liquid class properties <https://github.com/Opentrons/opentrons/tree/edge/shared-data/liquid-class/definitions/1>`__ for examples.
335
+
336
+
You can also define optional properties, like a mix or blowout, in your liquid class. See `the liquid class schema <https://github.com/Opentrons/opentrons/blob/edge/shared-data/liquid-class/schemas/1.json>`__ for a complete list of properties.
337
+
338
+
.. note::
339
+
The :py:meth:`.ProtocolContext.get_liquid_class` method only accepts Opentrons-verified liquid classes, like ``glycerol_50``. You'll need to use :py:meth:`.ProtocolContext.define_liquid_class` in each Flex protocol that uses a custom liquid class.
Copy file name to clipboardExpand all lines: api/docs/v2/versioning.rst
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -147,6 +147,7 @@ Version 2.24
147
147
- Adds the ability to perform liquid handling actions using :ref:`liquid classes <liquid-classes>`.
148
148
149
149
- :py:meth:`.ProtocolContext.get_liquid_class` accesses :ref:`Opentrons-verified liquid class definitions <liquid-class-definitions>` for aqueous, volatile, and viscous liquids.
150
+
- :py:meth:`.ProtocolContext.define_liquid_class` lets you create your own liquid classes from verified classes or from scratch.
150
151
- New :py:class:`.InstrumentContext` methods — :py:meth:`.transfer_with_liquid_class`, :py:meth:`.distribute_with_liquid_class`, and :py:meth:`.consolidate_with_liquid_class` — move liquids according to their properties.
151
152
- :py:meth:`.air_gap`, :py:meth:`.blow_out`, :py:meth:`.dispense`, :py:meth:`.mix`, and :py:meth:`.touch_tip` have new parameters for advanced settings that are also available in Protocol Designer.
0 commit comments