This repository contains scripts for running automated Illumina NGS library preparation on a Hamilton STARlet liquid handler using PyLabRobot. This method originally was designed for the Illumina NGS Library Prep workflow at Pioneer Labs.
The full workflow includes:
- Sample consolidation — consolidating samples across 96-well plates
- Adapter PCR — running adapter PCR with the same primers across all samples
- Index PCR — running index PCR with different primers per sample
Each step can also be run independently.
- Read
docs/LPM_USERGUIDE.mdto learn more about the workflow - Follow installation instructions below to set up your environment and install PyLabRobot
- Execute method
- Hardware: Hamilton STARlet liquid handler (required for real runs; simulation mode is available without hardware — see
methods/startup.py) - Python: 3.12
- PyLabRobot: Version 0.2 as of March, 2026 (see PyLabRobot Resources below)
- Package manager: conda (recommended) or pip/venv
- Slack workspace: optional, for run notifications
git clone https://github.com/your-org/ngs-library-prep.git
cd ngs-library-prepChoose either conda (recommended) or venv.
conda env create -f environment.yml
conda activate ngs_library_preppython3 -m venv .venv
source .venv/bin/activate # macOS/Linux
# .venv\Scripts\activate # Windows
pip install -r requirements.txtgit clone https://github.com/pylabrobot/pylabrobot.git
cd pylabrobot
pip install -e '.[dev]'| Notebook | When to use |
|---|---|
scripts/library_prep.ipynb |
Full workflow: lysis resuspension → sample consolidation → adapter PCR setup |
scripts/adapter_to_index_PCR.ipynb |
Mid-workflow entry: adapter PCR → optional Exo1 dispense → index PCR |
ngs_library_prep/
├── docs/ # Documentation and user guides
│ ├── LPM_USERGUIDE.md # Step-by-step user guide for the full workflow
│ └── imgs/ # Images referenced by the user guide
├── methods/ # Core Python functions for each workflow step
│ ├── library_prep.py
│ └── startup.py
├── resources/ # Custom labware definitions
│ ├── __init__.py
│ └── custom_labware.py
├── scripts/ # Jupyter notebooks for executing workflows on the robot
│ ├── library_prep.ipynb
│ └── adapter_to_index_PCR.ipynb
├── utils/ # Shared utility helpers
│ ├── labware_utils.py
│ └── robot_utils.py
├── worklists/ # Example input worklists
│ └── example_worklist.csv
├── environment.yml # Conda environment spec
├── requirements.txt # pip/venv dependency list
└── example.config.json # Example configuration file for Slack API integration
- discuss.pylabrobot.org for questions and discussions.
- GitHub Issues for bug reports and feature requests.


