Esempio n. 1
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)
Esempio n. 2
0
async def test_instrument_reuse(async_server, async_client, monkeypatch):
    hw = async_server['com.opentrons.hardware']

    # With no pipette connected before homing pipettes, we should a) not crash
    # and b) not have any instruments connected afterwards

    test_data = {
        'target': 'pipette',
        'mount': 'left'
    }

    res = await async_client.post('/robot/home', json=test_data)
    assert res.status == 200

    res = await async_client.get('/pipettes')
    data = await res.json()
    assert data['left']['model'] is None

    # If we do have a pipette connected, if we home we should still have it
    # connected afterwards
    test_model = 'p300_multi_v1'
    if async_server['api_version'] == 1:

        def dummy_read_model(mount):
            return test_model

        monkeypatch.setattr(hw._driver, 'read_pipette_model', dummy_read_model)
        instruments.P300_Multi('left')
    else:
        hw._backend._attached_instruments = {
            types.Mount.RIGHT: {'model': test_model, 'id': 'dummy-id'},
            types.Mount.LEFT: {'model': test_model, 'id': 'dummy-id'}
        }

    res = await async_client.get('/pipettes',
                                 params=[('refresh', 'true')])
    data = await res.json()
    assert data['left']['model'] == test_model

    res = await async_client.post('/robot/home', json=test_data)
    assert res.status == 200

    res = await async_client.get('/pipettes')
    data = await res.json()

    assert data['left']['model'] == test_model
Esempio n. 3
0
 def mount_pipette(pipette_type, mount, tiprack_slot):
     if pipette_type == 'p10-multi':
         tip_rack = [
             labware.load('tiprack-10ul', slot) for slot in tiprack_slot
         ]
         pipette = instruments.P10_Multi(mount=mount, tip_racks=tip_rack)
     elif pipette_type == 'p50-multi':
         tip_rack = [
             labware.load('opentrons-tiprack-300ul', slot)
             for slot in tiprack_slot
         ]
         pipette = instruments.P50_Multi(mount=mount, tip_racks=tip_rack)
     else:
         tip_rack = [
             labware.load('opentrons-tiprack-300ul', slot)
             for slot in tiprack_slot
         ]
         pipette = instruments.P300_Multi(mount=mount, tip_racks=tip_rack)
     return pipette
Esempio n. 4
0
def test_drop_tip_in_trash(virtual_smoothie_env, monkeypatch):
    from opentrons import robot, labware
    from opentrons.legacy_api.instruments.pipette import Pipette
    robot.reset()
    robot.home()
    tiprack = labware.load('tiprack-200ul', '1')
    p300 = instruments.P300_Multi(mount='left', tip_racks=[tiprack])
    p300.pick_up_tip()

    movelog = []
    move_fn = Pipette.move_to

    def log_move(self, location, strategy=None):
        movelog.append(location)
        move_fn(self, location, strategy)

    monkeypatch.setattr(Pipette, "move_to", log_move)

    p300.drop_tip()

    base_obj = movelog[0][0]
    y_offset = movelog[0][1][1]
    assert base_obj == robot.fixed_trash[0]
    assert y_offset == 111.5
tiprack_type = 'tiprack-200ul-VWR'
rxn_plate = labware.load('384-corning-3702BC', '8')
tiprack_p300m = [labware.load(tiprack_type, slot_p300m)
               for slot_p300m in ['9']]
tiprack_p50m = [labware.load(tiprack_type, slot_p50m)
               for slot_p50m in ['10','7','4','1']]
reagent_trough = labware.load('trough-12row','11')

# instruments
p50m = instruments.P50_Multi(
    mount="right",
    tip_racks=tiprack_p50m)
if tiprack_type == 'tiprack-200ul-VWR':
    p300m = instruments.P300_Multi(
        mount="left",
        tip_racks=tiprack_p300m,
        min_volume=10,
        max_volume=200)
elif tiprack_type == 'opentrons-tiprack-300ul':
    p300m = instruments.P300_Multi(
        mount="left",
        tip_racks=tiprack_p300m,
        min_volume=30,
        max_volume=300)

def run_custom_protocol(
        transfer_volume_nitrilase: float=10,
        transfer_volume_substrate: float=1,
        transfer_volume_OPA_DMSO: float=36,
        transfer_volume_TCA: float=7.5,
        transfer_volume_DMSO: float=35.5):
    'James Kitson <*****@*****.**>',
    'description':
    'A simple test protocol that checks I can pipette into the same target well on multiple plates'
}

# Set labware to use
trough = labware.load('starlab-E2310-1200', '1')
#tubes = labware.load('opentrons-tuberack-2ml-eppendorf')
tips300 = labware.load('opentrons-tiprack-300ul', '2')
tips10 = labware.load('tiprack-starlab-S1181-3810', '3')
PCR1 = labware.load('starlab-E1403-5200', '4')
PCR2 = labware.load('starlab-E1403-5200', '5')
forward_primer = labware.load('starlab-E1403-0100', '10')

# set pipettes
pipette300 = instruments.P300_Multi(mount='left', tip_racks=[tips300])
pipette10 = instruments.P10_Multi(mount='right', tip_racks=[tips10])

# Define where the mastermix to be distributed is - this version is for bulk setup
master_mix = trough.wells('A3')

# Define where the mastermix to be distributed is - this version is for a single plate with a single channel
#master_mix = tubes.wells('A1')

