Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update protocol with customer's optimization #4885

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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()