def test_containers_create(self): import os import json from opentrons import Robot container_name = 'plate_for_testing_containers_create' containers.create(name=container_name, grid=(8, 12), spacing=(9, 9), diameter=4, depth=8, volume=1000) p = containers.load(container_name, 'A1') self.assertEquals(len(p), 96) self.assertEquals(len(p.rows), 12) self.assertEquals(len(p.cols), 8) self.assertEquals(p.get_parent(), Robot.get_instance().deck['A1']) self.assertEquals(p['C3'], p[18]) self.assertEquals(p['C3'].max_volume(), 1000) for i, w in enumerate(p): self.assertEquals(w, p[i]) # remove the file if we only created it for this test should_delete = False with open(environment.get_path('CONTAINERS_FILE')) as f: created_containers = json.load(f) del created_containers['containers'][p.get_name()] if not len(created_containers['containers'].keys()): should_delete = True if should_delete: os.remove(environment.get_path('CONTAINERS_FILE'))
def getEquipment(): equipment = {} containers.create('heating-block-3x4', grid=(3, 4), spacing=(22.3, 22.3), diameter=17, depth=45) equipment['InputsC1'] = containers.load('heating-block-3x4', 'C1') containers.create('heating-block-3x4', grid=(3, 4), spacing=(22.3, 22.3), diameter=17, depth=45) equipment['MixingD1'] = containers.load('heating-block-3x4', 'D1') equipment['OutputD2'] = containers.load('96-flat', 'D2') equipment['TouchC2'] = containers.load('96-flat', 'C2') containers.create('1000tiprack2', grid=(7, 5), spacing=(10.3, 18.6), diameter=9, depth=56) equipment['1000tiprack'] = containers.load('1000tiprack2', 'B2') equipment['100TiprackB1'] = containers.load('tiprack-1000ul', 'B1') equipment['TrashA1'] = containers.load('trash-box', 'A1') equipment['pd1000'] = instruments.Pipette( name='pd1000', axis='b', max_volume=1000, min_volume=100, channels=1, aspirate_speed=800, dispense_speed=1200, trash_container=equipment['TrashA1']) equipment['pd100'] = instruments.Pipette( name='pd100', axis='a', max_volume=100, min_volume=10, channels=1, aspirate_speed=600, dispense_speed=1000, trash_container=equipment['TrashA1']) return (equipment)
lines = open(input_file).readlines() header = lines[0].rstrip().split(",") out_d = {} for head in header: out_d[head] = [] for line in lines[1:]: spl_line = line.rstrip().split(",") for i, head in enumerate(header): out_d[head].append(spl_line[i]) df = DataFrame(out_d, len(lines[1:])) return df containers.create( "Starlab_96_Square_2mL", # name of you container grid=(8, 12), # specify amount of (columns, rows) spacing=(9, 9), # distances (mm) between each (column, row) diameter=8, # diameter (mm) of each well on the plate depth=45) # depth (mm) of each well on the plate # CSV file data stock_reagent_df = read_csv( r"C:\Users\opentrons\protocols\GitHub_repos\OT1-coding\urea_phip_triple_reaction\csv\stock_reagents.csv" ) solvent_df = read_csv( r"C:\Users\opentrons\protocols\GitHub_repos\OT1-coding\urea_phip_triple_reaction\csv\solvents.csv" ) """Function that does two liquid handling transfers. First it will dilute a solid reagent in a big trough to the right concentration. (Up to 2 reagents). Second, it will transfer the reagent from the big trough to the Fluix 24 vial rack, using the volume from the csv file It requires 2 csv files. The first is the solvent csv, the second the custom made stock reagent csv."""
from opentrons import robot, containers, instruments from itertools import chain # ~~~~~~~~~~~ SET UP ~~~~~~~~~~ #max_speed_per_axis = { # Head Speed # 'x': 2000, 'y': 1000, 'z':500, 'a':500, 'b':500, 'c':200} #robot.head_speed( # combined_speed=max(max_speed_per_axis.values()), **max_speed_per_axis) tipracks = [containers.load('tiprack-200ul', slot) for slot in ['D2', 'E2']] ## Tyler's custom 8-trough container (treated as 4, because of the way BD made them) containers.create('trough-8row', grid=(8, 4), spacing=(9, 30), diameter=6, depth=35) ## Axygen 96-well deep plate (1.1 ml) containers.create('96-deep-well-Axygen', grid=(8, 12), spacing=(9, 9), diameter=6, depth=43) ## VWR 1.2-ml sample tubes containers.create('96-sample-tubes', grid=(8, 12), spacing=(9, 9), diameter=6,
from opentrons import containers containers.create( '96-really-deep', grid=(8,12), spacing=(9,9), depth=39, diameter=9, volume=2000)
from opentrons import containers, instruments containers.create( 'tube-rack-4ml', # name of you container grid=(6, 8), # specify amount of (columns, rows) spacing=(13.25, 13.5), # distances (mm) between (column, row) diameter=6.5, # diameter (mm) of each well on the plate depth=44) # depth (mm) of each well on the plate containers.create( 'reservoir-2', # name of you container grid=(1, 2), # specify amount of (columns, rows) spacing=(0, 54), # distances (mm) between each (column, row) diameter=6.5, # diameter (mm) of each well on the plate depth=39.22) # depth (mm) of each well on the plate tube_B2 = containers.load('tube-rack-4ml', 'B2', 'tube-rack-B2') WP_500ul = containers.load('96-PCR-flat', 'C1', 'output 1') resevoir = containers.load('reservoir-2', 'B1', 'resevoir') tube_C2 = containers.load('tube-rack-4ml', 'C2', 'tube-rack-C2') tube_D2 = containers.load('tube-rack-4ml', 'D2', 'tube-rack-D2') WP_1ml = containers.load('96-PCR-flat', 'E1', 'output 2') all_dest_wells = WP_500ul.wells(0, length=80) + WP_1ml.wells(0, length=48) all_source_wells = tube_B2.wells(0, length=40) \ + tube_C2.wells(0, length=40) + tube_D2.wells() all_dest_rows = WP_500ul.rows(0, length=12) + WP_1ml.rows(0, length=12)
## Code to make a PCR master mix and distribute it between wells of a 96-well plate from opentrons import robot, containers, instruments #Define containers source_tubes = containers.load('tube-rack-2ml', 'E3', 'tube_rack') output = containers.load('96-PCR-flat', 'C1', 'output') p200rack = containers.load('tiprack-200ul', 'A1', 'p200_rack') trash = containers.load('trash-box', 'A3') #Create 6x12 p20 tip rack container containers.create('tiprack-200ul-6x12', grid=(6, 12), spacing=(9, 9), diameter=5, depth=60) p20rack = containers.load('tiprack-200ul-6x12', 'B2', 'p20_rack') #Create 3x6 2ml tube rack for DNA samples containers.create('3x6-tube-rack-2ml', grid=(3, 6), spacing=(19.5, 19.5), diameter=9.5, depth=40) DNA_rack = containers.load('3x6-tube-rack-2ml', 'C3', 'DNA_rack') #Define pipettes p20 = instruments.Pipette(trash_container=trash,
## Code to test dual pipetting capabilities of opentrons from opentrons import robot, containers, instruments source_tubes = containers.load('tube-rack-2ml', 'D2', 'tube rack') output = containers.load('96-PCR-flat', 'C1', 'output') containers.create('7x12_tiprack', grid=(7, 12), spacing=(9, 9), diameter=5, depth=60) p200rack = containers.load('7x12_tiprack', 'A1', 'p200-rack') p200 = instruments.Pipette(tip_racks=[p200rack], min_volume=20, max_volume=200, axis="b") for i in range(10): p200.pick_up_tip() p200.return_tip()
from otcustomizers import FileInput, StringSelection from opentrons import containers, instruments containers.create( 'FluidX_96_small', # name of you container grid=(8, 12), # specify amount of (columns, rows) spacing=(9, 9), # distances (mm) between each (column, row) diameter=6, # diameter (mm) of each well on the plate depth=20) containers.create( 'FluidX_24_9ml', # name of you container grid=(6, 8), # specify amount of (columns, rows) spacing=(18, 18), # distances (mm) between each (column, row) diameter=13, # diameter (mm) of each well on the plate depth=83) # depth (mm) of each well on the plate tiprack = containers.load("tiprack-1000ul", "B3") plate_96 = containers.load("FluidX_96_small", "B2", label="FluidX_96_small") plate_24 = containers.load('FluidX_24_9ml', "B2", label="FluidX_24_9ml") source = containers.load("trough-12row", "D2") trash = containers.load("trash-box", 'C3') # Define the pipettes p1000 = instruments.Pipette( name="eppendorf1000", axis="a", trash_container=trash, tip_racks=[tiprack], max_volume=1000, min_volume=10,
tubes_overflow = containers.load( '96-deep-well', 'B2', 'b2qubit_tubes', ) trash = containers.load( 'point', 'A3', 'a3trash', ) containers.create( '15ml-short-tube', grid=(1, 1), spacing=(20, 20), diameter=18, depth=105, ) solution = containers.load( '15ml-short-tube', 'B1', '15mltube', ) standards = containers.load( '96-deep-well', 'B1', 'b1p5tube', )
from opentrons import containers, instruments wash_volume = 6000 containers.create( '2x3_plate', # name of you container grid=(2, 3), # specify amount of (columns, rows) spacing=(39, 24.9), # distances (mm) between each (column, row) diameter=35.58, # diameter (mm) of each well on the plate depth=16.5 # depth (mm) of each well on the plate ) culture_plate = containers.load('2x3_plate', 'C1') trash = containers.load('trash-box', 'A3') p1000rack1 = containers.load('tiprack-1000ul', 'A1') p1000rack2 = containers.load('tiprack-1000ul', 'A2') trough = containers.load('trough-12row', 'C2') p1000 = instruments.Pipette( name="p1000", axis="a", min_volume=100, max_volume=1000, trash_container=trash, tip_racks=[p1000rack1, p1000rack2] ) PBS_wash = trough['A1'] culture_medium = trough['A2'] dest_wells = [
from opentrons import containers, instruments, robot import math containers.create( 'trough-7row', # name of you container grid=(1, 7), # specify amount of (columns, rows) spacing=(0, 18.21), # distances (mm) between each (column, row) diameter=2.46, # diameter (mm) of each well on the plate depth=40) """ Column A """ tiprack = containers.load('tiprack-200ul', 'A1', 'Tip M') tiprack2 = containers.load('tiprack-200ul', 'A2', 'Tip N') tiprack3 = containers.load('tiprack-200ul', 'A3', 'Tip O') """ Column B """ tiprack4 = containers.load('tiprack-200ul', 'B1', 'Tip J') trough = containers.load('trough-7row', 'B2') tiprack5 = containers.load('tiprack-200ul', 'B3', 'Tip L') """ Column C """ tiprack6 = containers.load('tiprack-200ul', 'C1', 'Tip G') cleanup_plate = containers.load('384-plate', 'C2') tiprack7 = containers.load('tiprack-200ul', 'C3', 'Tip I') """ Column D
from opentrons import containers, instruments # the number of plates with 19 mm diameter wells # num19plates = 1 # change here # the number of plates with 32 mm diameter wells # num32plates = 1 # change here # time to create liquid flow time = 45 # change here containers.create( '2x3_MaxwellPlate19mm', # name of you container grid=(2, 3), # specify amount of (columns, rows) spacing=(38.4, 38.4), # distances (mm) between each (column, row) diameter=19, # diameter (mm) of each well on the plate depth=8) # depth (mm) of each well on the plate containers.create( '2x3_MaxwellPlate32mm', # name of you container grid=(2, 3), # specify amount of (columns, rows) spacing=(38.4, 38.4), # distances (mm) between each (column, row) diameter=32, # diameter (mm) of each well on the plate depth=8) # depth (mm) of each well on the plate # HACK: need to explicitly load each container like this # instead of using a for loop, so that deck map can be parsed out # for protocol library # smallplates = [] # largeplates = []
from opentrons import robot, containers, instruments #containers.create( # "tiprack-300ul_storm2", # name of you container # grid=(8, 12), # specify amount of (columns, rows) # spacing=(9, 9), # distances (mm) between each (column, row) # diameter=4, # diameter (mm) of each well on the plate # depth=60) # depth (mm) of each well on the plate #containers.create( # "Starlab_96_Square_2mL", # name of you container # grid=(8, 12), # specify amount of (columns, rows) # spacing=(9, 9), # distances (mm) between each (column, row) # diameter=8, # diameter (mm) of each well on the plate # depth=60) # depth (mm) of each well on the plate containers.create( "StarLab_96_tall", # name of you container grid=(8, 12), # specify amount of (columns, rows) spacing=(18, 18), # distances (mm) between each (column, row) diameter=11, # diameter (mm) of each well on the plate depth=46) # depth (mm) of each well on the plate
# ~~~~~~~~~~~ SET UP ~~~~~~~~~~ # max_speed_per_axis = { # Head Speed # 'x': 2000, 'y': 1000, 'z':500, 'a':500, 'b':500, 'c':200} # robot.head_speed( # combined_speed=max(max_speed_per_axis.values()), **max_speed_per_axis) tiprack = containers.load('tiprack-200ul', 'A2', 'tiprack') waste = containers.load('96-deep-well', 'D2', 'waste') #waste in deep well to see cells in case speed has an impact in disruptions wash_basin = containers.load('point', 'B2', 'wash basin') cellwell = containers.load('96-PCR-flat', 'C1', 'cells') #microwell plate with cells in it #place hot plate beneath, 37 degrees. output_low = containers.load('96-PCR-flat', 'B1', 'output low') output_high = containers.load('96-PCR-flat', 'A1', 'output high') containers.create( 'troughrow', grid=(8,4), spacing=(10,30), diameter=6, depth=35) glucose_medium = containers.load('troughrow', 'D1', 'glucose medium') LOW_GLUCOSE_MEDIUM_ROWS = '1' #'2', '3'] #1st & 2nd rows of trough (from front to back) require 15mL low glucose medium #3rd row requires 16mL low glucose medium HIGH_GLUCOSE_MEDIUM_LOCATION = '4' #4th row requires 16mL low glucose medium p200_multi_low_speed = instruments.Pipette( # Lowest pipette speed, use for washing axis='a', name='pip200low',
from opentrons import containers, instruments ''' Create a new container ''' containers.create( 'Epptubes', # name of you container grid=(3, 4), # specify amount of (columns, rows) spacing=(13, 13), # distances (mm) between each (column, row) diameter=8, # diameter (mm) of each well on the plate depth=40) # depth (mm) of each well on the plate) # source of diluent tuberack = containers.load('Epptubes', 'D3') #plate_96 = containers.load('96-PCR-flat', 'B1') pcr_strip_d1 = containers.load('PCR-strip-tall', 'B1') #pcr_strip_d2 = containers.load('PCR-strip-tall', 'B1') #Qpcr_strip = containers.load('opentrons-aluminum-block-PCR-strips-200ul', 'C1') tiprack = containers.load('tiprack-200ul', 'A1') trash = containers.load('trash-box', 'C2') #diluent_source = trough['A1'] # HACK: need to explicitly load each container like this # instead of using a for loop, so that deck map can be parsed out # for protocol library # plate dilution will happen in # plate_slots = ['A1', 'B1', 'A2', 'B2', 'A3', 'B3'] # plates = [c o n t a i n e r s.load(
from opentrons import robot, containers, instruments containers.create( 'jMX_big_vial_holder', # name of you container grid=(3, 4), # specify amount of (columns, rows) spacing=(23, 23), # distances (mm) between each (column, row) diameter=1.3, # diameter (mm) of each well on the plate depth=68.0) # depth (mm) of each well on the plate containers.create( 'Para_dox_96_short', # name of you container grid=(8, 12), # specify amount of (columns, rows) spacing=(9, 9), # distances (mm) between each (column, row) diameter=7, # diameter (mm) of each well on the plate depth=30) # depth (mm) of each well on the plate print(containers.list()) print(containers)
# imports from opentrons import containers, instruments, robot # containers containers.create('tiprack-100ul', grid=(8, 12), spacing=(12, 12), diameter=3.5, depth=60) trash = containers.load('point', 'E2') plate = containers.load('96-PCR-tall', 'B1') samples = containers.load('96-flat', 'C1') mastermix = containers.load('tube-rack-2ml', 'A2') t10 = containers.load('tiprack-10ul', 'A1') t100 = containers.load('tiprack-20ul', 'A3') # pipettes p100 = instruments.Pipette(axis='b', max_volume=100, tip_racks=[t10], trash_container=trash) p50 = instruments.Pipette(axis='a', max_volume=50, tip_racks=[t10], trash_container=trash, channels=8) def print_history():
def getEquipment(): equipment = {} ############## DECK LAYOUT BEGINS HERE #CONTAINER DEFINITIONS: TransposeTipBox = True containers.create("24corning", grid=(4, 6), spacing=(19.304, 19.304), diameter=16.26, depth=18) #24-well plate #DECK: equipment['trash'] = containers.load('point', "C1", "trash") equipment['p200rack'] = containers.load('tiprack-200ul', 'E2', 'tiprack200') if TransposeTipBox: equipment['p1000rack'] = create_container_instance("TR1000-Transposed", slot="A1", grid=(8, 12), spacing=(9.02, -9.02), diameter=5, depth=85, Transposed=True) else: equipment['p1000rack'] = create_container_instance("TR1000-Normal", slot="A1", grid=(8, 12), spacing=(9.02, 9.02), diameter=5, depth=85) equipment['CulturePlate'] = containers.load('24corning', 'B2', 'CulturePlate24') equipment['CulturePlate96'] = containers.load('96-flat', 'B2') equipment['CulturePlate2'] = containers.load('24corning', 'C2', 'CulturePlate242') equipment['AliquotPlate'] = containers.load('96-flat', 'C2', 'AliquotPlate') equipment['TubBlood'] = create_container_instance("TubBlood", slot="D1", grid=(8, 1), spacing=(9.02, 9.02), diameter=0, depth=55) equipment['TubMedia'] = create_container_instance("TubMedia", slot="D1", grid=(8, 1), spacing=(9.02, 9.02), diameter=0, depth=55) equipment['TubSybr'] = create_container_instance("TubSybr", slot="D1", grid=(8, 1), spacing=(9.02, 9.02), diameter=0, depth=55) #PIPETTE(S) equipment['p1000'] = instruments.Pipette( name="P1000", axis="b", min_volume=20, max_volume=1000, tip_racks=[equipment['p1000rack']], trash_container=equipment['trash']) equipment['p200x8'] = instruments.Pipette( name="p200x8", axis="a", min_volume=20, max_volume=300, trash_container=equipment['trash'], channels=8) return (equipment)
from opentrons import robot, containers, instruments robot.head_speed(x=18000, y=18000, z=5000, a=700, b=700) containers.create( '96_rack_pp', grid=(8,12), spacing=(18,18), diameter=13, depth=48 ) containers.create( '96_rack_glass', grid=(8,12), spacing=(18,18), diameter=13, depth=48 ) rack_number=4 rack_stock_reactants=[] r_positions=['A1','A2','B1','C1'] r_types=['halide','boronic acid','base','catalyst'] for i in range(0,rack_number): rack_stock_reactants.append(containers.load("FluidX_24_5ml", r_positions[i], r_types[i])) tiprack_1000 = containers.load("tiprack-1000ul-H", "D3") source_trough4row = containers.load("trough-12row", "C2") reaction_racks = [containers.load("96_rack_glass", "D1"),containers.load("96_rack_pp", "D2")] trash = containers.load("point", "B3")
from opentrons import robot, containers, instruments from utilities import * # create the custom containers: 24 and 6 well plates # this will create a file ./containers/_contaiers_create.json # which will be used to load the custom containers # It should not be necessary to run this script as the # JSON file is part of the repo so this is mainly here # for reference to show how it was created. # When using this, check the created file for order of # well, which should be given in the same order that # they are to be used, i.e. A1, B1, C1 .. , A2, B2, C2... containers.create("24corning", grid=(4, 6), spacing=(19.304, 19.304), diameter=16.26, depth=18) #24-well plate containers.create("6corning", grid=(2, 3), spacing=(39.12, 39.12), diameter=34.80, depth=11.27) #6-well plate
if hasattr(instr, 'update_calibrator'): instr.update_calibrator() custom_container.properties['type'] = name custom_container.get_name = lambda: label # add to robot deck robot.deck[slot].add(custom_container, label) return custom_container #define trough type for water containers.create('trough-15ml', grid=(1, 1), spacing=(20, 20), diameter=30, depth=30) #Setup directions to human in comments. tiprack200 = containers.load('tiprack-200ul', 'A3') # p200 tip rack in slot A3 Tip_rack_8 = containers.load('tiprack-200ul', 'E1') # p200 tip rack for 8-channel in slot E1 TrashA = containers.load('trash-box', 'C1') # trash for 8-channel in slot C1 TrashB = containers.load('trash-box', 'A2') # trash for single in slot A2 Water = containers.load('trough-15ml', 'E2', 'water-trough') SamplesLeft = create_container_instance( 'double-tube-rack-40-half', # aluminum tube rack for 1.7 ml microcentrifuge tubes; has 8x5 arrangement, fits in two slots grid=(4, 5), # 4 columns and 5 rows spacing=(19.5, 19.5), # 20 mm apart diameter=10, # each tube 10 mm in diameter
def create(self, *args, **kwargs): return cnt.create(*args, **kwargs)
from opentrons import robot, containers, instruments #import pandas as pd #all_info=pd.read_csv('new_protocol_steps.csv') containers.create('FluidX_24_5ml', grid=(4, 6), spacing=(18, 18), diameter=13, depth=48) robot.head_speed(x=18000, y=18000, z=5000, a=700, b=700) rack_number = 4 rack_stock_reactants = [] r_positions = ['A1', 'A2', 'B1', 'B2'] r_types = ['halide', 'boronic acid', 'base', 'catalyst'] tiprack_1000 = containers.load("tiprack-1000ul-H", "D3") source_trough4row = containers.load("trough-12row", "C2") for i in range(0, rack_number): rack_stock_reactants.append( containers.load("FluidX_24_5ml", r_positions[i], r_types[i])) trash = containers.load("point", "B3") # Pipettes SetUp p1000 = instruments.Pipette( name='eppendorf1000', axis='b', trash_container=trash, tip_racks=tiprack_1000, max_volume=1000, min_volume=30,
from opentrons import containers, instruments containers.create( 'septum-plate', # name of you container grid=(8, 7), # specify amount of (columns, rows) spacing=(9, 18), # distances (mm) between each (column, row) diameter=2.46, # diameter (mm) of each well on the plate depth=10) """ Column A """ tiprack = containers.load('tiprack-200ul', 'A1') tuberack = containers.load('tube-rack-2ml', 'A2') """ Column B """ septum1 = containers.load('septum-plate', 'B3') """ Column C """ septum2 = containers.load('septum-plate', 'C3') trash = containers.load('trash-box', 'C2') trough = containers.load('trough-12row', 'C1') """ Column D """ septum3 = containers.load('septum-plate', 'D1') septum4 = containers.load('septum-plate', 'D2') septum5 = containers.load('septum-plate', 'D3') """ Column E