# List the target plates
dest_plates = [PCR1, PCR2]

# Get a list of all the pipetting locations on every plate in dest_plates
all_dests = [well for plate in dest_plates for well in plate.rows('A')]

# dispence the PCR mastermix across both plates
Esempio n. 7
0
#### LABWARE SETUP ####
trough = labware.load('trough-12row', '9')
RNA_plate = labware.load('1ml_PCR', '1')
mag_deck = modules.load('magdeck', '7')
sample_plate = labware.load('1ml_magPCR', '7', share=True)

tipracks_200_1 = labware.load('tiprack-200ul', '4', share=True)
tipracks_200_2 = labware.load('tiprack-200ul', '5', share=True)
tipracks_200_3 = labware.load('tiprack-200ul', '6', share=True)

#### PIPETTE SETUP ####
m300 = instruments.P300_Multi(
    mount='right',
    min_volume=25,
    max_volume=200,
    aspirate_flow_rate=100,
    dispense_flow_rate=200,
    tip_racks=[tipracks_200_1, tipracks_200_2, tipracks_200_3])

#### REAGENT SETUP
Binding_buffer1 = trough.wells('A1')
Binding_buffer2 = trough.wells('A2')  # Buffer B			# Buffer B
EtOH_Bind1 = trough.wells('A3')
EtOH_Bind2 = trough.wells('A4')
BufferC_1 = trough.wells('A10')
BufferC_2 = trough.wells('A11')

#### Plate SETUP
SA1 = sample_plate.wells('A1')
SA2 = sample_plate.wells('A2')
Esempio n. 8
0
tips = [
    labware.load('opentrons-tiprack-300ul', str(slot))
    for slot in range(4, 10)
]
print('-' * 50)
print('Make sure the `tips` make sense!')
print(tips)
print('-' * 50)

# modules
magdeck = modules.load('magdeck', '1')
sample_plate = labware.load(plate_name, '1', share=True)

# instruments
m300 = instruments.P300_Multi(mount='right', tip_racks=tips)

# reagent setup

for reagent_name in reagents:
    reagents[reagent_name]['setup'] = trough.wells('A1')

#lysis_buffer = trough.wells('A1')
# isopropanol = trough.wells('A2')
# magnetic_bead = trough.wells('A3')   # e.g, silica-coated magnetic beads (BOMB protocol #2.1, 1:10 diluted from stock)
# ethanol_80percent = trough.wells('A4')
# dnaseI_reaction_mix = trough.wells('A5')  # enzyme that removes DNA
# rna_binding_buffer = trough.wells('A6')
# nuclease_free_water = trough.wells('A7')
# liquid_waste = trough.wells('A12')  #  elusion waste
from opentrons import instruments, labware

# trough and 384-well plate
trough = labware.load('trough-12row', '4', 'trough')
plate = labware.load('384-plate', '2', 'plate')

# 8-channel 10uL pipette, with tip rack and trash
tiprack = labware.load('tiprack-200ul', '1', 'p200rack')

m200 = instruments.P300_Multi(
    mount='left',
    tip_racks=[tiprack],
)


def run_custom_protocol(well_volume: float = 30.0):
    alternating_wells = []
    for column in plate.columns():
        alternating_wells.append(column.wells('A', length=8, step=2))
        alternating_wells.append(column.wells('B', length=8, step=2))

    m200.distribute(well_volume, trough.wells('A1'), alternating_wells)
#pipetting dead volumes
small_aspiration_extra = 10  #ul
large_aspiration_extra = 50  #ul

#temporary variable to hold the current reaction volume
reaction_volume = sample_volume

#reagent IDs
end_mix = enzrack.wells('A1').bottom()
lig_mix = enzrack.wells('A2').bottom()

#pipettor(s)
p300 = instruments.P300_Multi(mount='left',
                              tip_racks=[p200rack3, p200rack4],
                              aspirate_flow_rate=60,
                              dispense_flow_rate=60,
                              min_volume=20)


#Mix sequentially reducing height offset by 2mm
def steppedmix(reps, vol, loc):
    p300.set_flow_rate(aspirate=100, dispense=150)
    p300.mix(reps, vol, loc.bottom(4))
    p300.mix(reps, vol, loc.bottom(2))
    p300.mix(reps, vol, loc.bottom())
    p300.set_flow_rate(aspirate=60, dispense=60)


#TEMPORARY DEF: fix robot gantry speed reset after home() (pending fix from Opentrons)
def gantrydefault():
Esempio n. 11
0
    'protocolName': 'Plate Filling',
    'author': 'Maciej Holowko <*****@*****.**>',
    }

#trough = labware.create(
#        '12_well_through_lp',                    # name of you labware
#        grid=(1, 12),                    # specify amount of (columns, rows)
#        spacing=(1, 14),               # distances (mm) between each (column, row)
#        diameter=7,                     # diameter (mm) of each well on the plate
#        depth=10,                       # depth (mm) of each well on the plate
#        volume=2000)


# trough and 384-well plate
trough = labware.load('12_well_through_lp', '3', 'trough')
plate = labware.load('384-plate', '2', 'plate')

# 8-channel 10uL pipette, with tip rack and trash
tiprack = labware.load('tiprack-200ul', '1', 'p200rack')

pipette = instruments.P300_Multi(mount='left',tip_racks=[tiprack])

