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

Abr lengthen protocols #17140

Merged
merged 28 commits into from
Dec 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
b0ad059
Added parameter to deactivate modules at the end of protocols
AnthonyNASC20 Dec 10, 2024
a6c2191
helpers functions added: clean up plates, comment liquid waste height…
rclarke0 Dec 11, 2024
b243767
update to reading instrument commands, recording of liquid heights
rclarke0 Dec 11, 2024
e211e7c
changes to record liquid waste height
rclarke0 Dec 11, 2024
6dedefe
DVT1AB3 PROTOCOL
rclarke0 Dec 12, 2024
4e01627
Merge branch 'module_deactivate' into abr-lengthen-protocols
AnthonyNASC20 Dec 12, 2024
6111620
DVT1ABR1 PROTOCOL
rclarke0 Dec 12, 2024
fbb46ce
DVT1ABR2 PROTOCOL
rclarke0 Dec 12, 2024
b281e7b
DVT1ABR3 LIQUID SET UP
rclarke0 Dec 12, 2024
2e1895b
DVT1ABR4 PROTOCOL
rclarke0 Dec 12, 2024
684eb1f
abr7 and abr11 lengthened protocols and setups
AnthonyNASC20 Dec 12, 2024
d7102bf
DVT2ABR5 PROTOCOL
rclarke0 Dec 12, 2024
99f220f
PVT1ABR8 PROTOCOL
rclarke0 Dec 12, 2024
690645c
PVT1ABR9 PROTOCOL
rclarke0 Dec 12, 2024
1e4f2aa
Merge branch 'abr-lengthen-protocols' of https://github.com/Opentrons…
rclarke0 Dec 12, 2024
f175fba
deactivate modules in PVT1ABR7 & PVT1ABR11 protocols
rclarke0 Dec 12, 2024
eef6d63
PVT1ABR10 PROTOCOL
rclarke0 Dec 12, 2024
75f1903
protocol syntax fixes
rclarke0 Dec 12, 2024
60f668b
add protocol version number
rclarke0 Dec 13, 2024
5f7934d
fix to commandtype
rclarke0 Dec 16, 2024
10e8971
abr1 liquid set up fix
rclarke0 Dec 17, 2024
5422265
deck riser test script:
rclarke0 Dec 17, 2024
d014070
abr-6 finalized protocol
AnthonyNASC20 Dec 17, 2024
577946e
Merge branch 'abr-lengthen-protocols' of https://github.com/Opentrons…
rclarke0 Dec 18, 2024
896abce
ABR10/ABR6 fixes
rclarke0 Dec 18, 2024
0c79bde
clean up previous merge issue
AnthonyNASC20 Dec 18, 2024
297ccf0
Merge branch 'edge' into abr-lengthen-protocols
rclarke0 Dec 18, 2024
473baec
fix lint issues
AnthonyNASC20 Dec 18, 2024
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 @@ -239,7 +239,10 @@ def get_liquid_waste_height(file_results: Dict[str, Any]) -> float:
result_str = get_comment_result_by_string(
file_results, "Liquid Waste Total Height: "
)
height = float(result_str)
try:
height = float(result_str)
except ValueError:
height = 0.0
return height


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ def tipcheck(m1000: InstrumentContext) -> None:
"Lysis and PK": [{"well": lysis_, "volume": 12320.0}],
"Beads and Binding": [{"well": binding_buffer, "volume": 11875.0}],
"Binding 2": [{"well": bind2_res, "volume": 13500.0}],
"Final Elution": [{"well": elution_solution, "volume": 1200.0}],
"Final Elution": [{"well": elution_solution, "volume": 7500.0}],
"Samples": [{"well": samps, "volume": 0.0}],
"Reagents": [{"well": all_washes, "volume": 9800.0}],
}
Expand Down Expand Up @@ -489,9 +489,8 @@ def elute(vol: float) -> None:
m1000.aspirate(vol, elution_solution)
m1000.air_gap(20)
m1000.dispense(m1000.current_volume, m.top(-3))
total_elution_vol += vol
total_elution_vol += vol * 8
m1000.drop_tip() if TIP_TRASH else m1000.return_tip()

helpers.set_hs_speed(protocol, h_s, heater_shaker_speed * 0.9, wash_time, True)

# Transfer back to magnet
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,16 +35,16 @@ def add_parameters(parameters: ParameterContext) -> None:
display_name="Number of Runs",
default=2,
minimum=1,
maximum=10,
maximum=4,
)


# Start protocol
def run(ctx: ProtocolContext) -> None:
def run(protocol: ProtocolContext) -> None:
"""Protocol."""
dot_bottom = ctx.params.dot_bottom # type: ignore[attr-defined]
deactivate_modules = ctx.params.deactivate_modules # type: ignore[attr-defined]
number_of_runs = ctx.params.number_of_runs # type: ignore[attr-defined]
dot_bottom = protocol.params.dot_bottom # type: ignore[attr-defined]
deactivate_modules = protocol.params.deactivate_modules # type: ignore[attr-defined]
number_of_runs = protocol.params.number_of_runs # type: ignore[attr-defined]
dry_run = False
tip_mixing = False

