Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(abr-testing): Flex stacker protocol edits #17159

Open
wants to merge 5 commits into
base: edge
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ def run(protocol: ProtocolContext) -> None:
single_channel_mount = protocol.params.pipette_mount_1 # type: ignore[attr-defined]
eight_channel_mount = protocol.params.pipette_mount_2 # type: ignore[attr-defined]
deactivate_modules_bool = protocol.params.deactivate_modules # type: ignore[attr-defined]
helpers.comment_protocol_version(protocol, "01")
helpers.comment_protocol_version(protocol, "02")

MIX_SPEED = heater_shaker_speed
MIX_SEC = 10
Expand Down Expand Up @@ -289,8 +289,16 @@ def run(sample_plate: Labware) -> None:

run(sample_plate_1)
# swap plates
protocol.move_labware(sample_plate_1, "B4", True)
protocol.move_labware(sample_plate_2, "B2", True)
helpers.move_labware_to_destination(
protocol=protocol,
labware=sample_plate_1,
dest="B4",
use_gripper=True,
flex_stacker=True,
)
helpers.move_labware_to_destination(
protocol=protocol, labware=sample_plate_2, dest="B2", use_gripper=True
)
run(sample_plate_2)

helpers.clean_up_plates(p1000_single, [wash_res], waste, 1000)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
Well,
InstrumentContext,
)

from opentrons import types
import math
from abr_testing.protocols import helpers
Expand Down Expand Up @@ -78,7 +79,7 @@ def run(protocol: ProtocolContext) -> None:
pipette_1000_mount = protocol.params.pipette_mount_1 # type: ignore[attr-defined]
pipette_50_mount = protocol.params.pipette_mount_2 # type: ignore[attr-defined]
deck_riser = protocol.params.deck_riser # type: ignore[attr-defined]
helpers.comment_protocol_version(protocol, "01")
helpers.comment_protocol_version(protocol, "02")

