-
Notifications
You must be signed in to change notification settings - Fork 52
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
update pipette gen and concentrations list
- Loading branch information
Showing
2 changed files
with
7 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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": { | ||
|
@@ -1154,7 +1154,7 @@ | |
}, | ||
{ | ||
"mount": "right", | ||
"name": "p300_single_gen2" | ||
"name": "p300_single" | ||
} | ||
], | ||
"labware": [ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters