diff --git a/protocols/08207f/08207f.ot2.apiv2.py b/protocols/08207f/08207f.ot2.apiv2.py index 7c67f2e17..25a2987ed 100644 --- a/protocols/08207f/08207f.ot2.apiv2.py +++ b/protocols/08207f/08207f.ot2.apiv2.py @@ -10,11 +10,20 @@ def run(ctx): - [input_csv, init_vol_buff, labware_pcr_plate, labware_temp_deck, - p20_mount, p300_mount] = get_values( # noqa: F821 - "input_csv", "init_vol_buff", "labware_pcr_plate", "labware_temp_deck", - "p20_mount", "p300_mount") - + [input_csv, init_vol_buff, labware_pcr_plate, dna_plate_lname, + temp_mod_lname, temperature, p20_mount, p300_mount] = get_values( # noqa: F821 + "input_csv", "init_vol_buff", "labware_pcr_plate", "dna_plate_lname", + "temp_mod_lname", "temperature","p20_mount", "p300_mount") + + if not 4 <= temperature <= 95: + raise Exception( + "Temperature module range is between 4 and 95ºC") + + # modules + temp_mod = None + if temp_mod_lname: + temp_mod = ctx.load_module("temperature module gen2", '3') + # labware tiprack20 = [ ctx.load_labware('opentrons_96_filtertiprack_20ul', slot, @@ -24,8 +33,14 @@ def run(ctx): ctx.load_labware( 'opentrons_96_filtertiprack_200ul', slot, '200ul tiprack') for slot in ['2', '9']] - tempdeck = ctx.load_module('temperature module gen2', '3') - dna_plate = tempdeck.load_labware(labware_temp_deck) # noqa: E501 + + dna_plate = None + if temp_mod: + dna_plate = temp_mod.load_labware(dna_plate_lname, 'sample plate') + else: + dna_plate = ctx.load_labware(dna_plate_lname, '3', 'sample plate') + + tube_rack = ctx.load_labware( 'opentrons_10_tuberack_falcon_4x50ml_6x15ml_conical', '5') dest_plate = ctx.load_labware(labware_pcr_plate, '6', 'end-point-plate') # noqa: E501 @@ -65,8 +80,13 @@ def slow_withdraw(pip, well, delay_seconds=2.0): pip.move_to(well.top()) pip.default_speed *= 16 - # mapping + # Set temperature module temperature + if temp_mod: + ctx.comment("\n\nSetting temperature module to {} ºC\n". + format(temperature)) + temp_mod.set_temperature(temperature) + # mapping buffer = tube_rack.wells_by_name()['A3'] # parse