Skip to content

Commit

Permalink
fix positioning of tall labware to avoid crashing
Browse files Browse the repository at this point in the history
  • Loading branch information
ncdiehl11 committed Feb 2, 2024
1 parent c03caf5 commit d03177d
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 12 deletions.
18 changes: 9 additions & 9 deletions protoBuilds/051557/dilution.ot2.apiv2.py.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"content": "from opentrons.types import Mount\n\nmetadata = {\n 'protocolName': 'Lipid Quantification',\n 'author': 'Nick <[email protected]>',\n 'apiLevel': '2.13'\n}\n\n\ndef run(ctx):\n\n [num_sample_columns, mount_m20, mount_m300] = get_values( # noqa: F821\n 'num_sample_columns', 'mount_m20', 'mount_m300')\n\n # labware\n plate = ctx.load_labware('abgene_96_wellplate_2200ul', '4')\n tubeblock = ctx.load_labware(\n 'opentrons_24_aluminumblock_nest_1.5ml_snapcap', '5')\n reservoir = ctx.load_labware(\n 'eppendorf_7_reservoir_30000ul', '8',\n 'triton (channel 1) and triglyceride (channel 1)')\n tipracks20 = [ctx.load_labware('opentrons_96_tiprack_20ul', '2')]\n tipracks300 = [ctx.load_labware('opentrons_96_tiprack_300ul', '3')]\n tiprack20_s = ctx.load_labware('opentrons_96_tiprack_20ul', '10')\n\n # pipettes\n m20 = ctx.load_instrument('p20_multi_gen2', mount_m20,\n tip_racks=tipracks20)\n m300 = ctx.load_instrument('p300_multi_gen2', mount_m300,\n tip_racks=tipracks300)\n\n # reagents\n triton = reservoir.rows()[0][0]\n triglyceride = reservoir.rows()[0][1]\n offset_triglyceride = -41\n standards = tubeblock.wells()[:5]\n standards_dests_sets = [\n row[:3] for row in plate.rows()[1:6]]\n triton_dests = plate.rows()[0][:3+num_sample_columns]\n triglyceride_dests = triton_dests\n\n def slow_withdraw(pip, well, delay_seconds=2.0):\n pip.default_speed /= 16\n if delay_seconds > 0:\n ctx.delay(seconds=delay_seconds)\n pip.move_to(well.top())\n pip.default_speed *= 16\n\n tips_single = tiprack20_s.wells()\n default_current = 0.6\n mount = Mount.LEFT if m20.mount == 'left' else Mount.RIGHT\n\n # offset tip pickup\n def pick_up_single():\n ctx._hw_manager.hardware._attached_instruments[\n mount].update_config_item(\n 'pick_up_current', default_current/8)\n tip = tips_single.pop()\n m20.pick_up_tip(tip)\n ctx._hw_manager.hardware._attached_instruments[\n mount].update_config_item(\n 'pick_up_current', default_current)\n\n # transfer standards\n vol_standard = 3\n if standards[0].depth > tips_single[0].depth - 5: # account for overlap\n h_asp = tips_single[0].depth - 5\n else:\n h_asp = standards[0].depth - 5\n if plate.wells()[0].depth > tips_single[0].depth - 5:\n h_disp = tips_single[0].depth - 5\n else:\n h_disp = plate.wells()[0].depth - 5\n\n for s, dest_set in zip(standards, standards_dests_sets):\n for d in dest_set:\n pick_up_single()\n m20.aspirate(vol_standard, s.top(-1*h_asp))\n slow_withdraw(m20, s)\n m20.dispense(vol_standard, d.top(-1*h_disp))\n m20.drop_tip()\n\n ctx.pause('Remove silicone mats from pre-plated sample wells.')\n\n # transfer triton\n vol_triton = 10.0\n for d in triton_dests:\n m20.pick_up_tip()\n m20.aspirate(vol_triton, triton.bottom(5))\n slow_withdraw(m20, triton)\n m20.dispense(vol_triton, d.top(-1*h_disp))\n slow_withdraw(m20, d)\n m20.drop_tip()\n\n ctx.pause('Cover plate, shake 2 minutes @ 900 r.p.m., incubate 1 hour \\\n@ 37C, and 20 minutes @ room temperature.')\n\n # transfer triglyceride\n vol_triglyceride = 300.0\n for d in triglyceride_dests:\n m300.pick_up_tip()\n m300.aspirate(\n vol_triglyceride, triglyceride.bottom(5-offset_triglyceride))\n slow_withdraw(m300, triglyceride)\n m300.dispense(vol_triglyceride, d.bottom(5))\n slow_withdraw(m300, d)\n m300.drop_tip()\n",
"content": "from opentrons.types import Mount\n\nmetadata = {\n 'protocolName': 'Lipid Quantification',\n 'author': 'Nick <[email protected]>',\n 'apiLevel': '2.13'\n}\n\n\ndef run(ctx):\n\n [num_sample_columns, mount_m20, mount_m300] = get_values( # noqa: F821\n 'num_sample_columns', 'mount_m20', 'mount_m300')\n\n # labware\n plate = ctx.load_labware('abgene_96_wellplate_2200ul', '4')\n tubeblock = ctx.load_labware(\n 'opentrons_24_aluminumblock_nest_1.5ml_snapcap', '5')\n reservoir = ctx.load_labware(\n 'eppendorf_7_reservoir_30000ul', '11',\n 'triton (channel 1) and triglyceride (channel 1)')\n tipracks20 = [ctx.load_labware('opentrons_96_tiprack_20ul', '8')]\n tipracks300 = [ctx.load_labware('opentrons_96_tiprack_300ul', '3')]\n tiprack20_s = ctx.load_labware('opentrons_96_tiprack_20ul', '10')\n\n # pipettes\n m20 = ctx.load_instrument('p20_multi_gen2', mount_m20,\n tip_racks=tipracks20)\n m300 = ctx.load_instrument('p300_multi_gen2', mount_m300,\n tip_racks=tipracks300)\n\n # reagents\n triton = reservoir.rows()[0][0]\n triglyceride = reservoir.rows()[0][1]\n offset_triglyceride = -41\n standards = tubeblock.wells()[:5]\n standards_dests_sets = [\n row[:3] for row in plate.rows()[1:6]]\n triton_dests = plate.rows()[0][:3+num_sample_columns]\n triglyceride_dests = triton_dests\n\n def slow_withdraw(pip, well, delay_seconds=2.0):\n pip.default_speed /= 16\n if delay_seconds > 0:\n ctx.delay(seconds=delay_seconds)\n pip.move_to(well.top(5))\n pip.default_speed *= 16\n\n tips_single = tiprack20_s.wells()\n default_current = 0.6\n mount = Mount.LEFT if m20.mount == 'left' else Mount.RIGHT\n\n # offset tip pickup\n def pick_up_single():\n ctx._hw_manager.hardware._attached_instruments[\n mount].update_config_item(\n 'pick_up_current', default_current/8)\n tip = tips_single.pop()\n m20.pick_up_tip(tip)\n ctx._hw_manager.hardware._attached_instruments[\n mount].update_config_item(\n 'pick_up_current', default_current)\n\n # transfer standards\n vol_standard = 3\n if standards[0].depth > tips_single[0].depth - 5: # account for overlap\n h_asp = tips_single[0].depth - 5\n else:\n h_asp = standards[0].depth - 5\n if plate.wells()[0].depth > tips_single[0].depth - 5:\n h_disp = tips_single[0].depth - 5\n else:\n h_disp = plate.wells()[0].depth - 5\n\n for s, dest_set in zip(standards, standards_dests_sets):\n for d in dest_set:\n pick_up_single()\n m20.aspirate(vol_standard, s.top(-1*h_asp))\n slow_withdraw(m20, s)\n m20.dispense(vol_standard, d.top(-1*h_disp))\n m20.drop_tip()\n\n ctx.pause('Remove silicone mats from pre-plated sample wells.')\n\n # transfer triton\n vol_triton = 10.0\n for d in triton_dests:\n m20.pick_up_tip()\n m20.move_to(triton.top(5))\n m20.aspirate(vol_triton, triton.bottom(5))\n slow_withdraw(m20, triton)\n m20.dispense(vol_triton, d.top(-1*h_disp))\n slow_withdraw(m20, d)\n m20.drop_tip()\n\n ctx.pause('Cover plate, shake 2 minutes @ 900 r.p.m., incubate 1 hour \\\n@ 37C, and 20 minutes @ room temperature.')\n\n # transfer triglyceride\n vol_triglyceride = 300.0\n for d in triglyceride_dests:\n m300.pick_up_tip()\n m300.move_to(triglyceride.top(5))\n m300.aspirate(\n vol_triglyceride, triglyceride.bottom(5-offset_triglyceride))\n slow_withdraw(m300, triglyceride)\n m300.dispense(vol_triglyceride, d.bottom(5))\n slow_withdraw(m300, d)\n m300.drop_tip()\n",
"custom_labware_defs": [
{
"brand": {
Expand Down Expand Up @@ -1570,12 +1570,6 @@
}
],
"labware": [
{
"name": "Opentrons 96 Tip Rack 20 \u00b5L on 2",
"share": false,
"slot": "2",
"type": "opentrons_96_tiprack_20ul"
},
{
"name": "Opentrons 96 Tip Rack 300 \u00b5L on 3",
"share": false,
Expand All @@ -1595,17 +1589,23 @@
"type": "opentrons_24_aluminumblock_nest_1.5ml_snapcap"
},
{
"name": "triton (channel 1) and triglyceride (channel 1) on 8",
"name": "Opentrons 96 Tip Rack 20 \u00b5L on 8",
"share": false,
"slot": "8",
"type": "eppendorf_7_reservoir_30000ul"
"type": "opentrons_96_tiprack_20ul"
},
{
"name": "Opentrons 96 Tip Rack 20 \u00b5L on 10",
"share": false,
"slot": "10",
"type": "opentrons_96_tiprack_20ul"
},
{
"name": "triton (channel 1) and triglyceride (channel 1) on 11",
"share": false,
"slot": "11",
"type": "eppendorf_7_reservoir_30000ul"
},
{
"name": "Opentrons Fixed Trash on 12",
"share": false,
Expand Down
8 changes: 5 additions & 3 deletions protocols/051557/dilution.ot2.apiv2.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ def run(ctx):
tubeblock = ctx.load_labware(
'opentrons_24_aluminumblock_nest_1.5ml_snapcap', '5')
reservoir = ctx.load_labware(
'eppendorf_7_reservoir_30000ul', '8',
'eppendorf_7_reservoir_30000ul', '11',
'triton (channel 1) and triglyceride (channel 1)')
tipracks20 = [ctx.load_labware('opentrons_96_tiprack_20ul', '2')]
tipracks20 = [ctx.load_labware('opentrons_96_tiprack_20ul', '8')]
tipracks300 = [ctx.load_labware('opentrons_96_tiprack_300ul', '3')]
tiprack20_s = ctx.load_labware('opentrons_96_tiprack_20ul', '10')

Expand All @@ -43,7 +43,7 @@ def slow_withdraw(pip, well, delay_seconds=2.0):
pip.default_speed /= 16
if delay_seconds > 0:
ctx.delay(seconds=delay_seconds)
pip.move_to(well.top())
pip.move_to(well.top(5))
pip.default_speed *= 16

tips_single = tiprack20_s.wells()
Expand Down Expand Up @@ -86,6 +86,7 @@ def pick_up_single():
vol_triton = 10.0
for d in triton_dests:
m20.pick_up_tip()
m20.move_to(triton.top(5))
m20.aspirate(vol_triton, triton.bottom(5))
slow_withdraw(m20, triton)
m20.dispense(vol_triton, d.top(-1*h_disp))
Expand All @@ -99,6 +100,7 @@ def pick_up_single():
vol_triglyceride = 300.0
for d in triglyceride_dests:
m300.pick_up_tip()
m300.move_to(triglyceride.top(5))
m300.aspirate(
vol_triglyceride, triglyceride.bottom(5-offset_triglyceride))
slow_withdraw(m300, triglyceride)
Expand Down

0 comments on commit d03177d

Please sign in to comment.