Skip to content

Commit

Permalink
docs(api): new and updated Tutorial protocol files (#13075)
Browse files Browse the repository at this point in the history
* update OT-2, new Flex protocols

* links to new protocols

* new pipette load names

* var name tiprack -> tips

* more useful `protocolName`s
  • Loading branch information
ecormany authored Jul 14, 2023
1 parent 773b8a4 commit 0630f70
Show file tree
Hide file tree
Showing 5 changed files with 91 additions and 16 deletions.
14 changes: 7 additions & 7 deletions api/docs/v2/example_protocols/dilution_tutorial.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
from opentrons import protocol_api

metadata = {
'apiLevel': '2.13',
'protocolName': 'Serial Dilution Tutorial',
'apiLevel': '2.15',
'protocolName': 'Serial Dilution Tutorial – OT-2 single-channel',
'description': '''This protocol is the outcome of following the
Python Protocol API Tutorial located at
https://docs.opentrons.com/v2/tutorial.html. It takes a
Expand All @@ -12,13 +12,13 @@
}

def run(protocol: protocol_api.ProtocolContext):
tiprack = protocol.load_labware('opentrons_96_tiprack_300ul', 1)
tips = protocol.load_labware('opentrons_96_tiprack_300ul', 1)
reservoir = protocol.load_labware('nest_12_reservoir_15ml', 2)
plate = protocol.load_labware('nest_96_wellplate_200ul_flat', 3)
p300 = protocol.load_instrument('p300_single_gen2', 'left', tip_racks=[tiprack])
left_pipette = protocol.load_instrument('p300_single_gen2', 'left', tip_racks=[tips])

# distribute diluent
p300.transfer(100, reservoir['A1'], plate.wells())
left_pipette.transfer(100, reservoir['A1'], plate.wells())

# loop through each row
for i in range(8):
Expand All @@ -27,7 +27,7 @@ def run(protocol: protocol_api.ProtocolContext):
row = plate.rows()[i]

# transfer solution to first well in column
p300.transfer(100, reservoir['A2'], row[0], mix_after=(3, 50))
left_pipette.transfer(100, reservoir['A2'], row[0], mix_after=(3, 50))

# dilute the sample down the row
p300.transfer(100, row[:11], row[1:], mix_after=(3, 50))
left_pipette.transfer(100, row[:11], row[1:], mix_after=(3, 50))
37 changes: 37 additions & 0 deletions api/docs/v2/example_protocols/dilution_tutorial_flex.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
from opentrons import protocol_api

metadata = {
'protocolName': 'Serial Dilution Tutorial – Flex 1-channel',
'description': '''This protocol is the outcome of following the
Python Protocol API Tutorial located at
https://docs.opentrons.com/v2/tutorial.html. It takes a
solution and progressively dilutes it by transferring it
stepwise across a plate.''',
'author': 'New API User'
}

requirements = {
'robotType': 'Flex',
'apiLevel': '2.15'
}

def run(protocol: protocol_api.ProtocolContext):
tips = protocol.load_labware('opentrons_flex_96_tiprack_200ul', 'D1')
reservoir = protocol.load_labware('nest_12_reservoir_15ml', 'D2')
plate = protocol.load_labware('nest_96_wellplate_200ul_flat', 'D3')
left_pipette = protocol.load_instrument('flex_1channel_1000', 'left', tip_racks=[tips])

# distribute diluent
left_pipette.transfer(100, reservoir['A1'], plate.wells())

# loop through each row
for i in range(8):

# save the destination row to a variable
row = plate.rows()[i]

# transfer solution to first well in column
left_pipette.transfer(100, reservoir['A2'], row[0], mix_after=(3, 50))

# dilute the sample down the row
left_pipette.transfer(100, row[:11], row[1:], mix_after=(3, 50))
14 changes: 7 additions & 7 deletions api/docs/v2/example_protocols/dilution_tutorial_multi.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
from opentrons import protocol_api

metadata = {
'apiLevel': '2.13',
'protocolName': 'Serial Dilution Tutorial',
'apiLevel': '2.15',
'protocolName': 'Serial Dilution Tutorial – OT-2 8-channel',
'description': '''This protocol is the outcome of following the
Python Protocol API Tutorial located at
https://docs.opentrons.com/v2/tutorial.html. It takes a
Expand All @@ -12,21 +12,21 @@
}

def run(protocol: protocol_api.ProtocolContext):
tiprack = protocol.load_labware('opentrons_96_tiprack_300ul', 1)
tips = protocol.load_labware('opentrons_96_tiprack_300ul', 1)
reservoir = protocol.load_labware('nest_12_reservoir_15ml', 2)
plate = protocol.load_labware('nest_96_wellplate_200ul_flat', 3)
p300 = protocol.load_instrument('p300_multi_gen2', 'right', tip_racks=[tiprack])
left_pipette = protocol.load_instrument('p300_multi_gen2', 'right', tip_racks=[tips])

# distribute diluent
p300.transfer(100, reservoir['A1'], plate.rows()[0])
left_pipette.transfer(100, reservoir['A1'], plate.rows()[0])

# no loop, 8-channel pipette

# save the destination row to a variable
row = plate.rows()[0]

# transfer solution to first well in column
p300.transfer(100, reservoir['A2'], row[0], mix_after=(3, 50))
left_pipette.transfer(100, reservoir['A2'], row[0], mix_after=(3, 50))

# dilute the sample down the row
p300.transfer(100, row[:11], row[1:], mix_after=(3, 50))
left_pipette.transfer(100, row[:11], row[1:], mix_after=(3, 50))
36 changes: 36 additions & 0 deletions api/docs/v2/example_protocols/dilution_tutorial_multi_flex.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
from opentrons import protocol_api

metadata = {
'protocolName': 'Serial Dilution Tutorial – Flex 8-channel',
'description': '''This protocol is the outcome of following the
Python Protocol API Tutorial located at
https://docs.opentrons.com/v2/tutorial.html. It takes a
solution and progressively dilutes it by transferring it
stepwise across a plate.''',
'author': 'New API User'
}

requirements = {
'robotType': 'Flex',
'apiLevel': '2.15'
}

def run(protocol: protocol_api.ProtocolContext):
tips = protocol.load_labware('opentrons_96_tiprack_300ul', 'D1')
reservoir = protocol.load_labware('nest_12_reservoir_15ml', 'D2')
plate = protocol.load_labware('nest_96_wellplate_200ul_flat', 'D3')
left_pipette = protocol.load_instrument('flex_8channel_1000', 'right', tip_racks=[tips])

# distribute diluent
left_pipette.transfer(100, reservoir['A1'], plate.rows()[0])

# no loop, 8-channel pipette

# save the destination row to a variable
row = plate.rows()[0]

# transfer solution to first well in column
left_pipette.transfer(100, reservoir['A2'], row[0], mix_after=(3, 50))

# dilute the sample down the row
left_pipette.transfer(100, row[:11], row[1:], mix_after=(3, 50))
6 changes: 4 additions & 2 deletions api/docs/v2/tutorial.rst
Original file line number Diff line number Diff line change
Expand Up @@ -309,8 +309,10 @@ There are two ways to try out your protocol: simulation on your computer, or a l

If you get any errors in simulation, or you don't get the outcome you expected when running your protocol, you can check your code against these reference protocols on GitHub:

- `Single-channel serial dilution <https://github.com/Opentrons/opentrons/blob/edge/api/docs/v2/example_protocols/dilution_tutorial.py>`_
- `8-channel serial dilution <https://github.com/Opentrons/opentrons/blob/edge/api/docs/v2/example_protocols/dilution_tutorial_multi.py>`_
- `Flex: Single-channel serial dilution <https://github.com/Opentrons/opentrons/blob/edge/api/docs/v2/example_protocols/dilution_tutorial_flex.py>`_
- `Flex: 8-channel serial dilution <https://github.com/Opentrons/opentrons/blob/edge/api/docs/v2/example_protocols/dilution_tutorial_multi_flex.py>`_
- `OT-2: Single-channel serial dilution <https://github.com/Opentrons/opentrons/blob/edge/api/docs/v2/example_protocols/dilution_tutorial.py>`_
- `OT-2: 8-channel serial dilution <https://github.com/Opentrons/opentrons/blob/edge/api/docs/v2/example_protocols/dilution_tutorial_multi.py>`_

.. _tutorial-simulate:

Expand Down

0 comments on commit 0630f70

Please sign in to comment.