REUSE_ETOH_TIPS = True
REUSE_RSB_TIPS = (
Expand Down Expand Up @@ -260,11 +261,22 @@ def run_tag_profile(

# Move Plate to TC
protocol.comment("****Moving Plate to Pre-Warmed TC Module Block****")
protocol.move_labware(sample_plate, tc_mod, use_gripper=USE_GRIPPER)
print("Moving to TC")
helpers.move_labware_to_destination(
protocol=protocol,
labware=sample_plate,
dest=tc_mod,
use_gripper=USE_GRIPPER,
)

if disposable_lid:
lid_on_plate, unused_lids, used_lids = helpers.use_disposable_lid_with_tc(
protocol, unused_lids, used_lids, sample_plate, tc_mod
protocol,
unused_lids,
used_lids,
sample_plate,
tc_mod,
flex_stacker=True,
)
else:
tc_mod.close_lid()
Expand All @@ -275,13 +287,27 @@ def run_tag_profile(

if disposable_lid:
if len(used_lids) <= 1:
protocol.move_labware(lid_on_plate, "D4", use_gripper=True)
helpers.move_labware_to_destination(
protocol=protocol,
labware=lid_on_plate,
dest="D4",
use_gripper=True,
flex_stacker=True,
)
else:
protocol.move_labware(lid_on_plate, used_lids[-2], use_gripper=True)
helpers.move_labware_to_destination(
protocol=protocol,
labware=lid_on_plate,
dest=used_lids[-2],
use_gripper=True,
flex_stacker=True,
)
# #Move Plate to H-S
protocol.comment("****Moving Plate off of TC****")

protocol.move_labware(sample_plate, "D1", use_gripper=USE_GRIPPER)
helpers.move_labware_to_destination(
protocol=protocol, labware=sample_plate, dest="D1", use_gripper=USE_GRIPPER
)
return unused_lids, used_lids

def run_er_profile(
Expand All @@ -297,11 +323,21 @@ def run_er_profile(

# Move Plate to TC
protocol.comment("****Moving Plate to Pre-Warmed TC Module Block****")
protocol.move_labware(sample_plate, tc_mod, use_gripper=USE_GRIPPER)
helpers.move_labware_to_destination(
protocol=protocol,
labware=sample_plate,
dest=tc_mod,
use_gripper=USE_GRIPPER,
)

if disposable_lid:
lid_on_plate, unused_lids, used_lids = helpers.use_disposable_lid_with_tc(
protocol, unused_lids, used_lids, sample_plate, tc_mod
protocol,
unused_lids,
used_lids,
sample_plate,
tc_mod,
flex_stacker=True,
)
else:
tc_mod.close_lid()
Expand All @@ -315,13 +351,27 @@ def run_er_profile(
if disposable_lid:
# move lid
if len(used_lids) <= 1:
protocol.move_labware(lid_on_plate, "C4", use_gripper=True)
helpers.move_labware_to_destination(
protocol=protocol,
labware=lid_on_plate,
dest="C4",
use_gripper=True,
flex_stacker=True,
)
else:
protocol.move_labware(lid_on_plate, used_lids[-2], use_gripper=True)
helpers.move_labware_to_destination(
protocol=protocol,
labware=lid_on_plate,
dest=used_lids[-2],
use_gripper=True,
flex_stacker=True,
)
# #Move Plate to H-S
protocol.comment("****Moving Plate off of TC****")

protocol.move_labware(sample_plate, "D1", use_gripper=USE_GRIPPER)
helpers.move_labware_to_destination(
protocol=protocol, labware=sample_plate, dest="D1", use_gripper=USE_GRIPPER
)
return unused_lids, used_lids

def run_ligation_profile(
Expand All @@ -338,11 +388,21 @@ def run_ligation_profile(
# Move Plate to TC
protocol.comment("****Moving Plate to Pre-Warmed TC Module Block****")

protocol.move_labware(sample_plate, tc_mod, use_gripper=USE_GRIPPER)
helpers.move_labware_to_destination(
protocol=protocol,
labware=sample_plate,
dest=tc_mod,
use_gripper=USE_GRIPPER,
)

if disposable_lid:
lid_on_plate, unused_lids, used_lids = helpers.use_disposable_lid_with_tc(
protocol, unused_lids, used_lids, sample_plate, tc_mod
protocol,
unused_lids,
used_lids,
sample_plate,
tc_mod,
flex_stacker=True,
)
else:
tc_mod.close_lid()
Expand All @@ -357,14 +417,28 @@ def run_ligation_profile(
tc_mod.open_lid()
if disposable_lid:
if len(used_lids) <= 1:
protocol.move_labware(lid_on_plate, "C4", use_gripper=True)
helpers.move_labware_to_destination(
protocol=protocol,
labware=lid_on_plate,
dest="C4",
use_gripper=True,
flex_stacker=True,
)
else:
protocol.move_labware(lid_on_plate, used_lids[-2], use_gripper=True)
helpers.move_labware_to_destination(
protocol=protocol,
labware=lid_on_plate,
dest=used_lids[-2],
use_gripper=True,
flex_stacker=True,
)

# #Move Plate to H-S
protocol.comment("****Moving Plate off of TC****")

protocol.move_labware(sample_plate, "D1", use_gripper=USE_GRIPPER)
helpers.move_labware_to_destination(
protocol=protocol, labware=sample_plate, dest="D1", use_gripper=USE_GRIPPER
)
return unused_lids, used_lids

def run_amplification_profile(
Expand All @@ -380,13 +454,23 @@ def run_amplification_profile(

# Move Plate to TC
protocol.comment("****Moving Sample Plate onto TC****")
protocol.move_labware(sample_plate_2, tc_mod, use_gripper=USE_GRIPPER)
helpers.move_labware_to_destination(
protocol=protocol,
labware=sample_plate_2,
dest=tc_mod,
use_gripper=USE_GRIPPER,
)

if not dry_run:
tc_mod.set_lid_temperature(105)
if disposable_lid:
lid_on_plate, unused_lids, used_lids = helpers.use_disposable_lid_with_tc(
protocol, unused_lids, used_lids, sample_plate_2, tc_mod
protocol,
unused_lids,
used_lids,
sample_plate_2,
tc_mod,
flex_stacker=True,
)
else:
tc_mod.close_lid()
Expand All @@ -405,16 +489,35 @@ def run_amplification_profile(
tc_mod.open_lid()
if disposable_lid:
if len(used_lids) <= 1:
protocol.move_labware(lid_on_plate, "C4", use_gripper=True)
helpers.move_labware_to_destination(
protocol=protocol,
labware=lid_on_plate,
dest="C4",
use_gripper=True,
flex_stacker=True,
)
else:
protocol.move_labware(lid_on_plate, used_lids[-2], use_gripper=True)
helpers.move_labware_to_destination(
protocol=protocol,
labware=lid_on_plate,
dest=used_lids[-2],
use_gripper=True,
flex_stacker=True,
)

# Move Sample Plate to H-S
protocol.comment("****Moving Sample Plate back to H-S****")
protocol.move_labware(sample_plate_2, "D1", use_gripper=USE_GRIPPER)
helpers.move_labware_to_destination(
protocol=protocol,
labware=sample_plate_2,
dest="D1",
use_gripper=USE_GRIPPER,
)
# get FLP plate out of the way
protocol.comment("****Moving FLP Plate back to TC****")
protocol.move_labware(FLP_plate, tc_mod, use_gripper=USE_GRIPPER)
helpers.move_labware_to_destination(
protocol=protocol, labware=FLP_plate, dest=tc_mod, use_gripper=USE_GRIPPER
)
return unused_lids, used_lids

def mix_beads(
Expand Down Expand Up @@ -623,7 +726,12 @@ def lib_cleanup() -> None:
# Move FLP plate off magnetic module if it's there
if FLP_plate.parent == magblock:
protocol.comment("****Moving FLP Plate off Magnetic Module****")
protocol.move_labware(FLP_plate, tc_mod, use_gripper=USE_GRIPPER)
helpers.move_labware_to_destination(
protocol=protocol,
labware=FLP_plate,
dest=tc_mod,
use_gripper=USE_GRIPPER,
)

for x, i in enumerate(samples):
mix_beads(p200, bead_res, bead_vol_1, 7 if x == 0 else 2, x)
Expand Down Expand Up @@ -653,7 +761,12 @@ def lib_cleanup() -> None:
)

protocol.comment("****Moving Labware to Magnet for Pelleting****")
protocol.move_labware(sample_plate, magblock, use_gripper=USE_GRIPPER)
helpers.move_labware_to_destination(
protocol=protocol,
labware=sample_plate,
dest=magblock,
use_gripper=USE_GRIPPER,
)

protocol.delay(minutes=4.5, msg="Time for Pelleting")

Expand Down Expand Up @@ -706,7 +819,9 @@ def lib_cleanup() -> None:
# Return Plate to H-S from Magnet

protocol.comment("****Moving sample plate off of Magnet****")
protocol.move_labware(sample_plate, "D1", use_gripper=USE_GRIPPER)
helpers.move_labware_to_destination(
protocol=protocol, labware=sample_plate, dest="D1", use_gripper=USE_GRIPPER
)

# Adding RSB and Mixing

Expand Down Expand Up @@ -741,7 +856,12 @@ def lib_cleanup() -> None:
)

protocol.comment("****Move Samples to Magnet for Pelleting****")
protocol.move_labware(sample_plate, magblock, use_gripper=USE_GRIPPER)
helpers.move_labware_to_destination(
protocol=protocol,
labware=sample_plate,
dest=magblock,
use_gripper=USE_GRIPPER,
)

protocol.delay(minutes=2, msg="Please allow 2 minutes for beads to pellet.")

Expand All @@ -761,14 +881,23 @@ def lib_cleanup() -> None:

# move new sample plate to D1 or heatershaker
protocol.comment("****Moving sample plate off of Magnet****")
protocol.move_labware(sample_plate_2, "D1", use_gripper=USE_GRIPPER)
helpers.move_labware_to_destination(
protocol=protocol,
labware=sample_plate_2,
dest="D1",
use_gripper=USE_GRIPPER,
)

# Keep Sample PLate 1 to B2
protocol.comment("****Moving Sample_plate_1 Plate off magnet to B2****")
protocol.move_labware(sample_plate, "B2", use_gripper=USE_GRIPPER)
helpers.move_labware_to_destination(
protocol=protocol, labware=sample_plate, dest="B2", use_gripper=USE_GRIPPER
)

protocol.comment("****Moving FLP Plate off TC****")
protocol.move_labware(FLP_plate, magblock, use_gripper=USE_GRIPPER)
helpers.move_labware_to_destination(
protocol=protocol, labware=FLP_plate, dest=magblock, use_gripper=USE_GRIPPER
)

def lib_amplification(
unused_lids: List[Labware], used_lids: List[Labware]
Expand Down Expand Up @@ -843,7 +972,12 @@ def lib_cleanup_2() -> None:
)

protocol.comment("****Moving Labware to Magnet for Pelleting****")
protocol.move_labware(sample_plate_2, magblock, use_gripper=USE_GRIPPER)
helpers.move_labware_to_destination(
protocol=protocol,
labware=sample_plate_2,
dest=magblock,
use_gripper=USE_GRIPPER,
)

protocol.delay(minutes=4.5, msg="Time for Pelleting")

Expand Down Expand Up @@ -895,7 +1029,12 @@ def lib_cleanup_2() -> None:
protocol.delay(minutes=3, msg="Allow 3 minutes for residual ethanol to dry")

protocol.comment("****Moving sample plate off of Magnet****")
protocol.move_labware(sample_plate_2, "D1", use_gripper=USE_GRIPPER)
helpers.move_labware_to_destination(
protocol=protocol,
labware=sample_plate_2,
dest="D1",
use_gripper=USE_GRIPPER,
)

# Adding RSB and Mixing

Expand Down Expand Up @@ -930,7 +1069,12 @@ def lib_cleanup_2() -> None:
)

protocol.comment("****Move Samples to Magnet for Pelleting****")
protocol.move_labware(sample_plate_2, magblock, use_gripper=USE_GRIPPER)
helpers.move_labware_to_destination(
protocol=protocol,
labware=sample_plate_2,
dest=magblock,
use_gripper=USE_GRIPPER,
)

protocol.delay(minutes=2, msg="Please allow 2 minutes for beads to pellet.")

Expand Down
Loading
Loading