From 1a099ba9768dad04ece265016ca6b4dd0afb6912 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9Cramifarawi=E2=80=9D?= <“rami.farawi@opentrons.com”> Date: Wed, 6 Mar 2024 16:44:20 -0500 Subject: [PATCH 1/4] fix --- protocols/0f7910/0f7910.ot2.apiv2.py | 11 ++++++++--- protocols/0f7910/README.md | 2 +- protocols/0f7910/fields.json | 8 +------- 3 files changed, 10 insertions(+), 11 deletions(-) diff --git a/protocols/0f7910/0f7910.ot2.apiv2.py b/protocols/0f7910/0f7910.ot2.apiv2.py index 85d8d72dd..55692bcd3 100644 --- a/protocols/0f7910/0f7910.ot2.apiv2.py +++ b/protocols/0f7910/0f7910.ot2.apiv2.py @@ -1,5 +1,6 @@ from opentrons import protocol_api + metadata = { 'protocolName': 'Plate Filling with CSV Import', 'author': 'Rami Farawi ', @@ -13,14 +14,12 @@ def run(ctx): [csv_samp, source_format, dest_format, - transfer_vol, starting_tip, p300_mount, p20_mount] = get_values( # noqa: F821 "csv_samp", "source_format", "dest_format", - "transfer_vol", "starting_tip", "p300_mount", "p20_mount") @@ -52,6 +51,7 @@ def run(ctx): else "corning_384_wellplate_112ul_flat", 2 if dest_format == "384" else 1) + transfer_vol = float(csv_lines[0][5]) if transfer_vol > 20: tips300 = [ctx.load_labware('opentrons_96_tiprack_300ul', slot) @@ -78,23 +78,28 @@ def pick_up(pip): pick_up(pip) # protocol + pip = p20 if transfer_vol <= 20 else p300 pip.flow_rate.aspirate = 1 pip.flow_rate.dispense = 2 + if transfer_vol > 20: pip.starting_tip = tips300[0].wells()[starting_tip] else: pip.starting_tip = tips20[0].wells()[starting_tip] + for row in csv_lines: source_plate_slot = int(row[1]) source_well_name = row[2] dest_well_name = row[4] + pip_transfer_vol = float(row[5]) source = ctx.loaded_labwares[source_plate_slot].wells_by_name()[source_well_name] # noqa: E501 dest = dest_plate.wells_by_name()[dest_well_name] pick_up(pip) - pip.transfer(transfer_vol, source.bottom(z=0.2), dest, new_tip='never', + pip.transfer(pip_transfer_vol, source.bottom(z=0.2), dest, + new_tip='never', blow_out=True, blowout_location='destination well') pip.drop_tip() ctx.comment('\n\n') diff --git a/protocols/0f7910/README.md b/protocols/0f7910/README.md index f280cb3ca..1ca124699 100644 --- a/protocols/0f7910/README.md +++ b/protocols/0f7910/README.md @@ -16,7 +16,7 @@ Select the format for the source and destination plates. See diagram below. If a 384 plate is selected for destination plate, it should always be in slot 2. If a 96 plate is selected for destination, it should always be in slot 1. Source plates always start from slot 3 to 9, and tip racks are always the same. You can select which tip the protocol will start on in the fields below. If the global transfer volume is over 20ul, then the P300 will be used. If the transfer volume is 20 or less, the P20 will be used. A value of "8" for the starting position of the tip would mean to start H1 of the tip rack, and a value of 10 would mean to start at B2 of the tip rack, since it iterates down by column. The csv should be formatted as such in the header: ``` -Source plate barcode, Source plate slot (3-9), Source well (A1, B1, etc.), Destination plate barcode, Destination well +Source plate barcode, Source plate slot (3-9), Source well, Dest plate barcode, Dest well, Transfer Vol (ul) ``` diff --git a/protocols/0f7910/fields.json b/protocols/0f7910/fields.json index bd08f6fac..75a832eab 100644 --- a/protocols/0f7910/fields.json +++ b/protocols/0f7910/fields.json @@ -3,7 +3,7 @@ "type": "textFile", "label": ".CSV File", "name": "csv_samp", - "default": "Source plate Barcode,Source plate location,Source well,Destination plate Barcode,Destination well\nDDDD,3,C1,ABCD,A1\nEEEE,3,A1,BBBD,B1" + "default": "Source plate Barcode,Source plate location,Source well,Destination plate Barcode,Destination well\nDDDD,3,C1,ABCD,A1\nEEEE,3,A1,BBBD,B1, 12.4" }, { "type": "dropDown", @@ -23,12 +23,6 @@ {"label": "384", "value": "384"} ] }, - { - "type": "float", - "label": "Transfer Volume (ul)", - "name": "transfer_vol", - "default": 12.0 - }, { "type": "int", "label": "Starting Tip in Tip Rack (1-96, by column)", From 90f4e79603a01733a52b185b153aed7e400c5b5a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9Cramifarawi=E2=80=9D?= <“rami.farawi@opentrons.com”> Date: Wed, 6 Mar 2024 16:45:31 -0500 Subject: [PATCH 2/4] fix --- data/data/fields.csv | 2 +- protoBuilds/0f7910/0f7910.ot2.apiv2.py.json | 10 ++-------- protoBuilds/0f7910/README.json | 4 ++-- protocols/0f7910/fields.json | 2 +- 4 files changed, 6 insertions(+), 12 deletions(-) diff --git a/data/data/fields.csv b/data/data/fields.csv index 3c397a264..e341042fb 100644 --- a/data/data/fields.csv +++ b/data/data/fields.csv @@ -1554,7 +1554,7 @@ transfer2,1 transfer_csv,21 transfer_scheme,2 transfer_to_storage,1 -transfer_vol,10 +transfer_vol,9 transfer_volume,3 transfercsv,2 transfervol,1 diff --git a/protoBuilds/0f7910/0f7910.ot2.apiv2.py.json b/protoBuilds/0f7910/0f7910.ot2.apiv2.py.json index 61dd5ed9e..a528d5e2b 100644 --- a/protoBuilds/0f7910/0f7910.ot2.apiv2.py.json +++ b/protoBuilds/0f7910/0f7910.ot2.apiv2.py.json @@ -1,9 +1,9 @@ { - "content": "from opentrons import protocol_api\n\nmetadata = {\n 'protocolName': 'Plate Filling with CSV Import',\n 'author': 'Rami Farawi ',\n 'source': 'Custom Protocol Request',\n 'apiLevel': '2.11'\n}\n\n\ndef run(ctx):\n\n [csv_samp,\n source_format,\n dest_format,\n transfer_vol,\n starting_tip,\n p300_mount,\n p20_mount] = get_values( # noqa: F821\n \"csv_samp\",\n \"source_format\",\n \"dest_format\",\n \"transfer_vol\",\n \"starting_tip\",\n \"p300_mount\",\n \"p20_mount\")\n\n # mapping\n csv_lines = [[val.strip() for val in line.split(',')]\n for line in csv_samp.splitlines()\n if line.split(',')[0].strip()][1:]\n\n unique_list = []\n for row in csv_lines:\n source_plate_slot = int(row[1])\n if source_plate_slot not in unique_list:\n unique_list.append(source_plate_slot)\n\n starting_tip -= starting_tip\n\n # labware\n source_plates = [ctx.load_labware(\n 'corning_96_wellplate_360ul_flat'\n if source_format == \"96\"\n else \"corning_384_wellplate_112ul_flat\", slot)\n for slot in unique_list]\n source_plates = source_plates\n\n dest_plate = ctx.load_labware(\n 'corning_96_wellplate_360ul_flat'\n if dest_format == \"96\"\n else \"corning_384_wellplate_112ul_flat\", 2\n if dest_format == \"384\"\n else 1)\n\n if transfer_vol > 20:\n tips300 = [ctx.load_labware('opentrons_96_tiprack_300ul', slot)\n for slot in [10]]\n else:\n tips20 = [ctx.load_labware('opentrons_96_tiprack_20ul', slot)\n for slot in [11]]\n\n # pipettes\n if transfer_vol > 20:\n p300 = ctx.load_instrument('p300_single_gen2', p300_mount,\n tip_racks=tips300)\n\n else:\n p20 = ctx.load_instrument('p20_single_gen2', p20_mount,\n tip_racks=tips20)\n\n def pick_up(pip):\n try:\n pip.pick_up_tip()\n except protocol_api.labware.OutOfTipsError:\n ctx.pause(\"Replace empty tip racks.\")\n pip.reset_tipracks()\n pick_up(pip)\n\n # protocol\n pip = p20 if transfer_vol <= 20 else p300\n pip.flow_rate.aspirate = 1\n pip.flow_rate.dispense = 2\n if transfer_vol > 20:\n pip.starting_tip = tips300[0].wells()[starting_tip]\n else:\n pip.starting_tip = tips20[0].wells()[starting_tip]\n for row in csv_lines:\n source_plate_slot = int(row[1])\n source_well_name = row[2]\n dest_well_name = row[4]\n\n source = ctx.loaded_labwares[source_plate_slot].wells_by_name()[source_well_name] # noqa: E501\n dest = dest_plate.wells_by_name()[dest_well_name]\n\n pick_up(pip)\n pip.transfer(transfer_vol, source.bottom(z=0.2), dest, new_tip='never',\n blow_out=True, blowout_location='destination well')\n pip.drop_tip()\n ctx.comment('\\n\\n')\n", + "content": "from opentrons import protocol_api\n\n\nmetadata = {\n 'protocolName': 'Plate Filling with CSV Import',\n 'author': 'Rami Farawi ',\n 'source': 'Custom Protocol Request',\n 'apiLevel': '2.11'\n}\n\n\ndef run(ctx):\n\n [csv_samp,\n source_format,\n dest_format,\n starting_tip,\n p300_mount,\n p20_mount] = get_values( # noqa: F821\n \"csv_samp\",\n \"source_format\",\n \"dest_format\",\n \"starting_tip\",\n \"p300_mount\",\n \"p20_mount\")\n\n # mapping\n csv_lines = [[val.strip() for val in line.split(',')]\n for line in csv_samp.splitlines()\n if line.split(',')[0].strip()][1:]\n\n unique_list = []\n for row in csv_lines:\n source_plate_slot = int(row[1])\n if source_plate_slot not in unique_list:\n unique_list.append(source_plate_slot)\n\n starting_tip -= starting_tip\n\n # labware\n source_plates = [ctx.load_labware(\n 'corning_96_wellplate_360ul_flat'\n if source_format == \"96\"\n else \"corning_384_wellplate_112ul_flat\", slot)\n for slot in unique_list]\n source_plates = source_plates\n\n dest_plate = ctx.load_labware(\n 'corning_96_wellplate_360ul_flat'\n if dest_format == \"96\"\n else \"corning_384_wellplate_112ul_flat\", 2\n if dest_format == \"384\"\n else 1)\n transfer_vol = float(csv_lines[0][5])\n\n if transfer_vol > 20:\n tips300 = [ctx.load_labware('opentrons_96_tiprack_300ul', slot)\n for slot in [10]]\n else:\n tips20 = [ctx.load_labware('opentrons_96_tiprack_20ul', slot)\n for slot in [11]]\n\n # pipettes\n if transfer_vol > 20:\n p300 = ctx.load_instrument('p300_single_gen2', p300_mount,\n tip_racks=tips300)\n\n else:\n p20 = ctx.load_instrument('p20_single_gen2', p20_mount,\n tip_racks=tips20)\n\n def pick_up(pip):\n try:\n pip.pick_up_tip()\n except protocol_api.labware.OutOfTipsError:\n ctx.pause(\"Replace empty tip racks.\")\n pip.reset_tipracks()\n pick_up(pip)\n\n # protocol\n\n pip = p20 if transfer_vol <= 20 else p300\n pip.flow_rate.aspirate = 1\n pip.flow_rate.dispense = 2\n\n if transfer_vol > 20:\n pip.starting_tip = tips300[0].wells()[starting_tip]\n else:\n pip.starting_tip = tips20[0].wells()[starting_tip]\n\n for row in csv_lines:\n source_plate_slot = int(row[1])\n source_well_name = row[2]\n dest_well_name = row[4]\n pip_transfer_vol = float(row[5])\n\n source = ctx.loaded_labwares[source_plate_slot].wells_by_name()[source_well_name] # noqa: E501\n dest = dest_plate.wells_by_name()[dest_well_name]\n\n pick_up(pip)\n pip.transfer(pip_transfer_vol, source.bottom(z=0.2), dest,\n new_tip='never',\n blow_out=True, blowout_location='destination well')\n pip.drop_tip()\n ctx.comment('\\n\\n')\n", "custom_labware_defs": [], "fields": [ { - "default": "Source plate Barcode,Source plate location,Source well,Destination plate Barcode,Destination well\nDDDD,3,C1,ABCD,A1\nEEEE,3,A1,BBBD,B1", + "default": "Source plate Barcode,Source plate location,Source well,Destination plate Barcode,Destination well\nDDDD,3,C1,ABCD,A1,12.4\nEEEE,3,A1,BBBD,B1,12.4", "label": ".CSV File", "name": "csv_samp", "type": "textFile" @@ -38,12 +38,6 @@ ], "type": "dropDown" }, - { - "default": 12, - "label": "Transfer Volume", - "name": "transfer_vol", - "type": "int" - }, { "default": 1, "label": "Starting Tip in Tip Rack (1-96, by column)", diff --git a/protoBuilds/0f7910/README.json b/protoBuilds/0f7910/README.json index 8394c6a4d..260d5cd76 100644 --- a/protoBuilds/0f7910/README.json +++ b/protoBuilds/0f7910/README.json @@ -6,14 +6,14 @@ ] }, "deck-setup": "", - "description": "Select the format for the source and destination plates. See diagram below. If a 384 plate is selected for destination plate, it should always be in slot 2. If a 96 plate is selected for destination, it should always be in slot 1. Source plates always start from slot 3 to 9, and tip racks are always the same. You can select which tip the protocol will start on in the fields below. If the global transfer volume is over 20ul, then the P300 will be used. If the transfer volume is 20 or less, the P20 will be used. A value of \"8\" for the starting position of the tip would mean to start H1 of the tip rack, and a value of 10 would mean to start at B2 of the tip rack, since it iterates down by column. The csv should be formatted as such in the header:\nSource plate barcode, Source plate slot (3-9), Source well (A1, B1, etc.), Destination plate barcode, Destination well", + "description": "Select the format for the source and destination plates. See diagram below. If a 384 plate is selected for destination plate, it should always be in slot 2. If a 96 plate is selected for destination, it should always be in slot 1. Source plates always start from slot 3 to 9, and tip racks are always the same. You can select which tip the protocol will start on in the fields below. If the global transfer volume is over 20ul, then the P300 will be used. If the transfer volume is 20 or less, the P20 will be used. A value of \"8\" for the starting position of the tip would mean to start H1 of the tip rack, and a value of 10 would mean to start at B2 of the tip rack, since it iterates down by column. The csv should be formatted as such in the header:\nSource plate barcode, Source plate slot (3-9), Source well, Dest plate barcode, Dest well, Transfer Vol (ul)", "internal": "0f7910", "labware": "\nCorning 384 Well Plate 112 \u00b5L Flat\nCorning 96 Well Plate 360 \u00b5L\nOpentrons 96 Tip Rack 20 \u00b5L\nOpentrons 96 Tip Rack 300 \u00b5L\n", "markdown": { "author": "[Opentrons](https://opentrons.com/)\n\n\n\n\n", "categories": "* Sample Prep\n\t* Plate Filling\n\n\n", "deck-setup": "![deck](https://opentrons-protocol-library-website.s3.amazonaws.com/custom-README-images/0f7910/Screen+Shot+2022-12-20+at+10.41.56+AM.png)\n\n\n", - "description": "Select the format for the source and destination plates. See diagram below. If a 384 plate is selected for destination plate, it should always be in slot 2. If a 96 plate is selected for destination, it should always be in slot 1. Source plates always start from slot 3 to 9, and tip racks are always the same. You can select which tip the protocol will start on in the fields below. If the global transfer volume is over 20ul, then the P300 will be used. If the transfer volume is 20 or less, the P20 will be used. A value of \"8\" for the starting position of the tip would mean to start H1 of the tip rack, and a value of 10 would mean to start at B2 of the tip rack, since it iterates down by column. The csv should be formatted as such in the header:\n\n```\nSource plate barcode, Source plate slot (3-9), Source well (A1, B1, etc.), Destination plate barcode, Destination well\n```\n\n\n", + "description": "Select the format for the source and destination plates. See diagram below. If a 384 plate is selected for destination plate, it should always be in slot 2. If a 96 plate is selected for destination, it should always be in slot 1. Source plates always start from slot 3 to 9, and tip racks are always the same. You can select which tip the protocol will start on in the fields below. If the global transfer volume is over 20ul, then the P300 will be used. If the transfer volume is 20 or less, the P20 will be used. A value of \"8\" for the starting position of the tip would mean to start H1 of the tip rack, and a value of 10 would mean to start at B2 of the tip rack, since it iterates down by column. The csv should be formatted as such in the header:\n\n```\nSource plate barcode, Source plate slot (3-9), Source well, Dest plate barcode, Dest well, Transfer Vol (ul)\n```\n\n\n", "internal": "0f7910\n", "labware": "* Corning 384 Well Plate 112 \u00b5L Flat\n* Corning 96 Well Plate 360 \u00b5L\n* [Opentrons 96 Tip Rack 20 \u00b5L](https://shop.opentrons.com/collections/opentrons-tips/products/opentrons-10ul-tips)\n* [Opentrons 96 Tip Rack 300 \u00b5L](https://shop.opentrons.com/collections/opentrons-tips/products/opentrons-10ul-tips)\n\n\n", "notes": "If you have any questions about this protocol, please contact the Protocol Development Team by filling out the [Troubleshooting Survey](https://protocol-troubleshooting.paperform.co/).\n\n\n", diff --git a/protocols/0f7910/fields.json b/protocols/0f7910/fields.json index 75a832eab..febb6d458 100644 --- a/protocols/0f7910/fields.json +++ b/protocols/0f7910/fields.json @@ -3,7 +3,7 @@ "type": "textFile", "label": ".CSV File", "name": "csv_samp", - "default": "Source plate Barcode,Source plate location,Source well,Destination plate Barcode,Destination well\nDDDD,3,C1,ABCD,A1\nEEEE,3,A1,BBBD,B1, 12.4" + "default": "Source plate Barcode,Source plate location,Source well,Destination plate Barcode,Destination well\nDDDD,3,C1,ABCD,A1,12.4\nEEEE,3,A1,BBBD,B1,12.4" }, { "type": "dropDown", From 4dad96a281386c3a4f1561c7e05fb6a8fda200d3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9Cramifarawi=E2=80=9D?= <“rami.farawi@opentrons.com”> Date: Wed, 6 Mar 2024 16:53:00 -0500 Subject: [PATCH 3/4] fix --- protoBuilds/0f7910/0f7910.ot2.apiv2.py.json | 2 +- protocols/0f7910/0f7910.ot2.apiv2.py | 9 ++++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/protoBuilds/0f7910/0f7910.ot2.apiv2.py.json b/protoBuilds/0f7910/0f7910.ot2.apiv2.py.json index a528d5e2b..ce4c17477 100644 --- a/protoBuilds/0f7910/0f7910.ot2.apiv2.py.json +++ b/protoBuilds/0f7910/0f7910.ot2.apiv2.py.json @@ -1,5 +1,5 @@ { - "content": "from opentrons import protocol_api\n\n\nmetadata = {\n 'protocolName': 'Plate Filling with CSV Import',\n 'author': 'Rami Farawi ',\n 'source': 'Custom Protocol Request',\n 'apiLevel': '2.11'\n}\n\n\ndef run(ctx):\n\n [csv_samp,\n source_format,\n dest_format,\n starting_tip,\n p300_mount,\n p20_mount] = get_values( # noqa: F821\n \"csv_samp\",\n \"source_format\",\n \"dest_format\",\n \"starting_tip\",\n \"p300_mount\",\n \"p20_mount\")\n\n # mapping\n csv_lines = [[val.strip() for val in line.split(',')]\n for line in csv_samp.splitlines()\n if line.split(',')[0].strip()][1:]\n\n unique_list = []\n for row in csv_lines:\n source_plate_slot = int(row[1])\n if source_plate_slot not in unique_list:\n unique_list.append(source_plate_slot)\n\n starting_tip -= starting_tip\n\n # labware\n source_plates = [ctx.load_labware(\n 'corning_96_wellplate_360ul_flat'\n if source_format == \"96\"\n else \"corning_384_wellplate_112ul_flat\", slot)\n for slot in unique_list]\n source_plates = source_plates\n\n dest_plate = ctx.load_labware(\n 'corning_96_wellplate_360ul_flat'\n if dest_format == \"96\"\n else \"corning_384_wellplate_112ul_flat\", 2\n if dest_format == \"384\"\n else 1)\n transfer_vol = float(csv_lines[0][5])\n\n if transfer_vol > 20:\n tips300 = [ctx.load_labware('opentrons_96_tiprack_300ul', slot)\n for slot in [10]]\n else:\n tips20 = [ctx.load_labware('opentrons_96_tiprack_20ul', slot)\n for slot in [11]]\n\n # pipettes\n if transfer_vol > 20:\n p300 = ctx.load_instrument('p300_single_gen2', p300_mount,\n tip_racks=tips300)\n\n else:\n p20 = ctx.load_instrument('p20_single_gen2', p20_mount,\n tip_racks=tips20)\n\n def pick_up(pip):\n try:\n pip.pick_up_tip()\n except protocol_api.labware.OutOfTipsError:\n ctx.pause(\"Replace empty tip racks.\")\n pip.reset_tipracks()\n pick_up(pip)\n\n # protocol\n\n pip = p20 if transfer_vol <= 20 else p300\n pip.flow_rate.aspirate = 1\n pip.flow_rate.dispense = 2\n\n if transfer_vol > 20:\n pip.starting_tip = tips300[0].wells()[starting_tip]\n else:\n pip.starting_tip = tips20[0].wells()[starting_tip]\n\n for row in csv_lines:\n source_plate_slot = int(row[1])\n source_well_name = row[2]\n dest_well_name = row[4]\n pip_transfer_vol = float(row[5])\n\n source = ctx.loaded_labwares[source_plate_slot].wells_by_name()[source_well_name] # noqa: E501\n dest = dest_plate.wells_by_name()[dest_well_name]\n\n pick_up(pip)\n pip.transfer(pip_transfer_vol, source.bottom(z=0.2), dest,\n new_tip='never',\n blow_out=True, blowout_location='destination well')\n pip.drop_tip()\n ctx.comment('\\n\\n')\n", + "content": "from opentrons import protocol_api\n\n\nmetadata = {\n 'protocolName': 'Plate Filling with CSV Import',\n 'author': 'Rami Farawi ',\n 'source': 'Custom Protocol Request',\n 'apiLevel': '2.11'\n}\n\n\ndef run(ctx):\n\n [csv_samp,\n source_format,\n dest_format,\n starting_tip,\n p300_mount,\n p20_mount] = get_values( # noqa: F821\n \"csv_samp\",\n \"source_format\",\n \"dest_format\",\n \"starting_tip\",\n \"p300_mount\",\n \"p20_mount\")\n\n # mapping\n csv_lines = [[val.strip() for val in line.split(',')]\n for line in csv_samp.splitlines()\n if line.split(',')[0].strip()][1:]\n\n unique_list = []\n for row in csv_lines:\n source_plate_slot = int(row[1])\n if source_plate_slot not in unique_list:\n unique_list.append(source_plate_slot)\n\n starting_tip -= starting_tip\n\n # labware\n source_plates = [ctx.load_labware(\n 'corning_96_wellplate_360ul_flat'\n if source_format == \"96\"\n else \"corning_384_wellplate_112ul_flat\", slot)\n for slot in unique_list]\n source_plates = source_plates\n\n dest_plate = ctx.load_labware(\n 'corning_96_wellplate_360ul_flat'\n if dest_format == \"96\"\n else \"corning_384_wellplate_112ul_flat\", 2\n if dest_format == \"384\"\n else 1)\n transfer_vol = float(csv_lines[0][5])\n\n if transfer_vol > 20:\n tips300 = [ctx.load_labware('opentrons_96_tiprack_300ul', slot)\n for slot in [10]]\n else:\n tips20 = [ctx.load_labware('opentrons_96_tiprack_20ul', slot)\n for slot in [11]]\n\n # pipettes\n if transfer_vol > 20:\n p300 = ctx.load_instrument('p300_single_gen2', p300_mount,\n tip_racks=tips300)\n\n else:\n p20 = ctx.load_instrument('p20_single_gen2', p20_mount,\n tip_racks=tips20)\n\n def pick_up(pip):\n try:\n pip.pick_up_tip()\n except protocol_api.labware.OutOfTipsError:\n ctx.pause(\"Replace empty tip racks.\")\n pip.reset_tipracks()\n pick_up(pip)\n\n # protocol\n\n pip = p20 if transfer_vol <= 20 else p300\n pip.flow_rate.aspirate = 1\n pip.flow_rate.dispense = 2\n\n if transfer_vol > 20:\n pip.starting_tip = tips300[0].wells()[starting_tip]\n else:\n pip.starting_tip = tips20[0].wells()[starting_tip]\n\n for row in csv_lines:\n source_plate_slot = int(row[1])\n source_well_name = row[2]\n dest_well_name = row[4]\n pip_transfer_vol = float(row[5])\n\n source = ctx.loaded_labwares[source_plate_slot].wells_by_name()[source_well_name] # noqa: E501\n dest = dest_plate.wells_by_name()[dest_well_name]\n\n pick_up(pip)\n pip.mix(1, pip_transfer_vol, source.bottom(z=0.2))\n pip.aspirate(pip_transfer_vol, source.bottom(z=0.2))\n pip.dispense(pip_transfer_vol, dest)\n pip.move_to(dest.top(z=-3))\n ctx.delay(seconds=1)\n pip.blow_out()\n pip.drop_tip()\n ctx.comment('\\n\\n')\n", "custom_labware_defs": [], "fields": [ { diff --git a/protocols/0f7910/0f7910.ot2.apiv2.py b/protocols/0f7910/0f7910.ot2.apiv2.py index 55692bcd3..7a2086e88 100644 --- a/protocols/0f7910/0f7910.ot2.apiv2.py +++ b/protocols/0f7910/0f7910.ot2.apiv2.py @@ -98,8 +98,11 @@ def pick_up(pip): dest = dest_plate.wells_by_name()[dest_well_name] pick_up(pip) - pip.transfer(pip_transfer_vol, source.bottom(z=0.2), dest, - new_tip='never', - blow_out=True, blowout_location='destination well') + pip.mix(1, pip_transfer_vol, source.bottom(z=0.2)) + pip.aspirate(pip_transfer_vol, source.bottom(z=0.2)) + pip.dispense(pip_transfer_vol, dest) + pip.move_to(dest.top(z=-3)) + ctx.delay(seconds=1) + pip.blow_out() pip.drop_tip() ctx.comment('\n\n') From 206017324db6fc6afd2b0c1e584e692198d267c4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9Cramifarawi=E2=80=9D?= <“rami.farawi@opentrons.com”> Date: Wed, 6 Mar 2024 16:55:54 -0500 Subject: [PATCH 4/4] fix --- protoBuilds/0f7910/0f7910.ot2.apiv2.py.json | 2 +- protocols/0f7910/0f7910.ot2.apiv2.py | 7 +++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/protoBuilds/0f7910/0f7910.ot2.apiv2.py.json b/protoBuilds/0f7910/0f7910.ot2.apiv2.py.json index ce4c17477..d4d5af2cb 100644 --- a/protoBuilds/0f7910/0f7910.ot2.apiv2.py.json +++ b/protoBuilds/0f7910/0f7910.ot2.apiv2.py.json @@ -1,5 +1,5 @@ { - "content": "from opentrons import protocol_api\n\n\nmetadata = {\n 'protocolName': 'Plate Filling with CSV Import',\n 'author': 'Rami Farawi ',\n 'source': 'Custom Protocol Request',\n 'apiLevel': '2.11'\n}\n\n\ndef run(ctx):\n\n [csv_samp,\n source_format,\n dest_format,\n starting_tip,\n p300_mount,\n p20_mount] = get_values( # noqa: F821\n \"csv_samp\",\n \"source_format\",\n \"dest_format\",\n \"starting_tip\",\n \"p300_mount\",\n \"p20_mount\")\n\n # mapping\n csv_lines = [[val.strip() for val in line.split(',')]\n for line in csv_samp.splitlines()\n if line.split(',')[0].strip()][1:]\n\n unique_list = []\n for row in csv_lines:\n source_plate_slot = int(row[1])\n if source_plate_slot not in unique_list:\n unique_list.append(source_plate_slot)\n\n starting_tip -= starting_tip\n\n # labware\n source_plates = [ctx.load_labware(\n 'corning_96_wellplate_360ul_flat'\n if source_format == \"96\"\n else \"corning_384_wellplate_112ul_flat\", slot)\n for slot in unique_list]\n source_plates = source_plates\n\n dest_plate = ctx.load_labware(\n 'corning_96_wellplate_360ul_flat'\n if dest_format == \"96\"\n else \"corning_384_wellplate_112ul_flat\", 2\n if dest_format == \"384\"\n else 1)\n transfer_vol = float(csv_lines[0][5])\n\n if transfer_vol > 20:\n tips300 = [ctx.load_labware('opentrons_96_tiprack_300ul', slot)\n for slot in [10]]\n else:\n tips20 = [ctx.load_labware('opentrons_96_tiprack_20ul', slot)\n for slot in [11]]\n\n # pipettes\n if transfer_vol > 20:\n p300 = ctx.load_instrument('p300_single_gen2', p300_mount,\n tip_racks=tips300)\n\n else:\n p20 = ctx.load_instrument('p20_single_gen2', p20_mount,\n tip_racks=tips20)\n\n def pick_up(pip):\n try:\n pip.pick_up_tip()\n except protocol_api.labware.OutOfTipsError:\n ctx.pause(\"Replace empty tip racks.\")\n pip.reset_tipracks()\n pick_up(pip)\n\n # protocol\n\n pip = p20 if transfer_vol <= 20 else p300\n pip.flow_rate.aspirate = 1\n pip.flow_rate.dispense = 2\n\n if transfer_vol > 20:\n pip.starting_tip = tips300[0].wells()[starting_tip]\n else:\n pip.starting_tip = tips20[0].wells()[starting_tip]\n\n for row in csv_lines:\n source_plate_slot = int(row[1])\n source_well_name = row[2]\n dest_well_name = row[4]\n pip_transfer_vol = float(row[5])\n\n source = ctx.loaded_labwares[source_plate_slot].wells_by_name()[source_well_name] # noqa: E501\n dest = dest_plate.wells_by_name()[dest_well_name]\n\n pick_up(pip)\n pip.mix(1, pip_transfer_vol, source.bottom(z=0.2))\n pip.aspirate(pip_transfer_vol, source.bottom(z=0.2))\n pip.dispense(pip_transfer_vol, dest)\n pip.move_to(dest.top(z=-3))\n ctx.delay(seconds=1)\n pip.blow_out()\n pip.drop_tip()\n ctx.comment('\\n\\n')\n", + "content": "from opentrons import protocol_api\n\n\nmetadata = {\n 'protocolName': 'Plate Filling with CSV Import',\n 'author': 'Rami Farawi ',\n 'source': 'Custom Protocol Request',\n 'apiLevel': '2.11'\n}\n\n\ndef run(ctx):\n\n [csv_samp,\n source_format,\n dest_format,\n starting_tip,\n p300_mount,\n p20_mount] = get_values( # noqa: F821\n \"csv_samp\",\n \"source_format\",\n \"dest_format\",\n \"starting_tip\",\n \"p300_mount\",\n \"p20_mount\")\n\n # mapping\n csv_lines = [[val.strip() for val in line.split(',')]\n for line in csv_samp.splitlines()\n if line.split(',')[0].strip()][1:]\n\n unique_list = []\n for row in csv_lines:\n source_plate_slot = int(row[1])\n if source_plate_slot not in unique_list:\n unique_list.append(source_plate_slot)\n\n starting_tip -= starting_tip\n\n # labware\n source_plates = [ctx.load_labware(\n 'corning_96_wellplate_360ul_flat'\n if source_format == \"96\"\n else \"corning_384_wellplate_112ul_flat\", slot)\n for slot in unique_list]\n source_plates = source_plates\n\n dest_plate = ctx.load_labware(\n 'corning_96_wellplate_360ul_flat'\n if dest_format == \"96\"\n else \"corning_384_wellplate_112ul_flat\", 2\n if dest_format == \"384\"\n else 1)\n transfer_vol = float(csv_lines[0][5])\n\n if transfer_vol > 20:\n tips300 = [ctx.load_labware('opentrons_96_tiprack_300ul', slot)\n for slot in [10]]\n else:\n tips20 = [ctx.load_labware('opentrons_96_tiprack_20ul', slot)\n for slot in [11]]\n\n # pipettes\n if transfer_vol > 20:\n p300 = ctx.load_instrument('p300_single_gen2', p300_mount,\n tip_racks=tips300)\n\n else:\n p20 = ctx.load_instrument('p20_single_gen2', p20_mount,\n tip_racks=tips20)\n\n def pick_up(pip):\n try:\n pip.pick_up_tip()\n except protocol_api.labware.OutOfTipsError:\n ctx.pause(\"Replace empty tip racks.\")\n pip.reset_tipracks()\n pick_up(pip)\n\n # protocol\n\n pip = p20 if transfer_vol <= 20 else p300\n pip.flow_rate.aspirate = 1\n pip.flow_rate.dispense = 2\n\n if transfer_vol > 20:\n pip.starting_tip = tips300[0].wells()[starting_tip]\n else:\n pip.starting_tip = tips20[0].wells()[starting_tip]\n\n for row in csv_lines:\n source_plate_slot = int(row[1])\n source_well_name = row[2]\n dest_well_name = row[4]\n\n source = ctx.loaded_labwares[source_plate_slot].wells_by_name()[source_well_name] # noqa: E501\n dest = dest_plate.wells_by_name()[dest_well_name]\n\n pick_up(pip)\n pip.mix(1, transfer_vol, source.bottom(z=0.2))\n pip.aspirate(transfer_vol, source.bottom(z=0.2))\n pip.dispense(transfer_vol, dest)\n pip.move_to(dest.top(z=-3))\n ctx.delay(seconds=1)\n pip.blow_out()\n pip.drop_tip()\n ctx.comment('\\n\\n')\n", "custom_labware_defs": [], "fields": [ { diff --git a/protocols/0f7910/0f7910.ot2.apiv2.py b/protocols/0f7910/0f7910.ot2.apiv2.py index 7a2086e88..cd64bbe2f 100644 --- a/protocols/0f7910/0f7910.ot2.apiv2.py +++ b/protocols/0f7910/0f7910.ot2.apiv2.py @@ -92,15 +92,14 @@ def pick_up(pip): source_plate_slot = int(row[1]) source_well_name = row[2] dest_well_name = row[4] - pip_transfer_vol = float(row[5]) source = ctx.loaded_labwares[source_plate_slot].wells_by_name()[source_well_name] # noqa: E501 dest = dest_plate.wells_by_name()[dest_well_name] pick_up(pip) - pip.mix(1, pip_transfer_vol, source.bottom(z=0.2)) - pip.aspirate(pip_transfer_vol, source.bottom(z=0.2)) - pip.dispense(pip_transfer_vol, dest) + pip.mix(1, transfer_vol, source.bottom(z=0.2)) + pip.aspirate(transfer_vol, source.bottom(z=0.2)) + pip.dispense(transfer_vol, dest) pip.move_to(dest.top(z=-3)) ctx.delay(seconds=1) pip.blow_out()