Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
number_of_samples: int = 96,
p10_multi_mount: StringSelection('right', 'left') = 'right',
p50_multi_mount: StringSelection('left', 'right') = 'left',
dual_index: StringSelection('yes', 'no') = 'yes',
reagent_starting_column: int = 1
):
# checks
if number_of_samples > 96 or number_of_samples < 1:
raise Exception('Invalid number of samples')
if p10_multi_mount == p50_multi_mount:
raise Exception('Invalid pipette mount combination')
if reagent_starting_column > 7:
raise Exception('Invlaid reagent starting column')
# pipettes
m10 = instruments.P10_Multi(mount=p10_multi_mount, tip_racks=tips10)
m50 = instruments.P50_Multi(mount=p50_multi_mount, tip_racks=tips50)
# reagent setup
[fs2e1, fs1, rs, ss1, ss2e2, pcre3] = [
reagent_plate.rows('A')[ind]
for ind in range(reagent_starting_column-1, reagent_starting_column+5)
]
[pb, eb, ps] = [trough.wells(ind) for ind in range(3)]
etoh = [chan for chan in trough.wells('A4', length=4)]
etoh_waste = [chan for chan in trough.wells('A8', length=4)]
# sample setup
num_cols = math.ceil(number_of_samples/8)
samples_TM = plate_TM.rows('A')[:num_cols]
samples_2 = plate_2.rows('A')[:num_cols]
samples_mag = magplate.rows('A')[:num_cols]
for slot in slots]
pipette = instruments.P50_Single(
mount=pipette_axis,
tip_racks=tipracks)
elif pipette_type == 'p10_Single':
tipracks = [labware.load('opentrons_96_tiprack_10ul ', slot)
for slot in slots]
pipette = instruments.P10_Single(
mount=pipette_axis,
tip_racks=tipracks)
elif pipette_type == 'p10_Multi':
tipracks = [labware.load('opentrons_96_tiprack_10ul ', slot)
for slot in slots]
pipette = instruments.P10_Multi(
mount=pipette_axis,
tip_racks=tipracks)
elif pipette_type == 'p50_Multi':
tipracks = [labware.load('opentrons_96_tiprack_300ul', slot)
for slot in slots]
pipette = instruments.P50_Multi(
mount=pipette_axis,
tip_racks=tipracks)
elif pipette_type == 'p300_Multi':
tipracks = [labware.load('opentrons_96_tiprack_300ul', slot)
for slot in slots]
pipette = instruments.P300_Multi(
mount=pipette_axis,
tip_racks=tipracks)
diameter=5.5,
depth=20.75)
# labware setup
pcr_plate = labware.load(pcr_plate_name, '1')
trough = labware.load('trough-12row', '2')
trough2 = labware.load('trough-12row', '3')
mag_plate = labware.load(mag_plate_name, '4')
tipracks_m10 = [labware.load('tiprack-10ul', slot)
for slot in ['10', '11']]
tipracks_m300 = [labware.load('tiprack-200ul', slot)
for slot in ['5', '6', '7', '8', '9']]
# pipette setup
m10 = instruments.P10_Multi(
mount='left',
tip_racks=tipracks_m10)
m300 = instruments.P300_Multi(
mount='right',
tip_racks=tipracks_m300)
# reagent setup
oligo_beads = trough.wells('A1')
ethanol = trough.wells('A2')
TE_buffer = trough.wells('A3')
m300_tip_count = 0
m10_tip_count = 0
pcr_loc = [col for col in pcr_plate.cols()]
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)
elif pipette_type == 'p10-Multi':
pipette = instruments.P10_Multi(
mount='left',
tip_racks=tiprack)
elif pipette_type == 'p10-Single':
pipette = instruments.P10_Single(
mount='left',
tip_racks=tiprack)
new_tip = 'never' if tip_use_strategy == 'use one tip' else 'always'
transfer_volume = total_mixing_volume/dilution_factor
buffer_volume = total_mixing_volume - transfer_volume
tip_max = 12*len(tiprack) if pip_name == 'Multi' else 96*len(tiprack)
tip_count = 0
def pick_up():
tiprack_p10 = labware.load('tiprack-10ul', '4')
tiprack_p300_1 = labware.load('tiprack-200ul', '3')
tiprack_p300_2 = labware.load('tiprack-200ul', '5')
tiprack_p300_3 = labware.load('tiprack-200ul', '6')
tiprack_p300_4 = labware.load('tiprack-200ul', '7')
tiprack_p300_5 = labware.load('tiprack-200ul', '8')
tiprack_p300_6 = labware.load('tiprack-200ul', '9')
liquid_trash = labware.load('point', '10')
# variables and reagents setup
water = trough.well('A1') # location of water in trough
fbs = trough.well('A8') # location of fbs in trough
np = trough.well('A9') # location of nanoparticles in trough
# instrument setup
m10 = instruments.P10_Multi(
mount='left',
tip_racks=[tiprack_p10]
)
m300 = instruments.P300_Multi(
mount='right',
tip_racks=[tiprack_p300_1, tiprack_p300_2, tiprack_p300_3, tiprack_p300_4,
tiprack_p300_5, tiprack_p300_6]
)
def check_trough_volume(water_vol):
global water
# upper limit of liquid volume in trough is max_volume - 1 mL
trough_vol = water.max_volume()-1000
if water_vol > trough_vol:
num_sample_cols = math.ceil(number_of_samples/8)
rxn_samples = rxn_plate.rows('A')[:num_sample_cols]
elution_samples = elution_plate.rows('A')[:num_sample_cols]
# pipettes
tips300 = [labware.load('opentrons_96_tiprack_300ul', slot)
for slot in ['4', '5', '6', '7']]
tips10 = [labware.load('opentrons_96_tiprack_10ul', slot)
for slot in ['8', '9', '10', '11']]
m300 = instruments.P300_Multi(
mount=p300_mount,
tip_racks=tips300
)
m10 = instruments.P10_Multi(
mount=p10_mount,
tip_racks=tips10
)
tip10_count = 0
tip300_count = 0
tip10_max = len(tips10)*12
tip300_max = len(tips300)*12
def pick_up(pip):
nonlocal tip10_count
nonlocal tip300_count
if pip == m10:
if tip10_count == tip10_max:
robot.pause('Replace 10ul tipracks before resuming.')
grid=(12, 8),
spacing=(9, 9),
diameter=6.3,
depth=10.8,
volume=350
)
# load labware
trough = labware.load('trough-12row', '1')
PCR_plate = labware.load(PCR_plate_name, '2')
flat_plate = labware.load(flat_plate_name, '3')
tips10 = labware.load('tiprack-10ul', '7')
tips300 = labware.load('opentrons-tiprack-300ul', '8')
# pipettes
m10 = instruments.P10_Multi(mount='right', tip_racks=[tips10])
m300 = instruments.P300_Multi(mount='left', tip_racks=[tips300])
# reagent setup
solution = trough.wells('A8')
# transfer working solution to flat plate
m300.distribute(75, solution, [well.top() for well in flat_plate.rows('A')])
# transfer DNA from PCR plate to corresponding well of flat plate
for source_col, dest_col in zip(PCR_plate.columns('2', to='12'),
flat_plate.columns('2', to='12')):
source = source_col[0]
dest = dest_col[0]
m10.pick_up_tip()
m10.transfer(3, source, dest, blow_out=True, new_tip='never')
# labware setup
plate_1 = labware.load(plate_name, '1')
plate_2 = labware.load(plate_name, '2')
for plate in [plate_1, plate_2]:
for well in plate.wells():
well.properties['height'] = 11.6
trough = labware.load('trough-12row', '4')
tipracks_10 = [labware.load('tiprack-10ul', slot)
for slot in ['3', '5', '7', '8']]
tiprack_50 = labware.load('opentrons-tiprack-300ul', '6')
# instrument setup
m10 = instruments.P10_Multi(
mount='left',
tip_racks=tipracks_10)
m50 = instruments.P50_Multi(
mount='right',
tip_racks=[tiprack_50])
# reagent setup
DMSO = trough.wells('A1')
buff = trough.wells('A2')
protein = trough.wells('A3')
substrate = trough.wells('A4')
# add DMSO to column 2-16
m50.distribute(
10,
"""
tiprack = labware.load('tiprack-10ul', '2')
"""
C
"""
plate_48 = labware.load('48-well-plate', '3', share=True)
plate_96 = labware.load('96-flat', '3', share=True)
p10single = instruments.P10_Single(
mount='right',
tip_racks=[tiprack])
p10multi = instruments.P10_Multi(
mount='left',
tip_racks=[tiprack])
def run_custom_protocol(plate_size: int=96):
if plate_size == 96:
plate = plate_96
pipette = p10multi
else:
plate = plate_48
pipette = p10single
pipette.transfer(
5,
plate.cols(),
output.cols(),
number_of_samples: int = 96,
p10_multi_mount: StringSelection('right', 'left') = 'right',
p50_multi_mount: StringSelection('left', 'right') = 'left',
dual_index: StringSelection('yes', 'no') = 'yes',
reagent_starting_column: int = 1
):
# checks
if number_of_samples > 96 or number_of_samples < 1:
raise Exception('Invalid number of samples')
if p10_multi_mount == p50_multi_mount:
raise Exception('Invalid pipette mount combination')
if reagent_starting_column > 7:
raise Exception('Invlaid reagent starting column')
# pipettes
m10 = instruments.P10_Multi(mount=p10_multi_mount, tip_racks=tips10)
m50 = instruments.P50_Multi(mount=p50_multi_mount, tip_racks=tips50)
# reagent setup
[fs2e1, fs1, rs, ss1, ss2e2, pcre3] = [
reagent_plate.rows('A')[ind]
for ind in range(reagent_starting_column-1, reagent_starting_column+5)
]
[pb, eb, ps] = [trough.wells(ind) for ind in range(3)]
etoh = [chan for chan in trough.wells('A4', length=4)]
etoh_waste = [chan for chan in trough.wells('A8', length=4)]
liquid_waste = trough.wells('A12')
# sample setup
num_cols = math.ceil(number_of_samples/8)
samples_TM = plate_TM.rows('A')[:num_cols]
samples_2 = plate_2.rows('A')[:num_cols]