Beispiel #1
0
def run_custom_protocol(pipette_type: 'StringSelection...'='p300-Single',
                        source_labware_type: 'StringSelection...'='trough-12row',
                        destination_labware_type: 'StringSelection...'='96-flat',
                        micro_liters: 'NumberSelection...'=1,
                        new_tip_type: 'StringSelection...'='once'):
    if pipette_type == 'p300-Single':
        tiprack = labware.load('tiprack-200ul', '1')
        pipette = instruments.P300_Single(
            mount='right',
            tip_racks=[tiprack])
    elif pipette_type == 'p50-Single':
        tiprack = labware.load('tiprack-200ul', '1')
        pipette = instruments.P50_Single(
            mount='right',
            tip_racks=[tiprack])
    elif pipette_type == 'p10-Single':
        tiprack = labware.load('tiprack-10ul', '1')
        pipette = instruments.P10_Single(
            mount='right',
            tip_racks=[tiprack])
    else:
        print('Unknown pipette type: ' + pipette_type)
        return

    source_container = labware.load(source_labware_type, '2')
    destination_container = labware.load(destination_labware_type, '3')

    source_wells = source_container.wells('A1')
    destination_wells = destination_container.wells('A1')

    pipette.distribute(
        micro_liters,
        source_wells,
        destination_wells,
        new_tip=new_tip_type)
Beispiel #2
0
def run_custom_protocol(
        pipette_type: 'StringSelection...' = 'p300-Single',
        dye_labware_type: 'StringSelection...' = 'trough-12row'):
    if pipette_type == 'p300-Single':
        tiprack = labware.load('tiprack-200ul', '1')
        pipette = instruments.P300_Single(mount='right', tip_racks=[tiprack])
    elif pipette_type == 'p50-Single':
        tiprack = labware.load('tiprack-200ul', '1')
        pipette = instruments.P50_Single(mount='right', tip_racks=[tiprack])
    elif pipette_type == 'p10-Single':
        tiprack = labware.load('tiprack-10ul', '1')
        pipette = instruments.P10_Single(mount='right', tip_racks=[tiprack])

    if dye_labware_type == 'trough-12row':
        dye_container = labware.load('trough-12row', '2')
    else:
        dye_container = labware.load('tube-rack-2ml', '2')

    output = labware.load('96-flat', '3')
    # Well Location set-up
    dye1_wells = [
        'C4', 'B4', 'A3', 'A2', 'B1', 'C1', 'D1', 'D2', 'E2', 'E1', 'F1', 'G1',
        'H2', 'H3', 'G4', 'F4'
    ]

    dye2_wells = [
        'C5', 'C6', 'C7', 'C8', 'C9', 'B10', 'C11', 'D12', 'E12', 'F11', 'G10',
        'E9', 'F9', 'F8', 'F7', 'F6', 'F5', 'G8'
    ]

    dye2 = dye_container.wells('A1')
    dye1 = dye_container.wells('A2')

    pipette.distribute(50, dye1, output.wells(dye1_wells), new_tip='once')
    pipette.distribute(50, dye2, output.wells(dye2_wells), new_tip='once')
Beispiel #3
0
def run_custom_protocol(
    well_volume: float = 1.0,
    pipette_type: StringSelection('p300-Single', 'p50-Single', 'p10-Single',
                                  'p300-Multi', 'p50-Multi',
                                  'p10-Multi') = 'p300-Single'):
    pip_name = pipette_type.split('-')  # Check which pipette type

    if pipette_type == 'p300-Single':
        pipette = instruments.P300_Single(mount='left', tip_racks=[tiprack])
    elif pipette_type == 'p50-Single':
        pipette = instruments.P50_Single(mount='left', tip_racks=[tiprack])
    elif pipette_type == 'p10-Single':
        pipette = instruments.P10_Single(mount='left', tip_racks=[tiprack])
    elif pipette_type == 'p300-Multi':
        pipette = instruments.P300_Multi(mount='left', tip_racks=[tiprack])
    elif pipette_type == 'p50-Multi':
        pipette = instruments.P50_Multi(mount='left', tip_racks=[tiprack])
    elif pipette_type == 'p10-Multi':
        pipette = instruments.P10_Multi(mount='left', tip_racks=[tiprack])

    alternating_wells = []
    for column in plate.cols():
        if pip_name[1] == 'Multi':
            alternating_wells.append(column.wells('A'))
            alternating_wells.append(column.wells('B'))
        else:
            alternating_wells.append(column.wells('A', length=8, step=2))
            alternating_wells.append(column.wells('B', length=8, step=2))

    pipette.distribute(well_volume, trough.wells('A1'), alternating_wells)
Beispiel #4
0
def setup():
    global header, p50, p300, stock_wells, tube_rack, df
    df = np.genfromtxt('solutionmaker.csv',
                       delimiter=',',
                       skip_header=1,
                       missing_values='')
    with open('solutionmaker.csv') as csvfile:
        reader_object = csv.reader(csvfile)
        header = [row for i_row, row in enumerate(reader_object) if i_row == 0]

    (nrows, ncols) = df.shape
    for n_row in range(nrows):
        if (df[n_row, :].sum() > 1500):
            raise ValueError(
                'Individual wells will not tolerate addition of this much volume'
            )
    """
	The following are constants for instantiation (mm/sec or ul/sec)
	-----------------------------------------
	"""
    XSPEED = 600
    YSPEED = 600
    ZSPEED = 125
    P300_ASPIRATERATE = 150
    P50_ASPIRATE = 25
    P50_DISPENSERATE = 100
    P300_DISPENSERATE = 600
    """
	------------------------------------------
	"""

    # connects robot and sets robot settings
    robot.home()
    robot.connect()
    robot.head_speed(x=XSPEED, y=YSPEED, z=ZSPEED)

    # sets up labware and the layout of the experiment
    m300rack_1 = containers.load('tiprack-200ul', '10', share='True')
    m300rack_2 = containers.load('tiprack-200ul', '11', share='True')
    stock_wells = []
    slot_plate_wells = ['4', '5']
    for slot in slot_plate_wells:
        stock_wells.append(containers.load('plate_6_well', slot, share='True'))
    stock_wells.append(containers.load('96-flat', '6', share='True'))
    tube_rack = []
    slots_tube_rack = ['1', '2', '3']
    for slot in slots_tube_rack:
        tube_rack.append(containers.load('4x6_Tube_rack', slot, share='True'))

    # instantiates pipettes
    p50 = instruments.P50_Single(mount="right",
                                 tip_racks=[m300rack_1],
                                 aspirate_flow_rate=P50_ASPIRATE,
                                 dispense_flow_rate=P50_DISPENSERATE)
    p300 = instruments.P300_Single(mount="left",
                                   tip_racks=[m300rack_2],
                                   aspirate_flow_rate=P300_ASPIRATERATE,
                                   dispense_flow_rate=P300_DISPENSERATE)