alternating_wells = []
for column in plate.cols():
    alternating_wells.append(column.wells('A', length=8, step=2))
    alternating_wells.append(column.wells('B', length=8, step=2))
        
pipette.distribute(3.8, trough.wells('A1'), alternating_wells,trash=False)


Esempio n. 12
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()
Esempio n. 13
0
from opentrons import containers, instruments

trough = containers.load('trough-12row', '3', 'trough')
plate = containers.load('96-deep-well', '2', 'plate')
tubes = containers.load('tube-rack-2ml', '8', 'tubes')

multirack = containers.load('tiprack-200ul', '1', 'p300rack')
singlerack = containers.load('tiprack-200ul', '4', 'p300rack')

m300 = instruments.P300_Multi(mount="left", tip_racks=[multirack])

p300 = instruments.P300_Single(
    mount="right",
    tip_racks=[singlerack],
)


def run_custom_protocol(sample_volume: float = 30, buffer_volume: float = 30):
    if sample_volume < 30:
        raise ValueError("Pipette only aspirates 30ul and above")
    if buffer_volume < 30:
        raise ValueError("Pipette only aspirates 30ul and above")
    # Transfer buffer to all wells, except row 1 on plate.
    m300.distribute(buffer_volume, trough['A1'], plate.columns('2', to='12'))

    # Transfer 8 tube samples to row 1 on plate, and mix.
    p300.transfer(
        sample_volume * 2,
        tubes.wells('A1', to='D2'),
        plate.columns('1'),
        new_tip='always',
Esempio n. 14
0
bead_plate = labware.load('96-PCR-flat', '4', 'bead_plate')
spin_plate = labware.load('96-PCR-flat', '5', 'spin_plate')
collection1mL_1 = labware.load('96-PCR-flat', '6', 'collection1mL_1')
collection1mL_2 = labware.load('96-PCR-flat', '7', 'collection1mL_2')
collection1mL_3 = labware.load('96-PCR-flat', '8', 'collection1mL_3')
collection1mL_4 = labware.load('96-PCR-flat', '9', 'collection1mL_4')
collection2mL_1 = labware.load('96-PCR-flat', '10', 'collection2mL_1')

trough = labware.load('trough-12row', '11', 'trough')

m300rack1 = labware.load('tiprack-200ul', '1', 'm300rack1')
m300rack2 = labware.load('tiprack-200ul', '2', 'm300rack2')
m300rack3 = labware.load('tiprack-200ul', '3', 'm300rack3')

m300 = instruments.P300_Multi(
    tip_racks=[m300rack1, m300rack2, m300rack3],
    mount='left',
)

ethanol = trough.cols('1')
bead_solution = trough.cols('2')
C1 = trough.cols('3')
C2 = trough.cols('4')
C3 = trough.cols('5')
C4 = trough.cols('6')
C5_D = trough.cols('7')
C6 = trough.cols('8')

supernatantvol = 100

# VACUUM & CENTRIFUGATION:
def run_custom_protocol(
    pipette_type: StringSelection('p300-Single', 'p300-Multi', 'p50-Single',
                                  'p50-Multi') = 'p300-Multi',
    dilution_factor: float = 1.5,
    num_of_dilutions: int = 10,
    total_mixing_volume: float = 200.0,
    tip_use_strategy: StringSelection('use one tip',
                                      'new tip each time') = 'use one tip'):

    pip_name = pipette_type.split('-')[1]

    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 == '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)

    new_tip = 'never' if tip_use_strategy == 'use one tip' else 'always'

    transfer_volume = total_mixing_volume / dilution_factor
    diluent_volume = total_mixing_volume - transfer_volume

    if pip_name == 'Multi':

        # Distribute diluent across the plate to the the number of samples
        # And add diluent to one column after the number of samples for a blank
        pipette.distribute(diluent_volume, trough['A1'],
                           plate.cols('2', length=(num_of_dilutions)))

        # Dilution of samples across the 96-well flat bottom plate
        pipette.pick_up_tip(presses=3, increment=1)

        pipette.transfer(transfer_volume,
                         plate.columns('1', to=(num_of_dilutions - 1)),
                         plate.columns('2', to=num_of_dilutions),
                         mix_after=(3, total_mixing_volume / 2),
                         new_tip=new_tip)

        # Remove transfer volume from the last column of the dilution
        pipette.transfer(transfer_volume,
                         plate.columns(num_of_dilutions),
                         liquid_trash,
                         new_tip=new_tip)

        if new_tip == 'never':
            pipette.drop_tip()

    else:
        # Distribute diluent across the plate to the the number of samples
        # And add diluent to one column after the number of samples for a blank
        for col in plate.cols('2', length=(num_of_dilutions)):
            pipette.distribute(diluent_volume, trough['A1'], col)

        for row in plate.rows():
            if new_tip == 'never':
                pipette.pick_up_tip()

            pipette.transfer(transfer_volume,
                             row.wells('1', to=(num_of_dilutions - 1)),
                             row.wells('2', to=(num_of_dilutions)),
                             mix_after=(3, total_mixing_volume / 2),
                             new_tip=new_tip)

            pipette.transfer(transfer_volume,
                             row.wells(num_of_dilutions),
                             liquid_trash,
                             new_tip=new_tip)

            if new_tip == 'never':
                pipette.drop_tip()
                              share=True)
