PyLabRobot
Overview
PyLabRobot is a hardware-agnostic, pure Python Software Development Kit for automated and autonomous laboratories. Use this skill to control liquid handling robots, plate readers, pumps, heater shakers, incubators, centrifuges, and other laboratory automation equipment through a unified Python interface that works across platforms (Windows, macOS, Linux).
When to Use This Skill
Use this skill when:
- Programming liquid handling robots (Hamilton STAR/STARlet, Opentrons OT-2, Tecan EVO)
- Automating laboratory workflows involving pipetting, sample preparation, or analytical measurements
- Managing deck layouts and laboratory resources (plates, tips, containers, troughs)
- Integrating multiple lab devices (liquid handlers, plate readers, heater shakers, pumps)
- Creating reproducible laboratory protocols with state management
- Simulating protocols before running on physical hardware
- Reading plates using BMG CLARIOstar or other supported plate readers
- Controlling temperature, shaking, centrifugation, or other material handling operations
- Working with laboratory automation in Python
Core Capabilities
PyLabRobot provides comprehensive laboratory automation through six main capability areas, each detailed in the references/ directory:
1. Liquid Handling (references/liquid-handling.md)
Control liquid handling robots for aspirating, dispensing, and transferring liquids. Key operations include:
- Basic Operations: Aspirate, dispense, transfer liquids between wells
- Tip Management: Pick up, drop, and track pipette tips automatically
- Advanced Techniques: Multi-channel pipetting, serial dilutions, plate replication
- Volume Tracking: Automatic tracking of liquid volumes in wells
- Hardware Support: Hamilton STAR/STARlet, Opentrons OT-2, Tecan EVO, and others
2. Resource Management (references/resources.md)
Manage laboratory resources in a hierarchical system:
- Resource Types: Plates, tip racks, troughs, tubes, carriers, and custom labware
- Deck Layout: Assign resources to deck positions with coordinate systems
- State Management: Track tip presence, liquid volumes, and resource states
- Serialization: Save and load deck layouts and states from JSON files
- Resource Discovery: Access wells, tips, and containers through intuitive APIs
3. Hardware Backends (references/hardware-backends.md)
Connect to diverse laboratory equipment through backend abstraction:
- Liquid Handlers: Hamilton STAR (full support), Opentrons OT-2, Tecan EVO
- Simulation: ChatterboxBackend for protocol testing without hardware
- Platform Support: Works on Windows, macOS, Linux, and Raspberry Pi
- Backend Switching: Change robots by swapping backend without rewriting protocols
4. Analytical Equipment (references/analytical-equipment.md)
Integrate plate readers and analytical instruments:
- Plate Readers: BMG CLARIOstar for absorbance, luminescence, fluorescence
- Scales: Mettler Toledo integration for mass measurements
- Integration Patterns: Combine liquid handlers with analytical equipment
- Automated Workflows: Move plates between devices automatically
5. Material Handling (references/material-handling.md)
Control environmental and material handling equipment:
- Heater Shakers: Hamilton HeaterShaker, Inheco ThermoShake
- Incubators: Inheco and Thermo Fisher incubators with temperature control
- Centrifuges: Agilent VSpin with bucket positioning and spin control
- Pumps: Cole Parmer Masterflex for fluid pumping operations
- Temperature Control: Set and monitor temperatures during protocols
6. Visualization & Simulation (references/visualization.md)
Visualize and simulate laboratory protocols:
- Browser Visualizer: Real-time 3D visualization of deck state
- Simulation Mode: Test protocols without physical hardware
- State Tracking: Monitor tip presence and liquid volumes visually
- Deck Editor: Graphical tool for designing deck layouts
- Protocol Validation: Verify protocols before running on hardware
Quick Start
To get started with PyLabRobot, install the package and initialize a liquid handler:
# Install PyLabRobot
# uv pip install pylabrobot
# Basic liquid handling setup
from pylabrobot.liquid_handling import LiquidHandler
from pylabrobot.liquid_handling.backends import STAR
from pylabrobot.resources import STARLetDeck
# Initialize liquid handler
lh = LiquidHandler(backend=STAR(), deck=STARLetDeck())
await lh.setup()
# Basic operations
await lh.pick_up_tips(tip_rack["A1:H1"])
await lh.aspirate(plate["A1"], vols=100)
await lh.dispense(plate["A2"], vols=100)
await lh.drop_tips()
Working with References
This skill organizes detailed information across multiple reference files. Load the relevant reference when:
- Liquid Handling: Writing pipetting protocols, tip management, transfers
- Resources: Defining deck layouts, managing plates/tips, custom labware
- Hardware Backends: Connecting to specific robots, switching platforms
- Analytical Equipment: Integrating plate readers, scales, or analytical devices
- Material Handling: Using heater shakers, incubators, centrifuges, pumps
- Visualization: Simulating protocols, visualizing deck states
All reference files can be found in the references/ directory and contain comprehensive examples, API usage patterns, and best practices.
Best Practices
When creating laboratory automation protocols with PyLabRobot:
- Start with Simulation: Use ChatterboxBackend and the visualizer to test protocols before running on hardware
- Enable Tracking: Turn on tip tracking and volume tracking for accurate state management
- Resource Naming: Use clear, descriptive names for all resources (plates, tip racks, containers)
- State Serialization: Save deck layouts and states to JSON for reproducibility
- Error Handling: Implement proper async error handling for hardware operations
- Temperature Control: Set temperatures early as heating/cooling takes time
- Modular Protocols: Break complex workflows into reusable functions
- Documentation: Reference official docs at https://docs.pylabrobot.org for latest features
Common Workflows
Liquid Transfer Protocol
# Setup
lh = LiquidHandler(backend=STAR(), deck=STARLetDeck())
await lh.setup()
# Define resources
tip_rack = TIP_CAR_480_A00(name="tip_rack")
source_plate = Cos_96_DW_1mL(name="source")
dest_plate = Cos_96_DW_1mL(name="dest")
lh.deck.assign_child_resource(tip_rack, rails=1)
lh.deck.assign_child_resource(source_plate, rails=10)
lh.deck.assign_child_resource(dest_plate, rails=15)
# Transfer protocol
await lh.pick_up_tips(tip_rack["A1:H1"])
await lh.transfer(source_plate["A1:H12"], dest_plate["A1:H12"], vols=100)
await lh.drop_tips()
Plate Reading Workflow
# Setup plate reader
from pylabrobot.plate_reading import PlateReader
from pylabrobot.plate_reading.clario_star_backend import CLARIOstarBackend
pr = PlateReader(name="CLARIOstar", backend=CLARIOstarBackend())
await pr.setup()
# Set temperature and read
await pr.set_temperature(37)
await pr.open()
# (manually or robotically load plate)
await pr.close()
data = await pr.read_absorbance(wavelength=450)
Additional Resources
For detailed usage of specific capabilities, refer to the corresponding reference file in the references/ directory.
1---2name: "pylabrobot"3description: "Laboratory automation toolkit for controlling liquid handlers, plate readers, pumps, heater shakers, incubators, centrifuges, and analytical equipment. Use this skill when automating laboratory workfl"4metadata:5 source: https://skillmd.com/skills/viggyv/pylabrobot6---78# PyLabRobot910## Overview1112PyLabRobot is a hardware-agnostic, pure Python Software Development Kit for automated and autonomous laboratories. Use this skill to control liquid handling robots, plate readers, pumps, heater shakers, incubators, centrifuges, and other laboratory automation equipment through a unified Python interface that works across platforms (Windows, macOS, Linux).1314## When to Use This Skill1516Use this skill when:17- Programming liquid handling robots (Hamilton STAR/STARlet, Opentrons OT-2, Tecan EVO)18- Automating laboratory workflows involving pipetting, sample preparation, or analytical measurements19- Managing deck layouts and laboratory resources (plates, tips, containers, troughs)20- Integrating multiple lab devices (liquid handlers, plate readers, heater shakers, pumps)21- Creating reproducible laboratory protocols with state management22- Simulating protocols before running on physical hardware23- Reading plates using BMG CLARIOstar or other supported plate readers24- Controlling temperature, shaking, centrifugation, or other material handling operations25- Working with laboratory automation in Python2627## Core Capabilities2829PyLabRobot provides comprehensive laboratory automation through six main capability areas, each detailed in the references/ directory:3031### 1. Liquid Handling (`references/liquid-handling.md`)3233Control liquid handling robots for aspirating, dispensing, and transferring liquids. Key operations include:34- **Basic Operations**: Aspirate, dispense, transfer liquids between wells35- **Tip Management**: Pick up, drop, and track pipette tips automatically36- **Advanced Techniques**: Multi-channel pipetting, serial dilutions, plate replication37- **Volume Tracking**: Automatic tracking of liquid volumes in wells38- **Hardware Support**: Hamilton STAR/STARlet, Opentrons OT-2, Tecan EVO, and others3940### 2. Resource Management (`references/resources.md`)4142Manage laboratory resources in a hierarchical system:43- **Resource Types**: Plates, tip racks, troughs, tubes, carriers, and custom labware44- **Deck Layout**: Assign resources to deck positions with coordinate systems45- **State Management**: Track tip presence, liquid volumes, and resource states46- **Serialization**: Save and load deck layouts and states from JSON files47- **Resource Discovery**: Access wells, tips, and containers through intuitive APIs4849### 3. Hardware Backends (`references/hardware-backends.md`)5051Connect to diverse laboratory equipment through backend abstraction:52- **Liquid Handlers**: Hamilton STAR (full support), Opentrons OT-2, Tecan EVO53- **Simulation**: ChatterboxBackend for protocol testing without hardware54- **Platform Support**: Works on Windows, macOS, Linux, and Raspberry Pi55- **Backend Switching**: Change robots by swapping backend without rewriting protocols5657### 4. Analytical Equipment (`references/analytical-equipment.md`)5859Integrate plate readers and analytical instruments:60- **Plate Readers**: BMG CLARIOstar for absorbance, luminescence, fluorescence61- **Scales**: Mettler Toledo integration for mass measurements62- **Integration Patterns**: Combine liquid handlers with analytical equipment63- **Automated Workflows**: Move plates between devices automatically6465### 5. Material Handling (`references/material-handling.md`)6667Control environmental and material handling equipment:68- **Heater Shakers**: Hamilton HeaterShaker, Inheco ThermoShake69- **Incubators**: Inheco and Thermo Fisher incubators with temperature control70- **Centrifuges**: Agilent VSpin with bucket positioning and spin control71- **Pumps**: Cole Parmer Masterflex for fluid pumping operations72- **Temperature Control**: Set and monitor temperatures during protocols7374### 6. Visualization & Simulation (`references/visualization.md`)7576Visualize and simulate laboratory protocols:77- **Browser Visualizer**: Real-time 3D visualization of deck state78- **Simulation Mode**: Test protocols without physical hardware79- **State Tracking**: Monitor tip presence and liquid volumes visually80- **Deck Editor**: Graphical tool for designing deck layouts81- **Protocol Validation**: Verify protocols before running on hardware8283## Quick Start8485To get started with PyLabRobot, install the package and initialize a liquid handler:8687```python88# Install PyLabRobot89# uv pip install pylabrobot9091# Basic liquid handling setup92from pylabrobot.liquid_handling import LiquidHandler93from pylabrobot.liquid_handling.backends import STAR94from pylabrobot.resources import STARLetDeck9596# Initialize liquid handler97lh = LiquidHandler(backend=STAR(), deck=STARLetDeck())98await lh.setup()99100# Basic operations101await lh.pick_up_tips(tip_rack["A1:H1"])102await lh.aspirate(plate["A1"], vols=100)103await lh.dispense(plate["A2"], vols=100)104await lh.drop_tips()105```106107## Working with References108109This skill organizes detailed information across multiple reference files. Load the relevant reference when:110- **Liquid Handling**: Writing pipetting protocols, tip management, transfers111- **Resources**: Defining deck layouts, managing plates/tips, custom labware112- **Hardware Backends**: Connecting to specific robots, switching platforms113- **Analytical Equipment**: Integrating plate readers, scales, or analytical devices114- **Material Handling**: Using heater shakers, incubators, centrifuges, pumps115- **Visualization**: Simulating protocols, visualizing deck states116117All reference files can be found in the `references/` directory and contain comprehensive examples, API usage patterns, and best practices.118119## Best Practices120121When creating laboratory automation protocols with PyLabRobot:1221231. **Start with Simulation**: Use ChatterboxBackend and the visualizer to test protocols before running on hardware1242. **Enable Tracking**: Turn on tip tracking and volume tracking for accurate state management1253. **Resource Naming**: Use clear, descriptive names for all resources (plates, tip racks, containers)1264. **State Serialization**: Save deck layouts and states to JSON for reproducibility1275. **Error Handling**: Implement proper async error handling for hardware operations1286. **Temperature Control**: Set temperatures early as heating/cooling takes time1297. **Modular Protocols**: Break complex workflows into reusable functions1308. **Documentation**: Reference official docs at https://docs.pylabrobot.org for latest features131132## Common Workflows133134### Liquid Transfer Protocol135136```python137# Setup138lh = LiquidHandler(backend=STAR(), deck=STARLetDeck())139await lh.setup()140141# Define resources142tip_rack = TIP_CAR_480_A00(name="tip_rack")143source_plate = Cos_96_DW_1mL(name="source")144dest_plate = Cos_96_DW_1mL(name="dest")145146lh.deck.assign_child_resource(tip_rack, rails=1)147lh.deck.assign_child_resource(source_plate, rails=10)148lh.deck.assign_child_resource(dest_plate, rails=15)149150# Transfer protocol151await lh.pick_up_tips(tip_rack["A1:H1"])152await lh.transfer(source_plate["A1:H12"], dest_plate["A1:H12"], vols=100)153await lh.drop_tips()154```155156### Plate Reading Workflow157158```python159# Setup plate reader160from pylabrobot.plate_reading import PlateReader161from pylabrobot.plate_reading.clario_star_backend import CLARIOstarBackend162163pr = PlateReader(name="CLARIOstar", backend=CLARIOstarBackend())164await pr.setup()165166# Set temperature and read167await pr.set_temperature(37)168await pr.open()169# (manually or robotically load plate)170await pr.close()171data = await pr.read_absorbance(wavelength=450)172```173174## Additional Resources175176- **Official Documentation**: https://docs.pylabrobot.org177- **GitHub Repository**: https://github.com/PyLabRobot/pylabrobot178- **Community Forum**: https://discuss.pylabrobot.org179- **PyPI Package**: https://pypi.org/project/PyLabRobot/180181For detailed usage of specific capabilities, refer to the corresponding reference file in the `references/` directory.