Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
tube_name = 'qiagen_96_tuberack_collection_1.2ml_round'
if tube_name not in labware.list():
labware.create(
tube_name,
grid=(12, 8),
spacing=(9, 9),
diameter=7,
depth=45,
volume=1200
)
# load modules and labware
strip_rack = labware.load(tube_name, '1', 'collection strip tubes (racked)')
res = labware.load(res_name, '2', 'reagent reservoir')
magdeck = modules.load('magdeck', '4')
mag_plate = labware.load(
deep_name, '4', 'deepwell plate on magdeck', share=True)
slots300 = ['6', '7']
tips300 = [
labware.load('opentrons_96_tiprack_300ul', slot) for slot in slots300]
def run_custom_protocol(
p300_multi_mount: StringSelection('right', 'left') = 'right',
number_of_samples: int = 96,
volume_of_lysate_to_transfer_in_ul: float = 500
):
# checks
if number_of_samples > 96 or number_of_samples < 1:
raise Exception('Invalid sample number (must be in [1, 96])')
volume=2000
)
strips_name = 'Greiner-Sapphire-PCR-strips'
if strips_name not in labware.list():
labware.create(
strips_name,
grid=(12, 8),
spacing=(9, 9),
diameter=5.7,
depth=20.2,
volume=200
)
# load modules and labware
magdeck = modules.load('magdeck', '1')
mag_plate = labware.load(deepwell_name, '1', share=True)
pcr_plate = labware.load(deepwell_name, '2', 'original PCR plate')
strips = labware.load(strips_name, '3', 'reagent strips')
trough = labware.load('trough-12row', '4')
tips10 = labware.load(tips10_name, '5')
tips300 = [labware.load(tips300_name, slot) for slot in ['6', '7', '8', '9']]
# pipettes
m10 = instruments.P10_Multi(mount='right', tip_racks=[tips10])
m300 = instruments.P300_Multi(mount='left', tip_racks=tips300)
# reagents
beads = strips.wells('A1')
propanol = trough.wells('A1')
etoh = trough.wells('A2')
eb = trough.wells('A3')
'source': 'Custom Protocol Request'
}
pcr_plate_name = 'framestar-break-way-96-pcr-plate-low-profile'
if pcr_plate_name not in labware.list():
labware.create(
pcr_plate_name,
grid=(12, 9),
spacing=(9, 9),
diameter=5.5,
depth=15.1,
volume=200)
# labware setup
reg_plate = labware.load(pcr_plate_name, '1')
mag_module = modules.load('magdeck', '4')
mag_plate = labware.load(pcr_plate_name, '4', share=True)
tuberack = labware.load('opentrons-tuberack-1.5ml-eppendorf', '5')
trough = labware.load('trough-12row', '7')
tiprack_50 = labware.load('opentrons-tiprack-300ul', '2')
tipracks_300 = [labware.load('opentrons-tiprack-300ul', slot)
for slot in ['3', '6', '8', '9', '10', '11']]
# instrument setup
p50 = instruments.P50_Single(
mount='left',
tip_racks=[tiprack_50])
m300 = instruments.P300_Multi(
mount='right',
tip_racks=tipracks_300)
'protocolName': 'Swift Biosciences Swift 25 Turbo NGS Library Prep',
'author': 'Nick ',
'source': 'Custom Protocol Request'
}
# load modules and labware
magdeck = modules.load('magdeck', '1')
mag_plate = labware.load('biorad_96_wellplate_200ul_pcr', '1', share=True)
elution_plate = labware.load(
'biorad_96_wellplate_200ul_pcr', '2', 'elution plate')
reagent_rack = labware.load(
'opentrons_24_aluminumblock_generic_2ml_screwcap',
'3',
'reagent tuberack (for mastermixes)'
)
tempdeck = modules.load('tempdeck', '4')
temp_plate = labware.load(
'biorad_96_wellplate_200ul_pcr',
'4',
'temperature module plate',
share=True
)
reagent_res = labware.load(
'usascientific_12_reservoir_22ml', '5', 'reagent reservoir')
tempdeck.set_temperature(4)
tempdeck.wait_for_temp()
tips10 = [
labware.load('opentrons_96_tiprack_10ul', slot)
for slot in ['6', '7', '8']
]
tips300 = [
labware.load('opentrons_96_tiprack_300ul', slot)
from opentrons import labware, instruments, modules, robot
from otcustomizers import StringSelection
import math
metadata = {
'protocolName': 'Custom Omega Biotek Mag-Bind Protocol',
'author': 'Nick ',
'source': 'Custom Protocol Request'
}
mag_deck = modules.load('magdeck', '10')
mag_plate = labware.load('usascientific_96_wellplate_2.4ml_deep',
'10', share=True)
reagent_container = labware.load('usascientific_12_reservoir_22ml', '7')
def run_custom_protocol(
sample_number: int = 48,
total_vol: float = 280,
incubation_time_in_seconds: int = 30,
settling_time_in_seconds: int = 120,
ETR_Wash_Vol_in_ul: float = 50,
wash_vol_in_ul: float = 400,
bead_volume_in_ul: float = 145,
ethanol_vol_in_ul: float = 182,
pipette_type: StringSelection(
'p300_Multi', 'p300_Single', 'p50_Multi',
from opentrons import labware, instruments, modules, robot
from otcustomizers import StringSelection
import math
metadata = {
'protocolName': 'Nextera DNA Flex NGS Library Prep: Post Tagmentation \
Cleanup',
'author': 'Nick ',
'source': 'Custom Protocol Request'
}
# load labware and modules
magdeck = modules.load('magdeck', '1')
mag_plate = labware.load(
'biorad_96_wellplate_200ul_pcr', '1', 'tagmentation rxn plate', share=True)
res12 = labware.load(
'usascientific_12_reservoir_22ml', '3', 'reagent reservoir')
twb = [chan.bottom(5) for chan in res12.wells()[:2]]
liquid_waste = [chan.top() for chan in res12.wells('A11', length=2)]
def run_custom_protocol(
p300_type: StringSelection('single', 'multi') = 'single',
p300_mount: StringSelection('right', 'left') = 'right',
number_of_samples_to_process: int = 24
):
# check:
if number_of_samples_to_process > 96 or number_of_samples_to_process < 1:
# create custom plate
plate_name = 'Cellvis-24-flat'
if plate_name not in labware.list():
labware.create(
plate_name,
grid=(6, 4),
spacing=(19.3, 19.3),
diameter=16.2,
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
from opentrons import instruments, labware, modules
# labware setup
temp_deck = modules.load('tempdeck', '1')
plate_96 = labware.load('opentrons-aluminum-block-96-PCR-plate',
'1', share=True)
plate_384 = labware.load('384-plate', '2')
tuberack = labware.load('tube-rack-2ml', '3')
source_tubes = tuberack.wells(0, length=8)
tiprack_10ul = labware.load('tiprack-10ul', '5')
tiprack_300ul = labware.load('opentrons-tiprack-300ul', '4')
tiprack2_300ul = labware.load('opentrons-tiprack-300ul', '6')
tiprack3_300ul = labware.load('opentrons-tiprack-300ul', '7')
# pipette setup
m10 = instruments.P10_Multi(
mount='right',
tip_racks=[tiprack_10ul]
)
from otcustomizers import FileInput
# create custom labware
tuberack_name = 'custom-pyrotube-rack'
if tuberack_name not in labware.list():
labware.create(
tuberack_name,
grid=(6, 4),
spacing=(20, 20),
diameter=11.8,
depth=75)
# labware setup
flow_tuberacks = [labware.load(tuberack_name, slot)
for slot in ['1', '2', '3', '5']]
temp_deck = modules.load('tempdeck', '4')
plate = labware.load('96-flat', '4', share=True)
trough = labware.load('trough-12row', '7')
tuberack = labware.load('opentrons-tuberack-2ml-screwcap', '8')
tiprack_10 = labware.load('tiprack-10ul', '6')
tiprack_300 = [labware.load('opentrons-tiprack-300ul', slot)
for slot in ['9', '10', '11']]
# instrument setup
p300 = instruments.P300_Single(
mount='left',
tip_racks=tiprack_300)
p10 = instruments.P10_Single(
mount='right',
tip_racks=[tiprack_10])
import json
from inspect import signature, Parameter
import time
import sys
from opentrons import robot, labware, modules
from opentrons.legacy_api.instruments import Pipette as BasePipette
all_labware = []
all_modules = []
orig_labware_load = labware.load
orig_module_load = modules.load
# labware.load spy
def load_labware_spy(labware_name, slot, label=None, share=False):
# module.load() calls labware.load() to get the "labware" for the modules
# so we have to filter out modules from this labware spy somehow...
if labware_name not in modules.SUPPORTED_MODULES:
all_labware.append({
'type': labware_name,
'slot': slot,
'name': label or labware_name,
'share': share
})
return orig_labware_load(labware_name, slot, label, share)