Skip to main content

PlexPipe

Tests codecov Python Versions Docs PyPI License

Logo

PlexPipe turns raw multiplexed whole-slide images into quantitative single-cell data. It takes the individual analysis-ready TIFF files and moves them through five modular steps, from outlining regions of interest to a single-cell feature table ready for downstream analysis in the scverse ecosystem.

PlexPipe runs one step at a time, each driven by a single configuration file that holds the parameters for the whole workflow. Two steps, ROI definition and quality control, open a napari viewer, because they need a person to outline the regions of interest and mark imaging artefacts for exclusion.

The pipeline

Five stages, each demonstrated by a notebook in notebooks/:

  1. ROI definition (interactive): find and outline the regions of interest in a whole-slide image, for example dearraying the cores of a tissue microarray. Notebook: 01_roi_definition_demo.ipynb.
  2. ROI cutting: extract each ROI into its own SpatialData object. Notebook: 02_roi_cutting_demo.ipynb.
  3. Quality control (interactive): mark imaging artefacts and tissue to exclude from analysis. Notebook: 03_QC_demo.ipynb.
  4. Segmentation: enhance images and segment cells and nuclei into masks (Cellpose or InstanSeg). Notebook: 04_segmentation_demo.ipynb.
  5. Quantification: measure per-cell marker intensities into an AnnData table. Notebook: 05_quantification_demo.ipynb.

Outputs are stored as SpatialData (Zarr) objects with AnnData tables, so results drop straight into scverse tools or the napari-spatialdata plugin for interactive exploration.

Installation

Install PlexPipe from PyPI, with every optional feature:

pip install "plex_pipe[all]"

or, with uv, uv pip install "plex_pipe[all]". This gives you the plex_pipe library and the plexpipe command.

To run the notebooks, clone the repository and sync the full environment:

git clone https://github.com/plexpipe/plex-pipe.git
cd plex-pipe
uv sync --extra all

--extra all installs every optional feature: the segmentation backends (Cellpose, InstanSeg, PyTorch), the napari GUI, Jupyter, and Globus transfer. On a Windows machine with an NVIDIA GPU you need a CUDA build of PyTorch, covered in the installation guide.

Supported platforms. Python 3.12–3.14 on Linux, Windows and Apple Silicon Macs. Install plex_pipe[all]; PyTorch comes from PyPI and matches your platform (CUDA on Linux, CPU on Windows, CPU + Metal/MPS on macOS). On Windows with an NVIDIA GPU, install a CUDA build of PyTorch yourself, or use uv sync --extra all-cuda in a clone (see the installation guide). Intel Macs are not supported: current PyTorch releases no longer include Intel-Mac builds.

Try it on example data

The notebooks run on a small example dataset, and the first notebook downloads it for you with fetch_example(), so you can go from a fresh clone to a running pipeline without hunting for data. The notebooks and the example configuration come with a clone of the repository; they are not part of the installed package.

Start with 01_roi_definition_demo.ipynb and work through to 05. Stages 1 and 3 open a napari window for the interactive steps; the rest run automatically from the shared configuration file.

Execution modes

For smaller datasets and prototyping, run the notebooks or standalone scripts locally. For large-scale parallel processing on HPC, use the Nextflow version, plex-pipe-nextflow.

Status

PlexPipe is in active development (alpha). Interfaces and the configuration schema may still change before a 1.0 release. Bug reports and feedback are welcome on the issue tracker.

Automatic ROI suggestion with SAM2 (Segment Anything Model 2) is optional and installed separately (Linux or WSL on Windows); ROIs can always be drawn by hand.

Used in

  • Yang Y, Bukkuri A, Poe D, McLaughlin J, Hao S, Brown DD, Kedziora KM, Stallaert W. Distinct p21 dynamics drive alternative routes to whole-genome duplication through a common CDK4/6-dependent polyploid G0 state. bioRxiv [Preprint]. 2026 Jan 15:2026.01.15.699545. doi: 10.64898/2026.01.15.699545. PMID: 41648389; PMCID: PMC12871375.

Similar projects

PlexPipe is one of several open pipelines for turning multiplexed images into single-cell data:

PlexPipe's distinguishing emphasis is human-in-the-loop interaction. Two of its five steps, ROI definition and quality control, open a napari viewer so a scientist can outline regions of interest and annotate imaging artefacts directly, keeping expert judgement at the points in the workflow where it matters most.

License

Distributed under the terms of the BSD-3-Clause license.

Metadata

Release files for plex-pipe 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for plex-pipe 0.1.0
File Size Uploaded Provenance
plex_pipe-0.1.0.tar.gz 1.3 MB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for plex-pipe 0.1.0
File Interpreter ABI Platform
plex_pipe-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 1.4 MB

Release files / plex_pipe-0.1.0.tar.gz

Download URL plex_pipe-0.1.0.tar.gz
Size 1.3 MB
Tags Source
SHA-256 checksum
How to use checksums
d97a6c5297eb55039b3671f5c96b1dadb3d75faa8ddfea0738427d92c3a974ae
BLAKE2b-256 checksum
How to use checksums
4108ac82d93f61623b0a0fab07ae6c034a14a1bf97e2544a1c6fa923def16e3f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 16, 2026.

Transparency log

Release files / plex_pipe-0.1.0-py3-none-any.whl

Download URL plex_pipe-0.1.0-py3-none-any.whl
Size 100.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a80b58fe2a8ce4d9547d0bad824294a99a49146dedf5b0331902aae98709a915
BLAKE2b-256 checksum
How to use checksums
1b64c24fe7cd6b470a0d4a242176ae396e41d953c62efe7dc85e18b42526bc8b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 16, 2026.

Transparency log

Security for plex-pipe 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for plex_pipe-0.1.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 16, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page