Docs | Forum | Installation | Getting started
PyLabRobot is a hardware agnostic, pure Python library for liquid handling robots and other lab automation equipment. Read the paper in Device.
PyLabRobot provides a layer of general-purpose abstractions over robot functions, with various device drivers for communicating with different kinds of robots. Right now we only have drivers for Hamilton, Tecan and Opentrons liquid handling robots, but we will soon have drivers for many more. The two Hamilton drivers are Venus, which is derived from the PyHamilton library, and STAR, which is a low-level firmware interface. The Tecan driver is EVO, also a low level, cross platform firmware interface. The Opentrons driver is based on the Opentrons HTTP API. We also provide a simulator which plays the role of a device driver but renders commands in a browser-based deck visualization.
Here's a quick example showing how to move 100uL of liquid from well A1 to A2 using firmware on Hamilton STAR (this will work on any operating system!):
from pylabrobot import LiquidHandler
from pylabrobot.liquid_handling.backends import STAR
from pylabrobot.resources import Deck
deck = Deck.load_from_json_file("hamilton-layout.json")
lh = LiquidHandler(backend=STAR(), deck=deck)
await lh.setup()
await lh.pick_up_tips(lh.get_resource("tip_rack")["A1"])
await lh.aspirate(lh.get_resource("plate")["A1"], vols=100)
await lh.dispense(lh.get_resource("plate")["A2"], vols=100)
await lh.return_tips()
To run the same procedure on an Opentrons, change the following lines:
- from pylabrobot.liquid_handling.backends import STAR
+ from pylabrobot.liquid_handling.backends import OpentronsBackend
- deck = Deck.load_from_json_file("hamilton-layout.json")
+ deck = Deck.load_from_json_file("opentrons-layout.json")
- lh = LiquidHandler(backend=STAR(), deck=deck)
+ lh = LiquidHandler(backend=OpentronsBackend(host="x.x.x.x"), deck=deck)
Or Tecan (also works on any operating system!):
- from pylabrobot.liquid_handling.backends import STAR
+ from pylabrobot.liquid_handling.backends import EVO
- deck = Deck.load_from_json_file("hamilton-layout.json")
+ deck = Deck.load_from_json_file("tecan-layout.json")
- lh = LiquidHandler(backend=STAR(), deck=deck)
+ lh = LiquidHandler(backend=EVO(), deck=deck)
PyLabRobot also provides a layer of general-purpose abstractions for plate readers, currently with just a driver for the ClarioStar. This driver works on Windows, macOS and Linux. Here's a quick example showing how to read a plate using the ClarioStar:
from pylabrobot.plate_reading import PlateReader, ClarioStar
pr = PlateReader(name="plate reader", backend=ClarioStar())
await pr.setup()
# Use in combination with a liquid handler
lh.assign_child_resource(pr, location=Coordinate(x, y, z))
lh.move_plate(lh.get_resource("plate"), pr)
data = await pr.read_luminescence()
- forums.pylabrobot.org for questions and discussions.
- GitHub Issues for bug reports and feature requests.
If you use PyLabRobot in your research, please cite the following:
@article{WIERENGA2023100111,
title = {PyLabRobot: An open-source, hardware-agnostic interface for liquid-handling robots and accessories},
journal = {Device},
volume = {1},
number = {4},
pages = {100111},
year = {2023},
issn = {2666-9986},
doi = {https://doi.org/10.1016/j.device.2023.100111},
url = {https://www.sciencedirect.com/science/article/pii/S2666998623001709},
author = {Rick P. Wierenga and Stefan M. Golas and Wilson Ho and Connor W. Coley and Kevin M. Esvelt},
keywords = {laboratory automation, open source, standardization, liquid-handling robots},
}
Disclaimer: PyLabRobot is not officially endorsed or supported by any robot manufacturer. If you use a firmware driver such as the STAR driver provided here, you do so at your own risk. Usage of a firmware driver such as STAR may invalidate your warranty. Please contact us with any questions.
Developed for the Sculpting Evolution Group at the MIT Media Lab