Expand All @@ -53,7 +53,7 @@ def run(ctx: ProtocolContext) -> None:
bind_vol = 300.0
sample_vol = 180.0
elution_vol = 100.0

helpers.comment_protocol_version(protocol, "01")
# Same for all HDQ Extractions
deepwell_type = "nest_96_wellplate_2ml_deep"
if not dry_run:
Expand All @@ -68,56 +68,56 @@ def run(ctx: ProtocolContext) -> None:
binding_buffer_vol = bead_vol + bind_vol
starting_vol = AL_total_vol + sample_vol

h_s: HeaterShakerContext = ctx.load_module(helpers.hs_str, "D1") # type: ignore[assignment]
h_s: HeaterShakerContext = protocol.load_module(
helpers.hs_str, "D1"
) # type: ignore[assignment]
sample_plate, h_s_adapter = helpers.load_hs_adapter_and_labware(
deepwell_type, h_s, "Sample Plate"
)
h_s.close_labware_latch()
samples_m = sample_plate.wells()[0]

# NOTE: MAG BLOCK will be on slot 6

temp: TemperatureModuleContext = ctx.load_module(
temp: TemperatureModuleContext = protocol.load_module(
helpers.temp_str, "A3"
) # type: ignore[assignment]
elutionplate, tempblock = helpers.load_temp_adapter_and_labware(
"armadillo_96_wellplate_200ul_pcr_full_skirt", temp, "Elution Plate/Reservoir"
)

magblock: MagneticBlockContext = ctx.load_module(
magblock: MagneticBlockContext = protocol.load_module(
"magneticBlockV1", "C1"
) # type: ignore[assignment]
liquid_waste = ctx.load_labware("nest_1_reservoir_195ml", "B3", "Liquid Waste")
liquid_waste = protocol.load_labware("nest_1_reservoir_195ml", "B3", "Liquid Waste")
waste = liquid_waste.wells()[0].top()

lysis_reservoir = ctx.load_labware(deepwell_type, "D2", "Lysis reservoir")
lysis_reservoir = protocol.load_labware(deepwell_type, "D2", "Lysis reservoir")
lysis_res = lysis_reservoir.wells()[0]
bind_reservoir = ctx.load_labware(
bind_reservoir = protocol.load_labware(
deepwell_type, "C2", "Beads and binding reservoir"
)
bind_res = bind_reservoir.wells()[0]
wash1_reservoir = ctx.load_labware(deepwell_type, "C3", "Wash 1 reservoir")
wash1_reservoir = protocol.load_labware(deepwell_type, "C3", "Wash 1 reservoir")
wash1_res = wash1_reservoir.wells()[0]
wash2_reservoir = ctx.load_labware(deepwell_type, "B1", "Wash 2 reservoir")
wash2_reservoir = protocol.load_labware(deepwell_type, "B1", "Wash 2 reservoir")
wash2_res = wash2_reservoir.wells()[0]
elution_res = elutionplate.wells()[0]
# Load Pipette and tip racks
# Load tips
tiprack_1 = ctx.load_labware(
tiprack_1 = protocol.load_labware(
"opentrons_flex_96_tiprack_1000ul",
"A1",
adapter="opentrons_flex_96_tiprack_adapter",
)
tips = tiprack_1.wells()[0]

tiprack_2 = ctx.load_labware(
tiprack_2 = protocol.load_labware(
"opentrons_flex_96_tiprack_1000ul",
"A2",
adapter="opentrons_flex_96_tiprack_adapter",
)
tips1 = tiprack_2.wells()[0]
# load 96 channel pipette
pip: InstrumentContext = ctx.load_instrument(
pip: InstrumentContext = protocol.load_instrument(
"flex_96channel_1000", mount="left", tip_racks=[tiprack_1, tiprack_2]
)
# Load Liquids and probe
Expand All @@ -136,7 +136,7 @@ def run(ctx: ProtocolContext) -> None:
"Samples": [{"well": sample_plate.wells(), "volume": sample_vol}],
}

helpers.find_liquid_height_of_loaded_liquids(ctx, liquid_vols_and_wells, pip)
helpers.find_liquid_height_of_loaded_liquids(protocol, liquid_vols_and_wells, pip)

pip.flow_rate.aspirate = 50
pip.flow_rate.dispense = 150
Expand Down Expand Up @@ -220,7 +220,7 @@ def bead_mix(vol: float, plate: Well, reps: int = 5) -> None:
pip.flow_rate.aspirate = 150
pip.flow_rate.dispense = 200

def protocol() -> None:
def protocol_function() -> None:
# Start Protocol
temp.set_temperature(inc_temp)
# Transfer and mix lysis
Expand All @@ -232,11 +232,11 @@ def protocol() -> None:
pip.return_tip()

# Mix, then heat
ctx.comment("Lysis Mixing")
helpers.set_hs_speed(ctx, h_s, 1800, 10, False)
protocol.comment("Lysis Mixing")
helpers.set_hs_speed(protocol, h_s, 1800, 10, False)
if not dry_run:
h_s.set_and_wait_for_temperature(55)
ctx.delay(
protocol.delay(
minutes=10 if not dry_run else 0.25,
msg="Please allow another 10 minutes of 55C incubation to complete lysis.",
)
Expand All @@ -255,13 +255,15 @@ def protocol() -> None:
pip.home()

# Shake for binding incubation
ctx.comment("Binding incubation")
helpers.set_hs_speed(ctx, h_s, 1800, 10, True)
protocol.comment("Binding incubation")
helpers.set_hs_speed(protocol, h_s, 1800, 10, True)

# Transfer plate to magnet
helpers.move_labware_from_hs_to_destination(ctx, sample_plate, h_s, magblock)
helpers.move_labware_from_hs_to_destination(
protocol, sample_plate, h_s, magblock
)

ctx.delay(
protocol.delay(
minutes=settling_time,
msg="Please wait " + str(settling_time) + " minute(s) for beads to pellet.",
)
Expand All @@ -276,7 +278,7 @@ def protocol() -> None:
pip.return_tip()

# Transfer plate from magnet to H/S
helpers.move_labware_to_hs(ctx, sample_plate, h_s, h_s_adapter)
helpers.move_labware_to_hs(protocol, sample_plate, h_s, h_s_adapter)

# Washes
for i in range(num_washes if not dry_run else 1):
Expand All @@ -290,14 +292,14 @@ def protocol() -> None:
pip.dispense(wash_vol, samples_m)
if not tip_mixing:
pip.return_tip()
helpers.set_hs_speed(ctx, h_s, 1800, 5, True)
helpers.set_hs_speed(protocol, h_s, 1800, 5, True)

# Transfer plate to magnet
helpers.move_labware_from_hs_to_destination(
ctx, sample_plate, h_s, magblock
protocol, sample_plate, h_s, magblock
)

ctx.delay(
protocol.delay(
minutes=settling_time,
msg="Please wait "
+ str(settling_time)
Expand All @@ -314,7 +316,7 @@ def protocol() -> None:
pip.return_tip()

# Transfer plate from magnet to H/S
helpers.move_labware_to_hs(ctx, sample_plate, h_s, h_s_adapter)
helpers.move_labware_to_hs(protocol, sample_plate, h_s, h_s_adapter)

# Dry beads
if dry_run:
Expand All @@ -323,7 +325,7 @@ def protocol() -> None:
drybeads = 10
# Number of minutes you want to dry for
for beaddry in np.arange(drybeads, 0, -0.5):
ctx.delay(
protocol.delay(
minutes=0.5,
msg="There are " + str(beaddry) + " minutes left in the drying step.",
)
Expand All @@ -337,12 +339,14 @@ def protocol() -> None:
pip.return_tip()
pip.home()

helpers.set_hs_speed(ctx, h_s, 2000, 5, True)
helpers.set_hs_speed(protocol, h_s, 2000, 5, True)

# Transfer plate to magnet
helpers.move_labware_from_hs_to_destination(ctx, sample_plate, h_s, magblock)
helpers.move_labware_from_hs_to_destination(
protocol, sample_plate, h_s, magblock
)

ctx.delay(
protocol.delay(
minutes=settling_time,
msg="Please wait " + str(settling_time) + " minute(s) for beads to pellet.",
)
Expand All @@ -364,8 +368,8 @@ def protocol() -> None:
pip.aspirate(500, wash2_res)
pip.dispense(500, liquid_waste["A1"].top())
pip.return_tip()
helpers.find_liquid_height_of_all_wells(ctx, pip, [liquid_waste["A1"]])
helpers.move_labware_to_hs(ctx, sample_plate, h_s, h_s_adapter)
helpers.find_liquid_height_of_all_wells(protocol, pip, [liquid_waste["A1"]])
helpers.move_labware_to_hs(protocol, sample_plate, h_s, h_s_adapter)

def setup() -> None:
pip.pick_up_tip()
Expand Down Expand Up @@ -418,11 +422,13 @@ def clean() -> None:
helpers.clean_up_plates(pip, plates_to_clean, liquid_waste["A1"], 1000)

for i in range(number_of_runs):
protocol()
protocol_function()

pip.reset_tipracks()
if i < number_of_runs - 1:
setup()
pip.reset_tipracks()
clean()
if deactivate_modules:
helpers.deactivate_modules(ctx)
helpers.deactivate_modules(protocol)
helpers.find_liquid_height_of_all_wells(protocol, pip, [liquid_waste["A1"]])
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ def run(protocol: protocol_api.ProtocolContext) -> None:
binding2 = 13500 / 8
wash2 = 9800 / 8
wash2_list = [wash2] * 12
final_elution = 1200 / 8
final_elution = 7500 / 8

# Fill up Plates
# Res1
p1000.transfer(
Expand Down
Loading