def test_serial_dilution(self): plate = containers.load('96-flat', 'B1', 'plate') tiprack = containers.load( 'tiprack-200ul', # container type from library 'A1', # slot on deck 'tiprack' # calibration reference for 1.2 compatibility ) trough = containers.load('trough-12row', 'B1', 'trough') trash = containers.load('point', 'A2', 'trash') p200 = instruments.Pipette( trash_container=trash, tip_racks=[tiprack], min_volume=10, # These are variable axis="b", channels=1) p200.set_max_volume(200) p200.calibrate_plunger(top=0, bottom=10, blow_out=12, drop_tip=13) for t, col in enumerate(plate.cols): p200.pick_up_tip(tiprack[t]) p200.aspirate(10, trough[t]) p200.dispense(10, col[0]) for well, next_well in zip(col[:-1], col[1:]): p200.aspirate(10, well) p200.dispense(10, next_well).mix(3) p200.drop_tip(trash)
def setUp(self): self.robot = Robot.reset() options = { 'limit_switches': True, 'firmware': 'v1.0.5', 'config': { 'ot_version': 'one_pro', 'version': 'v1.0.3', # config version 'alpha_steps_per_mm': 80.0, 'beta_steps_per_mm': 80.0 } } self.robot.connect(options=options) self.robot.home() self.trash = containers.load('point', 'A1') self.tiprack = containers.load('tiprack-10ul', 'B2') self.plate = containers.load('96-flat', 'A2') self.p200 = instruments.Pipette( trash_container=self.trash, tip_racks=[self.tiprack], min_volume=10, # These are variable axis="b", channels=1 ) self.p200.calibrate_plunger(top=0, bottom=10, blow_out=12, drop_tip=13) self.p200.set_max_volume(200)
def setUp(self): Robot.reset() self.robot = Robot.get_instance() # self.robot.connect(port='/dev/tty.usbmodem1421') # self.robot.home() self.trash = containers.load('point', 'A1', 'trash') self.tiprack = containers.load('tiprack-200ul', 'B2', 'p200-rack') self.trough = containers.load('trough-12row', 'B2', 'trough') self.plate = containers.load('96-flat', 'A2', 'magbead') self.p200 = instruments.Pipette( name="p200", trash_container=self.trash, tip_racks=[self.tiprack], min_volume=10, # These are variable axis="b", channels=1) self.p1000 = instruments.Pipette( name="p1000", trash_container=self.trash, tip_racks=[self.tiprack], min_volume=100, # These are variable axis="a", channels=1)
def test_deck_setup(self): deck = self.robot.deck trash = containers.load('point', 'A1', 'myTrash') tiprack = containers.load('tiprack-10ul', 'B2') self.assertTrue(isinstance(tiprack, Container)) self.assertTrue(isinstance(deck, Deck)) self.assertTrue(deck.has_container(trash)) self.assertTrue(deck.has_container(tiprack))
def test_protocol_container_setup(self): plate = containers.load('96-flat', 'A1', 'myPlate') tiprack = containers.load('tiprack-10ul', 'B2') containers_list = self.robot.containers().values() self.assertEqual(len(containers_list), 2) self.assertEqual(self.robot._deck['A1']['myPlate'], plate) self.assertEqual(self.robot._deck['B2']['tiprack-10ul'], tiprack) self.assertTrue(plate in containers_list) self.assertTrue(tiprack in containers_list)
def test_protocol_head(self): trash = containers.load('point', 'A1', 'myTrash') tiprack = containers.load('tiprack-10ul', 'B2') p200 = instruments.Pipette( name='myPipette', trash_container=trash, tip_racks=[tiprack], min_volume=10, # These are variable axis="b", channels=1 ) instruments_list = self.robot.get_instruments() self.assertEqual(instruments_list[0], ('B', p200)) instruments_list = self.robot.get_instruments('myPipette') self.assertEqual(instruments_list[0], ('B', p200))
def process_deck(self): """ "deck": { "p200-rack": { "labware": "tiprack-200ul", "slot" : "A1" }, ".75 mL Tube Rack": { "labware": "tube-rack-.75ml", "slot" : "C1" }, "trash": { "labware": "point", "slot" : "B2" } } :return: """ deck_info = self.protocol['deck'] deck_data = {} for container_label, definition in deck_info.items(): try: container_type = definition.get('labware') except KeyError: raise JSONProcessorRuntimeError( 'Labware and Slot are required items for "{}" container ' 'definition'.format(container_label) ) slot = definition.get('slot') if not slot: slot = self.get_unallocated_slot() self.warnings.append( 'No SLOT was associated with container "{}", auto ' 'assigning container to slot {}' .format(container_label, slot) ) container_obj = containers.load( container_type, slot, container_label ) deck_data[container_label] = {'instance': container_obj} self.deck = deck_data
def setUp(self): self.robot = Robot.reset_for_tests() options = { 'limit_switches': False, 'firmware': 'v1.0.5', 'config': { 'ot_version': 'one_pro', 'version': 'v1.0.3', # config version 'alpha_steps_per_mm': 80.0, 'beta_steps_per_mm': 80.0 } } self.robot.connect(options=options) self.robot.home() self.plate = containers.load('96-flat', 'A2') self.magbead = instruments.Magbead(mosfet=0, container=self.plate) self.robot._driver.set_mosfet = mock.Mock() self.robot._driver.wait = mock.Mock()
def protocol(self): robot = Robot.get_instance() robot.get_serial_ports_list() options = { 'limit_switches': True, 'firmware': 'v1.0.5', 'config': { 'ot_version': 'one_pro', 'version': 'v1.0.3', # config version 'alpha_steps_per_mm': 80.0, 'beta_steps_per_mm': 80.0 } } robot.connect(options=options) robot.home() tiprack = containers.load( 'tiprack-200ul', # container type 'A1', # slot 'tiprack' # user-defined name ) plate = containers.load('96-flat', 'B1', 'plate') trash = containers.load('point', 'C2', 'trash') trough = containers.load('trough-12row', 'B2', 'trough') p200 = instruments.Pipette(name="p200", trash_container=trash, tip_racks=[tiprack], min_volume=0.5, axis="b", channels=1) p200.set_max_volume(200) calibration_data = """ { "b": { "blowout": 28.0, "bottom": 26.0, "droptip": 32.0, "resting": 0, "theContainers": { "plate": { "rel_x": 181.696, "rel_y": 0.700999999999965, "rel_z": 9.600999999999999, "x": 202.195, "y": 370.304, "z": 125.7 }, "tiprack": { "rel_x": 0.0, "rel_y": 0.0, "rel_z": 0.0, "x": 20.499, "y": 369.603, "z": 116.099 }, "trough": { "rel_x": 0.0, "rel_y": 0.0, "rel_z": 0.0, "x": 20.499, "y": 269.603, "z": 116.099 }, "trash": { "rel_x": 212.701, "rel_y": -200.801, "rel_z": -58.399, "x": 233.2, "y": 171.305, "z": 57.7 } }, "tip_rack_origin": "tiprack", "tip_racks": [ { "container": "tiprack" } ], "top": 13.0, "trash_container": { "container": "trash" }, "volume": 200 } } """ import_calibration_json(calibration_data, robot, True) robot.clear() # distribute p200.pick_up_tip(tiprack[0]) p200.aspirate(96 * 2, trough[0]) for i in range(96): p200.dispense(2, plate[i]).touch_tip() p200.drop_tip(tiprack[0]) p200.pick_up_tip(tiprack[1]) for i in range(96): p200.aspirate(2, plate[95 - i]) p200.dispense(trough[0]) p200.drop_tip(tiprack[1])
import os from opentrons_sdk import containers from opentrons_sdk.labware import instruments from opentrons_sdk.robot import Robot from opentrons_sdk.drivers.motor import CNCDriver from helpers.calibration import import_json_calibration robot = Robot.get_instance() robot._driver = CNCDriver() plate = containers.load('96-flat', 'A2', 'magbead') trash = containers.load('point', 'A1', 'trash') tiprack = containers.load('tiprack-200ul', 'B2', 'p200-rack') # tipracks need a Well height equal to the tip length for tip in tiprack: tip.properties['height'] = 80 p200 = instruments.Pipette( name="p200", trash_container=trash, tip_racks=[tiprack], min_volume=0.1, # These are variable axis="b", channels=1 ) p200.set_max_volume(200)
def setUp(self): Robot.reset() self.plate = containers.load('96-flat', 'A2')
from opentrons_sdk import containers from opentrons_sdk.labware import instruments from opentrons_sdk.robot import Robot from opentrons_sdk.drivers.motor import CNCDriver robot = Robot.get_instance() robot._driver = CNCDriver() plate = containers.load('96-flat', 'A2') trash = containers.load('point', 'A3') tiprack = containers.load('tiprack-10ul', 'B2') p200 = instruments.Pipette( trash_container=trash, tip_racks=[tiprack], min_volume=0.1, # These are variable axis="b", channels=1) robot.connect('/dev/tty.usbmodem1421') # robot.home() robot.move_head(x=144, y=269.5) robot.move_head(z=-50) p200.calibrate_position((plate, plate[0].center(plate))) p200.calibrate_plunger(top=0, bottom=15, blow_out=18, drop_tip=20) p200.set_max_volume(200) # p200.aspirate(200, plate[0])