Skip to main content

The Opentrons API is a simple framework designed to make writing automated biology lab protocols easy.

Project description

Build Status Coverage Status

Introduction

Please refer to Full API Documentation for detailed instructions.

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.

pipette.aspirate(tube_1).dispense(tube_2)

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[1])
p200.dispense(50, plate[0])
p200.dispense(50, plate[1])
p200.dispense(50, plate[2])
p200.dispense(50, plate[3])

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[1])
    p200.dispense(50, plate[i])

Basic Principles

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:

p200.aspirate(100, plate['A1']).dispense(plate['A2'])
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:

p200.aspirate(100, plate[0]).dispense(plate[1])

while using 0 or 1 instead of ‘A1’ and ‘B1’ will do just the same.

or

p200.aspirate(100, plate[0].bottom())

will aspirate 100, from the bottom of a well.

Hello World

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[0])

for i in range(95):
    p200.aspirate(100, plate[i])
    p200.dispense(plate[i + 1])

p200.return_tip()

robot.simulate()

Installing Opentrons API

If you are just starting with Python it is recommended to install Jupyter notebook to run Opentrons API. Please refer to Full API Documentation for detailed instructions.

If you are familiar with python and comfortable running pip, you can install Opentrons API by running:

pip install opentrons

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

opentrons-2.0.0.tar.gz (70.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

opentrons-2.0.0-py2.py3-none-any.whl (66.8 kB view details)

Uploaded Python 2Python 3

File details

Details for the file opentrons-2.0.0.tar.gz.

File metadata

  • Download URL: opentrons-2.0.0.tar.gz
  • Upload date:
  • Size: 70.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for opentrons-2.0.0.tar.gz
Algorithm Hash digest
SHA256 6000a914b8a3c86af76b70d6b7c9df7f7a84b63fd7b953512ddb39745b9d3388
MD5 f4f3e317d84e605f215a58976df4e3e8
BLAKE2b-256 4f50922879735a71cbb1ffb1a0dc6661924b4a44acec83d631b58e7d2f3a5453

See more details on using hashes here.

File details

Details for the file opentrons-2.0.0-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for opentrons-2.0.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 31234d225faeafe2a9579fc45a8afcb7539483f5c01796bf2a7ff10bb7caaec4
MD5 3e62e64238a7f456f5a67fbe36564ccd
BLAKE2b-256 b1531ac6386c280d07a9ee4c00a8c90729568743bc282e1a682f75e03c35f7eb

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page