temp_deck.set_temperature(10)

# Load in 1 10ul tiprack and 2 300ul tipracks
tr_10 = [labware.load('opentrons_96_tiprack_10ul',
                      '3')]  #, labware.load('opentrons_96_tiprack_10ul', '6')]
tr_300 = [
    labware.load('opentrons_96_tiprack_300ul', '6'),
    labware.load('opentrons_96_tiprack_300ul', '9')
]
#for i in range(0, 1):
#   tr_300.append(labware.load('tipone_96_tiprack_200ul', '9'))

# Load in pipettes
p10_single = instruments.P10_Single(mount='right', tip_racks=tr_10)
p300_multi = instruments.P300_Multi(mount='left', tip_racks=tr_300)
''' Need to provide the instructions for loading reagent'''
reagents_plate = labware.load('biorad_96_wellplate_200ul_pcr', '4',
                              'Reagents Plate')
ligase = reagents_plate.wells('H12')  #MoClo
restriction_enzyme = reagents_plate.wells('G12')  #MoClo
buffer = reagents_plate.wells('F12')  # MoClo
'''
	This deck slot location is dedicated for the reaction plate after MoClo protocol is completed, so at the beginning of the protocol there isn't an actual plate existing in this slot location.
	'''
post_moclo_reaction_plate = labware.load('biorad_96_wellplate_200ul_pcr', '7',
                                         'Post-MoClo Reaction Plate')

# Load in water, SOC, and wash trough (USA Scientific 12 Well Reservoir 22ml)
trough = labware.load('usascientific_12_reservoir_22ml', '5',
                      'Reagents trough')
Esempio n. 17
0
from opentrons import labware, instruments

metadata = {
    'protocolName': 'SybrGreen 1 setup',
    'author': 'James Kitson <*****@*****.**>',
    'description':
    'A protocol to dilute DNA controls and distribute Sybr Green 1'
}

# Set labware to use
tips300 = labware.load('opentrons-tiprack-1000ul', '9',
                       'for SybrGreen and DNA dilutions')
tips10_1 = labware.load('opentrons-tiprack-10ul', '2', 'for primers')
tips10_2 = labware.load('opentrons-tiprack-10ul', '3', 'for template DNA')
Control_plate = labware.load('Thermo-237108', '4', 'lambda DNA controls')
test_DNA = labware.load('Thermo-237108', '5', 'template DNA plate')

tubes = labware.load('opentrons-tuberack-50ml', '6', 'Sybr Green 1 in A1')
trough = labware.load('starlab-E2896-0220', '7', 'Control dilutions')

pipette300 = instruments.P300_Multi(mount='left')
pipette10 = instruments.P10_Multi(mount='right',
                                  tip_racks=[tips10_1, tips10_2])

pipette300.pick_up_tip(tips300.wells('H1'))
pipette300.transfer(100, trough.wells('A1'), test_DNA.wells('A1'))

pipette300.pick_up_tip(tips300.wells('F2'))
pipette300.transfer(100, trough.wells('A1'), test_DNA.wells('B1'))
Esempio n. 18
0
tempdeck = modules.load("tempdeck", master_settings['Temp_module']["Position"])
hotplate = labware.load("opentrons_24_aluminumblock_generic_2ml_screwcap",
                        master_settings['Temp_module']["Position"],
                        share=True)
sample_plate = labware.load("4ti-0960_FrameStar",
                            master_settings["Plate"]["Position"])

p10_tip_rack = labware.load("opentrons_96_tiprack_10ul",
                            master_settings["P10_single"]["Rack"])
P10 = instruments.P10_Single(mount=master_settings["P10_single"]["Mount"],
                             tip_racks=[p10_tip_rack])
P10.start_at_tip(p10_tip_rack.well(P10_first_tip))

p300_tip_rack = labware.load("opentrons_96_tiprack_300ul",
                             master_settings["P300_multi"]["Rack"])
P300 = instruments.P300_Multi(mount=master_settings["P300_multi"]["Mount"],
                              tip_racks=[p300_tip_rack])
P300.start_at_tip(p300_tip_rack.cols(P300_tip_column))

# Main:
LB_vols = [target_vol * OD / target_OD for OD in sample_ODs]
tempdeck.set_temperature(37)
tempdeck.wait_for_temp()
robot.comment("Insert sample plate into position: " +
              master_settings["Plate"]["Position"])
