Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
“ramifarawi” committed Dec 11, 2023
1 parent 3d60fa8 commit c449201
Show file tree
Hide file tree
Showing 8 changed files with 2,836 additions and 3 deletions.
7 changes: 4 additions & 3 deletions data/data/fields.csv
Original file line number Diff line number Diff line change
Expand Up @@ -726,7 +726,7 @@ lysis_vol,1
m10_mount,2
m1k,1
m20_mount,79
m300_mount,107
m300_mount,108
m300_type,2
m_mount,1
mag_bead_mix_resuspend_reps,1
Expand Down Expand Up @@ -910,7 +910,7 @@ num_rounds,1
num_row,1
num_rows_a,1
num_rows_b,1
num_samp,70
num_samp,71
num_samp_p1,1
num_samp_p2,1
num_samp_plate1,1
Expand Down Expand Up @@ -986,7 +986,7 @@ p1kmnt,1
p1n,1
p1num,1
p20_blowout_height,1
p20_mount,135
p20_mount,136
p20_multi_mount,3
p20_rate,2
p20_reservoir_height,1
Expand Down Expand Up @@ -1191,6 +1191,7 @@ reagent_slot_scan,2
reagent_transfer_vol,2
reagent_type,1
reagents_csv,1
real_mode,1
reduced_speed_limit,1
relative_height,1
remove_empty_racks,1
Expand Down
1,297 changes: 1,297 additions & 0 deletions protoBuilds/0845ab/0845ab.ot2.apiv2.py.json

Large diffs are not rendered by default.

