Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
p1000_mount: StringSelection('right', 'left') = 'right',
volume_CSV: FileInput = example_csv
):
# pipette
p1000 = instruments.P1000_Single(mount=p1000_mount, tip_racks=tipracks1000)
# parse
volumes = [
float(line.split(',')[0]) for line in volume_CSV.splitlines() if line]
if len(volumes) > 48*9:
raise Exception('Too many volumes (' + str(len(volumes)) + 'for deck.')
# load tube tube racks
num_tuberacks = math.ceil(len(volumes)/48)
tuberacks = [
labware.load(rack_name, slot, 'destination tuberack ' + str(i+1))
for i, slot in enumerate(range(4, 12))][:num_tuberacks]
all_tubes = [tube for rack in tuberacks for tube in rack.wells()]
tip1000_count = 0
tip1000_max = len(tipracks1000)*96
def pick_up():
nonlocal tip1000_count
if tip1000_count == tip1000_max:
robot.pause('Refill 1000ul tipracks before resuming.')
p1000.reset()
tip1000_count = 0
tip1000_count += 1
p1000.pick_up_tip()
# perform dilution transfer
def run_custom_protocol(
sample_num: StringSelection('4', '8', '12', '16')='4'
):
sample_num = int(sample_num)
# labware setup
eppendorf_rack = labware.load('opentrons-tuberack-2ml-eppendorf', '5')
plate = labware.load('PCR-strip-tall', '2')
tiprack_10 = labware.load('tiprack-10ul', '8')
tipracks_300 = [labware.load('opentrons-tiprack-300ul', slot)
for slot in ['3', '6', '9']]
# instruments setup
p10 = instruments.P10_Single(
mount='left',
tip_racks=[tiprack_10])
p50 = instruments.P50_Single(
mount='right',
tip_racks=tipracks_300)
# reagent setup
water = eppendorf_rack.wells('A1')
depth=19,
volume=3600
)
# load labware and modules
tempmod_1 = modules.load('tempdeck', '10')
temp_plate1 = labware.load(plate_name, '10', 'plate 1', share=True)
tempmod_2 = modules.load('tempdeck', '7')
temp_plate2 = labware.load(plate_name, '7', 'plate 2', share=True)
tempmod_3 = modules.load('tempdeck', '4')
temp_plate3 = labware.load(plate_name, '4', 'plate 3', share=True)
tempmod_4 = modules.load('tempdeck', '6')
temp_plate4 = labware.load(plate_name, '6', 'plate 4', share=True)
tips1000 = [labware.load('tiprack-1000ul', slot) for slot in ['5', '11']]
tubes = labware.load('opentrons-tuberack-15_50ml', '8')
waste = labware.load('point', '1')
tempmod1.set_temperature(37)
tempmod2.set_temperature(37)
tempmod3.set_temperature(37)
tempmod4.set_temperature(37)
tempmod4.wait_for_temp()
# reagents
media = [tubes.wells(well) for well in ['A3', 'A4']]
def run_custom_protocol(
pipette_mount: StringSelection('right', 'left') = 'right'
):
# height track function
flat_plate = labware.load('96-flat', '5')
# reagent setup
RNase_A = trough.wells('A1')
solution_II = trough.wells('A2')
N3_buffer = trough.wells('A3')
LC_beads = trough.wells('A4')
ETR_bind_buffer = trough.wells('A5')
Mag_Bind_RQ = trough.wells('A6')
ETR_wash_buffer = trough.wells('A7')
VHB_buffer = trough.wells('A8')
SPM_wash_buffer = trough.wells('A9')
elution_buffer = trough.wells('A10')
# tipracks
tipracks300 = [labware.load('tiprack-200ul', slot)
for slot in ['6', '7', '8', '9', '10']]
tiprack50 = labware.load('tiprack-200ul', '11')
# pipette setup
m300 = instruments.P300_Multi(
mount='left',
tip_racks=tipracks300)
m50 = instruments.P50_Multi(
mount='right',
tip_racks=[tiprack50])
def run_custom_protocol(
elution_buffer_volume: float=50):
if elisa_plate_name not in labware.list():
labware.create(
elisa_plate_name,
grid=(12, 8),
spacing=(9, 9),
diameter=7,
depth=11.3,
volume=350
)
# load labware
elisa_plates = [
labware.load(elisa_plate_name, str(slot), 'elisa plate ' + str(slot))
for slot in range(1, 9)
]
dilution_plate = labware.load(
deep_plate_name, '9', 'dilution plate with tubes')
accessory_tuberack = labware.load(deep_plate_name, '10', 'accessory tuberack')
tips300 = labware.load('opentrons-tiprack-300ul', '11')
# tube setup
accessory_tubes = [tube for tube in accessory_tuberack.columns('1')]
def run_custom_protocol(
p300_single_mount: StringSelection('left', 'right') = 'left',
p300_multi_mount: StringSelection('right', 'left') = 'right'
):
# check
if p300_multi_mount == p300_single_mount:
raise Exception('Input different mount sides for pipettes.')
'phenix-filter-tiprack-300ul')='phenix-filter-tiprack-300ul'):
for tiprack_type in [p10_tiprack_type, p50_tiprack_type]:
if tiprack_type not in labware.list():
labware.create(
tiprack_type,
grid=(12, 8),
spacing=(9, 9),
diameter=5,
depth=60)
# labware setup
plate = labware.load('biorad-hardshell-96-PCR', '1')
mag_module = modules.load('magdeck', '4')
mag_plate = labware.load('biorad-hardshell-96-PCR', '4', share=True)
reagent_tubes = labware.load('96-PCR-tall', '5')
deep_plate = labware.load('96-deep-well', '7')
trough = labware.load('trough-12row', '8')
tipracks_10 = [labware.load(p10_tiprack_type, slot)
for slot in ['10', '11']]
tipracks_50 = [labware.load(p50_tiprack_type, slot)
for slot in ['2', '3', '6', '9']]
# instruments setup
m10 = instruments.P10_Multi(
mount='right',
tip_racks=tipracks_10)
m50 = instruments.P50_Multi(
mount='left',
tip_racks=tipracks_50)
from opentrons import labware, instruments, robot
from otcustomizers import StringSelection
import math
metadata = {
'protocolName': 'QIAseq Targeted DNA Panel for Illumina Instruments Part 4:\
Target enrichment',
'author': 'Nick ',
'source': 'Custom Protocol Request'
}
# load modules and labware
rxn_plate = labware.load(
'opentrons_96_aluminumblock_biorad_wellplate_200ul',
'1',
'reaction plate'
)
reagent_tuberack = labware.load(
'opentrons_24_aluminumblock_generic_2ml_screwcap',
'2',
'reagent tuberack (pre-chilled)'
)
strips = labware.load(
'opentrons_96_aluminumblock_generic_pcr_strip_200ul', '3', 'strips')
tips50_single = labware.load('opentrons_96_tiprack_300ul', '4')
tips_50_multi = [
labware.load('opentrons_96_tiprack_300ul', slot) for slot in ['5', '6']
]
from opentrons import labware, instruments
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')
from opentrons import labware, instruments
# generate custom labware
custom_6_well_plate = 'custom-6-well-plate'
if custom_6_well_plate not in labware.list():
labware.create(
custom_6_well_plate,
grid=(3, 2),
spacing=(40, 38),
diameter=34.9,
depth=65)
# labware setup
stock = labware.load(custom_6_well_plate, '1')
reactor = labware.load(custom_6_well_plate, '2')
tipracks_300 = [labware.load('opentrons-tiprack-300ul', slot)
for slot in ['4', '5']]
# pipette setup
p300 = instruments.P300_Single(
mount='right',
tip_racks=tipracks_300)
for index, reactor in enumerate(reactor.wells()[:3]):
if index < 2:
time = 2
else:
def run_custom_protocol(
p1000_mount: StringSelection('right', 'left') = 'right',
number_of_capsules_to_fill: int = 100,
volume_to_fill_in_ul: float = 200
):
# check
if volume_to_fill_in_ul < 100:
raise Exception('Invalid volume for P1000 pipette')
# load capsule plates
slots = ['4', '10'] if number_of_capsules_to_fill > 100 else ['4']
capsule_racks = [
labware.load(capsule_rack_name, slot, 'capsules') for slot in slots]
# pipette
p1000 = instruments.P1000_Single(mount=p1000_mount, tip_racks=[tips1000])
p1000.set_flow_rate(aspirate=100)
max_vol = oil.properties['total-liquid-volume']*0.9
total_vol = 0
x = 108.00
y = 72.00
h = -10
def height_track():
nonlocal h
dh = (volume_to_fill_in_ul/(x*y))+0.01
h = h - dh if h - dh > -37 else -37