pylabrobot

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

PyLabRobot

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).
PyLabRobot是一款与硬件无关的纯Python软件开发工具包,适用于自动化和自主实验室。您可以通过一个跨平台(Windows、macOS、Linux)的统一Python接口,使用此工具控制liquid handling robots、plate readers、pumps、heater shakers、incubators、centrifuges及其他实验室自动化设备。

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
当您需要以下操作时,可使用此工具:
  • 编程liquid handling robots(Hamilton STAR/STARlet、Opentrons OT-2、Tecan EVO)
  • 自动化涉及移液、样品制备或分析测量的实验室工作流程
  • 管理deck布局和实验室资源(plates、tips、containers、troughs)
  • 集成多种实验室设备(liquid handlers、plate readers、heater shakers、pumps)
  • 创建带有状态管理的可复现实验室实验方案
  • 在物理硬件上运行前模拟实验方案
  • 使用BMG CLARIOstar或其他支持的plate readers读取plates
  • 控制温度、振荡、离心或其他物料处理操作
  • 在Python中进行实验室自动化开发

Core Capabilities

核心功能

PyLabRobot provides comprehensive laboratory automation through six main capability areas, each detailed in the references/ directory:
PyLabRobot通过六大核心功能领域提供全面的实验室自动化支持,每个领域的详细内容可查看references/目录下的对应文档:

1. Liquid Handling (
references/liquid-handling.md
)

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
控制liquid handling robots完成吸液、分液和移液操作。主要操作包括:
  • 基础操作:吸液、分液、在孔间转移液体
  • 吸头管理:自动拾取、丢弃和跟踪移液器吸头
  • 高级技术:多通道移液、系列稀释、板复制
  • 体积跟踪:自动跟踪孔内液体体积
  • 硬件支持:Hamilton STAR/STARlet、Opentrons OT-2、Tecan EVO及其他设备

2. Resource Management (
references/resources.md
)

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
通过分层系统管理实验室资源:
  • 资源类型:Plates、tip racks、troughs、tubes、carriers及自定义实验器皿
  • Deck布局:通过坐标系将资源分配到deck位置
  • 状态管理:跟踪吸头存在情况、液体体积和资源状态
  • 序列化:从JSON文件保存和加载deck布局及状态
  • 资源发现:通过直观的API访问孔、吸头和容器

3. Hardware Backends (
references/hardware-backends.md
)

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
通过后端抽象连接多种实验室设备:
  • Liquid Handlers:Hamilton STAR(完全支持)、Opentrons OT-2、Tecan EVO
  • 模拟:ChatterboxBackend用于无需硬件的实验方案测试
  • 平台支持:可在Windows、macOS、Linux和Raspberry Pi上运行
  • 后端切换:无需重写实验方案,只需更换后端即可切换机器人

4. Analytical Equipment (
references/analytical-equipment.md
)

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
集成plate readers和分析仪器:
  • Plate Readers:BMG CLARIOstar用于吸光度、发光、荧光检测
  • 天平:集成Mettler Toledo进行质量测量
  • 集成模式:将liquid handlers与分析设备结合使用
  • 自动化工作流程:自动在设备间转移plates

5. Material Handling (
references/material-handling.md
)

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
控制环境和物料处理设备:
  • Heater Shakers:Hamilton HeaterShaker、Inheco ThermoShake
  • 培养箱:Inheco和Thermo Fisher培养箱,支持温度控制
  • 离心机:Agilent VSpin,支持桶定位和离心控制
  • :Cole Parmer Masterflex用于流体泵送操作
  • 温度控制:在实验方案中设置和监控温度

6. Visualization & Simulation (
references/visualization.md
)

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
可视化和模拟实验室实验方案:
  • 浏览器可视化工具:实时3D可视化deck状态
  • 模拟模式:无需物理硬件即可测试实验方案
  • 状态跟踪:可视化监控吸头存在情况和液体体积
  • Deck编辑器:用于设计deck布局的图形工具
  • 实验方案验证:在硬件上运行前验证实验方案

Quick Start

快速开始