def run_custom_protocol(pipette_type: 'StringSelection...'='p300-Single',
    pipette_mount: 'StringSelection...'='right',
    dye_labware_type: 'StringSelection...'='trough-12row'):

    if pipette_mount == 'left' or pipette_mount == 'l':
        mount_position = 'left'
    elif pipette_mount == 'right' or pipette_mount == 'r':
        mount_position = 'right'
    else:
        raise Exception(
        "You can only mount the pipette on the 'left' or 'right' mount")

    if pipette_type == 'p300-Single':
        tiprack = labware.load('tiprack-200ul', '1')
        pipette = instruments.P300_Single(
            mount=mount_position,
            tip_racks=[tiprack])
    elif pipette_type == 'p50-Single':
        tiprack = labware.load('tiprack-200ul', '1')
        pipette = instruments.P50_Single(
            mount=mount_position,
            tip_racks=[tiprack])
    elif pipette_type == 'p10-Single':
        tiprack = labware.load('tiprack-10ul', '1')
        pipette = instruments.P10_Single(
            mount=mount_position,
            tip_racks=[tiprack])

    if dye_labware_type == 'trough-12row':
        dye_container = labware.load('trough-12row', '2')
    elif dye_labware_type == '6-well-plate':
        dye_container = labware.load('6-well-plate', '2')
    else:
        dye_container = labware.load('tube-rack-2ml', '2')

    output = labware.load('96-flat', '3')
    # Well Location set-up
    dye1_wells = ['A5', 'A6', 'A8', 'A9', 'B4', 'B10', 'C3', 'C11', 'D3',
                  'D11', 'E3', 'E11', 'F3', 'F11', 'G4', 'G10',
                  'H5', 'H6', 'H7', 'H8', 'H9']

    dye2_wells = ['C7', 'D6', 'D7', 'D8', 'E5', 'E6', 'E7', 'E8',
                  'E9', 'F5', 'F6', 'F7', 'F8', 'F9', 'G6', 'G7', 'G8']

    dye2 = dye_container.wells('A1')
    dye1 = dye_container.wells('A2')

    pipette.distribute(
        50,
        dye1,
        output.wells(dye1_wells),
        new_tip='once')
    pipette.distribute(
        50,
        dye2,
        output.wells(dye2_wells),
        new_tip='once')
Beispiel #6
0
def run_custom_protocol(
    volumes_csv: FileInput = example_csv,
    pipette_axis: StringSelection('B (left side)',
                                  'A (right side)') = 'B (left side)',
    pipette_model: StringSelection('p1000', 'p300', 'p50', 'p10') = 'p300',
    source_plate_type: StringSelection('96-flat', '384-plate') = '96-flat',
    destination_plate_type: StringSelection('96-flat',
                                            '384-plate') = '96-flat',
    tip_reuse: StringSelection('new tip each time',
                               'reuse tip') = 'new tip each time'):

    pipette_max_vol = int(pipette_model[1:])
    mount = 'right'
    if pipette_axis[0] == 'B':
        mount = 'left'

    tiprack_slots = ['1', '4', '7', '10']

    if pipette_max_vol == 300:
        tipracks = [
            labware.load('tiprack-200ul', slot) for slot in tiprack_slots
        ]
        pipette = instruments.P300_Single(mount=mount, tip_racks=tipracks)
    elif pipette_max_vol == 50:
        tipracks = [
            labware.load('tiprack-200ul', slot) for slot in tiprack_slots
        ]
        pipette = instruments.P50_Single(mount=mount, tip_racks=tipracks)
    elif pipette_max_vol == 10:
        tipracks = [
            labware.load('tiprack-200ul', slot) for slot in tiprack_slots
        ]
        pipette = instruments.P10_Single(mount=mount, tip_racks=tipracks)
    elif pipette_max_vol == 1000:
        tipracks = [
            labware.load('tiprack-200ul', slot) for slot in tiprack_slots
        ]
        pipette = instruments.P1000_Single(mount=mount, tip_racks=tipracks)

    data = [
        [well, vol] for well, vol in
        [row.split(',') for row in volumes_csv.strip().splitlines() if row]
    ]

    source_plate = labware.load(source_plate_type, '2')
    dest_plate = labware.load(destination_plate_type, '3')

    tip_strategy = 'always' if tip_reuse == 'new tip each time' else 'once'
    for well_idx, (source_well, vol) in enumerate(data):
        if source_well and vol:
            vol = float(vol)
            pipette.transfer(vol,
                             source_plate.wells(source_well),
                             dest_plate.wells(well_idx),
                             new_tip=tip_strategy)
Beispiel #7
0
def test_set_flow_rate():
    # Test new flow-rate functionality on all pipettes with different max vols
    robot.reset()
    p10 = instruments.P10_Single(mount='right')

    p10.set_flow_rate(aspirate=10)
    ul_per_mm = Pipette._p10_single_piecewise(p10, p10.max_volume, 'aspirate')
    expected_mm_per_sec = round(10 / ul_per_mm, 6)
    assert p10.speeds['aspirate'] == expected_mm_per_sec

    p10.set_flow_rate(dispense=20)
    ul_per_mm = Pipette._p10_single_piecewise(p10, p10.max_volume, 'dispense')
    expected_mm_per_sec = round(20 / ul_per_mm, 6)
    assert p10.speeds['dispense'] == expected_mm_per_sec

    robot.reset()
    p50 = instruments.P50_Single(mount='right')

    p50.set_flow_rate(aspirate=50)
    ul_per_mm = Pipette._p50_single_piecewise(p50, p50.max_volume, 'aspirate')
    expected_mm_per_sec = round(50 / ul_per_mm, 6)
    assert p50.speeds['aspirate'] == expected_mm_per_sec

    p50.set_flow_rate(dispense=60)
    ul_per_mm = Pipette._p50_single_piecewise(p50, p50.max_volume, 'dispense')
    expected_mm_per_sec = round(60 / ul_per_mm, 6)
    assert p50.speeds['dispense'] == expected_mm_per_sec

    robot.reset()
    p300 = instruments.P300_Single(mount='right')

    p300.set_flow_rate(aspirate=300)
    ul_per_mm = Pipette._p300_single_piecewise(p300, p300.max_volume,
                                               'aspirate')
    expected_mm_per_sec = round(300 / ul_per_mm, 6)
    assert p300.speeds['aspirate'] == expected_mm_per_sec

    p300.set_flow_rate(dispense=310)
    ul_per_mm = Pipette._p300_single_piecewise(p300, p300.max_volume,
                                               'dispense')
    expected_mm_per_sec = round(310 / ul_per_mm, 6)
    assert p300.speeds['dispense'] == expected_mm_per_sec

    robot.reset()
    p1000 = instruments.P1000_Single(mount='right')

    p1000.set_flow_rate(aspirate=1000)
    ul_per_mm = Pipette._p1000_piecewise(p1000, p1000.max_volume, 'aspirate')
    expected_mm_per_sec = round(1000 / ul_per_mm, 6)
    assert p1000.speeds['aspirate'] == expected_mm_per_sec

    p1000.set_flow_rate(dispense=1100)
    ul_per_mm = Pipette._p1000_piecewise(p1000, p1000.max_volume, 'dispense')
    expected_mm_per_sec = round(1100 / ul_per_mm, 6)
    assert p1000.speeds['dispense'] == expected_mm_per_sec
Beispiel #8
0
def run_custom_protocol(
        pipette_axis: StringSelection(
            'left', 'right')='left',
        pipette_model: StringSelection(
            'p10', 'p50', 'p300', 'p1000')='p300',
        consolidate_volume: float=20.0,
        source_container: StringSelection(
            '96-flat', 'tube-rack-2ml')='96-flat',
        number_of_source_wells: int=4,
        destination_container: StringSelection(
            '96-flat', 'tube-rack-2ml')='96-flat',
        destination_well: str='A1',
        tip_reuse_strategy: StringSelection(
            'reuse one tip', 'new tip each time')='reuse one tip'):

    pipette_max_vol = int(pipette_model[1:])
    new_tip = 'always' if tip_reuse_strategy == 'new tip each time' else 'once'
    tip_rack = labware.load(tiprack_from_pipette(pipette_max_vol), '1')

    source = labware.load(source_container, '2')
    dest = labware.load(destination_container, '3')

    try:
        dest_well = dest.wells(destination_well)
    except ValueError:
        raise RuntimeError(
            'Invalid destination well "{}". Expected well name like A1, H11, '
            .format(destination_well) + 'etc. The destination plate may not ' +
            'have a well of that name (eg a 96-well plate has no well "T18")')

    if pipette_model == 'p10':
        pipette = instruments.P10_Single(
            mount=pipette_axis,
            tip_racks=[tip_rack])
    elif pipette_model == 'p50':
        pipette = instruments.P50_Single(
            mount=pipette_axis,
            tip_racks=[tip_rack])
    elif pipette_model == 'p300':
        pipette = instruments.P300_Single(
            mount=pipette_axis,
            tip_racks=[tip_rack])
    else:
        pipette = instruments.P1000_Single(
            mount=pipette_axis,
            tip_racks=[tip_rack])

    pipette.consolidate(
        consolidate_volume,
        source[:number_of_source_wells],
        dest_well,
        new_tip=new_tip)