robot.pause()
# Resuspend cells:
P300.pick_up_tip()
P300.mix(10, 100, sample_plate.cols(0).bottom(1))
P300.return_tip()
# Pipette LB and passage:
for i in range(len(sample_ODs)):
Esempio n. 19
0
def load_deck(deck_plan='default', **kwarg):
    """
    load deck_plan. create global variables for loaded labwares.
    createa global variable deck_plan_: dictionary, slot number '1'/'2' : labware variable
    can use deck_plan_['1'] to refer to labware loaded on the deck.

    current deck plans:
    1).default : 1/3:elisa strip; 2:trough; 4:15-50ml rack; 5:ep rack; 9:trash"
    2).default-1ml-plate 1.1mlPPplate 3:elisa strip; 2:trough; 4:15-50ml rack; 5:ep rack; 9:trash"
    2).default-5ml : 1/3:elisa strip; 2:trough; *4:5ml-50ml rack*; 5:ep rack; 9:trash"
    3).default-mag : *1:magnet*; 2:trough; 3:elisa strip; 4:15-50ml rack; 5:ep rack; 9:trash'
    """

    if deck_plan == 'default':
        global trough, liquid_trash, tip_rack, single_tip_rack, elisa_strip, ep_rack, tube_rack, multi_pipette, single_pipette, elisa_strip_2
        initialize(**kwarg)
        elisa_strip_2 = labware.load('elisa_strip', '1')
        trough = labware.load('trough-12row', '2')
        liquid_trash = labware.load('trough-12row', '9')
        tip_rack = [labware.load('tiprack-200ul', slot) for slot in ['7', '8']]
        single_tip_rack = [
            labware.load('tiprack-200ul', slot) for slot in ['10', '11']
        ]
        elisa_strip = labware.load('elisa_strip', '3')
        ep_rack = labware.load('tube-rack-eppendorf', '5')
        tube_rack = labware.load('tube-rack-15_50ml_apt', '4')
        deck_plan_.update([('5', ep_rack), ('4', tube_rack),
                           ('1', elisa_strip_2), ('2', trough),
                           ('3', elisa_strip), ('9', liquid_trash)])
        multi_pipette = instruments.P300_Multi(mount='left',
                                               tip_racks=tip_rack)
        single_pipette = instruments.P300_Single(mount='right',
                                                 tip_racks=single_tip_rack)
    elif deck_plan == 'default-1ml-plate':
        initialize(**kwarg)
        pp_plate = labware.load('ams_1ml_pp_plate', '1')
        trough = labware.load('trough-12row', '2')
        liquid_trash = labware.load('trough-12row', '9')
        tip_rack = [labware.load('tiprack-200ul', slot) for slot in ['7', '8']]
        single_tip_rack = [
            labware.load('tiprack-200ul', slot) for slot in ['10', '11']
        ]
        elisa_strip = labware.load('elisa_strip', '3')
        ep_rack = labware.load('tube-rack-eppendorf', '5')
        tube_rack = labware.load('tube-rack-15_50ml_apt', '4')
        deck_plan_.update([('5', ep_rack), ('4', tube_rack), ('1', pp_plate),
                           ('2', trough), ('3', elisa_strip),
                           ('9', liquid_trash)])
        multi_pipette = instruments.P300_Multi(mount='left',
                                               tip_racks=tip_rack)
        single_pipette = instruments.P300_Single(mount='right',
                                                 tip_racks=single_tip_rack)
    elif deck_plan == 'default-mag':
        kwarg['magnet'] = True
        initialize(**kwarg)
        global mag_deck, mag_plate
        mag_deck = modules.load('magdeck', '1')
        mag_plate = labware.load('pp_plate_mag', '1', share=True)
        trough = labware.load('trough-12row', '2')
        liquid_trash = labware.load('trough-12row', '9')
        tip_rack = [labware.load('tiprack-200ul', slot) for slot in ['7', '8']]
        single_tip_rack = [
            labware.load('tiprack-200ul', slot) for slot in ['10', '11']
        ]
        elisa_strip = labware.load('elisa_strip', '3')
        ep_rack = labware.load('tube-rack-eppendorf', '5')
        tube_rack = labware.load('tube-rack-15_50ml_apt', '4')
        deck_plan_.update([('5', ep_rack), ('4', tube_rack), ('1', mag_plate),
                           ('2', trough), ('3', elisa_strip),
                           ('9', liquid_trash)])
        multi_pipette = instruments.P300_Multi(mount='left',
                                               tip_racks=tip_rack)
        single_pipette = instruments.P300_Single(mount='right',
                                                 tip_racks=single_tip_rack)
    elif deck_plan == 'default-5ml':
        initialize(**kwarg)
        elisa_strip_2 = labware.load('elisa_strip', '1')
        trough = labware.load('trough-12row', '2')
        liquid_trash = labware.load('trough-12row', '9')
        tip_rack = [labware.load('tiprack-200ul', slot) for slot in ['7', '8']]
        single_tip_rack = [
            labware.load('tiprack-200ul', slot) for slot in ['10', '11']
        ]
        elisa_strip = labware.load('elisa_strip', '3')
        ep_rack = labware.load('tube-rack-eppendorf', '5')
        tube_rack = labware.load('ep_5ml_tube_rack', '4')
        deck_plan_.update([('5', ep_rack), ('4', tube_rack),
                           ('1', elisa_strip_2), ('2', trough),
                           ('3', elisa_strip), ('9', liquid_trash)])
        multi_pipette = instruments.P300_Multi(mount='left',
                                               tip_racks=tip_rack)
        single_pipette = instruments.P300_Single(mount='right',
                                                 tip_racks=single_tip_rack)

    else:
        pass
Esempio n. 20
0
reagents = containers.load('tube-rack-.75ml', '6')

# 96 well plates
flat_plate = containers.load('96-PCR-flat', '2')
deep_plate = containers.load('96-deep-well', '5')

# tip rack for p10 and p50 pipette
tip200_rack = containers.load('tiprack-200ul', '1')
tip200_rack2 = containers.load('tiprack-200ul', '4')
tip200_rack3 = containers.load('tiprack-200ul', '7')

# p200 (20 - 200 uL) (single)
p200single = instruments.P300_Single(mount='right', tip_racks=[tip200_rack])

