diff --git a/data/data/fields.csv b/data/data/fields.csv index 326468bcb..a6dd7fb7c 100644 --- a/data/data/fields.csv +++ b/data/data/fields.csv @@ -1386,7 +1386,6 @@ start_tip,2 start_tip_p20,2 start_tip_p300,2 start_urea_vol,1 -starting_buffer_volume,1 starting_conc,2 starting_diluent_vol,1 starting_plasma_vol,1 diff --git a/protoBuilds/1464/ELISA_protocol_part1.ot2.apiv2.py.json b/protoBuilds/1464/ELISA_protocol_part1.ot2.apiv2.py.json index 166aecb34..4500a562b 100644 --- a/protoBuilds/1464/ELISA_protocol_part1.ot2.apiv2.py.json +++ b/protoBuilds/1464/ELISA_protocol_part1.ot2.apiv2.py.json @@ -1,13 +1,7 @@ { - "content": "import math\n\nmetadata = {\n 'protocolName': 'ELISA: Dilution',\n 'author': 'Alise ',\n 'source': 'Custom Protocol Request',\n 'apiLevel': '2.14'\n}\n\n\ndef run(ctx):\n [starting_buffer_volume, number_of_standards,\n concentration_csv, init_vol_buff] = get_values( # noqa: F821\n 'starting_buffer_volume', 'number_of_standards',\n 'concentration_csv', \"init_vol_buff\")\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('nest_96_wellplate_2ml_deep', 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 v_naught_buff = init_vol_buff*1000\n\n radius_sds = dilution_buffer.diameter/2\n\n h_naught_buff = 0.85*v_naught_buff/(math.pi*radius_sds**2)\n\n h_buff = h_naught_buff\n\n def adjust_height(volume_from_loop):\n nonlocal h_buff\n\n radius = radius_sds\n\n dh = (volume_from_loop/(math.pi*radius**2))*1.33\n\n h_buff -= dh\n\n if h_buff < 12:\n h_buff = 1\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\n diluent_vols = [320, 450, 180, 320, 450, 320, 450, 320, 450, 180, 320, 450]\n\n sample_vols = [80, 50, 120, 80, 50, 80, 50, 80, 50, 120, 80, 50]\n\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 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\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 p1000.pick_up_tip()\n p1000.transfer(\n volume,\n dilution_buffer.bottom(z=h_buff),\n dest.top(-20),\n new_tip='never')\n\n adjust_height(volume)\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 ',\n 'source': 'Custom Protocol Request',\n 'apiLevel': '2.14'\n}\n\n\ndef run(ctx):\n [number_of_standards,\n concentration_csv, init_vol_buff] = get_values( # noqa: F821\n 'number_of_standards',\n 'concentration_csv', \"init_vol_buff\")\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('nest_96_wellplate_2ml_deep', 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 v_naught_buff = init_vol_buff*1000\n\n radius_sds = dilution_buffer.diameter/2\n\n h_naught_buff = 0.85*v_naught_buff/(math.pi*radius_sds**2)\n\n h_buff = h_naught_buff\n\n def adjust_height(volume_from_loop):\n nonlocal h_buff\n\n radius = radius_sds\n\n dh = (volume_from_loop/(math.pi*radius**2))*1.33\n\n h_buff -= dh\n\n if h_buff < 12:\n h_buff = 1\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\n diluent_vols = [320, 450, 180, 320, 450, 320, 450, 320, 450, 180, 320, 450]\n\n sample_vols = [80, 50, 120, 80, 50, 80, 50, 80, 50, 120, 80, 50]\n\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 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\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 p1000.pick_up_tip()\n p1000.transfer(\n volume,\n dilution_buffer.bottom(z=h_buff),\n dest.top(-20),\n new_tip='never')\n\n adjust_height(volume)\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": [], "fields": [ - { - "default": 50.0, - "label": "starting buffer volume, in ul", - "name": "starting_buffer_volume", - "type": "float" - }, { "default": 6, "label": "number of standards", diff --git a/protocols/1464/ELISA_protocol_part1.ot2.apiv2.py b/protocols/1464/ELISA_protocol_part1.ot2.apiv2.py index f00494833..5cbbf5138 100644 --- a/protocols/1464/ELISA_protocol_part1.ot2.apiv2.py +++ b/protocols/1464/ELISA_protocol_part1.ot2.apiv2.py @@ -9,9 +9,9 @@ def run(ctx): - [starting_buffer_volume, number_of_standards, + [number_of_standards, concentration_csv, init_vol_buff] = get_values( # noqa: F821 - 'starting_buffer_volume', 'number_of_standards', + 'number_of_standards', 'concentration_csv', "init_vol_buff") # labware setup diff --git a/protocols/1464/fields.json b/protocols/1464/fields.json index 2bbe2f516..c3613979a 100644 --- a/protocols/1464/fields.json +++ b/protocols/1464/fields.json @@ -1,10 +1,4 @@ [ - { - "type": "float", - "label": "starting buffer volume, in ul", - "name": "starting_buffer_volume", - "default": 50.0 - }, { "type": "int", "label": "number of standards",