Beispiel #9
0
def run_custom_protocol(pipette_type: 'StringSelection...'='p300-Single',
    dye_labware_type: 'StringSelection...'='trough-12row'):
    if pipette_type == 'p300-Single':
        tiprack = labware.load('tiprack-200ul', '1')
        pipette = instruments.P300_Single(
            mount='left',
            tip_racks=[tiprack])
    elif pipette_type == 'p50-Single':
        tiprack = labware.load('tiprack-200ul', '1')
        pipette = instruments.P50_Single(
            mount='left',
            tip_racks=[tiprack])
    elif pipette_type == 'p10-Single':
        tiprack = labware.load('tiprack-10ul', '1')
        pipette = instruments.P10_Single(
            mount='left',
            tip_racks=[tiprack])

    if dye_labware_type == 'trough-12row':
        dye_container = labware.load('trough-12row', '2')
    else:
        dye_container = labware.load('tube-rack-2ml', '2')

    output = labware.load('96-flat', '3')
    # Well Location set-up
    dye1_wells = ['B2']

    dye2_wells = ['A1','A2','A3','A4','A5','A6','A7','A8','A9','A10','A11','A12'
				 'B1','B6','B7', 'B12',
				  'C1','C3','C4','C5','C6','C7', 'C9', 'C10','C11','C12'
				 'D1','D3','D4','D5','D6','D7','D12',
				  'E1', 'E3', 'E4','E4','E5','E6','E7','E9','E10','E11','E12'
				  'F1','F3','F4','F5','F6','F7','F9','F10','F11','F12'
				  'G1','G6','G7','G9','G10','G11','G12'
				  'H1','H2','H3','H4','H5','H6','H7','H8','H9','H10','H11','H12'
				 ]

    dye2 = dye_container.wells('A1')
    dye1 = dye_container.wells('A2')

    pipette.distribute(
        15,
        dye1,
        output.wells(dye1_wells),
        new_tip='once')
    pipette.distribute(
        15,
        dye2,
        output.wells(dye2_wells),
        new_tip='once')
def run_custom_protocol():
    p50_single = instruments.P50_Single(mount='right', tip_racks=[tiprack])

    transfer_volume = 50
    initial_volume = 2000  # Initial volume held in source tube

    source_tube = tube_rack_2ml.wells('D3')
    destination_tube = tube_rack_2ml.wells('D4')

    remaining_vol = 2000
    height = 1  # Initial height within source tube
    source_height_offset = 0.5  # Offset so that pipette tip is slightly submerged in source tube, not hovering at surface
    source_height = height - source_height_offset
    p50_single.pick_up_tip()
    while remaining_vol > 0:
        robot.comment(
            str(source_height))  # Print out the current source_height

        # This transfer command will start pipetting from the top of the source tube to the bottom of the destination
        # tube, and will continue "tracking" the height of the two volumes in each tube
        source = (source_tube,
                  source_tube.from_center(x=0, y=0, z=source_height)
                  )  # locations are tuples
        destination = (destination_tube,
                       destination_tube.from_center(x=0, y=0, z=-height)
                       )  # locations are tuples
        p50_single.transfer(transfer_volume,
                            source,
                            destination,
                            disposal_vol=0,
                            blow_out=True,
                            new_tip='never')

        # Update height by subtracting ratio of transfer_vol:inital_vol, or set to bottom of tube is "below" bottom
        if height > -1:
            height -= (
                transfer_volume / initial_volume
            ) * 2  # x2 because tube size is -1 to 1 i.e. a difference of 2
        else:
            height = -1

        # Update source_height or set to bottom of tube
        source_height = height - source_height_offset
        if source_height < -1:
            source_height = -1

        # Update remaining volume
        remaining_vol -= transfer_volume
 def mount_pipette(pipette_type, mount, tiprack_slot):
     if pipette_type == 'p10-single':
         tip_rack = labware.load('tiprack-10ul', tiprack_slot)
         pipette = instruments.P10_Single(mount=mount, tip_racks=[tip_rack])
     elif pipette_type == 'p50-single':
         tip_rack = labware.load('opentrons-tiprack-300ul', tiprack_slot)
         pipette = instruments.P50_Single(mount=mount, tip_racks=[tip_rack])
     elif pipette_type == 'p300-single':
         tip_rack = labware.load('opentrons-tiprack-300ul', tiprack_slot)
         pipette = instruments.P300_Single(mount=mount,
                                           tip_racks=[tip_rack])
     else:
         tip_rack = labware.load('tiprack-1000ul', tiprack_slot)
         pipette = instruments.P1000_Single(mount=mount,
                                            tip_racks=[tip_rack])
     return pipette
Beispiel #12
0
def run_custom_protocol(
    pipette_type: StringSelection('p300-Single', 'p50-Single',
                                  'p10-Single') = 'p300-Single',
    dye_labware_type: StringSelection('trough-12row',
                                      'tube-rack-2ml') = 'trough-12row'):
    if pipette_type == 'p300-Single':
        tiprack = labware.load('tiprack-200ul', '1')
        pipette = instruments.P300_Single(mount='right', tip_racks=[tiprack])
    elif pipette_type == 'p50-Single':
        tiprack = labware.load('tiprack-200ul', '1')
        pipette = instruments.P50_Single(mount='right', tip_racks=[tiprack])
    elif pipette_type == 'p10-Single':
        tiprack = labware.load('tiprack-10ul', '1')
        pipette = instruments.P10_Single(mount='right', tip_racks=[tiprack])

    if dye_labware_type == 'trough-12row':
        dye_container = labware.load('trough-12row', '2')
    else:
        dye_container = labware.load('tube-rack-2ml', '2')

    output = labware.load('96-flat', '3')
    # Well Location set-up
    dye1_wells = [
        'A5', 'A6', 'A8', 'A9', 'B4', 'B10', 'C3', 'C11', 'D3', 'D11', 'E3',
        'E11', 'F3', 'F11', 'G4', 'G10', 'H5', 'H6', 'H7', 'H8', 'H9'
    ]

    dye2_wells = [
        'C7', 'D6', 'D7', 'D8', 'E5', 'E6', 'E7', 'E8', 'E9', 'F5', 'F6', 'F7',
        'F8', 'F9', 'G6', 'G7', 'G8'
    ]

    dye2 = dye_container.wells('A1')
    dye1 = dye_container.wells('A2')

    pipette.distribute(50, dye1, output.wells(dye1_wells), new_tip='once')
    pipette.distribute(50, dye2, output.wells(dye2_wells), new_tip='once')