# p300 (50 - 300 uL) (multi)
p300multi = instruments.P300_Multi(mount='left',
                                   tip_racks=[tip200_rack2, tip200_rack3])

# medium in trough
medium = trough['A1']

# Add 180 uL of medium from trough/basin to first column of deep 96 well plate.
p300multi.transfer(180, medium, deep_plate.columns('1'))

# Add 450 uL of medium from trough/basin to the next 3 columns (2-4)
# of the same deep 96 well plate.
p300multi.distribute(450,
                     medium,
                     deep_plate.columns('2', length=3),
                     new_tip='once')

# Remove 20 uL from the first 8 tubes in a 0.75mL tube rack
Esempio n. 21
0
TUBE_RACK_TYPE = 'tube-rack_E1415-1500'
TUBE_RACK_SLOT = '11'
SPOTTING_WASTE_WELL = 'A1'
AGAR_PLATE_TYPE = 'Nunc_Omnitray'
AGAR_PLATE_SLOT = '1'

# Tiprack slots
p10_p300_tiprack_slots = tiprack_slots(spotting_tuples)
p10_slots = CANDIDATE_P10_SLOTS[:p10_p300_tiprack_slots[0]]
p300_slots = CANDIDATE_P300_SLOTS[:p10_p300_tiprack_slots[1]]

# Define labware
p10_tipracks = [labware.load(P10_TIPRACK_TYPE, slot) for slot in p10_slots]
p300_tipracks = [labware.load(P300_TIPRACK_TYPE, slot) for slot in p300_slots]
p10_pipette = instruments.P10_Single(mount=P10_MOUNT, tip_racks=p10_tipracks)
p300_pipette = instruments.P300_Multi(mount=P300_MOUNT,
                                      tip_racks=p300_tipracks)

assembly_plate = labware.load(ASSEMBLY_PLATE_TYPE, ASSEMBLY_PLATE_SLOT)
tempdeck = modules.load('tempdeck', TEMPDECK_SLOT)
transformation_plate = labware.load(TRANSFORMATION_PLATE_TYPE,
                                    TEMPDECK_SLOT,
                                    share=True)
soc_plate = labware.load(SOC_PLATE_TYPE, SOC_PLATE_SLOT)
tube_rack = labware.load(TUBE_RACK_TYPE, TUBE_RACK_SLOT)
spotting_waste = tube_rack.wells(SPOTTING_WASTE_WELL)
agar_plate = labware.load(AGAR_PLATE_TYPE, AGAR_PLATE_SLOT)

# Register agar_plate for calibration
p10_pipette.transfer(1,
                     agar_plate.wells('A1'),
                     agar_plate.wells('H12'),
def run_custom_protocol(
        p300_type: 'StringSelection...' = 'single',
        p300_mount: 'StringSelection...' = 'right',
        number_of_samples_to_process: int = 24
):
    # check:
    if number_of_samples_to_process > 96 or number_of_samples_to_process < 1:
        raise Exception('Invalid number of samples to process (must be between \
1 and 96).')

    num_cols = math.ceil(number_of_samples_to_process/8)
    num_300_racks = math.ceil((num_cols*6)/12)
    slots300 = [str(slot) for slot in range(5, 5+num_300_racks)]
    tips300 = [
        labware.load('opentrons_96_tiprack_300ul', slot) for slot in slots300]

    # pipettes
    if p300_type == 'multi':
        pip300 = instruments.P300_Multi(mount=p300_mount, tip_racks=tips300)
        samples300 = mag_plate.rows('A')[:num_cols]
    else:
        pip300 = instruments.P300_Single(mount=p300_mount, tip_racks=tips300)
        samples300 = mag_plate.wells()[:number_of_samples_to_process]
    pip300.set_flow_rate(aspirate=75, dispense=90)

    magdeck.engage(height=18)
    robot.comment('Incubating beads on magnet for 3 minutes.')
    pip300.delay(minutes=3)

    # remove and discard supernatant
    for s in samples300:
        pip300.pick_up_tip()
        pip300.transfer(65, s.bottom(1), liquid_waste[0], new_tip='never')
        pip300.blow_out()
        pip300.drop_tip()

    # TWB washes 3x
    count = 0
    total_twb = 96*3
    for wash in range(3):
        magdeck.disengage()

        # resuspend beads in TWB
        for i, s in enumerate(samples300):
            ind = (count*len(twb))//total_twb
            count += 1

            side = i % 2 if p300_type == 'multi' else math.floor(i/8) % 2
            angle = 0 if side == 0 else math.pi
            disp_loc = (s, s.from_center(r=0.85, h=-0.6, theta=angle))
            pip300.pick_up_tip()
            pip300.aspirate(100, twb[ind])
            pip300.move_to(s.bottom(5))
            pip300.dispense(100, disp_loc)
            pip300.mix(10, 80, disp_loc)
            pip300.drop_tip()

        magdeck.engage(height=18)

        if wash < 2:
            robot.comment('Incubating beads on magnet for 3 minutes')
            pip300.delay(minutes=3)
            # remove and discard supernatant
            for s in samples300:
                pip300.pick_up_tip()
                pip300.transfer(
                    120, s.bottom(1), liquid_waste[wash], new_tip='never')
                pip300.blow_out()
                pip300.drop_tip()

    robot.comment('Seal the plate, and keep on the magnetic module. The TWB \
remains in the wells to prevent overdrying of the beads')
Esempio n. 23
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)
Esempio n. 24
0
        custom_plate_name,  	# name of you labware
        grid=(12, 8),       	# number of (columns, rows)
        spacing=(9, 9),         # distances (mm) between each (column, row)
        diameter=8.24,      	# x dimension of well ** crude hack to tell API that it is a round well since x-size throws error **