36 changes: 36 additions & 0 deletions protoBuilds/0845ab/README.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
{
"author": "Opentrons",
"categories": {
"Broad Category": [
"Specific Category"
]
},
"deck-setup": "",
"description": "This protocol does stuff!",
"internal": "0845ab",
"labware": "\nTMTpro18 PCR strip plate #72.985.002\nNEST 96 Well Plate 100 \u00b5L PCR Full Skirt #402501\nOpentrons 24 Tube Rack with Eppendorf 2 mL Safe-Lock Snapcap\nOpentrons 96 Tip Rack 300 \u00b5L\nNEST 12 Well Reservoir 15 mL #360102\nOpentrons 96 Tip Rack 20 \u00b5L\nNEST 1 Well Reservoir 195 mL #360103\n",
"markdown": {
"author": "[Opentrons](https://opentrons.com/)\n\n\n",
"categories": "* Broad Category\n\t* Specific Category\n\n\n",
"deck-setup": "![deck](https://opentrons-protocol-library-website.s3.amazonaws.com/custom-README-images/0845ab/deck.png)\n\n\n",
"description": "This protocol does stuff!\n\n\n",
"internal": "0845ab\n",
"labware": "* TMTpro18 PCR strip plate #72.985.002\n* [NEST 96 Well Plate 100 \u00b5L PCR Full Skirt #402501](http://www.cell-nest.com/page94?_l=en&product_id=97&product_category=96)\n* [Opentrons 24 Tube Rack with Eppendorf 2 mL Safe-Lock Snapcap](https://shop.opentrons.com/collections/opentrons-tips/products/tube-rack-set-1)\n* [Opentrons 96 Tip Rack 300 \u00b5L](https://shop.opentrons.com/collections/opentrons-tips/products/opentrons-300ul-tips)\n* [NEST 12 Well Reservoir 15 mL #360102](http://www.cell-nest.com/page94?_l=en&product_id=102)\n* [Opentrons 96 Tip Rack 20 \u00b5L](https://shop.opentrons.com/collections/opentrons-tips/products/opentrons-10ul-tips)\n* [NEST 1 Well Reservoir 195 mL #360103](http://www.cell-nest.com/page94?_l=en&product_id=102)\n\n\n",
"modules": "* [Opentrons Magnetic Module (GEN2)](https://shop.opentrons.com/magnetic-module-gen2/)\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",
"pipettes": "* [Opentrons P20 Single Channel Electronic Pipette (GEN2)](https://shop.opentrons.com/single-channel-electronic-pipette-p20/)\n* [Opentrons P300 8 Channel Electronic Pipette (GEN2)](https://shop.opentrons.com/8-channel-electronic-pipette/)\n\n\n",
"process": "1. Input your protocol parameters above.\n2. Download your protocol and unzip if needed.\n3. Upload your custom labware to the [OT App](https://opentrons.com/ot-app) by navigating to `More` > `Custom Labware` > `Add Labware`, and selecting your labware files (.json extensions) if needed.\n4. Upload your protocol file (.py extension) to the [OT App](https://opentrons.com/ot-app) in the `Protocol` tab.\n5. Set up your deck according to the deck map.\n6. Calibrate your labware, tiprack and pipette using the OT App. For calibration tips, check out our [support articles](https://support.opentrons.com/en/collections/1559720-guide-for-getting-started-with-the-ot-2).\n7. Hit \"Run\".\n\n\n",
"protocol-steps": "1. Step 1...\n\n\n",
"reagent-setup": "![reagents](https://opentrons-protocol-library-website.s3.amazonaws.com/custom-README-images/0845ab/reagents.png)\n\n\n",
"title": "Digestion and Bead Cleanup"
},
"modules": [
"Opentrons Magnetic Module (GEN2)"
],
"notes": "If you have any questions about this protocol, please contact the Protocol Development Team by filling out the Troubleshooting Survey.",
"pipettes": "\nOpentrons P20 Single Channel Electronic Pipette (GEN2)\nOpentrons P300 8 Channel Electronic Pipette (GEN2)\n",
"process": "\nInput your protocol parameters above.\nDownload your protocol and unzip if needed.\nUpload your custom labware to the OT App by navigating to More > Custom Labware > Add Labware, and selecting your labware files (.json extensions) if needed.\nUpload your protocol file (.py extension) to the OT App in the Protocol tab.\nSet up your deck according to the deck map.\nCalibrate your labware, tiprack and pipette using the OT App. For calibration tips, check out our support articles.\nHit \"Run\".\n",
"protocol-steps": "\nStep 1...\n",
"reagent-setup": "",
"title": "Digestion and Bead Cleanup"
}
20 changes: 20 additions & 0 deletions protoBuilds/0845ab/metadata.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"files": {
"OT 1 protocol": [],
"OT 2 protocol": [
"0845ab.ot2.apiv2.py"
],
"description": [
"README.md"
]
},
"flags": {
"embedded-app": false,
"feature": false,
"hide-from-search": false,
"skip-tests": false
},
"path": "protocols/0845ab",
"slug": "0845ab",
"status": "ok"
}
248 changes: 248 additions & 0 deletions protocols/0845ab/0845ab.ot2.apiv2.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,248 @@
import math
from opentrons import protocol_api

metadata = {
'protocolName': 'Digestion and Bead Cleanup',
'author': 'Rami Farawi <[email protected]>',
'source': 'Custom Protocol Request',
'apiLevel': '2.14'
}


def run(ctx):

[num_samp, real_mode, p20_mount, m300_mount] = get_values( # noqa: F821
"num_samp", "real_mode", "p20_mount", "m300_mount")

# num_samp = 48
num_col = math.ceil(num_samp/8)
#
# m300_mount = 'left'
# p20_mount = 'right'
#
# real_mode = True

# labware
mag_mod = ctx.load_module("magnetic module gen2", 1)
try:
mag_plate = mag_mod.load_labware('opentrons_96_wellplate_200ul_pcr_full_skirt') # noqa: E501

except FileNotFoundError:
mag_plate = mag_mod.load_labware('nest_96_wellplate_100ul_pcr_full_skirt') # noqa: E501

