Skip to content

Commit

Permalink
Merge pull request #5064 from Opentrons/change-spotsee
Browse files Browse the repository at this point in the history
fix(spotsee): add number of cycles
  • Loading branch information
ramifarawi authored Apr 1, 2024
2 parents 02516cd + 7998287 commit ad1e3c5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion protoBuilds/spotsee/spotsee.ot2.apiv2.py.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"content": "metadata = {\n 'protocolName': 'Spotsee Well Distribution Protocol',\n 'author': 'Rami Farawi <[email protected]>',\n 'source': 'Custom Protocol Request',\n 'apiLevel': '2.13'\n}\n\n\ndef run(ctx):\n\n [num_cycles, vol, labware, start_tip,\n p20_mount, p300_mount] = get_values( # noqa: F821\n \"num_cycles\", \"vol\", \"labware\", \"start_tip\", \"p20_mount\", \"p300_mount\")\n\n # p20_mount = 'left'\n # vol = 25\n # p300_mount = 'right'\n # labware = '40_well_plate'\n # start_tip = 4\n\n # labware\n reservoir = ctx.load_labware('nest_1_reservoir_195ml', 10)\n plate = ctx.load_labware(labware, 1)\n tips = [ctx.load_labware('opentrons_96_filtertiprack_20ul' if vol < 10 else 'opentrons_96_tiprack_300ul', slot) # noqa: E501\n for slot in [11]]\n\n red_wells = [\n 'J1', 'I1', 'H1', 'G1', 'F1', 'E1', 'D1', 'C1', 'B1', 'A1',\n 'A2', 'B2', 'C2', 'D2', 'E2', 'F2', 'G2', 'H2', 'I2', 'J2',\n 'J3', 'I3', 'H3', 'G3', 'F3', 'E3', 'D3', 'C3', 'B3', 'A3',\n 'A4', 'B4', 'C4', 'D4', 'E4', 'F4', 'G4', 'H4', 'I4', 'J4',\n 'J5', 'I5', 'H5', 'G5', 'F5', 'E5', 'D5', 'C5', 'B5', 'A5',\n 'A6', 'B6', 'C6', 'D6', 'E6', 'F6', 'G6', 'H6', 'I6', 'J6',\n 'J7', 'I7', 'H7', 'G7', 'F7', 'E7', 'D7', 'C7', 'B7', 'A7',\n 'A8', 'B8', 'C8', 'D8', 'E8', 'F8', 'G8', 'H8', 'I8', 'J8'\n ]\n\n # pipettes\n p20 = ctx.load_instrument('p20_single_gen2', p20_mount, tip_racks=tips)\n p300 = ctx.load_instrument('p300_single_gen2', p300_mount, tip_racks=tips)\n pip = p20 if vol < 10 else p300\n\n # mapping\n buffer = reservoir.wells()[0]\n\n # protocol\n pip.pick_up_tip(tips[0].wells()[start_tip-1])\n for _ in range(num_cycles):\n ctx.comment('\\n-------------ADDING BUFFER TO PLATE-------------\\n\\n')\n if labware == '80_well_plate':\n num_asp = pip.max_volume // vol\n chunks = [red_wells[i:i+num_asp] for i in range(0, len(red_wells),\n num_asp)]\n for chunk in chunks:\n pip.aspirate(num_asp*vol, buffer)\n for well in chunk:\n pip.dispense(vol, plate.wells_by_name()[well])\n pip.move_to(plate.wells_by_name()[well].top(z=5))\n\n else:\n num_asp = pip.max_volume // vol\n chunks = [plate.wells()[i:i+num_asp] for i in range(0,\n len(plate.wells()),\n num_asp)]\n\n for chunk in chunks:\n pip.aspirate(num_asp*vol, buffer)\n for well in chunk:\n pip.dispense(vol, well)\n pip.move_to(well.top(z=5))\n ctx.pause('Change Sheet on Deck')\n pip.drop_tip()\n",
"content": "metadata = {\n 'protocolName': 'Spotsee Well Distribution Protocol',\n 'author': 'Rami Farawi <[email protected]>',\n 'source': 'Custom Protocol Request',\n 'apiLevel': '2.13'\n}\n\n\ndef run(ctx):\n\n [num_cycles, vol, labware, start_tip,\n p20_mount, p300_mount] = get_values( # noqa: F821\n \"num_cycles\", \"vol\", \"labware\", \"start_tip\", \"p20_mount\", \"p300_mount\")\n\n # p20_mount = 'left'\n # vol = 25\n # p300_mount = 'right'\n # labware = '40_well_plate'\n # start_tip = 4\n\n # labware\n reservoir = ctx.load_labware('nest_1_reservoir_195ml', 10)\n plate = ctx.load_labware(labware, 1)\n tips = [ctx.load_labware('opentrons_96_filtertiprack_20ul' if vol < 10 else 'opentrons_96_tiprack_300ul', slot) # noqa: E501\n for slot in [11]]\n\n red_wells = [\n 'J1', 'I1', 'H1', 'G1', 'F1', 'E1', 'D1', 'C1', 'B1', 'A1',\n 'A2', 'B2', 'C2', 'D2', 'E2', 'F2', 'G2', 'H2', 'I2', 'J2',\n 'J3', 'I3', 'H3', 'G3', 'F3', 'E3', 'D3', 'C3', 'B3', 'A3',\n 'A4', 'B4', 'C4', 'D4', 'E4', 'F4', 'G4', 'H4', 'I4', 'J4',\n 'J5', 'I5', 'H5', 'G5', 'F5', 'E5', 'D5', 'C5', 'B5', 'A5',\n 'A6', 'B6', 'C6', 'D6', 'E6', 'F6', 'G6', 'H6', 'I6', 'J6',\n 'J7', 'I7', 'H7', 'G7', 'F7', 'E7', 'D7', 'C7', 'B7', 'A7',\n 'A8', 'B8', 'C8', 'D8', 'E8', 'F8', 'G8', 'H8', 'I8', 'J8'\n ]\n\n # pipettes\n p20 = ctx.load_instrument('p20_single_gen2', p20_mount, tip_racks=tips)\n p300 = ctx.load_instrument('p300_single_gen2', p300_mount, tip_racks=tips)\n pip = p20 if vol < 10 else p300\n\n # mapping\n buffer = reservoir.wells()[0]\n\n # protocol\n pip.pick_up_tip(tips[0].wells()[start_tip-1])\n\n for _ in range(num_cycles):\n ctx.comment('\\n-------------ADDING BUFFER TO PLATE-------------\\n\\n')\n if labware == '80_well_plate':\n num_asp = pip.max_volume // vol\n\n chunks = [red_wells[i:i+num_asp] for i in range(0, len(red_wells),\n num_asp)]\n\n for chunk in chunks:\n pip.aspirate(num_asp*vol, buffer)\n for well in chunk:\n pip.dispense(vol, plate.wells_by_name()[well])\n pip.move_to(plate.wells_by_name()[well].top(z=5))\n\n else:\n num_asp = pip.max_volume // vol\n chunks = [plate.wells()[i:i+num_asp] for i in range(0,\n len(plate.wells()),\n num_asp)]\n\n for chunk in chunks:\n pip.aspirate(num_asp*vol, buffer)\n for well in chunk:\n pip.dispense(vol, well)\n pip.move_to(well.top(z=5))\n pip.dispense(pip.current_volume, buffer.top())\n ctx.pause('Change Sheet on Deck')\n pip.drop_tip()\n",
"custom_labware_defs": [
{
"brand": {
Expand Down
4 changes: 4 additions & 0 deletions protocols/spotsee/spotsee.ot2.apiv2.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,15 @@ def run(ctx):

# protocol
pip.pick_up_tip(tips[0].wells()[start_tip-1])

for _ in range(num_cycles):
ctx.comment('\n-------------ADDING BUFFER TO PLATE-------------\n\n')
if labware == '80_well_plate':
num_asp = pip.max_volume // vol

chunks = [red_wells[i:i+num_asp] for i in range(0, len(red_wells),
num_asp)]

for chunk in chunks:
pip.aspirate(num_asp*vol, buffer)
for well in chunk:
Expand All @@ -68,5 +71,6 @@ def run(ctx):
for well in chunk:
pip.dispense(vol, well)
pip.move_to(well.top(z=5))
pip.dispense(pip.current_volume, buffer.top())
ctx.pause('Change Sheet on Deck')
pip.drop_tip()

0 comments on commit ad1e3c5

Please sign in to comment.