Beispiel #13
0
def run_custom_protocol(
    volumes_csv: FileInput = example_csv,
    pipette_mount: StringSelection('right', 'left') = 'right',
    pipette_model: StringSelection('p300-Single', 'p50-Single',
                                   'p10-Single') = 'p300-Single',
    plate_type: StringSelection('96-flat', '384-plate') = '96-flat',
    tip_reuse: StringSelection('new tip each time',
                               'reuse tip') = 'new tip each time'):
    tipracks = [
        labware.load('opentrons-tiprack-300ul', slot) for slot in tiprack_slots
    ]

    if pipette_model == 'p300-Single':
        pipette = instruments.P300_Single(mount=pipette_mount,
                                          tip_racks=tipracks)
    elif pipette_model == 'p50-Single':
        pipette = instruments.P50_Single(mount=pipette_mount,
                                         tip_racks=tipracks)
    elif pipette_model == 'p10-Single':
        tipracks = [
            labware.load('tiprack-10ul', slot) for slot in tiprack_slots
        ]
        pipette = instruments.P10_Single(mount=pipette_mount,
                                         tip_racks=tipracks)

    plate = labware.load(plate_type, '3')

    volumes = [float(cell) for cell in well_csv_to_list(volumes_csv)]

    for vol in volumes:
        if 0 < vol < pipette.min_volume:
            robot.comment(
                'WARNING: volume {} is below pipette\'s minimum volume.'.
                format(vol))

    tip_strategy = 'always' if tip_reuse == 'new tip each time' else 'once'
    pipette.transfer(volumes, source, plate, new_tip=tip_strategy)
Beispiel #14
0
# out_plate = labware.load('biorad-hardshell-96-PCR', '2')
tuberack = labware.load('tube-rack-2ml', '5')

# reagent setup
atm = tuberack.wells('A1')  # Amplicon Tagment Mix
td = tuberack.wells('B1')  # Tagment DNA Buffer
nt = tuberack.wells('C1')  # Neutralize Tagment Buffer
npm = tuberack.wells('D1')  # Nextera PCR Master Mix
index_7 = tuberack.wells('A2', to='D4')  # Index 1 (i7) adapters
index_5 = tuberack.wells('A5', to='D6')  # Index 2 (i5) adapters

tipracks50 = [labware.load('tiprack-200ul', slot) for slot in ['3', '4']]
tipracks10 = [labware.load('tiprack-10ul', slot) for slot in ['6', '7']]

# pipette setup
p50 = instruments.P50_Single(mount='left', tip_racks=tipracks50)

p10 = instruments.P10_Single(mount='right', tip_racks=tipracks10)


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')
settling_time: float=5
drying_time: float=4

p50_type: 'StringSelection...'='p50_Single'
p50_mount: 'StringSelection...'='left'

# tipracks = labware.load('tiprack-starlab-S1120-9810', slot = 2)
tipracks = labware.load('opentrons_96_tiprack_300ul', 2)
p50_tips = labware.load('tiprack-starlab-S1120-2810', slot = 3)

p300 = instruments.P300_Multi(
mount=p300_mount,
tip_racks=[tipracks])

p50 = instruments.P50_Single(
mount=p50_mount,
tip_racks=[p50_tips])

#    mode = p300_type.split('_')[1] # this is 'Multi'

### Here I'm not really sure whats going on. I think that this is is recording
  # the potential locations for pipetting out from and to 

col_num = sample_number // 8 + (1 if sample_number % 8 > 0 else 0)
samples = [col for col in mag_plate.cols()[:col_num]]
#output = [col for col in output_plate.cols()[:col_num]]

# total_vol still needs to be specified
bead_volume = sample_volume*bead_ratio
total_vol = bead_volume + sample_volume + 4 # = 15ul of samples + 12 ul of beads + 5ul of excess
Beispiel #16
0
    pipette_multi = instruments.P10_Multi(
        mount=multi_pipette_mount,
        tip_racks=tiprackmulti
        )
pipette_multi.start_at_tip(tiprackmulti[0].well(tiprack_multi_startfrom))
pipette_multi.plunger_positions['drop_tip'] = -6


# single channel
if single_pipette_type == 'p50-Single': # this is mostly a type check
    tipracksingle = [
        labware.load(tiprack_single_type, tiprack_slot)
        for tiprack_slot in tiprack_single_slots
        ]
    pipette_single = instruments.P50_Single(
        mount=single_pipette_mount,
        tip_racks=tipracksingle
        )
pipette_single.start_at_tip(tipracksingle[0].well(tiprack_single_startfrom))
pipette_single.plunger_positions['drop_tip'] = -6
# pdb.set_trace()


# container for controls
ctrl_src_container = labware.load(trough_type, trough_slot)
dmso_src_well = ctrl_src_container.wells(DMSO_source_well)
water_src_well = ctrl_src_container.wells(H2O_source_well)


# define library plate
lib_plate = labware.load(library_type, library_slot)
Beispiel #17
0
def run_custom_protocol(pipette_type: StringSelection(
    'p300_Multi', 'p50_Single', 'p300_Single', 'p1000_Single', 'p10_Multi',
    'p50_Multi', 'p10_Single') = 'p300_Multi',
                        pipette_mount: StringSelection('left',
                                                       'right') = 'left',
                        sample_number: int = 24,
                        sample_volume: float = 20,
                        bead_ratio: float = 1.8,
                        elution_buffer_volume: float = 200,
                        incubation_time: float = 1,
                        settling_time: float = 1,
                        drying_time: float = 5):

    total_tips = sample_number * 8
    tiprack_num = total_tips // 96 + (1 if total_tips % 96 > 0 else 0)
    slots = ['3', '5', '6', '7', '8', '9', '10', '11'][:tiprack_num]
    if pipette_type == 'p1000_Single':
        tipracks = [labware.load('tiprack-1000ul', slot) for slot in slots]
        pipette = instruments.P1000_Single(mount=pipette_mount,
                                           tip_racks=tipracks)
    elif pipette_type == 'p300_Single':
        tipracks = [labware.load('tiprack-200ul', slot) for slot in slots]
        pipette = instruments.P300_Single(mount=pipette_mount,
                                          tip_racks=tipracks)
    elif pipette_type == 'p50_Single':
        tipracks = [labware.load('tiprack-200ul', slot) for slot in slots]
        pipette = instruments.P50_Single(mount=pipette_mount,
                                         tip_racks=tipracks)
    elif pipette_type == 'p10_Single':
        tipracks = [labware.load('tiprack-10ul', slot) for slot in slots]
        pipette = instruments.P10_Single(mount=pipette_mount,
                                         tip_racks=tipracks)
    elif pipette_type == 'p10_Multi':
        tipracks = [labware.load('tiprack-10ul', slot) for slot in slots]
        pipette = instruments.P10_Multi(mount=pipette_mount,
                                        tip_racks=tipracks)
    elif pipette_type == 'p50_Multi':
        tipracks = [labware.load('tiprack-200ul', slot) for slot in slots]
        pipette = instruments.P50_Multi(mount=pipette_mount,
                                        tip_racks=tipracks)
    elif pipette_type == 'p300_Multi':
        tipracks = [labware.load('tiprack-200ul', slot) for slot in slots]
        pipette = instruments.P300_Multi(mount=pipette_mount,
                                         tip_racks=tipracks)

    mode = pipette_type.split('_')[1]

    if mode == 'Single':
        if sample_number <= 5:
            reagent_container = labware.load('tube-rack-2ml', '4')
            liquid_waste = labware.load('trough-12row', '5').wells('A12')
        else:
            reagent_container = labware.load('trough-12row', '4')
            liquid_waste = reagent_container.wells('A12')
        samples = [well for well in mag_plate.wells()[:sample_number]]
        output = [well for well in output_plate.wells()[:sample_number]]
    else:
        reagent_container = labware.load('trough-12row', '4')
        liquid_waste = reagent_container.wells('A12')
        col_num = sample_number // 8 + (1 if sample_number % 8 > 0 else 0)
        samples = [col for col in mag_plate.cols()[:col_num]]
        output = [col for col in output_plate.cols()[:col_num]]

    # Define reagents and liquid waste
    beads = reagent_container.wells(0)
    ethanol = reagent_container.wells(1)
    elution_buffer = reagent_container.wells(2)

    # Define bead and mix volume
    bead_volume = sample_volume * bead_ratio
    if bead_volume / 2 > pipette.max_volume:
        mix_vol = pipette.max_volume
    else:
        mix_vol = bead_volume / 2
    total_vol = bead_volume + sample_volume + 5

    # Mix beads and PCR samples
    for target in samples:
        pipette.pick_up_tip()
        pipette.mix(5, mix_vol, beads)
        pipette.transfer(bead_volume, beads, target, new_tip='never')
        pipette.mix(10, mix_vol, target)
        pipette.blow_out()
        pipette.drop_tip()

    # Incubate beads and PCR product at RT for 5 minutes
    pipette.delay(minutes=incubation_time)

    # Engagae MagDeck and incubate
    mag_deck.engage()
    pipette.delay(minutes=settling_time)

    # Remove supernatant from magnetic beads
    pipette.set_flow_rate(aspirate=25, dispense=150)
    for target in samples:
        pipette.transfer(total_vol, target, liquid_waste, blow_out=True)

    # Wash beads twice with 70% ethanol
    air_vol = pipette.max_volume * 0.1
    for cycle in range(2):
        for target in samples:
            pipette.transfer(200,
                             ethanol,
                             target,
                             air_gap=air_vol,
                             new_tip='once')
        pipette.delay(minutes=1)
        for target in samples:
            pipette.transfer(200, target, liquid_waste, air_gap=air_vol)

    # Dry at RT
    pipette.delay(minutes=drying_time)

    # Disengage MagDeck
    mag_deck.disengage()

    # Mix beads with elution buffer
    if elution_buffer_volume / 2 > pipette.max_volume:
        mix_vol = pipette.max_volume
    else:
        mix_vol = elution_buffer_volume / 2
    for target in samples:
        pipette.pick_up_tip()
        pipette.transfer(elution_buffer_volume,
                         elution_buffer,
                         target,
                         new_tip='never')
        pipette.mix(20, mix_vol, target)
        pipette.drop_tip()

    # Incubate at RT for 3 minutes
    pipette.delay(minutes=5)

    # Engagae MagDeck for 1 minute and remain engaged for DNA elution
    mag_deck.engage()
    pipette.delay(minutes=settling_time)

    # Transfer clean PCR product to a new well
    for target, dest in zip(samples, output):
        pipette.transfer(elution_buffer_volume, target, dest, blow_out=True)
