Skip to content

Commit

Permalink
Update protocol with customer's optimization
Browse files Browse the repository at this point in the history
  • Loading branch information
parrishpayne12 committed Sep 11, 2023
1 parent c741c39 commit 5566efb
Showing 1 changed file with 30 additions and 21 deletions.
51 changes: 30 additions & 21 deletions protocols/0dda91/0dda91.ot2.apiv2.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ def run(ctx):
[input_csv, p20_mount] = get_values( # noqa: F821
'input_csv', 'p20_mount')

p20_mount = 'right'
p20_mount = 'p20_mount'

# labware
tips = [ctx.load_labware('opentrons_96_filtertiprack_20ul', slot)
Expand All @@ -37,31 +37,40 @@ def run(ctx):

# parse
all_rows = [
[val.strip().upper() for val in line.split(',')]
for line in input_csv.splitlines()[1:]
[val.strip() for val in line.split(',')]
for line in input_csv.splitlines()
if line and line.split(',')[0]][1:]

all_samples = [
well
for well in pcr_plate.wells()
]

for row, source in zip(all_rows, all_samples):
for row in (all_rows):

source = (row[0])
volume = float(row[2])
dest = (row[3])

if volume > 20:
num_transfers = math.ceil(volume/p20.max_volume)
transfer_vol = volume/num_transfers
for _ in range(num_transfers):

if volume > 0:
if volume > 20:
num_transfers = math.ceil(volume/p20.max_volume)
transfer_vol = volume/num_transfers
for _ in range(num_transfers):

p20.pick_up_tip()
p20.aspirate(transfer_vol, pcr_plate.wells_by_name()[source], rate=0.5)
ctx.max_speeds[axis] = 5
p20.move_to(pcr_plate.wells_by_name()[source].bottom(10))
ctx.max_speeds[axis] = None
p20.dispense(transfer_vol, tube_rack.wells_by_name()[dest], rate=0.5)
ctx.max_speeds[axis] = 5
p20.move_to(tube_rack.wells_by_name()[dest].bottom(15))
ctx.max_speeds[axis] = None
p20.drop_tip()
else:
p20.pick_up_tip()
p20.aspirate(transfer_vol, source)
p20.dispense(transfer_vol, tube_rack.wells_by_name()[dest])
p20.aspirate(volume, pcr_plate.wells_by_name()[source], rate=0.5)
ctx.max_speeds[axis] = 5
p20.move_to(pcr_plate.wells_by_name()[source].bottom(10))
ctx.max_speeds[axis] = None
p20.dispense(volume, tube_rack.wells_by_name()[dest], rate=0.5)
ctx.max_speeds[axis] = 5
p20.move_to(tube_rack.wells_by_name()[dest].bottom(15))
ctx.max_speeds[axis] = None
p20.drop_tip()
else:
p20.pick_up_tip()
p20.aspirate(volume, source)
p20.dispense(volume, tube_rack.wells_by_name()[dest])
p20.drop_tip()

0 comments on commit 5566efb

Please sign in to comment.