#       y-size=8.24,	      	# y dimension of well
        depth=24.63,            # depth (mm) of each well
        volume=1200)        	# volume (µL) of each well

plate = labware.load(custom_plate_name, slot='2')

tiprack = labware.load('opentrons_96_tiprack_300ul', '3')

# pipettes
pipette = instruments.P300_Multi(
    mount='right',
    aspirate_flow_rate=8,
    dispense_flow_rate=8,
    blow_out_flow_rate=16,
    tip_racks=[tiprack])	# *** DO NOT CALL (tiprack) in pipette.pick_up_tip() command *** !!!


# commands

# define variables
tip_air_gap = 40
cycle_delay_time = 2
equilibration_volume = 180
equilibration_final_dispense_addition = 2
capture_volume = 190
capture_final_dispense_addition = 5
wash_volume = 190
wash_final_dispense_addition = 5
Esempio n. 25
0
tiprack4 = labware.load(tip_type, '11', 'Tiprack 4')
dye_trough = labware.load('trough-12row', '3', 'Dye Trough')

plate_1 = labware.load('96-flat', '1')
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_multi':
    pip = instruments.P300_Multi(mount=mount, tip_racks=[tiprack1, tiprack2])
elif pipette_type == 'p10_multi':
    pip = instruments.P10_Multi(mount=mount, tip_racks=[tiprack1, tiprack2])