Beispiel #18
0
def run_custom_protocol(pipette_type: StringSelection(
    'p300_Multi', 'p50_Multi', 'p10_Multi', 'p1000_Single', 'p300_Single',
    'p50_Single', 'p10_Single') = 'p300_Multi',
                        pipette_mount: StringSelection('left',
                                                       'right') = 'left',
                        sample_number: int = 16,
                        PCR_volume: float = 20,
                        bead_ratio: float = 1.8,
                        elution_buffer_volume: float = 20):

    incubation_time = 300
    settling_time = 50
    drying_time = 5
    total_tips = sample_number * 8
    tiprack_num = total_tips // 96 + (1 if total_tips % 96 > 0 else 0)
    slots = ['3', '5', '6', '8', '9', '10', '11'][:tiprack_num]

    if pipette_type == 'p1000_Single':
        tipracks = [labware.load('tiprack-1000ul', slot) for slot in slots]
        pipette = instruments.P1000_Single(mount=pipette_mount,
                                           tip_racks=tipracks)

    elif pipette_type == 'p300_Single':
        tipracks = [labware.load('tiprack-200ul', slot) for slot in slots]
        pipette = instruments.P300_Single(mount=pipette_mount,
                                          tip_racks=tipracks)

    elif pipette_type == 'p50_Single':
        tipracks = [labware.load('tiprack-200ul', slot) for slot in slots]
        pipette = instruments.P50_Single(mount=pipette_mount,
                                         tip_racks=tipracks)

    elif pipette_type == 'p10_Single':
        tipracks = [labware.load('tiprack-10ul', slot) for slot in slots]
        pipette = instruments.P10_Single(mount=pipette_mount,
                                         tip_racks=tipracks)

    elif pipette_type == 'p10_Multi':
        tipracks = [labware.load('tiprack-10ul', slot) for slot in slots]
        pipette = instruments.P10_Multi(mount=pipette_mount,
                                        tip_racks=tipracks)

    elif pipette_type == 'p50_Multi':
        tipracks = [labware.load('tiprack-200ul', slot) for slot in slots]
        pipette = instruments.P50_Multi(mount=pipette_mount,
                                        tip_racks=tipracks)

    elif pipette_type == 'p300_Multi':
        tipracks = [labware.load('tiprack-200ul', slot) for slot in slots]
        pipette = instruments.P300_Multi(mount=pipette_mount,
                                         tip_racks=tipracks)

    mode = pipette_type.split('_')[1]
    if mode == 'Single':
        if sample_number <= 5:
            reagent_container = labware.load('opentrons-tuberack-2ml-screwcap',
                                             '7')
            liquid_waste = labware.load('trough-12row', '5').wells('A12')

        else:
            reagent_container = labware.load('trough-12row', '7')
            liquid_waste = reagent_container.wells('A12')
        samples = [well for well in mag_plate.wells()[:sample_number]]
        samples_top = [well.top() for well in samples]
        output = [well for well in output_plate.wells()[:sample_number]]

    else:
        reagent_container = labware.load('trough-12row', '7')
        liquid_waste = reagent_container.wells('A12')
        col_num = sample_number // 8 + (1 if sample_number % 8 > 0 else 0)
        samples = [col for col in mag_plate.cols()[:col_num]]
        samples_top = [well.top() for well in mag_plate.rows(0)[:col_num]]
        output = [col for col in output_plate.cols()[:col_num]]

    # Define reagents and liquid waste
    beads = reagent_container.wells(0)
    ethanol = reagent_container.wells(1)
    elution_buffer = reagent_container.wells(2)

    # Define bead and mix volume to resuspend beads
    bead_volume = PCR_volume * bead_ratio
    if mode == 'Single':
        if bead_volume * sample_number > pipette.max_volume:
            mix_vol = pipette.max_volume
        else:
            mix_vol = bead_volume * sample_number
    else:
        if bead_volume * col_num > pipette.max_volume:
            mix_vol = pipette.max_volume
        else:
            mix_vol = bead_volume * col_num
    total_vol = bead_volume + PCR_volume + 15
    mix_voltarget = PCR_volume + 10

    # Disengage MagDeck
    mag_deck.disengage()

    # Mix Speed
    pipette.set_flow_rate(aspirate=180, dispense=180)

    # Mix beads and PCR samples
    for target in samples:
        pipette.set_flow_rate(aspirate=180, dispense=180)
        pipette.pick_up_tip()
        # Slow down head speed 0.5X for bead handling
        pipette.mix(25, mix_vol, beads)
        max_speed_per_axis = {
            'x': (50),
            'y': (50),
            'z': (50),
            'a': (10),
            'b': (10),
            'c': (10)
        }
        robot.head_speed(combined_speed=max(max_speed_per_axis.values()),
                         **max_speed_per_axis)

        pipette.set_flow_rate(aspirate=10, dispense=10)
        pipette.transfer(bead_volume,
                         beads,
                         target,
                         air_gap=0,
                         new_tip='never')
        pipette.set_flow_rate(aspirate=50, dispense=50)
        pipette.mix(40, mix_voltarget, target)
        pipette.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)

        pipette.drop_tip()

        # Return robot head speed to the defaults for all axes
        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)

    # Incubate beads and PCR product at RT for 5 minutes
    robot.comment("Incubating the beads and PCR products at room temperature \
for 5 minutes. Protocol will resume automatically.")
    pipette.delay(seconds=incubation_time)

    # Engage MagDeck and Magnetize
    robot._driver.run_flag.wait()
    mag_deck.engage()
    robot.comment("Delaying for " + str(settling_time) +
                  " seconds for beads to \
settle.")
    pipette.delay(seconds=settling_time)

    # Remove supernatant from magnetic beads
    pipette.set_flow_rate(aspirate=25, dispense=120)
    for target in samples:
        pipette.transfer(total_vol,
                         target.bottom(0.7),
                         liquid_waste.top(),
                         blow_out=True)

    # Wash beads twice with 70% ethanol

    air_vol = pipette.max_volume * 0.1

    for cycle in range(2):
        pipette.pick_up_tip()
        for target in samples_top:
            pipette.transfer(185,
                             ethanol,
                             target,
                             air_gap=air_vol,
                             new_tip='never')
        robot.comment("Delaying for 17 seconds.")
        pipette.delay(seconds=17)
        for target in samples:
            if not pipette.tip_attached:
                pipette.pick_up_tip()
            pipette.transfer(195,
                             target.bottom(0.7),
                             liquid_waste.top(),
                             air_gap=air_vol,
                             new_tip='never')
            pipette.drop_tip()

    # Dry at RT
    robot.comment("Drying the beads for " + str(drying_time) +
                  " minutes. Protocol \
will resume automatically.")
    pipette.delay(minutes=drying_time)

    # Disengage MagDeck
    robot._driver.run_flag.wait()
    mag_deck.disengage()

    # Mix beads with elution buffer
    if elution_buffer_volume / 2 > pipette.max_volume:
        mix_vol = pipette.max_volume
    else:
        mix_vol = elution_buffer_volume / 2
    for target in samples:
        pipette.pick_up_tip()
        pipette.transfer(elution_buffer_volume,
                         elution_buffer,
                         target,
                         new_tip='never')
        pipette.mix(45, mix_vol, target)
        pipette.drop_tip()

    # Incubate at RT for 3 minutes
    robot.comment(
        "Incubating at room temperature for 3 minutes. Protocol will \
resume automatically.")
    pipette.delay(minutes=3)

    # Engage MagDeck for 1 minute and remain engaged for DNA elution
    robot._driver.run_flag.wait()
    mag_deck.engage()
    robot.comment("Delaying for " + str(settling_time) +
                  " seconds for beads to \
settle.")
    pipette.delay(seconds=settling_time)

    # Transfer clean PCR product to a new well
    for target, dest in zip(samples, output):
        pipette.transfer(elution_buffer_volume,
                         target.bottom(1),
                         dest.top(),
                         blow_out=True)

    # Disengage MagDeck
    mag_deck.disengage()
