Simple Biology Lab Protocol Coding¶
The Opentrons API is a simple framework designed to make writing automated biology lab protocols easy.
We’ve designed it in a way we hope is accessible to anyone with basic computer and wetlab skills. As a bench scientist, you should be able to code your automated protocols in a way that reads like a lab notebook.
That is how you tell the Opentrons robot to aspirate its the maximum volume of the current pipette from one tube and dispense it into another one.
You string these commands into full protocols that anyone with Opentrons can run. This one way to program the robot to use a p200 pipette to pick up 200ul (its full volume) and dispense 50ul into the first four wells in a 96 well plate called ‘plate.’
p200.aspirate(trough) p200.dispense(50, plate) p200.dispense(50, plate) p200.dispense(50, plate) p200.dispense(50, plate)
If you wanted to do this 96 times, you could write it like this:
for i in range(96): if p200.current_volume < 50: p200.aspirate(trough) p200.dispense(50, plate[i])
Human Readable: API strikes a balance between human and machine readability of the protocol. Protocol written with Opentrons API sound similar to what the protocol will look in real life. For example:
- Is exactly what you think it would do:
- Take p200 pipette
- Aspirate 100 uL from well A1 on your plate
- Dispense everything into well A2 on the same plate
Permissive: everyone’s process is different and we are not trying to impose our way of thinking on you. Instead, our API allows for different ways of expressing your protocol and adding fine details as you need them. For example:
while using 0 or 1 instead of ‘A1’ and ‘B1’ will do just the same.
will aspirate 100, from the bottom of a well.
Below is a short protocol that will pick up a tip and use it to move 100ul volume across all the wells on a plate:
from opentrons import robot from opentrons import containers, instruments tiprack = containers.load( 'tiprack-200ul', # container type 'A1', # slot 'tiprack' # user-defined name ) plate = containers.load('96-flat', 'B1', 'plate') p200 = instruments.Pipette( axis="b", max_volume=200 ) p200.pick_up_tip(tiprack) for i in range(95): p200.aspirate(100, plate[i]) p200.dispense(plate[i + 1]) p200.return_tip() robot.simulate()
Table of Contents¶
- Updating Firmware
- Code Environment
- Writing a Protocol
- Container Well Access
- Labware Library
- Custom Containers
- Using the App
- Advanced Use Cases
- Developer Interface