From d03177d86ca3b3b9da77a5df54eab73bc79c9dd1 Mon Sep 17 00:00:00 2001 From: ncdiehl11 Date: Fri, 2 Feb 2024 10:48:36 -0500 Subject: [PATCH] fix positioning of tall labware to avoid crashing --- protoBuilds/051557/dilution.ot2.apiv2.py.json | 18 +++++++++--------- protocols/051557/dilution.ot2.apiv2.py | 8 +++++--- 2 files changed, 14 insertions(+), 12 deletions(-) diff --git a/protoBuilds/051557/dilution.ot2.apiv2.py.json b/protoBuilds/051557/dilution.ot2.apiv2.py.json index b480a50fb..2f548116a 100644 --- a/protoBuilds/051557/dilution.ot2.apiv2.py.json +++ b/protoBuilds/051557/dilution.ot2.apiv2.py.json @@ -1,5 +1,5 @@ { - "content": "from opentrons.types import Mount\n\nmetadata = {\n 'protocolName': 'Lipid Quantification',\n 'author': 'Nick ',\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 ',\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": { @@ -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, @@ -1595,10 +1589,10 @@ "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", @@ -1606,6 +1600,12 @@ "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, diff --git a/protocols/051557/dilution.ot2.apiv2.py b/protocols/051557/dilution.ot2.apiv2.py index 4d0e8a6e5..3b6e1642c 100644 --- a/protocols/051557/dilution.ot2.apiv2.py +++ b/protocols/051557/dilution.ot2.apiv2.py @@ -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') @@ -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() @@ -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)) @@ -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)