Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
“ramifarawi” committed Nov 2, 2023
1 parent d3c53ad commit e7631b7
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 14 deletions.
2 changes: 1 addition & 1 deletion data/data/fields.csv
Original file line number Diff line number Diff line change
Expand Up @@ -572,7 +572,7 @@ init_vol,3
init_vol_50,1
init_vol_bca,1
init_vol_bsa,1
init_vol_buff,1
init_vol_buff,2
init_vol_buff1,1
init_vol_buff2,1
init_vol_buff3,1
Expand Down
48 changes: 36 additions & 12 deletions protoBuilds/0ca318/0ca318.ot2.apiv2.py.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"content": "import math\nfrom opentrons import protocol_api\n\nmetadata = {\n 'protocolName': 'PCR Prep and PCR',\n 'author': 'Rami <[email protected]>',\n 'source': 'Custom Protocol Request',\n 'apiLevel': '2.11'\n}\n\n\ndef run(ctx):\n\n [num_samp, source_type, mmx_type, start_tip,\n p20_mount, m20_mount] = get_values( # noqa: F821\n \"num_samp\", \"source_type\", \"mmx_type\",\n \"start_tip\", \"p20_mount\", \"m20_mount\")\n\n # num_samp = 96\n # source_type = \"tuberack\"\n # p20_mount = \"left\"\n # m20_mount = \"right\"\n\n # load modules\n tc_mod = ctx.load_module('Thermocycler Module')\n tc_mod.open_lid()\n tc_mod.set_lid_temperature(105)\n pcr_plate = tc_mod.load_labware('nest_96_wellplate_100ul_pcr_full_skirt') # noqa: E501\n\n temp_mod = ctx.load_module('temperature module gen2', 3)\n temp_mod.set_temperature(4)\n\n # load labware\n if source_type == \"tuberack\":\n samples_racks = [ctx.load_labware('opentrons_24_tuberack_nest_1.5ml_snapcap', # noqa: E501\n slot) for slot in [4, 5, 1, 2]]\n sample_tubes = [tube for rack in samples_racks\n for row in rack.rows() for tube in row][:num_samp]\n\n if mmx_type == \"mmx_wellplate\":\n mmx_plate = temp_mod.load_labware('opentrons_96_aluminumblock_nest_wellplate_100ul') # noqa: E501\n else:\n mmx_plate = temp_mod.load_labware('opentrons_24_aluminumblock_nest_1.5ml_snapcap') # noqa: E501\n\n tips = [ctx.load_labware('opentrons_96_filtertiprack_20ul', slot)\n for slot in [6, 9]]\n\n # load pipettes\n p20 = ctx.load_instrument('p20_single_gen2', p20_mount,\n tip_racks=tips)\n m20 = ctx.load_instrument('p20_multi_gen2', m20_mount,\n tip_racks=tips)\n all_tips = [tip for rack in tips for tip in rack.wells()]\n start_tip -= 1\n m20.starting_tip = all_tips[start_tip]\n p20.starting_tip = all_tips[start_tip]\n\n def pick_up(pip):\n try:\n pip.pick_up_tip()\n except protocol_api.labware.OutOfTipsError:\n ctx.pause(f\"Replace empty tip rack for {pip}\")\n pip.reset_tipracks()\n pip.pick_up_tip()\n\n # mapping\n num_full_cols = math.floor(num_samp/8)\n\n remainder = False if num_samp % 8 == 0 else True\n\n num_mmx_cols = math.ceil(num_samp/24)\n if mmx_type == \"mmx_wellplate\":\n mmx = mmx_plate.rows()[0][:num_mmx_cols]*24\n else:\n mmx = mmx_plate.rows()[0][:num_mmx_cols]*96\n\n unfilled_mmx_col = mmx_plate.rows()[0][5]\n\n if mmx_type == 'mmx_wellplate':\n ctx.comment('\\n\\nTRANSFERRING MASTERMIX TO PLATE\\n')\n m20.pick_up_tip()\n\n for i, (s_col, d_col) in enumerate(zip(\n mmx,\n pcr_plate.rows()[0][:num_full_cols])): # noqa: E501\n if i % 4 == 0 and i > 0:\n if m20.has_tip:\n m20.drop_tip()\n m20.pick_up_tip()\n\n m20.aspirate(10, s_col, rate=0.5)\n m20.dispense(10, d_col, rate=0.5) # noqa: E501\n m20.aspirate(12.5, s_col, rate=0.5)\n m20.dispense(12.5, d_col, rate=0.5) # noqa: E501\n m20.blow_out(d_col.top())\n m20.touch_tip()\n ctx.comment('\\n')\n\n if m20.has_tip:\n m20.drop_tip()\n\n if remainder:\n ctx.comment('\\n\\nTRANSFERRING MASTERMIX TO UNFILLED COLUMN\\n')\n remaining_wells = num_samp % 8\n unfilled_col = pcr_plate.columns()[num_full_cols][:remaining_wells]\n p20.pick_up_tip()\n\n for well in unfilled_col:\n p20.aspirate(10, unfilled_mmx_col, rate=0.5)\n p20.dispense(10, well, rate=0.5) # noqa: E501\n p20.aspirate(12.5, unfilled_mmx_col, rate=0.5)\n p20.dispense(12.5, well, rate=0.5) # noqa: E501\n p20.blow_out(well.top())\n p20.touch_tip()\n p20.drop_tip()\n\n elif mmx_type == \"mmx_tuberack\":\n\n ctx.comment('\\n\\nTRANSFERRING MASTERMIX TO PLATE\\n')\n p20.pick_up_tip()\n\n for i, (s, d) in enumerate(zip(mmx, pcr_plate.wells()[:num_samp])):\n\n if i % 4 == 0 and i > 0:\n if m20.has_tip:\n m20.drop_tip()\n m20.pick_up_tip()\n\n p20.aspirate(10, s, rate=0.5)\n p20.dispense(10, d, rate=0.5) # noqa: E501\n p20.aspirate(12.5, s, rate=0.5)\n p20.dispense(12.5, d, rate=0.5) # noqa: E501\n p20.blow_out(d.top())\n p20.touch_tip()\n ctx.comment('\\n')\n p20.drop_tip()\n\n # transfer sample\n sample_wells = [\n well for column in pcr_plate.columns()[1:11]\n for well in column[1:7]\n ]\n\n if source_type == \"tuberack\":\n ctx.comment('\\n\\nTRANSFERRING SAMPLE TO PCR PLATE\\n')\n for tube, dest in zip(sample_tubes, sample_wells):\n p20.pick_up_tip()\n p20.aspirate(2.5, tube, rate=0.5)\n p20.dispense(2.5, dest)\n p20.mix(3, 20, dest)\n p20.blow_out(dest.top())\n p20.touch_tip()\n p20.drop_tip()\n\n ctx.comment('\\n\\n------------Running PCR-------------\\n')\n\n profile1 = [\n\n {'temperature': 95, 'hold_time_seconds': 180},\n\n ]\n\n profile2 = [\n\n {'temperature': 95, 'hold_time_seconds': 30},\n {'temperature': 55, 'hold_time_seconds': 30},\n {'temperature': 72, 'hold_time_seconds': 30}\n\n ]\n\n profile3 = [\n\n {'temperature': 72, 'hold_time_seconds': 300}\n\n ]\n\n tc_mod.close_lid()\n tc_mod.execute_profile(steps=profile1, repetitions=1, block_max_volume=25)\n tc_mod.execute_profile(steps=profile2, repetitions=25, block_max_volume=25)\n tc_mod.execute_profile(steps=profile3, repetitions=1, block_max_volume=25)\n tc_mod.set_block_temperature(4)\n tc_mod.set_lid_temperature(25)\n tc_mod.open_lid()\n\n ctx.comment('''Centrifuge the PCR plate at 1,000 \u00d7 g at 20\u00b0C for 1 minute\n to collect condensation, carefully remove seal.\n\n Place pcr plate in slot 4 of robot 2.\n\n Also ensure that beads are vortexed and placed in column 1\n of the reagent plate. For part 2 of the protocol.''')\n",
"content": "import math\nfrom opentrons import protocol_api\n\nmetadata = {\n 'protocolName': 'PCR Prep and PCR',\n 'author': 'Rami <[email protected]>',\n 'source': 'Custom Protocol Request',\n 'apiLevel': '2.11'\n}\n\n\ndef run(ctx):\n\n [num_samp, source_type, mmx_type, start_tip,\n p20_mount, m20_mount] = get_values( # noqa: F821\n \"num_samp\", \"source_type\", \"mmx_type\",\n \"start_tip\", \"p20_mount\", \"m20_mount\")\n\n # num_samp = 96\n # source_type = \"tuberack\"\n # p20_mount = \"left\"\n # m20_mount = \"right\"\n\n # load modules\n tc_mod = ctx.load_module('Thermocycler Module')\n tc_mod.open_lid()\n tc_mod.set_lid_temperature(105)\n pcr_plate = tc_mod.load_labware('nest_96_wellplate_100ul_pcr_full_skirt') # noqa: E501\n\n temp_mod = ctx.load_module('temperature module gen2', 3)\n temp_mod.set_temperature(4)\n\n # load labware\n if source_type == \"tuberack\":\n samples_racks = [ctx.load_labware('opentrons_24_tuberack_nest_1.5ml_snapcap', # noqa: E501\n slot) for slot in [4, 5, 1, 2]]\n sample_tubes = [tube for rack in samples_racks\n for row in rack.rows() for tube in row][:num_samp]\n\n if mmx_type == \"mmx_wellplate\":\n mmx_plate = temp_mod.load_labware('opentrons_96_aluminumblock_nest_wellplate_100ul') # noqa: E501\n else:\n mmx_plate = temp_mod.load_labware('opentrons_24_aluminumblock_nest_1.5ml_snapcap') # noqa: E501\n\n tips = [ctx.load_labware('opentrons_96_filtertiprack_20ul', slot)\n for slot in [6, 9]]\n\n # load pipettes\n p20 = ctx.load_instrument('p20_single_gen2', p20_mount,\n tip_racks=tips)\n m20 = ctx.load_instrument('p20_multi_gen2', m20_mount,\n tip_racks=tips)\n all_tips = [tip for rack in tips for tip in rack.wells()]\n start_tip -= 1\n m20.starting_tip = all_tips[start_tip]\n p20.starting_tip = all_tips[start_tip]\n\n def pick_up(pip):\n try:\n pip.pick_up_tip()\n except protocol_api.labware.OutOfTipsError:\n ctx.pause(f\"Replace empty tip rack for {pip}\")\n pip.reset_tipracks()\n pip.pick_up_tip()\n\n # mapping\n num_full_cols = math.floor(num_samp/8)\n dispense_wells = [well for column in pcr_plate.columns()[1:11]\n for well in column[1:7]][:num_samp]\n\n remainder = False if num_samp % 8 == 0 else True\n\n num_mmx_cols = math.ceil(num_samp/24)\n if mmx_type == \"mmx_wellplate\":\n mmx = mmx_plate.rows()[0][:num_mmx_cols]*24\n else:\n mmx = mmx_plate.rows()[0][:num_mmx_cols]*96\n\n unfilled_mmx_col = mmx_plate.rows()[0][5]\n\n if mmx_type == 'mmx_wellplate':\n ctx.comment('\\n\\nTRANSFERRING MASTERMIX TO PLATE\\n')\n m20.pick_up_tip()\n\n for i, (s_col, d_col) in enumerate(zip(\n mmx,\n pcr_plate.rows()[0][:num_full_cols])): # noqa: E501\n if i % 4 == 0 and i > 0:\n if m20.has_tip:\n m20.drop_tip()\n m20.pick_up_tip()\n\n m20.aspirate(10, s_col, rate=0.5)\n m20.dispense(10, d_col, rate=0.5) # noqa: E501\n m20.aspirate(12.5, s_col, rate=0.5)\n m20.dispense(12.5, d_col, rate=0.5) # noqa: E501\n m20.blow_out(d_col.top())\n m20.touch_tip()\n ctx.comment('\\n')\n\n if m20.has_tip:\n m20.drop_tip()\n\n if remainder:\n ctx.comment('\\n\\nTRANSFERRING MASTERMIX TO UNFILLED COLUMN\\n')\n remaining_wells = num_samp % 8\n unfilled_col = pcr_plate.columns()[num_full_cols][:remaining_wells]\n p20.pick_up_tip()\n\n for well in unfilled_col:\n p20.aspirate(10, unfilled_mmx_col, rate=0.5)\n p20.dispense(10, well, rate=0.5) # noqa: E501\n p20.aspirate(12.5, unfilled_mmx_col, rate=0.5)\n p20.dispense(12.5, well, rate=0.5) # noqa: E501\n p20.blow_out(well.top())\n p20.touch_tip()\n p20.drop_tip()\n\n elif mmx_type == \"mmx_tuberack\":\n\n ctx.comment('\\n\\nTRANSFERRING MASTERMIX TO PLATE\\n')\n p20.pick_up_tip()\n\n for i, (s, d) in enumerate(zip(mmx, dispense_wells)):\n\n if i % 4 == 0 and i > 0:\n if m20.has_tip:\n m20.drop_tip()\n m20.pick_up_tip()\n\n p20.aspirate(10, s, rate=0.5)\n p20.dispense(10, d, rate=0.5) # noqa: E501\n p20.aspirate(12.5, s, rate=0.5)\n p20.dispense(12.5, d, rate=0.5) # noqa: E501\n p20.blow_out(d.top())\n p20.touch_tip()\n ctx.comment('\\n')\n p20.drop_tip()\n\n if source_type == \"tuberack\":\n ctx.comment('\\n\\nTRANSFERRING SAMPLE TO PCR PLATE\\n')\n for tube, dest in zip(sample_tubes, dispense_wells):\n p20.pick_up_tip()\n p20.aspirate(2.5, tube, rate=0.5)\n p20.dispense(2.5, dest)\n p20.mix(6, 20, dest, rate=0.5)\n p20.blow_out(dest.top())\n p20.touch_tip()\n p20.drop_tip()\n\n ctx.comment('\\n\\n-----------Running PCR------------\\n')\n\n profile1 = [\n\n {'temperature': 95, 'hold_time_seconds': 180},\n\n ]\n\n profile2 = [\n\n {'temperature': 95, 'hold_time_seconds': 30},\n {'temperature': 55, 'hold_time_seconds': 30},\n {'temperature': 72, 'hold_time_seconds': 30}\n\n ]\n\n profile3 = [\n\n {'temperature': 72, 'hold_time_seconds': 300}\n\n ]\n\n tc_mod.close_lid()\n tc_mod.execute_profile(steps=profile1, repetitions=1, block_max_volume=25)\n tc_mod.execute_profile(steps=profile2, repetitions=25, block_max_volume=25)\n tc_mod.execute_profile(steps=profile3, repetitions=1, block_max_volume=25)\n tc_mod.set_block_temperature(4)\n tc_mod.set_lid_temperature(25)\n tc_mod.open_lid()\n\n ctx.comment('''Centrifuge the PCR plate at 1,000 \u00d7 g at 20\u00b0C for 1 minute\n to collect condensation, carefully remove seal.\n\n Place pcr plate in slot 4 of robot 2.\n\n Also ensure that beads are vortexed and placed in column 1\n of the reagent plate. For part 2 of the protocol.''')\n",
"custom_labware_defs": [
{
"brand": {
Expand Down Expand Up @@ -1148,13 +1148,13 @@
"label": "Where are the samples?",
"name": "source_type",
"options": [
{
"label": "Already in the 96 well plate on thermocycler",
"value": "wellplate"
},
{
"label": "In tube racks",
"value": "tuberack"
},
{
"label": "Already in the 96 well plate on thermocycler",
"value": "wellplate"
}
],
"type": "dropDown"
Expand All @@ -1163,13 +1163,13 @@
"label": "What is the mastermix in in slot 3 temperature module?",
"name": "mmx_type",
"options": [
{
"label": "In a 96 wellplate aluminum block",
"value": "mmx_wellplate"
},
{
"label": "Nest 1.5mL in a 24 aluminum block",
"value": "mmx_tuberack"
},
{
"label": "In a 96 wellplate aluminum block",
"value": "mmx_wellplate"
}
],
"type": "dropDown"
Expand Down Expand Up @@ -1223,10 +1223,34 @@
],
"labware": [
{
"name": "Opentrons 96 Well Aluminum Block with NEST Well Plate 100 \u00b5L on Temperature Module GEN2 on 3",
"name": "Opentrons 24 Tube Rack with NEST 1.5 mL Snapcap on 1",
"share": false,
"slot": "1",
"type": "opentrons_24_tuberack_nest_1.5ml_snapcap"
},
{
"name": "Opentrons 24 Tube Rack with NEST 1.5 mL Snapcap on 2",
"share": false,
"slot": "2",
"type": "opentrons_24_tuberack_nest_1.5ml_snapcap"
},
{
"name": "Opentrons 24 Well Aluminum Block with NEST 1.5 mL Snapcap on Temperature Module GEN2 on 3",
"share": false,
"slot": "3",
"type": "opentrons_96_aluminumblock_nest_wellplate_100ul"
"type": "opentrons_24_aluminumblock_nest_1.5ml_snapcap"
},
{
"name": "Opentrons 24 Tube Rack with NEST 1.5 mL Snapcap on 4",
"share": false,
"slot": "4",
"type": "opentrons_24_tuberack_nest_1.5ml_snapcap"
},
{
"name": "Opentrons 24 Tube Rack with NEST 1.5 mL Snapcap on 5",
"share": false,
"slot": "5",
"type": "opentrons_24_tuberack_nest_1.5ml_snapcap"
},
{
"name": "Opentrons 96 Filter Tip Rack 20 \u00b5L on 6",
Expand Down Expand Up @@ -1267,7 +1291,7 @@
"type": "thermocycler"
},
{
"name": "TemperatureModuleContext at Temperature Module GEN2 on 3 lw Opentrons 96 Well Aluminum Block with NEST Well Plate 100 \u00b5L on Temperature Module GEN2 on 3",
"name": "TemperatureModuleContext at Temperature Module GEN2 on 3 lw Opentrons 24 Well Aluminum Block with NEST 1.5 mL Snapcap on Temperature Module GEN2 on 3",
"share": false,
"slot": "3",
"type": "tempdeck"
Expand Down
2 changes: 1 addition & 1 deletion protocols/0ca318/0ca318.ot2.apiv2.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ def pick_up(pip):
p20.touch_tip()
p20.drop_tip()

ctx.comment('\n\n------------Running PCR-------------\n')
ctx.comment('\n\n-----------Running PCR------------\n')

profile1 = [

Expand Down

0 comments on commit e7631b7

Please sign in to comment.