To get started with PyLabRobot, install the package and initialize a liquid handler:
python
undefined
要开始使用PyLabRobot,请安装该包并初始化liquid handler:
python
undefined

Install PyLabRobot

Install PyLabRobot

uv pip install pylabrobot

uv pip install pylabrobot

Basic liquid handling setup

Basic liquid handling setup

from pylabrobot.liquid_handling import LiquidHandler from pylabrobot.liquid_handling.backends import STAR from pylabrobot.resources import STARLetDeck
from pylabrobot.liquid_handling import LiquidHandler from pylabrobot.liquid_handling.backends import STAR from pylabrobot.resources import STARLetDeck

Initialize liquid handler

Initialize liquid handler

lh = LiquidHandler(backend=STAR(), deck=STARLetDeck()) await lh.setup()
lh = LiquidHandler(backend=STAR(), deck=STARLetDeck()) await lh.setup()

Basic operations

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()
undefined
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()
undefined

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.
此工具的详细信息分布在多个参考文件中。在以下场景下加载对应的参考文档:
  • Liquid Handling:编写移液实验方案、吸头管理、转移操作
  • Resources:定义deck布局、管理plates/tips、自定义实验器皿
  • Hardware Backends:连接特定机器人、切换平台
  • Analytical Equipment:集成plate readers、天平或分析设备
  • Material Handling:使用heater shakers、培养箱、离心机、泵
  • Visualization:模拟实验方案、可视化deck状态
所有参考文件均可在
references/
目录中找到,包含完整的示例、API使用模式和最佳实践。

Best Practices

最佳实践

When creating laboratory automation protocols with PyLabRobot:
  1. Start with Simulation: Use ChatterboxBackend and the visualizer to test protocols before running on hardware
  2. Enable Tracking: Turn on tip tracking and volume tracking for accurate state management
  3. Resource Naming: Use clear, descriptive names for all resources (plates, tip racks, containers)
  4. State Serialization: Save deck layouts and states to JSON for reproducibility
  5. Error Handling: Implement proper async error handling for hardware operations
  6. Temperature Control: Set temperatures early as heating/cooling takes time
  7. Modular Protocols: Break complex workflows into reusable functions
  8. Documentation: Reference official docs at https://docs.pylabrobot.org for latest features
使用PyLabRobot创建实验室自动化实验方案时,请遵循以下最佳实践:
  1. 从模拟开始:使用ChatterboxBackend和可视化工具在硬件上运行前测试实验方案
  2. 启用跟踪功能:开启吸头跟踪和体积跟踪以实现准确的状态管理
  3. 资源命名:为所有资源(plates、tip racks、containers)使用清晰、描述性的名称
  4. 状态序列化:将deck布局和状态保存到JSON文件以确保可复现性
  5. 错误处理:为硬件操作实现适当的异步错误处理
  6. 温度控制:提前设置温度,因为加热/冷却需要时间
  7. 模块化实验方案:将复杂工作流程拆分为可复用的函数
  8. 文档参考:访问官方文档https://docs.pylabrobot.org获取最新功能信息

Common Workflows

常见工作流程

Liquid Transfer Protocol

液体转移实验方案

python
undefined
python
undefined

Setup

Setup

lh = LiquidHandler(backend=STAR(), deck=STARLetDeck()) await lh.setup()
lh = LiquidHandler(backend=STAR(), deck=STARLetDeck()) await lh.setup()

Define resources

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)
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

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()
undefined
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()
undefined

Plate Reading Workflow

读板工作流程

python
undefined
python
undefined

Setup plate reader

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()
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

Set temperature and read

await pr.set_temperature(37) await pr.open()
await pr.set_temperature(37) await pr.open()

(manually or robotically load plate)

(manually or robotically load plate)

await pr.close() data = await pr.read_absorbance(wavelength=450)
undefined
await pr.close() data = await pr.read_absorbance(wavelength=450)
undefined

Additional Resources

其他资源

For detailed usage of specific capabilities, refer to the corresponding reference file in the
references/
directory.
如需了解特定功能的详细用法,请查看
references/
目录下对应的参考文档。