Skip to content

Commit

Permalink
update pipette gen and concentrations list
Browse files Browse the repository at this point in the history
  • Loading branch information
ncdiehl11 committed Oct 3, 2023
1 parent b72de26 commit 2dd181d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions protoBuilds/1464/ELISA_protocol_part1.ot2.apiv2.py.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"content": "import math\n\nmetadata = {\n 'protocolName': 'ELISA: Dilution',\n 'author': 'Alise <[email protected]>',\n 'source': 'Custom Protocol Request',\n 'apiLevel': '2.13'\n}\n\n\ndef run(ctx):\n [starting_buffer_volume, number_of_standards,\n concentration_csv] = get_values( # noqa: F821\n 'starting_buffer_volume', 'number_of_standards',\n 'concentration_csv')\n\n # labware setup\n tuberack_1 = ctx.load_labware(\n 'opentrons_10_tuberack_falcon_4x50ml_6x15ml_conical', '1')\n tuberack_4 = ctx.load_labware(\n 'opentrons_24_tuberack_eppendorf_2ml_safelock_snapcap', '4')\n deep_plates = [ctx.load_labware('plateone_96_wellplate_2000ul', slot)\n for slot in ['5', '6']]\n\n tiprack_1000 = ctx.load_labware('opentrons_96_tiprack_1000ul', '2')\n tipracks_300 = [ctx.load_labware('opentrons_96_tiprack_300ul', slot)\n for slot in ['3', '7']]\n\n # instrument setup\n p1000 = ctx.load_instrument(\n 'p1000_single',\n mount='left',\n tip_racks=[tiprack_1000])\n p300 = ctx.load_instrument(\n 'p300_single_gen2',\n mount='right',\n tip_racks=tipracks_300)\n\n # reagent setup\n tubes = [well for row in tuberack_4.rows() for well in row]\n samples = tubes[2 + number_of_standards:]\n dilution_buffer = tuberack_1.wells_by_name()['A3']\n\n dil_dests = [row for deep_plate in deep_plates\n for row in deep_plate.rows()]\n\n conc_lists = [[int(cell) for cell in line.split(',') if cell]\n for line in concentration_csv.splitlines() if line]\n\n concs = [5, 10, 25, 50, 100, 500, 1000, 5000, 10000, 25000, 50000, 100000]\n diluent_vols = [320, 450, 180, 320, 450, 320, 450, 320, 450, 180, 320, 450]\n sample_vols = [80, 50, 120, 80, 50, 80, 50, 80, 50, 120, 80, 50]\n concs_init = [1, 1, 10, 10, 10, 100, 100, 1000, 1000, 10000, 10000, 10000]\n dil_formulae = {\n conc: {'diluent_vol': diluent_vol,\n 'sample_vol': sample_vol,\n 'conc_init': conc_init,\n 'col_index': index}\n for conc, diluent_vol, sample_vol, conc_init, index in zip(\n concs, diluent_vols, sample_vols, concs_init, range(12))\n }\n\n buffer_height = 20 + \\\n (50 - starting_buffer_volume) * 1000 / (math.pi * (13.5 ** 2))\n\n dilution_concs = []\n for sample_index, concentrations in enumerate(conc_lists):\n new_concs = []\n factors = [10, 100, 1000, 10000, 100000]\n conc_inspect = max(concentrations)\n\n for factor_index, factor in enumerate(factors):\n if (conc_inspect // factor) > 0 and (conc_inspect // factor) < 10:\n [new_concs.append(factors[:factor_index+1])]\n [concentrations.pop(concentrations.index(num))\n for num in factors[:factor_index+1] if num in concentrations]\n [new_concs.append([conc_inspect])\n if conc_inspect not in new_concs[0] else '']\n [concentrations.pop(concentrations.index(conc_inspect))\n if conc_inspect in concentrations else '']\n [new_concs.append([conc]) for conc in concentrations if concentrations]\n dilution_concs.append(new_concs)\n\n # transfer dilution buffer\n p1000.pick_up_tip()\n for sample_index, (row, concs) in enumerate(\n zip(dil_dests, dilution_concs)):\n volumes = [dil_formulae[conc]['diluent_vol']\n for c_list in concs for conc in c_list]\n dests = [row[dil_formulae[conc]['col_index']]\n for c_list in concs for conc in c_list]\n for volume, dest in zip(volumes, dests):\n buffer_height += volume / (math.pi * (13.5 ** 2))\n if buffer_height > 75:\n source = dilution_buffer.bottom(3)\n else:\n source = dilution_buffer.top(-buffer_height)\n p1000.transfer(\n volume,\n source,\n dest.top(-20),\n new_tip='never')\n p1000.blow_out(dest.top())\n p1000.drop_tip()\n\n # transfer samples\n for sample_index, (row, concs) in enumerate(\n zip(dil_dests, dilution_concs)):\n for c_list in concs:\n volumes = [dil_formulae[conc]['sample_vol'] for conc in c_list]\n sources = []\n for conc in c_list:\n if dil_formulae[conc]['conc_init'] == 1:\n sources.append(samples[sample_index])\n else:\n source_conc = dil_formulae[conc]['conc_init']\n sources.append(\n row[dil_formulae[source_conc]['col_index']])\n dests = [row[dil_formulae[conc]['col_index']]\n for conc in c_list]\n p300.pick_up_tip()\n for volume, source, dest in zip(volumes, sources, dests):\n p300.transfer(volume, source, dest.bottom(2), new_tip='never')\n p300.mix(3, 200, dest.bottom(2))\n p300.drop_tip()\n",
"content": "import math\n\nmetadata = {\n 'protocolName': 'ELISA: Dilution',\n 'author': 'Alise <[email protected]>',\n 'source': 'Custom Protocol Request',\n 'apiLevel': '2.13'\n}\n\n\ndef run(ctx):\n [starting_buffer_volume, number_of_standards,\n concentration_csv] = get_values( # noqa: F821\n 'starting_buffer_volume', 'number_of_standards',\n 'concentration_csv')\n\n # labware setup\n tuberack_1 = ctx.load_labware(\n 'opentrons_10_tuberack_falcon_4x50ml_6x15ml_conical', '1')\n tuberack_4 = ctx.load_labware(\n 'opentrons_24_tuberack_eppendorf_2ml_safelock_snapcap', '4')\n deep_plates = [ctx.load_labware('plateone_96_wellplate_2000ul', slot)\n for slot in ['5', '6']]\n\n tiprack_1000 = ctx.load_labware('opentrons_96_tiprack_1000ul', '2')\n tipracks_300 = [ctx.load_labware('opentrons_96_tiprack_300ul', slot)\n for slot in ['3', '7']]\n\n # instrument setup\n p1000 = ctx.load_instrument(\n 'p1000_single',\n mount='left',\n tip_racks=[tiprack_1000])\n p300 = ctx.load_instrument(\n 'p300_single',\n mount='right',\n tip_racks=tipracks_300)\n\n # reagent setup\n tubes = [well for row in tuberack_4.rows() for well in row]\n samples = tubes[2 + number_of_standards:]\n dilution_buffer = tuberack_1.wells_by_name()['A3']\n\n dil_dests = [row for deep_plate in deep_plates\n for row in deep_plate.rows()]\n\n conc_lists = [[int(cell) for cell in line.split(',') if cell]\n for line in concentration_csv.splitlines() if line]\n\n concs = [5, 10, 25, 50, 100, 500, 1000, 2500, 5000, 10000, 50000, 100000]\n diluent_vols = [320, 450, 180, 320, 450, 320, 450, 180, 320, 450, 180, 450]\n sample_vols = [80, 50, 120, 80, 50, 80, 50, 120, 80, 50, 80, 50]\n concs_init = [1, 1, 10, 10, 10, 100, 100, 1000, 1000, 1000, 10000, 10000]\n dil_formulae = {\n conc: {'diluent_vol': diluent_vol,\n 'sample_vol': sample_vol,\n 'conc_init': conc_init,\n 'col_index': index}\n for conc, diluent_vol, sample_vol, conc_init, index in zip(\n concs, diluent_vols, sample_vols, concs_init, range(12))\n }\n\n buffer_height = 20 + \\\n (50 - starting_buffer_volume) * 1000 / (math.pi * (13.5 ** 2))\n\n dilution_concs = []\n for sample_index, concentrations in enumerate(conc_lists):\n new_concs = []\n factors = [10, 100, 1000, 10000, 100000]\n conc_inspect = max(concentrations)\n\n for factor_index, factor in enumerate(factors):\n if (conc_inspect // factor) > 0 and (conc_inspect // factor) < 10:\n [new_concs.append(factors[:factor_index+1])]\n [concentrations.pop(concentrations.index(num))\n for num in factors[:factor_index+1] if num in concentrations]\n [new_concs.append([conc_inspect])\n if conc_inspect not in new_concs[0] else '']\n [concentrations.pop(concentrations.index(conc_inspect))\n if conc_inspect in concentrations else '']\n [new_concs.append([conc]) for conc in concentrations if concentrations]\n dilution_concs.append(new_concs)\n\n # transfer dilution buffer\n p1000.pick_up_tip()\n for sample_index, (row, concs) in enumerate(\n zip(dil_dests, dilution_concs)):\n volumes = [dil_formulae[conc]['diluent_vol']\n for c_list in concs for conc in c_list]\n dests = [row[dil_formulae[conc]['col_index']]\n for c_list in concs for conc in c_list]\n for volume, dest in zip(volumes, dests):\n buffer_height += volume / (math.pi * (13.5 ** 2))\n if buffer_height > 75:\n source = dilution_buffer.bottom(3)\n else:\n source = dilution_buffer.top(-buffer_height)\n p1000.transfer(\n volume,\n source,\n dest.top(-20),\n new_tip='never')\n p1000.blow_out(dest.top())\n p1000.drop_tip()\n\n # transfer samples\n for sample_index, (row, concs) in enumerate(\n zip(dil_dests, dilution_concs)):\n for c_list in concs:\n volumes = [dil_formulae[conc]['sample_vol'] for conc in c_list]\n sources = []\n for conc in c_list:\n if dil_formulae[conc]['conc_init'] == 1:\n sources.append(samples[sample_index])\n else:\n source_conc = dil_formulae[conc]['conc_init']\n sources.append(\n row[dil_formulae[source_conc]['col_index']])\n dests = [row[dil_formulae[conc]['col_index']]\n for conc in c_list]\n p300.pick_up_tip()\n for volume, source, dest in zip(volumes, sources, dests):\n p300.transfer(volume, source, dest.bottom(2), new_tip='never')\n p300.mix(3, 200, dest.bottom(2))\n p300.drop_tip()\n",
"custom_labware_defs": [
{
"brand": {
Expand Down Expand Up @@ -1154,7 +1154,7 @@
},
{
"mount": "right",
"name": "p300_single_gen2"
"name": "p300_single"
}
],
"labware": [
Expand Down
10 changes: 5 additions & 5 deletions protocols/1464/ELISA_protocol_part1.ot2.apiv2.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def run(ctx):
mount='left',
tip_racks=[tiprack_1000])
p300 = ctx.load_instrument(
'p300_single_gen2',
'p300_single',
mount='right',
tip_racks=tipracks_300)

Expand All @@ -47,10 +47,10 @@ def run(ctx):
conc_lists = [[int(cell) for cell in line.split(',') if cell]
for line in concentration_csv.splitlines() if line]

concs = [5, 10, 25, 50, 100, 500, 1000, 5000, 10000, 25000, 50000, 100000]
diluent_vols = [320, 450, 180, 320, 450, 320, 450, 320, 450, 180, 320, 450]
sample_vols = [80, 50, 120, 80, 50, 80, 50, 80, 50, 120, 80, 50]
concs_init = [1, 1, 10, 10, 10, 100, 100, 1000, 1000, 10000, 10000, 10000]
concs = [5, 10, 25, 50, 100, 500, 1000, 2500, 5000, 10000, 50000, 100000]
diluent_vols = [320, 450, 180, 320, 450, 320, 450, 180, 320, 450, 180, 450]
sample_vols = [80, 50, 120, 80, 50, 80, 50, 120, 80, 50, 80, 50]
concs_init = [1, 1, 10, 10, 10, 100, 100, 1000, 1000, 1000, 10000, 10000]
dil_formulae = {
conc: {'diluent_vol': diluent_vol,
'sample_vol': sample_vol,
Expand Down

0 comments on commit 2dd181d

Please sign in to comment.