Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
for _ in range(3):
m300.delay(seconds=10)
robot._driver.run_flag.wait()
magdeck.engage(height=18)
m300.delay(seconds=10)
robot._driver.run_flag.wait()
magdeck.disengage()
magdeck.engage(height=18)
robot.comment('Incubating on magnet for 1 minute.')
m300.delay(minutes=1)
if wash < 2:
remove_supernatant(150, waste[wash])
else:
robot._driver.run_flag.wait()
robot.pause('Prepare the substrate and load it into the 12-channel \
reservoir in channel 3.')
for i, m in enumerate(mag_samples_m):
if not m300.tip_attached:
pick_up(m300, 'multi')
m300.transfer(160, m.bottom(0.5), waste[2], new_tip='never')
m300.drop_tip()
pick_up(m300, 'multi')
m300.transfer(100, substrate, m, new_tip='never')
m300.drop_tip()
if i < len(mag_samples_m) - 1:
robot.pause('Waiting for measurement...')
else:
robot.comment('Take final measurement. Protocol finished.')
# distribute TE
pick_up(m50)
m50.distribute(
17, te, [m.top() for m in mag_samples_multi], new_tip='never')
for i, m in enumerate(mag_samples_multi):
if not m50.tip_attached:
pick_up(m50)
angle = 0 if i % 2 == 0 else math.pi
disp_loc = (m, m.from_center(r=0.95, h=-0.6, theta=angle))
mix(10, 10, disp_loc, m50, disp_perc=1.0)
m50.drop_tip()
robot.comment('Room temperature incubation for 5 minutes')
m50.delay(minutes=5)
robot._driver.run_flag.wait()
magdeck.engage(height=18)
robot.comment('Magnetic incubation for 5 minutes')
m50.delay(minutes=5)
# transfer supernatant
for m, e in zip(mag_samples_multi, elution_samples_multi):
pick_up(m50)
m50.aspirate(15, m.bottom(0.5))
m50.delay(seconds=3)
m50.dispense(15, e)
m50.blow_out()
m50.drop_tip()
magdeck.disengage()
robot.comment('Proceed to PCR enrichment (manual steps). Discard of \
else:
if pipette_l.max_volume < pipette_r.max_volume:
pip_s, pip_l = pipette_l, pipette_r
else:
pip_s, pip_l = pipette_r, pipette_l
else:
pipette = pipette_l if pipette_l else pipette_r
# destination
mastermix_dest = trough.wells('A1')
info_list = [cell for line in master_mix_csv.splitlines() if line
for cell in [line.split(',')]]
for line in info_list[1:]:
source = robot.deck.children_by_name[line[1]][0].wells(line[2])
vol = float(line[3])
if pipette_l and pipette_r:
if vol <= pip_s.max_volume:
pipette = pip_s
else:
pipette = pip_l
pipette.transfer(vol, source, mastermix_dest)
if pipette_type == 'p10-single':
pipette.transfer(
detection_reagent_volume,
tuberack.wells('A4'),
experiment_plate.columns().rows('I', 'K', 'M', 'O'),
new_tip='always',
mix_after=(3, detection_reagent_volume))
else:
pipette.transfer(
detection_reagent_volume,
plate.columns('5')[0],
experiment_plate.rows('A'),
new_tip='always',
mix_after=(3, detection_reagent_volume))
robot.home()
spacing=(20, 20),
diameter=16,
depth=14,
volume=1000
)
# labware
trough = labware.load('trough-12row', '3')
tips300 = [labware.load('opentrons-tiprack-300ul', slot)
for slot in ['6', '9']]
tubes_50 = labware.load('opentrons-tuberack-50ml', '11')
# modules
tempdeck = modules.load('tempdeck', '4')
plate = labware.load('custom-24-well-plate', '4', share=True)
if not robot.is_simulating():
tempdeck.set_temperature(60)
tempdeck.wait_for_temp()
# pipette
p300 = instruments.P300_Single(
mount='right',
tip_racks=tips300
)
# reagent setup
water = trough.wells('A1')
crystal_violet = trough.wells('A2')
acetic_acid = trough.wells('A3')
if not robot.is_simulating():
robot.comment("The protocol will pause for 60 minutes for the wells to "
pipette.start_at_tip(tiprack.cols(starting_col))
if plate_type == '384-well':
dests = [well for plate in plates for letter in ['A', 'B']
for well in plate.rows(letter)]
else:
dests = [well for plate in plates for well in plate.rows('A')]
pipette.pick_up_tip()
pipette.distribute(volume,
reservior,
dests,
disposal_vol=0,
new_tip='never')
pipette.retract()
robot.pause('Insert plates into light cabinet. Remove solution and wash \
plates. Dry plate and place the plates back in the robot. Make sure to \
load reagent 2 in slot 6.')
pipette.distribute(volume,
reservior,
dests,
disposal_vol=0,
new_tip='never')
pipette.retract()
robot.pause('Insert plates into light cabinet. Remove solution and wash \
plates. Dry plate and place the plates back in the robot. Make sure to \
load reagent 3 in slot 6.')
pipette.distribute(volume,
reservior,
num_initial_pbst,
final_aspirate,
sg_source=super_g_blocking_buffer,
num_final_pbst=1
):
for i in range(num_initial_pbst):
m300.pick_up_tip()
m300.distribute(
100,
pbst[wash_ind],
dispense_locs,
disposal_vol=0,
new_tip='never'
)
m300.move_to(res_12.wells('A12').top(10))
robot.comment('Incubating 5 minutes.')
m300.delay(minutes=5)
vacuum()
m300.pick_up_tip()
m300.distribute(
100,
sg_source,
dispense_locs,
disposal_vol=0,
new_tip='never'
)
m300.move_to(res_12.wells('A12').top(10))
robot.comment('Incubating 5 minutes.')
m300.delay(minutes=5)
vacuum()
)
dests = rxn_plate.rows('A')[:num_cols]
for d in dests:
pip10.pick_up_tip()
pip10.transfer(
5,
strips.wells('A1'),
d.top(),
new_tip='never',
)
pip10.mix(7, 9, d)
pip10.blow_out(d.top()),
pip10.drop_tip()
p50.drop_tip()
robot.pause('Briefly centrifuge the reaction plate and place back on the \
temperature module.')
for d in dests:
pip10.pick_up_tip()
pip10.mix(7, 9, d)
pip10.drop_tip()
robot.pause('Briefly centrifuge the reaction plate and place back on the \
temperature module.')
# add Fragmentation Enzyme Mix and mix
rxn_samples = rxn_plate.wells()[:number_of_samples]
p50.pick_up_tip()
p50.transfer(
5, frag_enzyme_mix, rxn_samples, new_tip='always')
# Step 3 + 4 transfer 130ul solution then transfer 200 to nanosep tubes
for k in range(50):
m = (k//10) + 1
pick_up(pip300)
pip300.transfer(130, temprack.wells(m), centtubes.wells(k),
new_tip='never')
pip300.mix(3, 150, centtubes.wells(k))
pip300.blow_out(centtubes.wells(k).top())
pip300.transfer(200, centtubes.wells(k), ultratubes.wells(k),
new_tip='never')
pip300.blow_out(ultratubes.wells(k).top())
pip300.drop_tip()
robot.comment("Part 1 is now complete. Please remove samples from OT-2 for \
centrifugation. After centrifugation, replace samples on the deck and run \
# transfer out supernatant from samples
for i, s in enumerate(mag_pools):
m300.pick_up_tip(tips[tip_counter])
m300.transfer(200,
s.bottom(2),
waste.wells(i+number_of_pools*2),
new_tip='never')
m300.drop_tip()
tip_counter += 1
# incubate at room temperature for 30 seconds
m300.delay(minutes=10)
magdeck.disengage()
robot.pause("Remove the sample rack from the magnetic module before "
"resuming.")
# distribute buffer to samples and mix
for s in pools:
m50.pick_up_tip(tips[tip_counter])
m50.transfer(27.5, buffer, s, new_tip='never')
m50.mix(15, 20, s)
m50.drop_tip()
tip_counter += 1
# incubate at room temperature for 2 minutes
m50.delay(minutes=2)
robot.pause("Place the sample rack on the magnetic module before "
"resuming. The magdeck will engage for 2 minutes before the "
"protocol resumes.")