Beispiel #19
0
#### LABWARE SETUP ####
elution_plate_DNA = labware.load('96-flat', '3')
trough = labware.load('trough-12row', '2')
RNA_plate = labware.load('96-deep-well', '7')
mag_deck = modules.load('magdeck', '7')
temp_deck = modules.load('tempdeck', '10')
trash_box = labware.load('trash-box', '8')

tipracks_200 = [labware.load('tiprack-200ul', slot)
               for slot in ['4','5','6','11']]



#### PIPETTE SETUP ####
p50 = instruments.P50_Single(
    mount='right',
    tip_racks=tipracks_200)

m300 = instruments.P300_Multi(
    mount='left',
    tip_racks=tipracks_200)

#### REAGENT SETUP
Elution_buffer = trough.wells('A4')

EtOH1 = trough.wells('A5')
EtOH2 = trough.wells('A6')
EtOH3 = trough.wells('A7')
EtOH4 = trough.wells('A8')
Wash = trough.wells('A9')
BufferC = trough.wells('A10')
#Left Mount
if current_pipettes[0] == 300:
    #P300:
    large_pipette = instruments.P300_Single(
        mount="left",
        dispense_flow_rate=P300_dispense_rate,
        tip_racks=[m300rack],
        trash_container=trash)
    large_min_volume = P300_min_volume

if current_pipettes[0] == 50:
    #P50:
    if current_pipettes[0] > current_pipettes[1]:
        large_pipette = instruments.P50_Single(
            mount="left",
            dispense_flow_rate=P50_dispense_rate,
            tip_racks=[m50rack],
            trash_container=trash)
        large_min_volume = P50_min_volume
    else:
        small_pipette = instruments.P50_Single(
            mount="left",
            dispense_flow_rate=P50_dispense_rate,
            tip_racks=[m50rack],
            trash_container=trash)

