/deck_slot_testing.py Secret
Created
May 31, 2023 21:17
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import typing | |
from opentrons import protocol_api | |
metadata = { | |
"protocolName": "Deck slot test", | |
"author": "Max Marrone <max@opentrons.com>", | |
"description": "A protocol designed to exercise the code that was changed in PR #12571.", | |
} | |
requirements = { | |
# "apiLevel": "2.13", | |
"apiLevel": "2.15", | |
# "robotType": "OT-2", | |
"robotType": "OT-3", | |
} | |
def run(protocol: protocol_api.ProtocolContext) -> None: | |
is_ot3 = requirements["robotType"] == "OT-3" | |
thermocycler_load_name = ( | |
"thermocyclerModuleV2" if is_ot3 else "thermocyclerModuleV1" | |
) | |
thermocycler = typing.cast( | |
protocol_api.ThermocyclerContext, protocol.load_module(thermocycler_load_name) | |
) | |
# Two slots that require dodging around the Thermocycler. | |
# Specified in different styles, for bonus points. | |
some_slot = "B3" | |
some_other_slot = 4 | |
tip_rack_load_name = ( | |
"opentrons_ot3_96_tiprack_50ul" if is_ot3 else "opentrons_96_tiprack_300ul" | |
) | |
tip_rack = protocol.load_labware(tip_rack_load_name, some_slot) | |
well_plate_1 = protocol.load_labware( | |
"armadillo_96_wellplate_200ul_pcr_full_skirt", some_other_slot | |
) | |
well_plate_2 = thermocycler.load_labware( | |
"armadillo_96_wellplate_200ul_pcr_full_skirt" | |
) | |
# On an OT-2, uncommenting this line should raise an error because it conflicts with the Thermocycler. | |
# labware_in_bad_location = protocol.load_labware("opentrons_96_tiprack_300ul", "8") | |
pipette_load_name = "p50_single_gen3" if is_ot3 else "p300_single_gen2" | |
pipette = protocol.load_instrument( | |
pipette_load_name, mount="left", tip_racks=[tip_rack] | |
) | |
thermocycler.open_lid() | |
transfer_count = 3 | |
pipette.transfer( | |
volume=10, | |
source=well_plate_1.wells()[:transfer_count], | |
dest=well_plate_2.wells()[:transfer_count], | |
new_tip="always", | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment