Skip to content

SamOliveiraLab/partaker

 
 

Repository files navigation

Partaker

Partaker (Python-based Analyzer for Real-Time Assessment of Kinetics and Expression in Real-time) is a GUI application for single-cell bacterial image analysis in microfluidic time-lapse microscopy. It integrates deep learning segmentation, multi-channel fluorescence quantification with Relative Promoter Unit (RPU) calibration, and morphological analysis in a unified interface.

DOI

Partaker GUI - Labeled Segmentation

Partaker allows you to create plots like this:

Example plot

Features

  • Multi-model segmentation: Six selectable deep learning models for cell segmentation
  • Multi-channel fluorescence: Per-cell fluorescence quantification with background subtraction and RPU calibration
  • Morphological analysis: Automated cell classification (rod, coccoid, artifact) with eight morphological descriptors
  • ND2 and TIFF support: Native reading of Nikon ND2 files and standard TIFF stacks
  • Multi-file stitching: Automatic concatenation of sequential acquisitions on the time axis
  • Session management: Save and resume analysis sessions through HDF5

Segmentation Models

Partaker integrates the following pretrained deep learning backends:

Model Family Best For
omnipose_bact_phase Omnipose Phase-contrast, dense monolayers
omnipose_bact_fluo Omnipose Fluorescence images
bact_phase_cp3 Cellpose 3 Phase-contrast, general bacteria
bact_fluor_cp3 Cellpose 3 Fluorescence images
cellpose_deepbacs DeepBacs/Cellpose Phase-contrast bacteria
unet Custom U-Net User-trained binary segmentation

Users can compare model outputs on their data and select the best-performing model for their imaging conditions.

Requirements

  • Python >= 3.10, < 3.12
  • macOS (Apple Silicon or Intel), Windows, or Linux
  • uv package manager (recommended)

Installation

  1. Install uv if you do not have it:
curl -LsSf https://astral.sh/uv/install.sh | sh
  1. Clone the repository:
git clone https://github.com/SamOliveiraLab/partaker.git
cd partaker
  1. Launch Partaker:
uv run gui

This will automatically download and install all dependencies and open the main GUI window.

Quick Start

  1. Load data: Go to File > Open and select your ND2 or TIFF file
  2. Navigate: Use the T (time), P (position), and C (channel) sliders to browse your data
  3. Segment: Select a segmentation model from the dropdown (e.g., omnipose_bact_phase) and switch Display Mode to "Labeled Segmentation" or "Overlay with Outlines"
  4. Batch segment: Use the Segmentation tab on the right panel to select positions, time range, and model, then click "Segment Selected"
  5. Analyze fluorescence: Switch to the Population tab to quantify fluorescence intensity per cell across channels
  6. Morphology: Use the Morphology tab to extract cell shape descriptors and classify cell types

Display Modes

  • Normal: Raw microscopy image
  • Overlay with Outlines: Segmentation contours overlaid on the original image
  • Labeled Segmentation: Color-coded instance labels showing individual cells

Custom U-Net Weights

To use a custom-trained U-Net model, set the environment variable before launching:

export PARTAKER_UNET_WEIGHTS="/path/to/your/unet_weights.pt"
uv run gui

The weights file should be a PyTorch state-dict (.pt). A conversion script (convert.py) is provided for converting Keras .h5 weights to PyTorch format.

Example Dataset

The validation dataset used in the manuscript (two-strain E. coli co-culture in monolayer microfluidic chambers) is available on the BioImage Archive.

Demo

A video walkthrough of Partaker is available on YouTube: Partaker Demo

Documentation

Full documentation is available at: https://samoliveiralab.github.io/partaker/

Contributing

Contributions are welcome. Please use conventional commits and contact the maintainers before starting major changes.

Packages

 
 
 

Contributors

Languages

  • Jupyter Notebook 91.7%
  • Python 8.3%