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_all(self): failures = [] for protocol_path, protocol_dict in self.get_protocols(): Robot.reset_for_tests() try: jpp = JSONProtocolProcessor(protocol_dict) jpp.process() except Exception as e: failures.append((protocol_path, e, jpp.errors)) if failures: print('The following protocols failed to parse') for path, exc, reason in failures: print("[{}]. Reason: {}".format(path, exc)) assert False
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 get_unallocated_slot(self): """ :return: str name of a slot without any children (first occurence) """ robot = Robot.get_instance() for slot in robot._deck.get_children_list(): if not slot.has_children(): return slot.get_name() raise JSONProcessorRuntimeError( 'Unable to find any unallocated slots in robot deck')
def setUp(self): self.robot = Robot.get_instance() # set this to True if testing with a robot connected # testing while connected allows the response handlers # and serial handshakes to be tested self.motor = self.robot._driver options = {'limit_switches': True} myport = self.robot.VIRTUAL_SMOOTHIE_PORT success = self.robot.connect(port=myport, options=options) self.assertTrue(success)
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 setUp(self): Robot.reset() self.robot = Robot.get_instance() self.protocol = None
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')
def setUp(self): Robot.reset_for_tests() self.robot = Robot.get_instance() self.robot.connect() self.protocol = None
def setUp(self): Robot.reset() self.robot = Robot.get_instance()