if current_pipettes[0] == 10:
    #P10:
    small_pipette = instruments.P10_Single(
        mount="left",
        dispense_flow_rate=P10_dispense_rate,
Beispiel #21
0
# Labware and module initialization

if "eppendorf_rack" not in labware.list():
    labware.create("eppendorf_rack",
                   grid=(12, 8),
                   spacing=(9, 9),
                   diameter=5,
                   depth=21,
                   volume=50)

plate = labware.load('eppendorf_rack', slot='8')
tiprack = labware.load('opentrons-tiprack-300ul', slot='6')
ninja = NinjaPCR(slot='10', simulating=robot.is_simulating())

primer_well = 'A2'
mm_well = 'B2'
dna_well = 'C2'
water_well = 'D2'

first_mix = 'A1'
second_mix = 'B1'
third_mix = 'C1'

pipette_l = instruments.P50_Single(mount='left', tip_racks=[tiprack])

args = [
    plate, pipette_l, tiprack, ninja, primer_well, mm_well, dna_well,
    water_well, first_mix, second_mix, third_mix
]
pcr(*args)
Beispiel #22
0
def run_custom_protocol(
        pipette_type: 'StringSelection...' = 'p300-Single',
        pipette_mount: 'StringSelection...' = 'right',
        dye_labware_type: 'StringSelection...' = 'trough-12row',
        tip_start_from: 'StringSelection...' = 'A1'):

    if pipette_mount == 'left' or pipette_mount == 'l':
        mount_position = 'left'
    elif pipette_mount == 'right' or pipette_mount == 'r':
        mount_position = 'right'
    else:
        raise Exception(
            "You can only mount the pipette on the 'left' or 'right' mount")

    if pipette_type == 'p300-Single':
        tiprack = labware.load('tiprack-200ul', '1')
        pipette = instruments.P300_Single(mount=mount_position,
                                          tip_racks=[tiprack])
    elif pipette_type == 'p50-Single':
        tiprack = labware.load('tiprack-200ul', '1')
        pipette = instruments.P50_Single(mount=mount_position,
                                         tip_racks=[tiprack])
    elif pipette_type == 'p10-Single':
        tiprack = labware.load('tiprack-10ul', '1')
        pipette = instruments.P10_Single(mount=mount_position,
                                         tip_racks=[tiprack])

    if dye_labware_type == 'trough-12row':
        dye_container = labware.load('trough-12row', '2')
    elif dye_labware_type == '6-well-plate':
        dye_container = labware.load('6-well-plate', '2')
    else:
        dye_container = labware.load('tube-rack-2ml', '2')

    output = labware.load('96-flat', '3')

    # Well Location set-up
    pink_wells = [
        'A3', 'A4', 'A5', 'A7', 'A8', 'A9', 'B2', 'B6', 'B10', 'C1', 'C11',
        'D1', 'D11', 'E2', 'E10', 'F3', 'F4', 'F8', 'F9', 'G5', 'G7', 'H6'
    ]

    light_pink_wells = [
        'A2', 'A6', 'A10', 'B1', 'B11', 'C12', 'D12', 'E1', 'E11', 'F2', 'F10',
        'G3', 'G4', 'G8', 'G9', 'H5', 'H7'
    ]

    blue_wells = [
        'C3', 'C4', 'C5', 'C8', 'C9', 'D5', 'D7', 'D8', 'E5', 'E6', 'E7'
    ]

    light_blue_wells = ['D3']

    water = dye_container.wells('A1')
    pink_dye = dye_container.wells('A2')
    blue_dye = dye_container.wells('A3')

    pipette.start_at_tip(tiprack.well(tip_start_from))
    # put water first
    pipette.transfer(30,
                     water,
                     output.wells(light_pink_wells + light_blue_wells),
                     new_tip='once')
    # pink
    pipette.pick_up_tip()
    pipette.transfer(50,
                     pink_dye,
                     output.wells(pink_wells),
                     new_tip='never',
                     trash=False)
    wells_for_lighter_pink = [
        well.top(-3) for well in output.wells(light_pink_wells)
    ]
    pipette.transfer(20,
                     pink_dye,
                     wells_for_lighter_pink,
                     new_tip='never',
                     touch_tip=True,
                     trash=False)
    print(pipette.current_tip())

    # mixing step
    for well_to_mix in light_pink_wells:
        pipette.mix(4, 10, output.wells(well_to_mix))
    pipette.drop_tip()
    print(pipette.current_tip())

    # blue
    pipette.pick_up_tip()
    pipette.transfer(50,
                     blue_dye,
                     output.wells(blue_wells),
                     new_tip='never',
                     trash='False')
    pipette.transfer(20,
                     blue_dye,
                     output.wells(light_blue_wells).top(-3),
                     new_tip='never',
                     touch_tip=True,
                     trash=False)
    print(pipette.current_tip())

    # mixing step
    pipette.mix(4, 10, output.wells(light_blue_wells))

    pipette.drop_tip()
    print(pipette.current_tip())
Beispiel #23
0
# sets up labware and the layout of the experiment
m300rack_1 = containers.load('tiprack-200ul', '10', share='True')
m300rack_2 = containers.load('tiprack-200ul', '11', share='True')
stock_wells = []
slot_plate_wells = ['4', '5']
for slot in slot_plate_wells:
    stock_wells.append(containers.load('plate_6_well', slot, share='True'))
stock_wells.append(containers.load('96-flat', '6', share='True'))
tube_rack = []
slots_tube_rack = ['1', '2', '3']
for slot in slots_tube_rack:
    tube_rack.append(containers.load('4x6_Tube_rack', slot, share='True'))

# instantiates pipettes
p50 = instruments.P50_Single(mount="right",
                             tip_racks=[m300rack_1],
                             aspirate_flow_rate=P50_ASPIRATE,
                             dispense_flow_rate=P50_DISPENSERATE)
p300 = instruments.P300_Single(mount="left",
                               tip_racks=[m300rack_2],
                               aspirate_flow_rate=P300_ASPIRATERATE,
                               dispense_flow_rate=P300_DISPENSERATE)

p50.transfer(100, stock_wells[0].wells('A1'), tube_rack[0].wells('A1'))
p300.transfer(100, stock_wells[1].wells('A1'), tube_rack[1].wells('A1'))
p300.transfer(100, stock_wells[2].wells('A1'), tube_rack[2].wells('A1'))
"""
# Uncomment for working on system
for stock_index, component in enumerate(header[0]):
	for aliquot_index, volume in enumerate(df[:, stock_index]):
		# logic for tube rack
		aliquot_rem = aliquot_index % 24
Beispiel #24
0
def run_custom_protocol(
        well_volume: float = 50.0,
        reagent_well: StringSelection('A1', 'A2', 'A3', 'A4', 'A5', 'A6', 'A7',
                                      'A8', 'A9', 'A10', 'A11', 'A12') = 'A1',
        plate_starting_column: str = '1',
        number_of_columns_to_fill: int = 24,
        pipette_type: StringSelection('p300-Single', 'p50-Single',
                                      'p10-Single', 'p300-Multi', 'p50-Multi',
                                      'p10-Multi') = 'p50-Multi',
        mix_reagent_before_transfer: StringSelection('True',
                                                     'False') = 'True'):

    if int(plate_starting_column) <= 0 or int(plate_starting_column) > 24:
        raise Exception("Plate starting column number must be 1-24.")
    if (int(plate_starting_column) + number_of_columns_to_fill) > 25:
        raise Exception("Number of columns to fill exceeds plate's limit.")

    if mix_reagent_before_transfer == 'False':
        mix_times = 0
    else:
        mix_times = 5

    pip_name = pipette_type.split('-')  # Check which pipette type

    if pip_name[0] == 'p10':
        tiprack = labware.load('tiprack-10ul', '1', 'p10rack')
    else:
        tiprack = labware.load('opentrons-tiprack-300ul', '1', 'p300rack')

    if pip_name[0] != 'p10' and well_volume < 5:
        raise Exception("Cannot transfer volume this small without p10.")
    if pip_name[0] == 'p30' and well_volume < 30:
        raise Exception("Cannot transfer volume this small with p300.")

    if pipette_type == 'p300-Single':
        pipette = instruments.P300_Single(mount='left', tip_racks=[tiprack])
    elif pipette_type == 'p50-Single':
        pipette = instruments.P50_Single(mount='left', tip_racks=[tiprack])
    elif pipette_type == 'p10-Single':
        pipette = instruments.P10_Single(mount='left', tip_racks=[tiprack])
    elif pipette_type == 'p300-Multi':
        pipette = instruments.P300_Multi(mount='left', tip_racks=[tiprack])
    elif pipette_type == 'p50-Multi':
        pipette = instruments.P50_Multi(mount='left', tip_racks=[tiprack])
    elif pipette_type == 'p10-Multi':
        pipette = instruments.P10_Multi(mount='left', tip_racks=[tiprack])

    if pip_name[1] == 'Multi':
        alternating_wells = []
        for column in plate.cols(plate_starting_column, to='24'):
            alternating_wells.append(column.wells('A'))
            alternating_wells.append(column.wells('B'))
        dests = alternating_wells[:number_of_columns_to_fill * 2]
    else:
        dests = plate.cols(plate_starting_column,
                           length=number_of_columns_to_fill)

    pipette.distribute(well_volume,
                       trough.wells(reagent_well),
                       dests,
                       mix_before=(mix_times, pipette.max_volume))
plate_2 = labware.load('96-flat', '2')
plate_3 = labware.load('96-flat', '4')
plate_4 = labware.load('96-flat', '5')
plate_5 = labware.load('96-flat', '7')
plate_6 = labware.load('96-flat', '8')
"""
All four pipettes are loaded into the program, however the app will only
see pipettes that are currently being used.
"""

if pipette_type == 'p300_single':
    pip = instruments.P300_Single(mount=mount, tip_racks=[tiprack1, tiprack2])
elif pipette_type == 'p10_single':
    pip = instruments.P10_Single(mount=mount, tip_racks=[tiprack1, tiprack2])
elif pipette_type == 'p50_single':
    pip = instruments.P50_Single(mount=mount, tip_racks=[tiprack1, tiprack2])
else:
    raise ValueError("Incorrect pipette type.")

plates = [plate_1, plate_2, plate_3, plate_4, plate_5, plate_6]

volumes = [
    VOLUME_ONE, VOLUME_TWO, VOLUME_THREE, VOLUME_FOUR, VOLUME_FIVE, VOLUME_SIX
]
"""
Helper functions
"""


def pre_wet(vol, well):
    pip.aspirate(vol, well)
def run_custom_protocol(
        pipette_type: 'StringSelection...' = 'p300-Single',
        source_labware_type: 'StringSelection...' = 'tube-rack-80well'):

    # Labware set-up
    if pipette_type == 'p300-Single':
        tiprack = labware.load('tiprack-200ul', '1')
        pipette = instruments.P300_Single(mount='right', tip_racks=[tiprack])
    elif pipette_type == 'p50-Single':
        tiprack = labware.load('tiprack-200ul', '1')
        pipette = instruments.P50_Single(mount='right', tip_racks=[tiprack])
    elif pipette_type == 'p10-Single':
        tiprack = labware.load('tiprack-10ul', '1')
        pipette = instruments.P10_Single(mount='right', tip_racks=[tiprack])

    source = labware.load(
        source_labware_type,
        '4')  # Labware for stuff we're sucking in (tube-rack-80well)
    plate = labware.load('96-flat',
                         '3')  # Labware for stuff we're spitting out
    liquid_waste = labware.load('trash-box', '9')  # Liquid waste box

    # Step 1: Add 100 uL of  PBS into wells A2, B2, C2, D2... A12, B12, C12, D12
    # NOTE: Our source of PBS is distributed across wells A1, A2, A3, and A4 in the source labware
    pipette.pick_up_tip()
    pbs_source_list = [
        source.wells('A1'),
        source.wells('A2'),
        source.wells('A3'),
        source.wells('A4')
    ]
    pbs_src_index = 0
    ul_pbs_elapsed = 0
    pbs_source = pbs_source_list[pbs_src_index]
    for row in plate.rows('A', to='D'):
        for i in range(1, 12):
            if ul_pbs_elapsed == 1200:
                pbs_src_index += 1
                ul_pbs_elapsed = 0
            pbs_source = pbs_source_list[pbs_src_index]
            pipette.aspirate(100, pbs_source)
            ul_pbs_elapsed += 100
            pipette.dispense(100, row[i])
    pipette.drop_tip()

    # Step 2: Add 200uL of fluorescein 1x stock solution into A1, B1, C1, D1
    fluorescein_source = source.wells('A5')
    destination_range = plate.wells('A1', 'B1', 'C1', 'D1')
    pipette.transfer(200, fluorescein_source, destination_range)

    # Step 3: Transfer 100 ul of fluorescein stock solution from A1 into A2, for A, B, C, D
    pipette.transfer(100, plate.wells('A1'), plate.wells('A2'))
    pipette.transfer(100, plate.wells('B1'), plate.wells('B2'))
    pipette.transfer(100, plate.wells('C1'), plate.wells('C2'))
    pipette.transfer(100, plate.wells('D1'), plate.wells('D2'))

    # Step 4: Mixing A2 - A11 and A11 into waste, for rows A - D
    for row in plate.rows('A', to='D'):
        pipette.pick_up_tip()
        for i in range(1, 11):
            #pipette.pick_up_tip()
            pipette.mix(3, 100, row[i])
            pipette.aspirate(100, row[i])
            if i < 10:
                pipette.dispense(100, row[i + 1])
            else:
                pipette.dispense(100, liquid_waste)
        pipette.drop_tip()

    # Debug
    for c in robot.commands():
        print(c)
from opentrons import labware, instruments, modules

metadata = {
    'protocolName': 'SPRI bead cleanups',
    'author': 'James Kitson',
}

magdeck = modules.load('magdeck', '7')
tips50 = labware.load('tiprack-starlab-S1120-2810', '1')
pipette = instruments.P50_Single(mount='left', tip_racks=[tips50])
plate = labware.load('starlab-E1403-5200', '7', share=True)
plate2 = labware.load('starlab-E1403-5200', '9')

pipette.pick_up_tip()

pipette.transfer(10, plate2['A1'], plate2['A2'])
pipette.transfer(10, plate2['A1'], plate['A2'])

magdeck.engage(height=18)
pipette.delay(5)
magdeck.disengage()

magdeck.engage(height=16)
pipette.delay(5)
magdeck.disengage()

magdeck.engage(height=17)
pipette.delay(10)
magdeck.disengage()

magdeck.engage(height=18)
Beispiel #28
0
#num_chips = int(input('Number of chips to coat (1,2 or 3)'))

# labware
if 'ax_6' not in locals():
    ax_6 = labware.load('ax6_5', '6')
if 'tiprack' not in locals():
    tiprack = labware.load('opentrons-tiprack-300ul', '1')
if 'ep_rack' not in locals():
    ep_rack = labware.load(
        'opentrons_24_tuberack_eppendorf_2ml_safelock_snapcap', '4')

# pipettes
if 'pipette_300' not in locals():
    pipette_300 = instruments.P300_Single(mount='left', tip_racks=[tiprack])
if 'pipette_50' not in locals():
    pipette_50 = instruments.P50_Single(mount='right', tip_racks=[tiprack])

wells = [
    "A1", "B1", "C1", "D1", "E1", "F1", "A2", "B2", "C2", "D2", "E2", "F2",
    "A3", "B3", "C3", "D3", "E3", "F3"
]

#Keeping sanity on tips
piwells = [
    "A1", "B1", "C1", "D1", "E1", "F1", "G1", "H1", "A2", "B2", "C2", "D2",
    "E2", "F2", "G2", "H2", "A3", "B3", "C3", "D3", "E3", "F3", "G3", "H3",
    "A4", "B4", "C4", "D4", "E4", "F4", "G4", "H4", "A5", "B5", "C5", "D5",
    "E5", "F5", "G5", "H5", "A6", "B6", "C6", "D6", "E6", "F6", "G6", "H6",
    "A7", "B7", "C7", "D7", "E7", "F7", "G7", "H7", "A8", "B8", "C8", "D8",
    "E8", "F8", "G8", "H8", "A9", "B9", "C9", "D9", "E9", "F9", "G9", "H9",
    "A10", "B10", "C10", "D10", "E10", "F10", "G10", "H10", "A11", "B11",
Beispiel #29
0
    pipette_drugs = instruments.P10_Single(
        mount=drugs_pipette_mount,
        tip_racks=tiprackdrugs
        )
pipette_drugs.start_at_tip(tiprackdrugs[0].well(tiprack_drugs_startfrom))
pipette_drugs.plunger_positions['drop_tip'] = -6


# single channel
if solvent_pipette_type == 'p50-Single': # this is mostly a type check
    tipracksolvent = [
        labware.load(tiprack_solvent_type, tiprack_slot)
        for tiprack_slot in tiprack_solvent_slots
        ]
    pipette_solvent = instruments.P50_Single(
        mount=solvent_pipette_mount,
        tip_racks=tipracksolvent
        )
pipette_solvent.start_at_tip(tipracksolvent[0].well(tiprack_solvent_startfrom))
pipette_solvent.plunger_positions['drop_tip'] = -6
# pdb.set_trace()


# container for controls
ctrl_src_container = labware.load(trough_type, trough_slot)
dmso_src_well = ctrl_src_container.wells(DMSO_source_well)
water_src_well = ctrl_src_container.wells(H2O_source_well)

# define library plate
lib_plate = labware.load(library_type, library_slot)

# define destination for controls:
]
tiprack_p300s = [
    labware.load(tiprack_type, slot_p300s) for slot_p300s in ['9']
]
rxn_plate = labware.load('384-corning-3702BC', '8')
nitrilase_samples = labware.load('opentrons-aluminum-block-2ml-eppendorf',
                                 '10',
                                 share=True)
reagent_rack = labware.load('opentrons-tuberack-15_50ml', '11')
substrate_rack = labware.load('opentrons-tuberack-2ml-eppendorf', '7')
ammonium_chloride = labware.load('opentrons-tuberack-15ml', '4')
liquid_trash = reagent_rack.wells('C1')
liquid_trash_2 = reagent_rack.wells('C2')

# instruments
p50s = instruments.P50_Single(mount="right", tip_racks=tiprack_p50s)
if tiprack_type == 'tiprack-200ul-VWR':
    p300s = instruments.P300_Single(mount="left",
                                    tip_racks=tiprack_p300s,
                                    min_volume=10,
                                    max_volume=200)
elif tiprack_type == 'opentrons-tiprack-300ul':
    p300s = instruments.P300_Single(mount="left",
                                    tip_racks=tiprack_p300s,
                                    min_volume=30,
                                    max_volume=300)


# protocol
def run_custom_protocol(phosphate_buffer_volume: float = 100,
                        water_volume: float = 100,