try:
old_plate = ctx.load_labware('opentrons_96_wellplate_200ul_pcr_full_skirt', 2) # noqa: E501
except FileNotFoundError:
old_plate = ctx.load_labware('nest_96_wellplate_100ul_pcr_full_skirt', 2)

tuberack = ctx.load_labware('opentrons_24_tuberack_eppendorf_2ml_safelock_snapcap', 3) # noqa: E501

reservoir = ctx.load_labware('nest_12_reservoir_15ml', 6)
trash = ctx.load_labware('nest_1_reservoir_195ml', 8).wells()[0].top()
tmt_plate = ctx.load_labware('tmtpro18_pcr_plate', 9)

if not ctx.is_simulating:

hs_mod = ctx.load_module('heaterShakerModuleV1', 10)
hs_mod.close_labware_latch()
else:
dummy = ctx.load_labware('nest_12_reservoir_15ml', 10)
dummy = dummy

tips300 = [ctx.load_labware('opentrons_96_tiprack_300ul', slot)
for slot in [4, 5]]
tips20 = [ctx.load_labware('opentrons_96_tiprack_20ul', slot)
for slot in [7, 11]]

# pipettes
p20 = ctx.load_instrument('p20_single_gen2', p20_mount, tip_racks=tips20)
m300 = ctx.load_instrument('p300_multi_gen2', m300_mount,
tip_racks=tips300)

def slow_tip_withdrawal(pipette, well_location, to_center=False):
pipette.default_speed = 10
if to_center is False:
pipette.move_to(well_location.top())
else:
pipette.move_to(well_location.center())
pipette.default_speed = 400

def pick_up(pip):
try:
pip.pick_up_tip()
except protocol_api.labware.OutOfTipsError:
ctx.pause(f"Replace empty tip rack for {pip}")
pip.reset_tipracks()
pip.pick_up_tip()

# mapping
sample_cols = old_plate.rows()[0][:num_col]
dest_cols = mag_plate.rows()[0][:num_col]
dest_wells = [well for well in mag_plate.wells()[:num_samp]]

pool_well1 = tuberack['B1']
pool_well2 = tuberack['B2']
pool_well3 = tuberack['B3']

num_pools = int(num_samp/16)

all_pools = [pool_well1, pool_well2, pool_well3][:num_pools]

acn = reservoir['A1']
ethanol = reservoir['A2']

beads = tuberack['A1']
mm_teab = tuberack['A2']
ha = tuberack['A3']
formic_acid = tuberack['A4']

digestion_solution = tmt_plate['A12']

# protocol
ctx.comment('\n---------------ADDING BEADS TO PLATES----------------\n\n')

pick_up(p20)
p20.mix(20, 20, beads, rate=1.5)
for well in dest_wells:
p20.aspirate(4, beads)
slow_tip_withdrawal(p20, beads)
p20.dispense(4, well)
slow_tip_withdrawal(p20, beads)
p20.blow_out()
p20.drop_tip() if real_mode else p20.return_tip()

ctx.comment('\n---------------Transferring Sample----------------\n\n')
for s, d in zip(sample_cols, dest_cols):
pick_up(m300)
m300.aspirate(30, s)
m300.dispense(30, d)
m300.blow_out()
m300.drop_tip() if real_mode else m300.return_tip()

ctx.comment('\n---------------Transferring ACN----------------\n\n')
for col in dest_cols:
pick_up(m300)
m300.aspirate(70, acn)
m300.dispense(70, col)
m300.mix(3, 85, col, rate=0.7)
m300.drop_tip() if real_mode else m300.return_tip()

ctx.delay(minutes=2 if real_mode else 0.5)

mag_mod.engage(height_from_base=1)

ctx.delay(minutes=5 if real_mode else 0.5)

ctx.comment('\n---------------Removing Super----------------\n\n')
pick_up(m300)
for col in dest_cols:
m300.aspirate(100, col, rate=0.1)
m300.aspirate(10, col.bottom(z=0.5), rate=0.1)
m300.dispense(110, trash)
ctx.delay(seconds=1.5)
m300.blow_out()
m300.drop_tip() if real_mode else m300.return_tip()

