Exemplo n.º 1
0
def build_v1_model(r, lw_name):
    plate = load(r, lw_name or '96-flat', '1')
    tiprack = load(r, 'opentrons-tiprack-300ul', '2')
    pipette = Pipette(r,
                      ul_per_mm=18.5, max_volume=300, mount='right',
                      tip_racks=[tiprack])
    instrument = models.Instrument(pipette)
    container = models.Container(plate)
    return namedtuple('model', 'robot instrument container')(
        robot=r,
        instrument=instrument,
        container=container,
    )
Exemplo n.º 2
0
def model(robot, hardware, loop, request):
    # Use with pytest.mark.parametrize(’labware’, [some-labware-name])
    # to have a different labware loaded as .container. If not passed,
    # defaults to the version-appropriate way to do 96 flat
    from opentrons.legacy_api.containers import load
    from opentrons.legacy_api.instruments.pipette import Pipette

    try:
        lw_name = request.getfixturevalue('labware')
    except Exception:
        lw_name = None

    if isinstance(hardware, hc.HardwareAPILike):
        ctx = ProtocolContext(loop=loop, hardware=hardware)
        pip = ctx.load_instrument('p300_single', 'right')
        loop.run_until_complete(
            hardware.cache_instruments({Mount.RIGHT: 'p300_single'}))
        instrument = models.Instrument(pip, context=ctx)
        plate = ctx.load_labware(lw_name or 'corning_96_wellplate_360ul_flat',
                                 1)
        rob = hardware
        container = models.Container(plate, context=ctx)
    else:
        print("hardware is {}".format(hardware))
        pipette = Pipette(robot, ul_per_mm=18.5, max_volume=300, mount='right')
        plate = load(robot, lw_name or '96-flat', '1')
        rob = robot
        instrument = models.Instrument(pipette)
        container = models.Container(plate)

    return namedtuple('model',
                      'robot instrument container')(robot=rob,
                                                    instrument=instrument,
                                                    container=container)
Exemplo n.º 3
0
def model_with_trough(robot):
    from opentrons.legacy_api.containers import load
    from opentrons.legacy_api.instruments.pipette import Pipette

    pipette = Pipette(robot, ul_per_mm=18.5, max_volume=300, mount='right')
    plate = load(robot, 'trough-12row', '1')

    instrument = models.Instrument(pipette)
    container = models.Container(plate)

    return namedtuple('model',
                      'robot instrument container')(robot=robot,
                                                    instrument=instrument,
                                                    container=container)
Exemplo n.º 4
0
def test_serial_dilution(robot):
    plate = load(robot, '96-flat', '2', 'plate')

    tiprack = load(
        robot,
        'tiprack-200ul',  # container type from library
        '1',  # slot on deck
        'tiprack'  # calibration reference for 1.2 compatibility
    )

    trough = load(robot, 'trough-12row', '5', 'trough')

    trash = load(robot, 'point', '3', 'trash')

    p200 = pipette.Pipette(
        robot,
        ul_per_mm=18.5,
        trash_container=trash,
        tip_racks=[tiprack],
        min_volume=10,
        max_volume=200,  # These are variable
        mount='left',
        channels=1)
    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)
            p200.mix(repetitions=3, volume=10, location=next_well)

        p200.drop_tip(trash)
Exemplo n.º 5
0
def plate(robot):
    return load(robot, '96-flat', '4')