elif pipette_type == 'p50_multi':
    pip = instruments.P50_Multi(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
"""
Esempio n. 26
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))
sample_volume: float=15
bead_ratio: float=0.8
elution_buffer_volume: float=30
incubation_time: float=5
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]]
trough = labware.load('trough-12row', '2')
liquid_trash = labware.load('trough-12row', '6')

tip_rack = [labware.load('tiprack-200ul', slot) for slot in ['7', '8']]
single_tip_rack = [
    labware.load('tiprack-200ul', slot) for slot in ['10', '11']
]

# need to create a new labware for eppendorf tube, eppendorf_2ml
ep_rack = labware.load('tube-rack-eppendorf', '5')

tube_rack = labware.load('tube-rack-15_50ml_apt', '4')

pcr_strip = labware.load('pcr_strip', '3')

multi_pipette = instruments.P300_Multi(mount='left', tip_racks=tip_rack)

single_pipette = instruments.P300_Single(mount='right',
                                         tip_racks=single_tip_rack)


class Tube_50ml_depth:
    """
    conical tube class, volume stored is in ml.
    """
    def __init__(self, volume):
        if volume[-2:].lower() == 'ul':
            self.volume = float(volume[:-2]) / 1000.0  # in ml
        elif volume[-2:].lower() == 'ml':
            self.volume = float(volume[:-2])
        else:
Esempio n. 29
0
def magbead(sample_number,
            ethanol_well,
            elution_buffer_well,
            sample_volume=30,
            bead_ratio=1.8,
            elution_buffer_volume=40,
            incubation_time=5,
            settling_time=2,
            drying_time=5,
            elution_time=2,
            sample_offset=0,
            tiprack_type="opentrons_96_tiprack_300ul"):
    """Implements magbead purification reactions for BASIC assembly using an opentrons OT-2.

    Selected args:
        ethanol_well (str): well in reagent container containing ethanol.
        elution_buffer_well (str): well in reagent container containing elution buffer.
        sample_offset (int): offset the intial sample column by the specified value.

    """

    # Constants
    PIPETTE_ASPIRATE_RATE = 25
    PIPETTE_DISPENSE_RATE = 150
    TIPS_PER_SAMPLE = 9
    CANDIDATE_TIPRACK_SLOTS = ['3', '6', '9', '2', '5']
    MAGDECK_POSITION = '1'
    MIX_PLATE_TYPE = '4ti-0960_FrameStar'
    MIX_PLATE_POSITION = '4'
    REAGENT_CONTAINER_TYPE = '4ti0131_trough-12'
    REAGENT_CONTAINER_POSITION = '7'
    BEAD_CONTAINER_TYPE = '4ti0136_96_deep-well'
    BEAD_CONTAINER_POSITION = '8'
    LIQUID_WASTE_WELL = 'A12'
    BEADS_WELL = 'A1'
    DEAD_TOTAL_VOL = 5
    SLOW_HEAD_SPEEDS = {
        'x': 600 // 4,
        'y': 400 // 4,
        'z': 125 // 10,
        'a': 125 // 10
    }
    DEFAULT_HEAD_SPEEDS = {'x': 400, 'y': 400, 'z': 125, 'a': 100}
    IMMOBILISE_MIX_REPS = 10
    MAGDECK_HEIGHT = 20
    AIR_VOL_COEFF = 0.1
    ETHANOL_VOL = 150
    WASH_TIME = 0.5
    ETHANOL_DEAD_VOL = 50
    ELUTION_MIX_REPS = 20
    ELUTANT_SEP_TIME = 1
    ELUTION_DEAD_VOL = 2

    # Errors
    if sample_number > 48:
        raise ValueError('sample number cannot exceed 48')

    # Tips and pipette
    total_tips = sample_number * TIPS_PER_SAMPLE
    tiprack_num = total_tips // 96 + (1 if total_tips % 96 > 0 else 0)
    slots = CANDIDATE_TIPRACK_SLOTS[:tiprack_num]
    tipracks = [labware.load(tiprack_type, slot) for slot in slots]
    pipette = instruments.P300_Multi(mount="left",
                                     tip_racks=tipracks,
                                     aspirate_flow_rate=PIPETTE_ASPIRATE_RATE,
                                     dispense_flow_rate=PIPETTE_DISPENSE_RATE)

    # Define labware
    MAGDECK = modules.load('magdeck', MAGDECK_POSITION)
    MAGDECK.disengage()
    mag_plate = labware.load(MIX_PLATE_TYPE, MAGDECK_POSITION, share=True)
    mix_plate = labware.load(MIX_PLATE_TYPE, MIX_PLATE_POSITION)
    reagent_container = labware.load(REAGENT_CONTAINER_TYPE,
                                     REAGENT_CONTAINER_POSITION)
    bead_container = labware.load(BEAD_CONTAINER_TYPE, BEAD_CONTAINER_POSITION)
    col_num = sample_number // 8 + (1 if sample_number % 8 > 0 else 0)
    samples = [
        col
        for col in mag_plate.cols()[0 + sample_offset:col_num + sample_offset]
    ]
    output = [
        col for col in mag_plate.cols()[6 + sample_offset:col_num + 6 +
                                        sample_offset]
    ]
    mixing = [
        col
        for col in mix_plate.cols()[0 + sample_offset:col_num + sample_offset]
    ]

    # Define reagents and liquid waste
    liquid_waste = reagent_container.wells(LIQUID_WASTE_WELL)
    beads = bead_container.wells(BEADS_WELL)
    ethanol = reagent_container.wells(ethanol_well)
    elution_buffer = reagent_container.wells(elution_buffer_well)

    # 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 + DEAD_TOTAL_VOL

    # Mix beads and PCR samples and incubate
    for target in range(int(len(samples))):
        # Aspirate beads
        pipette.pick_up_tip()
        pipette.aspirate(bead_volume, beads)
        robot.head_speed(**SLOW_HEAD_SPEEDS,
                         combined_speed=max(SLOW_HEAD_SPEEDS.values()))

        # Transfer and mix on  mix_plate
        pipette.aspirate(sample_volume + DEAD_TOTAL_VOL, samples[target])
        pipette.dispense(total_vol, mixing[target])
        pipette.mix(IMMOBILISE_MIX_REPS, mix_vol, mixing[target])
        pipette.blow_out()

        # Dispose of tip
        robot.head_speed(**DEFAULT_HEAD_SPEEDS,
                         combined_speed=max(DEFAULT_HEAD_SPEEDS.values()))
        pipette.drop_tip()

    # Immobilise sample
    pipette.delay(minutes=incubation_time)

    # Transfer sample back to magdeck
    for target in range(int(len(samples))):
        pipette.transfer(total_vol,
                         mixing[target],
                         samples[target],
                         blow_out=True)

    # Engagae MagDeck and incubate
    MAGDECK.engage(height=MAGDECK_HEIGHT)
    pipette.delay(minutes=settling_time)

    # Remove supernatant from magnetic beads
    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 * AIR_VOL_COEFF
    for cycle in range(2):
        for target in samples:
            pipette.transfer(ETHANOL_VOL, ethanol, target, air_gap=air_vol)
        pipette.delay(minutes=WASH_TIME)
        for target in samples:
            pipette.transfer(ETHANOL_VOL + ETHANOL_DEAD_VOL,
                             target,
                             liquid_waste,
                             air_gap=air_vol)

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

    # Disengage MagDeck
    MAGDECK.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.transfer(elution_buffer_volume,
                         elution_buffer,
                         target,
                         mix_after=(ELUTION_MIX_REPS, mix_vol))

    # Incubate at RT for "elution_time" minutes
    pipette.delay(minutes=elution_time)

    # Engagae MagDeck for 1 minute and remain engaged for DNA elution
    MAGDECK.engage(height=MAGDECK_HEIGHT)
    pipette.delay(minutes=ELUTANT_SEP_TIME)

    # Transfer clean PCR product to a new well
    for target, dest in zip(samples, output):
        pipette.transfer(elution_buffer_volume - ELUTION_DEAD_VOL,
                         target,
                         dest,
                         blow_out=False)

    # Disengage MagDeck
    MAGDECK.disengage()
Esempio n. 30
0

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

tipracks_1000 = [labware.load('tiprack-1000ul', slot, share=True)
                for slot in ['9']]


#### PIPETTE SETUP ####
s1000 = instruments.P1000_Single(
    mount='right',
    tip_racks=tipracks_1000)

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

#### REAGENT SETUP

Beads = trough.wells('A1')
Elution_buffer = trough.wells('A2')

Liquid_trash = trash_box.wells('A1')


Sample_buffer = buffer.wells('A1')
Ethanol_1 = buffer.wells('A2')
Ethanol_2 = buffer.wells('A3')
Wash_1 = buffer.wells('B2')
Wash_2 = buffer.wells('B3')