def transformation_setup(transformation_wells): """Sets up transformation reactions Args: transformation_wells (list). """ # Constants TEMP = 4 # Incubation temperature. ASSEMBLY_VOL = 5 # Volume of final assembly added to competent cells. MIX_SETTINGS = (4, 5) # Mix after setting during final assembly transfers. INCUBATION_TIME = 20 # Cells and final assembly incubation time. # Set temperature deck to 4 °C and load competent cells tempdeck.set_temperature(TEMP) tempdeck.wait_for_temp() robot.pause() robot.comment('Load competent cells, uncap and resume run') # Transfer final assemblies p10_pipette.transfer(ASSEMBLY_VOL, assembly_plate.wells(transformation_wells), transformation_plate.wells(transformation_wells), new_tip='always', mix_after=(MIX_SETTINGS)) # Incubate for 20 minutes and remove competent cells for heat shock p10_pipette.delay(minutes=INCUBATION_TIME) robot.pause() robot.comment( 'Remove transformation reactions, conduct heatshock and replace.')
def verify_well_locations(well_list: List[EnhancedWellV1], pipette: EnhancedPipetteV1): picked_tip = False if not pipette.tip_attached: pipette.pick_up_tip() picked_tip = True for well in well_list: move_to_loc = well.top() pipette.move_to(move_to_loc) # well_top_coords_absolute = well.top_coords_absolute() _, top_coords = well_vector(well.top()) _, move_to_coords = well_vector(move_to_loc) intended_coords = well_top_coords_absolute + (move_to_coords - top_coords) tip_coords = pipette.tip_coords_absolute() # robot.pause( pretty.format('verify location: {0} in {1} loc={2} tip={3}', well.get_name(), well.parent.get_name(), intended_coords, tip_coords)) if picked_tip: pipette.return_tip( ) # we didn't dirty it, we can always re-use it todo: enhance return_tip() to adjust iterator so that next pick can pick up again
def print_new_round_splash(): print('###################################################') print('# NEW SET OF STOCK PLATES #') print('# DISPENSE WATER AND DMSO #') print('# AFTER RESUMING PROTOCOL #') print('###################################################') robot.pause()
def phase_switch(comment='Remove final assembly plate. Introduce agar tray and deep well plate containing SOC media. Resume run.'): """Function pauses run enabling addition/removal of labware. Args: comment (str): string to be displayed during run following pause. """ robot.pause() robot.comment(comment)
def print_change_tiprack(pipette): print('###################################################') if pipette.type == 'multi': print('# CHANGE MULTI TIPRACK #') elif pipette.type == 'single': print('# CHANGE SINGLE TIPRACK #') else: raise Exception('unknown pipette type') print('###################################################') robot.pause()
def run_custom_protocol(pipette_name, mount, tiprack_load_name, labware_def): tiprack = labware.load(tiprack_load_name, TIPRACK_SLOT) pipette = getattr(instruments, pipette_name)(mount, tip_racks=[tiprack]) test_labware = robot.add_container_by_definition( labware_def, TEST_LABWARE_SLOT, label=labware_def.get('metadata', {}).get( 'displayName', 'test labware') ) num_cols = len(labware_def.get('ordering', [[]])) num_rows = len(labware_def.get('ordering', [[]])[0]) well_locs = uniq([ 'A1', '{}{}'.format(chr(ord('A') + num_rows - 1), str(num_cols))]) pipette.pick_up_tip() set_speed(RATE) pipette.move_to((robot.deck, CALIBRATION_CROSS_COORDS)) robot.pause( f"Confirm {mount} pipette is at slot {CALIBRATION_CROSS_SLOT} calibration cross") pipette.retract() robot.pause(f"Place your labware in Slot {TEST_LABWARE_SLOT}") for well_loc in well_locs: well = test_labware.wells(well_loc) all_4_edges = [ [well.from_center(x=-1, y=0, z=1), 'left'], [well.from_center(x=1, y=0, z=1), 'right'], [well.from_center(x=0, y=-1, z=1), 'front'], [well.from_center(x=0, y=1, z=1), 'back'] ] set_speed(RATE) pipette.move_to(well.top()) robot.pause("Moved to the top of the well") for edge_pos, edge_name in all_4_edges: set_speed(SLOWER_RATE) pipette.move_to((well, edge_pos)) robot.pause(f'Moved to {edge_name} edge') set_speed(RATE) pipette.move_to(well.bottom()) robot.pause("Moved to the bottom of the well") # need to interact with labware for it to show on deck map pipette.blow_out(well) set_speed(1.0) pipette.return_tip()
def calibrationcheck(): gantrydefault() p300.pick_up_tip() p300.move_to(enzrack.wells('A1').bottom()) p300.move_to(trough.wells('A1').bottom()) p300.move_to(magplate.wells('A1').bottom()) p300.move_to(tempplate.wells('A1').bottom()) robot.pause( msg= '**********LOAD REAGENTS AND PRESS RESUME TO START PROTOCOL***********' )
def dmf_iodomethane_multi(reaction_conditions_df): # Deck setup tiprack_300 = containers.load("tiprack-300ul", "D3") source_trough12row = containers.load('trough-12row', "E2") reaction_rack = containers.load("StarLab_96_tall", "D1") trash = containers.load("point", 'C3') # Pipettes SetUp p300_multi = instruments.Pipette( name='dlab_300multi', axis="a", trash_container=trash, tip_racks=[tiprack_300], max_volume=300, min_volume=30, channels=8, ) # The protocol id_header = "reaction" reaction_to_start = "Coupling_sequence" reagent_trough_location_header = "reagent 2 location" volume_reagent_header = "reagent 2 volume" solvent_trough_location_header = "post work up solvent location" solvent_volume_header = "post workup solvent volume" row_number_header = "Number rows" for index, value in enumerate(reaction_conditions_df[id_header].tolist()): if value == reaction_to_start: solvent_volume = float( reaction_conditions_df[solvent_volume_header].tolist()[index]) reagent_volume = float( reaction_conditions_df[volume_reagent_header].tolist()[index]) reagent_trough_location = reaction_conditions_df[ reagent_trough_location_header].tolist()[index] solvent_trough_location = reaction_conditions_df[ solvent_trough_location_header].tolist()[index] number_rows = int( reaction_conditions_df[row_number_header].tolist()[index]) p300_multi.distribute( solvent_volume, source_trough12row.wells(solvent_trough_location), [x.top(-5) for x in reaction_rack.rows(0, to=number_rows)], air_gap=10) robot.pause() p300_multi.distribute( reagent_volume, source_trough12row.wells(reagent_trough_location), [x.top(-5) for x in reaction_rack.rows(0, to=number_rows)], air_gap=10) robot.home()
def store(): p300.pick_up_tip() p300.aspirate(final_elution_volume + large_aspiration_extra, magplate.wells('A3').bottom()) p300.move_to(enzrack.wells('A12').bottom()) robot.pause( msg= '****************SAMPLES HELD IN CURRENT TIPS, SLOT 5 COLUMN 12. UNPAUSE TO EJECT****************' ) p300.dispense(final_elution_volume + large_aspiration_extra) p300.touch_tip(enzrack('A12')) gantrydefault() p300.drop_tip()
def dispatch_commands(protocol_data, loaded_pipettes, loaded_labware): # noqa: C901 E501 subprocedures = [ p.get('subprocedure', []) for p in protocol_data.get('procedure', []) ] flat_subs = chain.from_iterable(subprocedures) for command_item in flat_subs: command_type = command_item.get('command') params = command_item.get('params', {}) pipette = get_pipette(params, loaded_pipettes) location = get_location(params, loaded_labware) volume = params.get('volume') if command_type == 'delay': wait = params.get('wait', 0) if wait is True: # TODO Ian 2018-05-14 pass message robot.pause() else: _sleep(wait) elif command_type == 'blowout': pipette.blow_out(location) elif command_type == 'pick-up-tip': pipette.pick_up_tip(location) elif command_type == 'drop-tip': pipette.drop_tip(location) elif command_type == 'aspirate': pipette.aspirate(volume, location) elif command_type == 'dispense': pipette.dispense(volume, location) elif command_type == 'touch-tip': pipette.touch_tip(location)
} robot.head_speed(combined_speed=max(max_speed_per_axis.values()), **max_speed_per_axis) m10.set_flow_rate(aspirate=25, dispense=25) m10.aspirate(ER_vol, Enzyme_ER.bottom(1)) m10.move_to(target.bottom()) m10.dispense(ER_vol, target.bottom(3)) m10.set_flow_rate(aspirate=50, dispense=50) m10.mix(5, 10, target.bottom(2)) m10.delay(seconds=5) m10.set_flow_rate(aspirate=100, dispense=100) m10.move_to(target.top(-4)) max_speed_per_axis = { 'x': (600), 'y': (400), 'z': (100), 'a': (100), 'b': (40), 'c': (40) } robot.head_speed(combined_speed=max(max_speed_per_axis.values()), **max_speed_per_axis) m10.drop_tip() robot.pause( "Yay! \ Please incubate in PCR machine \ at 20°C for 30 minutes, followed by 30 minutes at 65°C. \ Press resume when finished." ) temp_deck_1.deactivate() temp_deck_2.deactivate()
def stock_solution(intermediate, solvent): #Deck setup tiprack_1000 = containers.load("tiprack-1000ul-H", "B3") source_trough4row = containers.load("trough-12row", "C2") destination_int = containers.load("FluidX_24_5ml", "A1", "int") trash = containers.load("point", "C3") #Pipettes SetUp p1000 = instruments.Pipette( name='eppendorf1000', axis='b', trash_container=trash, tip_racks=[tiprack_1000], max_volume=1000, min_volume=30, channels=1, ) id_header = "CPD ID" solvent = "MeCN" stock_sol1 = "Intermediate1" stock_sol2 = "Intermediate2" location_header = "Location_trough" destination_location_header = "Location" volume_stock_header = "Volume to dispense (uL)" volume_per_vial = "Volume to dispense" stock1 = "ImidInt-1" stock2 = "ImidInt-2" code_header = "Code" for i, x in enumerate(solvent_df[id_header].tolist()): if x == solvent: solvent_location = solvent_df[location_header].tolist()[i] if x == stock_sol1: stock_sol1_loc = solvent_df[location_header].tolist()[i] stock_sol1_volume = solvent_df[volume_stock_header].tolist()[i] if x == stock_sol2: stock_sol2_loc = solvent_df[location_header].tolist()[i] stock_sol2_volume = solvent_df[volume_stock_header].tolist()[i] p1000.pick_up_tip() p1000.transfer([stock_sol1_volume], source_trough4row.wells(solvent_location), source_trough4row.wells(stock_sol1_loc).top(-5), new_tip='never') p1000.drop_tip() #p1000.pick_up_tip() #p1000.transfer([stock_sol2_volume], source_trough4row.wells(solvent_location), source_trough4row.wells(stock_sol2_loc).top(-5), new_tip = 'never') #p1000.drop_tip() #print(solvent_location, stock_sol1_loc, stock_sol2_loc, stock_sol1_volume, stock_sol2_volume) robot.pause() for i, x in enumerate( intermediate_df[destination_location_header].tolist()): destination_location = x vol_to_dispense = [intermediate_df[volume_per_vial].tolist()[i]] intermediate_id = intermediate_df[code_header].tolist()[i] p1000.pick_up_tip() if intermediate_id == stock1: #print ('correct') if vol_to_dispense != 0: p1000.transfer( vol_to_dispense, source_trough4row.wells(stock_sol1_loc), destination_int.wells(destination_location).top(-5), new_tip='never') if intermediate_id == stock2: #print ('incorrect') p1000.drop_tip() p1000.pick_up_tip() if vol_to_dispense != 0: p1000.transfer( vol_to_dispense, source_trough4row.wells(stock_sol2_loc), destination_int.wells(destination_location).top(-5), new_tip='never') p1000.drop_tip() #else: # print ("error") # break print(destination_location, vol_to_dispense, intermediate_id, stock1) robot.home()
) # Pauses the protocol until the temperature deck reaches the desired temperature target1 = Compcells1( Even_wells) # Assigns the wells of Compcells1 as the target1 variable robot.home() # Returns the OT2 to the starting position robot.comment( "Make sure that centrifuge has been chilled down to 4*C and all buffers are on ice." ) # Produces a message on the OT2 display to inform the user of what the next step is robot.comment( "All plates should be chilled at the beginning and culture should be incubated on ice for 15 minutes before start." ) # Produces a comment on the OT2 providing information for the next step robot.comment( "Once at set temperature, insert culture into slot 6 and plate onto TempDeck, then resume!" ) # Produces a comment providing guidance to the user robot.pause() # Pauses the OT2 until the user resumes the process via the app # bacterial culture # This is the first step of protocol, 200 uL bacterial culture at OD 0.4-0.6 for i in range( 1 ): # Added to 96 well plate in specified wells, Range 1 means the loop runs once. Why is this a loop???? P300.pick_up_tip() # Forces the OT2 to equip a new pipette tip to the P300 P300.transfer( # Transfers reagents from a well to destination wells 200, # Sets the volume, in ul, to be transferred by the OT2 Culture( 'A1' ), # Sets the well to be aspirated from, the container stored in Culter, well A1 target1(), # Sets the wells to dispense to, the wells saved in target1 blow_out=True ) # Activates the blow out feature, where after aspirating the OT2 dispenses an extra gust of air to ensure the pipette tip is free of fluid robot.comment(
######################################################################################### ######################################################################################### tempdeck = TempDeck() # Saves the temperature deck into a variable, temperature = {"temp1": 4, "temp2": 42, "temp3": 37} # Saves the temperatures for the protocol into a dictionary. Dictionaries have keys and values # The value can be called by the key i.e temperature["temp1"] = 4 if not robot.is_simulating(): # If the robot is inactive and the temperature deck isn't processing a command tempdeck.connect('/dev/ttyACM0') # Connects to and begins cooling the temperature deck tempdeck.set_temperature(temperature["temp1"]) # Initialization temperature for cooling tempdeck.wait_for_temp() # Pauses the protocol until the temperature deck reaches the set temperature target = All_wells # Adds the array of wells into a variable for easier readability during manipulation SOB_wells = [well.top(1) for well in target] # well.top moves the pipette to the top of the well, the number specifies the distance in mm robot.pause() # Opentron command that pauses whatever the robot is doing. The user can remove and centrifuge at this point, if the need is there. resumed via the OT app # The code below handles distributing plasmid DNA for i in range(NumberofPlasmids): # Transfers plasmid DNA into competent cell aliquots. The variable NumberofPlasmids controls how many times the loop is carried out, once for each plasmid P10.distribute( # Presumes same plasmid for all cells, adds all doses to the pipette, wells specified later in the block PlasmidVolume, # Specifies the volume in ul DNA(i), # Selects which plasmid to pipette based on it's position on the container declared DNA. I increases with each loop, meaning the next plasmid is selected target, # Target is the specified wells where the plasmid is then distributed (this will not work if multiple plasmids are being used) blow_out=True, # Empties the pipette with an extra gust of air to ensure it is fluid free new_tip='always' # Changes the pipette after every dispense to avoid contamination ) robot.pause() # Pauses the robot until manually resumed in the OT app robot.home() # Homes the robot, setting the pipette to the starting position tempdeck.set_temperature(temperature["temp2"]) # Sets the temperature of the temperature deck, temperature is pulled from the temperature dictionary tempdeck.wait_for_temp() # Pauses the protocol until the temperature deck reaches the target temperature P10.delay(seconds=100) # Delays further input for 100 seconds. This allows the heating to continue for 100 seconds before setting the temp deck back to a lower temp
def run_custom_protocol(number_of_samples: int = 24, ): if number_of_samples <= 24: inputs = [ well for col in in_plate.cols('1', to='6') for well in col.wells('A', to='D') ][:number_of_samples] mag = [ well for col in mag_plate.cols('1', to='6') for well in col.wells('A', to='D') ][:number_of_samples] outputs = [ well for col in out_plate.cols('1', to='6') for well in col.wells('A', to='D') ][:number_of_samples] else: inputs = [well for well in in_plate.wells()][:number_of_samples] mag = [well for well in mag_plate.wells()][:number_of_samples] outputs = [well for well in out_plate.wells()][:number_of_samples] # Transfer 20 uL supernatant to new plate p50.transfer(20, inputs, mag, new_tip='always') # Transfer 44 uL LNA1 per sample to trough lna_vol = round(number_of_samples * 1.05 * 44) p50.transfer(lna_vol, LNA1, trough.wells('A1')) # Transfer 8 uL LNB1 per sample to trough lnb_vol = round(number_of_samples * 1.05 * 8) p50.pick_up_tip() p50.mix(5, 50, LNB1) p50.transfer(lnb_vol, LNB1, trough.wells('A1'), new_tip='never') p50.mix(10, 50, trough.wells('A1')) p50.drop_tip() # Transfer 45 uL combined LNA1 and LNB1 to each library p50.transfer(45, trough.wells('A1'), [well.top() for well in mag]) robot.pause("Shake at 1800 rpm for 30 minutes. Place the plate back on \ the MagDeck in slot 4.") # Turn on MagDeck for 2 minutes mag_deck.engage() p50.delay(minutes=2) # Remove supernatant from each well for well in mag: p50.transfer(65, well, liquid_trash) # Wash beads twice with LNW1 for cycle in range(2): p50.transfer(45, LNW1, [well.top() for well in mag]) robot.pause("Shake at 1800 rpm for 5 minutes. Place the plate back on \ the MagDeck in slot 4.") for well in mag: p50.transfer(50, mag, liquid_trash) # Add 30 uL NaOH to each well p50.distribute(30, NAOH, [well.top() for well in mag]) robot.pause("Shake at 1800 rpm for 5 minutes. Place the plate back on \ the MagDeck in slot 4.") # Turn on MagDeck for 2 minutes mag_deck.engage() p50.delay(minutes=2) # Add 30 uL LNS1 to each well of a new plate p50.distribute(30, LNS1, [well.top() for well in outputs]) # Add supernatant to new plate for well, dest in zip(mag, outputs): p50.transfer(60, well, dest) # Disengage MagDeck mag_deck.disengage()
def pause(): result = robot.pause() emit_notifications(['Protocol paused'], 'info') return flask.jsonify({'status': 'success', 'data': result})
def run_custom_protocol(number_of_samples: int = 24, PCR_product_volume: float = 50, bead_ratio: float = 1.8, dry_time: int = 15): if number_of_samples <= 24: inputs = [ well for col in in_plate.cols('1', to='6') for well in col.wells('A', to='D') ][:number_of_samples] mag = [ well for col in mag_plate.cols('1', to='6') for well in col.wells('A', to='D') ][:number_of_samples] outputs = [ well for col in out_plate.cols('1', to='6') for well in col.wells('A', to='D') ][:number_of_samples] else: inputs = [well for well in in_plate.wells()][:number_of_samples] mag = [well for well in mag_plate.wells()][:number_of_samples] outputs = [well for well in out_plate.wells()][:number_of_samples] bead_vol = PCR_product_volume * bead_ratio # Transfer PCR product p50.transfer(PCR_product_volume, inputs, mag, new_tip='always') # Transfer beads to each well p50.distribute(bead_vol, beads, [well.top() for well in mag]) total_vol = bead_vol + PCR_product_volume + 5 robot.pause("Shake at 1800 rpm for 2 minutes.") # Incubate at RT for 5 minutes p50.delay(minutes=5) # Engage MagDeck for 2 minutes, remain engaged mag_deck.engage() p50.delay(minutes=2) # Remove supernatant p50.transfer(total_vol, mag, liquid_trash, new_tip='always') # Wash beads twice with 80% ethanol for cycle in range(2): p50.transfer(200, ethanol, [well.top() for well in mag]) p50.delay(seconds=30) for well in mag: p50.transfer(220, well.top(), liquid_trash) # Air dry p50.delay(minutes=dry_time) # Turn off MagDeck mag_deck.disengage() # Transfer RSB to well p50.transfer(52.5, rsb, [well.top() for well in mag]) robot.pause("Shake at 1800 rpm for 2 minutes.") # Turn on MagDeck for 2 minutes mag_deck.engage() p50.delay(minutes=2) # Transfer supernatant to new PCR plate p50.transfer(50, mag_plate, outputs, new_tip='always') # Disengage MagDeck mag_deck.disengage()
Liquid_trash.top(-5), new_tip='always', blow_out=True) m300.transfer(200, SA11.bottom(2), Liquid_trash.top(-5), new_tip='always', blow_out=True) m300.transfer(200, SA12.bottom(2), Liquid_trash.top(-5), new_tip='always', blow_out=True) ##Reset tipracks for more tips robot.pause( "Please fill up tips before continuing process and empty trash box") m300.reset() ### Wash with EtOH2 mag_deck.disengage() for target in samples: m300.set_flow_rate(aspirate=180, dispense=180) m300.pick_up_tip() # Slow down head speed 0.5X for bead handling max_speed_per_axis = { 'x': (300), 'y': (300), 'z': (75), 'a': (75), 'b': (20), 'c': (20)
# Distribute acetate in last row with second small gradient curWells = plate.cols(7)[3:6] transfer_fillhgt((0,900), AceSource, curWells.top(), pipette, fillhgt_falcon50000, sourceVolumes["AceSource"], pipettingParameters, new_tip = "once" ) sourceVolumes["AceSource"] = _new_fillvol if whichSteps == "all": robot.pause() #if the whole experiment is done, the calls can be cooled untl this point and then added into the robot if whichSteps == "cells" or whichSteps == "all": # Distribute cells over all but last row for curRow in range(6): curWells = plate.rows(curRow)[:-1] transfer_fillhgt(100, CellSource, curWells.top(), pipette, fillhgt_falcon15000, sourceVolumes["CellSource"], pipettingParameters, new_tip = "once"
target = Compcells(Even_wells) # Specifies the target wells SOB_wells = [well.top(1) for well in target() ] # Positional argument reducing contamination ##################################################################################################################################### ##################################################################################################################################### # DNA TRANSFER STEP P10.distribute( # Presumes same plasmid for all cells DNA_Vol, DNA('A1'), Compcells(Even_wells), blow_out=True, new_tip='always') robot.pause() # Change to P10.delay(minutes=40) if delay bug is fixed robot.home() ##################################################################################################################################### ##################################################################################################################################### # HEAT SHOCK STEP TempDeck.set_temperature(target_temperature2) # Heat to 42 TempDeck.wait_for_temp P10.delay( seconds=60 ) # Not 42 to take into account gradual warming and thermal conductivity TempDeck.set_temperature(target_temperature1) # Cool to 4
# Distribute acetate in last row with second small gradient curWells = plate.cols(7)[3:6] transfer_fillhgt((0, 900), AceSource, curWells, pipette, fillhgt_falcon50000, sourceVolumes["AceSource"], pipettingParameters, new_tip="once") sourceVolumes["AceSource"] = _new_fillvol if whichSteps == "all": robot.pause( ) #if the whole experiment is done, the calls can be cooled untl this point and then added into the robot if whichSteps == "cells" or whichSteps == "all": # Distribute cells over all but last row for curRow in range(6): curWells = plate.rows(curRow)[:-1] curWells = curWells.bottom() transfer_fillhgt(100, CellSource, curWells, pipette, fillhgt_falcon50000, sourceVolumes["CellSource"], pipettingParameters,
m300.transfer(Elution_vol, Elution_buffer, target.top(-2), air_gap=0, new_tip='never') m300.set_flow_rate(aspirate=50, dispense=50) m300.mix(3, 100, target.bottom(6)) m300.delay(seconds=5) m300.move_to(target.top(-3)) m300.blow_out() max_speed_per_axis = {'x': (600), 'y': (400), 'z': (100), 'a': (100), 'b': (40),'c': (40)} robot.head_speed(combined_speed=max(max_speed_per_axis.values()),**max_speed_per_axis) m300.return_tip() ### Resets head speed for futher processing max_speed_per_axis = {'x': (600), 'y': (400), 'z': (50), 'a': (50), 'b': (40),'c': (40)} robot.head_speed(combined_speed=max(max_speed_per_axis.values()),**max_speed_per_axis) ### Incubate elutes for 15 minutes at room temperature robot.pause("Please, incubate samples for 10 min at 37ºC and press resume after it") ### Transfer elutes to new plates. ### Transfer Elution buffer to elution_plate A1 m300.set_flow_rate(aspirate=50, dispense=50) m300.pick_up_tip(tipracks_200_4.wells('A1')) m300.aspirate(Elution_vol, MA1.bottom(1)) m300.dispense(Elution_vol, elution_plate.wells('A1').bottom(2)) m300.delay(seconds=5) m300.set_flow_rate(aspirate=130, dispense=130) m300.move_to(elution_plate.wells('A1').top(-10)) m300.blow_out() m300.return_tip() ### Transfer Elution buffer to elution_plate A2 m300.set_flow_rate(aspirate=50, dispense=50)
dil_vol, previous_column.bottom(stock_frombottom_off), current_column, mix_before=(2, 5), # mix 2x with 5 uL before mix_after=(2, 5), # mix 2x with 5 uL after ) # update columns previous_column = current_column column_counter += 1 if is_new_set_stock_plates(column_counter): new_round_actions(pipette_multi) # update start_druglib_well start_druglib_well = stop_druglib_well count_used_tips() robot.pause(60) # each time we add water and fill up a 96wp => expecting 104 tips every plate # so 104, 208, 312, 416 #write out robot commands if not robot.is_simulating(): import datetime out_fname = datetime.datetime.now().strftime("%Y%m%d_%H%M%S")+'_runlog.txt' out_fname = '/data/user_storage/opentrons_data/protocols_logs/' + out_fname with open(out_fname,'w') as fid: for command in robot.commands(): print(command,file=fid)
m300.blow_out() m300.drop_tip() ### Transfer Elution buffer to EA5 m300.pick_up_tip(tipracks_200_3.wells('A11')) m300.set_flow_rate(aspirate=25, dispense=25) m300.aspirate(elution_vol, SA5.bottom()) m300.dispense(elution_vol, EA5.bottom(2)) m300.delay(seconds=5) m300.set_flow_rate(aspirate=130, dispense=130) m300.move_to(EA5.top(-10)) m300.blow_out() m300.drop_tip() ### Transfer Elution buffer to EA6 m300.pick_up_tip(tipracks_200_3.wells('A12')) m300.set_flow_rate(aspirate=25, dispense=25) m300.aspirate(elution_vol, SA6.bottom()) m300.dispense(elution_vol, EA6.bottom(2)) m300.delay(seconds=5) m300.set_flow_rate(aspirate=130, dispense=130) m300.move_to(EA6.top(-10)) m300.blow_out() m300.drop_tip() mag_deck.disengage() robot.pause( "Yay! \ Purification has finished \ Please store purified samples as -20°C \ Press resume when finished." )
mag_deck.disengage() s1000.distribute(Wash_2_vol, Wash_2, [well.top() for well in sample_plate.wells()], new_tip='once', blow_out =True) mag_deck.engage() m300.delay(minutes=5) m300.transfer(500, [well.bottom() for well in sample_plate.wells()], Liquid_trash, new_tip='always', blow_out =True) ## Ethanol Wash 1 mag_deck.disengage() s1000.distribute(EtOH_vol, Ethanol_1, [well.top() for well in sample_plate.wells()], new_tip='once', blow_out =True) mag_deck.engage() m300.delay(minutes=5) m300.transfer(500, [well.bottom() for well in sample_plate.wells()], Liquid_trash, new_tip='always', blow_out =True) ## Ethanol Wash 2 mag_deck.disengage() s1000.distribute(EtOH_vol, Ethanol_2, [well.top() for well in sample_plate.wells()], new_tip='once', blow_out =True) mag_deck.engage() m300.delay(minutes=5) m300.transfer(500, [well.bottom() for well in sample_plate.wells()], Liquid_trash, new_tip='always', blow_out =True) ## Dry beads robot.pause("Put the plate on the Temperature Module for 20 minutes at 55°C") ## Elution mag_deck.disengage() m300.distribute(Elution_vol, Elution_buffer, [well.bottom() for well in sample_plate.wells(), new_tip='always', blow_out =True] mag_deck.engage() m300.delay(minutes=5) m300.distribute(Elution_vol, [well.bottom() for well in sample_plate.wells(), [well.bottom() for well in elution_plate_DNA.wells(), new_tip='always', blow_out =True] robot.comment("Job's done")
# transfer Resuspension Buffer m10.transfer(2.5, resuspension_buffer, [col[0].top() for col in mag_plate.cols()], blow_out=True) # transfer A-Tailing Mix for col in mag_plate.cols(): m10.pick_up_tip() m10.transfer(12.5, a_tailling_mix, col[0].top(), new_tip='never') m10.mix(3, 10, col) m10.blow_out(col) m10.drop_tip() robot.pause("Remove the plate from the Magnetic Module and place on a \ Thermocycler to Ligate Adapters. Put the thawed RNA Adpater Index on the \ Magnetic Module. Place the plate back on the Temperature Module before \ resuming. See Configuration 2.") m10.reset() # transfer Resuspension Buffer m10.transfer(2.5, resuspension_buffer, [col[0].top() for col in temp_plate.cols()], blow_out=True) # transfer Ligation Mix m10.transfer(2.5, ligation_mix, [col[0].top() for col in temp_plate.cols()], blow_out=True) # transfer RNA Adpater Index for source, dest in zip(mag_plate.cols(), temp_plate.cols()):
def run_custom_protocol(number_of_samples: int = 24): # define sample locations samples = gDNA_plate.wells()[:number_of_samples] if number_of_samples <= 24: # index7 = 6 index5 = 4 output = [ well for col in gDNA_plate.cols('1', to='6') for well in col.wells('A', to='D') ] else: # index7 = 12 index5 = 8 output = [well for well in out_plate.wells()][:number_of_samples] cols = number_of_samples // index5 remainder = number_of_samples % index5 """ Tagment genomic DNA """ # Add Tagment DNA Buffer to each well p50.distribute(10, td, [well.top() for well in samples]) # Add normalized gDNA to each well p10.transfer(5, samples, output, new_tip='always') robot.pause("Centrifuge at 280 × g at 20°C for 1 minute. Place on the \ preprogrammed thermal cycler and run the tagmentation program. \ When the sample reaches 10°C, immediately proceed to the next step \ because the transposome is still active. Place the plate back to \ slot 2.") # Add Neutralize Tagment Buffer to each well p10.transfer(5, nt, output, mix_after=(5, 10), new_tip='always') robot.pause("Centrifuge at 280 × g at 20°C for 1 minute. Place the plate \ back to slot 2.") # Incubate at RT for 5 minutes p10.delay(minutes=5) """ Amplify Libraries """ # Add each index 1 adapter down each column for index, loc in enumerate(range(0, number_of_samples, index5)[:cols]): p50.distribute(5, index_7[index], [well.top() for well in output[loc:loc + index5]]) if remainder: index = range(0, number_of_samples, index5)[cols] p50.distribute( 5, index_7[cols], [well.top() for well in output[index:index + remainder]]) # Add each index 2 adapter across each row for index in range(0, index5): if remainder and index < remainder: loc = [loc for loc in range(index, number_of_samples, index5) ][:cols + 1] dest = [output[i].top() for i in loc] else: dest = [ output[i].top() for i in range(index, number_of_samples, index5) ][:cols] p50.distribute(5, index_5[index], dest) # Add Nextera PCR Master Mix to each well p50.transfer(15, npm, output, mix_after=(2, 30), new_tip='always')
def run_custom_protocol(sample_volume: float = 5, control_volume: float = 5, control_column: str = 1, number_of_destination_plates: int = 4): for plate_num in range(number_of_destination_plates): # transfer samples sample_cols = [col for col in master.cols(plate_num * 6, length=6)] for well_index in range(2): for index, sample in enumerate(sample_cols, 1): source = sample[well_index].bottom(0.5) dests = [ col[well_index].top(-4) for col in destination.cols(index * 3, length=3) ] for dest in dests: m10.pick_up_tip() m10.mix(1, 10) m10.transfer(sample_volume, source, dest, new_tip='never') m10.blow_out(dest) m10.touch_tip() m10.drop_tip() # transfer controls ctrl_1 = [well for well in control_1.cols(control_column)[:2]] ctrl_2 = [well for well in control_2.cols(control_column)[:2]] ctrl_1_dest = [[ destination.cols(col_num)[index] for col_num in ['2', '22'] ] for index in range(2)] ctrl_2_dest = [[ destination.cols(col_num)[index] for col_num in ['3', '23'] ] for index in range(2)] for source, dests in zip(ctrl_1, ctrl_1_dest): for dest in dests: m10.pick_up_tip() m10.mix(1, 10) m10.transfer(control_volume, source.bottom(0.5), dest.top(-4), new_tip='never') m10.blow_out() m10.touch_tip() m10.drop_tip() for source, dests in zip(ctrl_2, ctrl_2_dest): for dest in dests: m10.pick_up_tip() m10.mix(1, 10) m10.transfer(control_volume, source.bottom(0.5), dest.top(-4), new_tip='never') m10.blow_out() m10.touch_tip() m10.drop_tip() if not plate_num == (number_of_destination_plates - 1): robot.pause("Put a new plate in slot 2 and refill all of the \ tipracks.") m10.reset_tip_tracking()
blow_out=True) pipette_multi.drop_tip() wtcc += 1 # drug transfer pipette_multi.transfer(drugs_volume, src_wells, dst_wells, new_tip='always', blow_out=True) for s, d in zip(src_wells, dst_wells): print('{} {} -> {} {}'.format(src_plate.parent, s[0], dst_plate.parent, d[0])) count_used_tips() robot.pause() pipette_multi.reset_tip_tracking() # each time we add water and fill up a 96wp => expecting 104 tips every plate # so 104, 208, 312, 416 #write out robot commands if not robot.is_simulating(): import datetime out_fname = datetime.datetime.now().strftime( "%Y%m%d_%H%M%S") + '_runlog.txt' out_fname = '/data/user_storage/opentrons_data/protocols_logs/' + out_fname with open(out_fname, 'w') as fid: for command in robot.commands(): print(command, file=fid)
def dispatch_commands(protocol_data, loaded_pipettes, loaded_labware): # noqa: C901 E501 subprocedures = [ p.get('subprocedure', []) for p in protocol_data.get('procedure', []) ] default_values = protocol_data.get('default-values', {}) flat_subs = chain.from_iterable(subprocedures) for command_item in flat_subs: command_type = command_item.get('command') params = command_item.get('params', {}) pipette = _get_pipette(params, loaded_pipettes) protocol_pipette_data = protocol_data\ .get('pipettes', {})\ .get(params.get('pipette'), {}) pipette_name = protocol_pipette_data.get('name') if (not pipette_name): # TODO: Ian 2018-11-06 remove this fallback to 'model' when # backwards-compatability for JSON protocols with versioned # pipettes is dropped (next JSON protocol schema major bump) pipette_name = protocol_pipette_data.get('model') location = _get_location(loaded_labware, command_type, params, default_values) volume = params.get('volume') if pipette: # Aspirate/Dispense flow rate must be set each time for commands # which use pipettes right now. # Flow rate is persisted inside the Pipette object # and is settable but not easily gettable _set_flow_rate(pipette_name, pipette, command_type, params, default_values) if command_type == 'delay': wait = params.get('wait') message = params.get('message') if wait is None: raise ValueError('Delay cannot be null') elif wait is True: message = message or 'Pausing until user resumes' robot.pause(msg=message) else: text = f'Delaying for {datetime.timedelta(seconds=wait)}' if message: text = f"{text}. {message}" robot.comment(text) _sleep(wait) elif command_type == 'blowout': pipette.blow_out(location) elif command_type == 'pick-up-tip': pipette.pick_up_tip(location) elif command_type == 'drop-tip': pipette.drop_tip(location) elif command_type == 'aspirate': pipette.aspirate(volume, location) elif command_type == 'dispense': pipette.dispense(volume, location) elif command_type == 'touch-tip': # NOTE: if touch_tip can take a location tuple, # this can be much simpler (well_object, loc_tuple) = location # Use the offset baked into the well_object. # Do not allow API to apply its v_offset kwarg default value, # and do not apply the JSON protocol's default offset. z_from_bottom = loc_tuple[2] offset_from_top = (well_object.properties['depth'] - z_from_bottom) * -1 pipette.touch_tip(well_object, v_offset=offset_from_top) elif command_type == 'move-to-slot': slot = params.get('slot') if slot not in [str(s + 1) for s in range(12)]: raise ValueError( '"move-to-slot" requires a valid slot, got {}'.format( slot)) x_offset = params.get('offset', {}).get('x', 0) y_offset = params.get('offset', {}).get('y', 0) z_offset = params.get('offset', {}).get('z', 0) slot_placeable = robot.deck[slot] slot_offset = (x_offset, y_offset, z_offset) strategy = 'direct' if params.get('force-direct') else None # NOTE: Robot.move_to subtracts the offset from Slot.top()[1], # so in order not to translate our desired offset, # we have to compensate by adding it here :/ pipette.move_to((slot_placeable, add(slot_offset, tuple(slot_placeable.top()[1]))), strategy=strategy)