Skip to content

Commit 6f0c0a5

Browse files
committed
draft changes for liquid class pipetting
1 parent 2d7d454 commit 6f0c0a5

File tree

4 files changed

+87
-213
lines changed

4 files changed

+87
-213
lines changed

abr-testing/abr_testing/protocols/active_protocols/10_ZymoBIOMICS_Magbead_DNA_Cells_Flex.py

Lines changed: 26 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
}
2020

2121

22-
requirements = {"robotType": "Flex", "apiLevel": "2.23"}
22+
requirements = {"robotType": "Flex", "apiLevel": "2.24"}
2323
"""
2424
Slot A1: Tips 1000
2525
Slot A2: Tips 1000
@@ -148,7 +148,7 @@ def tipcheck(m1000: InstrumentContext) -> None:
148148
waste_reservoir = protocol.load_labware(
149149
"opentrons_tough_1_reservoir_300ml", "B3", "Liquid Waste"
150150
)
151-
waste = waste_reservoir.wells()[0].top()
151+
waste = waste_reservoir.wells()[0]
152152
res1 = protocol.load_labware(res_type, "D2", "reagent reservoir 1")
153153
res2 = protocol.load_labware(res_type, "C2", "reagent reservoir 2")
154154
res3 = protocol.load_labware(res_type, "B2", "reagent reservoir 3")
@@ -160,9 +160,17 @@ def tipcheck(m1000: InstrumentContext) -> None:
160160
tips1002 = protocol.load_labware("opentrons_flex_96_tiprack_1000ul", "B1", "Tips 3")
161161
tips_sn = tips1000.wells()[:num_samples]
162162
# load instruments
163-
m1000 = protocol.load_instrument(
164-
"flex_8channel_1000", mount, tip_racks=[tips1000, tips1001, tips1002]
165-
)
163+
tip_racks = [tips1000, tips1001, tips1002]
164+
165+
m1000 = protocol.load_instrument("flex_8channel_1000", mount, tip_racks=tip_racks)
166+
water = protocol.get_liquid_class("water")
167+
lm = "liquid-meniscus"
168+
for tip in tip_racks:
169+
props = water.get_for(m1000, tip)
170+
props.aspirate.aspirate_position.position_reference = lm # type: ignore[assignment]
171+
props.aspirate.aspirate_position.offset.z = meniscus_z
172+
props.dispense.dispense_position.position_reference = lm # type: ignore[assignment]
173+
props.dispense.dispense_position.offset.z = meniscus_z
166174

167175
def remove_supernatant(vol: float) -> None:
168176
"""Remove supernatant."""
@@ -173,12 +181,14 @@ def remove_supernatant(vol: float) -> None:
173181

174182
for i, m in enumerate(samples_m):
175183
m1000.pick_up_tip(tips_sn[8 * i])
176-
loc = m.meniscus(z=meniscus_z, target="end")
184+
loc = m
177185
for _ in range(num_trans):
178186
m1000.move_to(m.center())
179187
if vol_per_trans > m.current_liquid_volume():
180188
vol_per_trans = m.current_liquid_volume() - 100 # type: ignore
181-
m1000.transfer(vol_per_trans, loc, waste, new_tip="never", air_gap=20)
189+
m1000.transfer_with_liquid_class(
190+
water, vol_per_trans, loc, waste, return_tip=True
191+
)
182192
m1000.blow_out(waste)
183193
m1000.air_gap(20)
184194
m1000.drop_tip(tips_sn[8 * i]) if TIP_TRASH else m1000.return_tip()
@@ -325,18 +335,20 @@ def bind(vol1: float, vol2: float) -> None:
325335
num_trans = math.ceil(vol1 / 980)
326336
vol_per_trans = vol1 / num_trans
327337
source = binding_buffer[i // 2]
338+
print(source)
328339
if i == 0:
329340
reps = 5
330341
else:
331342
reps = 2
343+
print(well)
332344
bead_mixing(source, m1000, vol_per_trans, reps=reps if not dry_run else 1)
333345
# Transfer beads and binding from source to H-S plate
334346
for t in range(num_trans):
335347
if m1000.current_volume > 0:
336348
# void air gap if necessary
337349
m1000.dispense(m1000.current_volume, source.top())
338-
m1000.transfer(
339-
vol_per_trans, source, well.top(), air_gap=20, new_tip="never"
350+
m1000.transfer_with_liquid_class(
351+
water, vol_per_trans, source, well, return_tip=True
340352
)
341353
m1000.air_gap(20)
342354
bead_mixing(well, m1000, vol_per_trans, reps=bead_reps_2)
@@ -375,12 +387,8 @@ def bind(vol1: float, vol2: float) -> None:
375387
if m1000.current_volume > 0:
376388
# void air gap if necessary
377389
m1000.dispense(m1000.current_volume, source.top())
378-
m1000.transfer(
379-
vol_per_trans,
380-
source.meniscus(z=meniscus_z, target="end"),
381-
well.top(),
382-
air_gap=20,
383-
new_tip="never",
390+
m1000.transfer_with_liquid_class(
391+
water, vol_per_trans, source, well, return_tip=True
384392
)
385393
m1000.air_gap(20)
386394

@@ -424,12 +432,8 @@ def wash(vol: float, source: List[Well]) -> None:
424432
for n in range(num_trans):
425433
if vol_per_trans > src.current_liquid_height():
426434
vol_per_trans = src.current_liquid_height() - 100 # type: ignore[assignment]
427-
m1000.transfer(
428-
vol_per_trans,
429-
src.meniscus(z=meniscus_z, target="end"),
430-
m.top(),
431-
air_gap=20,
432-
new_tip="never",
435+
m1000.transfer_with_liquid_class(
436+
water, vol_per_trans, src, m, return_tip=True
433437
)
434438
wash_volume_tracker += vol_per_trans * 8
435439
if wash_volume_tracker >= 9600:
@@ -483,13 +487,7 @@ def elute(vol: float) -> None:
483487
tipcheck(m1000)
484488
m1000.flow_rate.dispense = 100
485489
m1000.flow_rate.aspirate = 25
486-
m1000.transfer(
487-
vol,
488-
m.meniscus(z=meniscus_z, target="end"),
489-
e.meniscus(z=5, target="end"),
490-
air_gap=20,
491-
new_tip="never",
492-
)
490+
m1000.transfer_with_liquid_class(water, vol, m, e, return_tip=True)
493491
m1000.blow_out(e.top(-2))
494492
m1000.air_gap(20)
495493
m1000.drop_tip() if TIP_TRASH else m1000.return_tip()

abr-testing/abr_testing/protocols/active_protocols/1_Simple Normalize Long Right.py

Lines changed: 37 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"source": "Protocol Library",
1616
}
1717

18-
requirements = {"robotType": "Flex", "apiLevel": "2.23"}
18+
requirements = {"robotType": "Flex", "apiLevel": "2.24"}
1919

2020

2121
def add_parameters(parameters: ParameterContext) -> None:
@@ -90,6 +90,23 @@ def run(protocol: ProtocolContext) -> None:
9090
"Dye": [{"well": [Dye_1, Dye_2, Dye_3], "volume": 675.0}],
9191
"Diluent": [{"well": [Diluent_1, Diluent_2, Diluent_3], "volume": 675.0}],
9292
}
93+
water = protocol.get_liquid_class("water")
94+
lm = "liquid-meniscus"
95+
tip_racks = [tiprack_x_2, tiprack_x_3]
96+
for tip in tip_racks:
97+
props = water.get_for(p1000_single, tip)
98+
props.aspirate.aspirate_position.position_reference = lm # type: ignore[assignment]
99+
props.aspirate.aspirate_position.offset.z = meniscus_z
100+
props.dispense.dispense_position.position_reference = lm # type: ignore[assignment]
101+
props.dispense.dispense_position.offset.z = meniscus_z
102+
tip_racks_multi = [tiprack_x_1]
103+
for tip in tip_racks_multi:
104+
props = water.get_for(p1000, tip)
105+
props.aspirate.aspirate_position.position_reference = lm # type: ignore[assignment]
106+
props.aspirate.aspirate_position.offset.z = meniscus_z
107+
props.dispense.dispense_position.position_reference = lm # type: ignore[assignment]
108+
props.dispense.dispense_position.offset.z = meniscus_z
109+
93110
# CONFIGURE SINGLE LAYOUT
94111
p1000.configure_nozzle_layout(style=SINGLE, start="H1", tip_racks=[tiprack_x_1])
95112
try:
@@ -112,11 +129,12 @@ def run(protocol: ProtocolContext) -> None:
112129
CurrentWell = str(data[current][0])
113130
DyeVol = float(data[current][1])
114131
while Dye_1.current_liquid_volume() < (DyeVol * 8):
115-
p1000.transfer(
132+
p1000.transfer_with_liquid_class(
133+
water,
116134
DyeVol,
117-
Dye_1.meniscus(z=meniscus_z, target="end"),
118-
sample_plate_1.wells_by_name()[CurrentWell].top(z=1),
119-
new_tip="never",
135+
Dye_1,
136+
sample_plate_1.wells_by_name()[CurrentWell],
137+
return_tip=True,
120138
)
121139
current += 1
122140
p1000.blow_out(location=waste_reservoir["A1"])
@@ -156,10 +174,11 @@ def run(protocol: ProtocolContext) -> None:
156174
CurrentWell = str(data[current][0])
157175
DyeVol = float(data[current][1])
158176
while Dye_2.current_liquid_volume() < (DyeVol * 8):
159-
p1000_single.transfer(
177+
p1000_single.transfer_with_liquid_class(
178+
water,
160179
DyeVol,
161-
Dye_2.meniscus(z=meniscus_z, target="end"),
162-
sample_plate_2.wells_by_name()[CurrentWell].top(z=1),
180+
Dye_2,
181+
sample_plate_2.wells_by_name()[CurrentWell],
163182
new_tip="never",
164183
)
165184
current += 1
@@ -199,13 +218,12 @@ def run(protocol: ProtocolContext) -> None:
199218
CurrentWell = str(data[current][0])
200219
DyeVol = float(data[current][1])
201220
if Dye_3.current_liquid_volume() < (DyeVol * 8):
202-
p1000_single.transfer(
221+
p1000_single.transfer_with_liquid_class(
222+
water,
203223
DyeVol,
204-
Dye_3.meniscus(z=meniscus_z, target="end"),
205-
sample_plate_3.wells_by_name()[CurrentWell].top(z=1),
206-
blow_out=True,
207-
blowout_location="destination well",
208-
new_tip="never",
224+
Dye_3,
225+
sample_plate_3.wells_by_name()[CurrentWell],
226+
return_tip=True,
209227
)
210228
current += 1
211229
p1000_single.blow_out(location=waste_reservoir["A1"])
@@ -242,13 +260,12 @@ def run(protocol: ProtocolContext) -> None:
242260
CurrentWell = str(data[current][0])
243261
DyeVol = float(data[current][1])
244262
if DyeVol != 0 and DyeVol < 100:
245-
p1000_single.transfer(
263+
p1000_single.transfer_with_liquid_class(
264+
water,
246265
DyeVol,
247-
Dye_3.bottom(z=2),
248-
sample_plate_4.wells_by_name()[CurrentWell].top(z=1),
249-
blow_out=True,
250-
blowout_location="destination well",
251-
new_tip="never",
266+
Dye_3,
267+
sample_plate_4.wells_by_name()[CurrentWell],
268+
return_tip=True,
252269
)
253270
if DyeVol > 20:
254271
wells.append(sample_plate_4.wells_by_name()[CurrentWell])

0 commit comments

Comments
 (0)