for _ in range(2):
ctx.comment('\n---------------Adding Ethanol----------------\n\n')
pick_up(m300)
for col in dest_cols:
m300.aspirate(100, ethanol, rate=0.1)
slow_tip_withdrawal(m300, ethanol)
m300.dispense(100, col.top())
m300.drop_tip() if real_mode else m300.return_tip()

ctx.comment('\n---------------Removing Ethanol----------------\n\n')
pick_up(m300)
for col in dest_cols:
m300.aspirate(100, col, rate=0.1)
m300.aspirate(10, col.bottom(z=0.5), rate=0.1)
m300.dispense(110, trash)
ctx.delay(seconds=1.5)
m300.blow_out()
m300.drop_tip() if real_mode else m300.return_tip()

mag_mod.disengage()

ctx.comment('\n--------------ADDING Digestion Solution--------------\n\n')
for col in dest_cols:
pick_up(m300)
m300.aspirate(20, digestion_solution)
m300.dispense(20, col)
m300.mix(2, 15, col)
m300.blow_out()
m300.drop_tip() if real_mode else m300.return_tip()

if not ctx.is_simulating:
hs_mod.open_labware_latch()
ctx.pause('Move plate to heater shaker')
if not ctx.is_simulating:
hs_mod.close_labware_latch()
hs_mod.set_and_wait_for_temperature(37)
ctx.pause('Overnight Digestion')
if not ctx.is_simulating:
hs_mod.deactivate_heater()
hs_mod.open_labware_latch()
ctx.pause("Move plate to magnetic module")

mag_mod.engage(height_from_base=1)
ctx.delay(minutes=2 if real_mode else 0.5)

ctx.comment('\n---------------Transferring Sample----------------\n\n')
new_cols = mag_plate.rows()[0][num_col:num_col+num_col]
new_wells = [well for col in mag_plate.columns()[num_col:num_col+num_col]
for well in col]

for s, d in zip(dest_cols, new_cols):
pick_up(m300)
m300.aspirate(20, s, rate=0.05)
m300.dispense(20, d)
m300.move_to(d.top())
ctx.delay(seconds=1.5)
m300.blow_out()
m300.touch_tip()
m300.drop_tip() if real_mode else m300.return_tip()

tmt_wells = [well for col in tmt_plate.columns()[:num_col]
for well in col]

for well in tmt_wells:
pick_up(p20)
p20.aspirate(5, mm_teab)
p20.dispense(5, well)
p20.mix(3, 20, well)
p20.drop_tip() if real_mode else p20.return_tip()

ctx.comment('\n-----From TMT Wells to Sample Wells----------\n\n')
for s, d in zip(tmt_wells, new_wells):
pick_up(p20)
p20.aspirate(9, s)
p20.dispense(9, d)
p20.mix(3, 20, d)
p20.drop_tip() if real_mode else p20.return_tip()

ctx.delay(minutes=60 if real_mode else 0.5)

for well in new_wells:
pick_up(p20)
p20.aspirate(5, ha)
p20.dispense(5, well)
p20.mix(1, 20, well)
p20.drop_tip() if real_mode else p20.return_tip()

ctx.delay(minutes=15 if real_mode else 0.5)
# WHAT IS POOL VOLUME?
for pool in all_pools:
pick_up(p20)
for well in new_wells:
for _ in range(2):
p20.aspirate(20, well)
p20.dispense(20, pool)
p20.drop_tip() if real_mode else p20.return_tip()

for pool in all_pools:
pick_up(p20)
p20.aspirate(10, formic_acid)
p20.dispense(10, pool)
p20.mix(3, 20, pool)
p20.drop_tip() if real_mode else p20.return_tip()
Loading

0 comments on commit c449201

Please sign in to comment.