Skip to content
dpeerlabPublic

About

GNN-based cell segmentation of spatial transcriptomics data

Resources

Contributing

Stars

31 stars

Watchers

1 watching

Forks

Repository files navigation

segger

Release License: MIT Docs Python 3.13 CUDA 13 Powered by cuspa

Cell segmentation for imaging-based spatial transcriptomics as graph-based transcript–cell assignment.

segger overview

Segger is a graph neural network (GNN)-based method that formulates cell segmentation in imaging-based spatial transcriptomics (iST) as a problem of transcript–cell assignment. Rather than relying solely on geometric proximity, Segger assumes that a transcript belongs to a cell if it is consistent both with its local spatial context and with the gene expression programs that define cell identity, as captured in a shared latent representation.

— Heidari, Moorman, et al., segger methods description

Note

This release uses cuspa, which we developed together with NVIDIA, to support atera-scale, billion-transcript whole-transcriptome datasets. It requires CUDA 13 and Python 3.13.

Full documentation - installation, quickstart, outputs, API reference, etc.: segger-segmentation.readthedocs.io

Installation

segger requires CUDA 13 and Python 3.13.

uv pip install segger

For conda, pixi, installing from source and older CUDA versions, see the installation docs.

Container

On HPC clusters, run the Docker image with Apptainer/Singularity. Pull it once (about 10-20 minutes), then run on a GPU node with --nv:

export APPTAINER_CACHEDIR=/path/to/cachedir
apptainer pull segger.sif docker://sailmskcc/segger:latest
apptainer exec --nv segger.sif segger --help

For Docker, see Use a container.

Usage

segger segment \
  -i /path/to/your/ist/data/ \
  -o /path/to/save/outputs/ \
  --export anndata boundaries  # optional (e.g. anndata, boundaries, xeniumranger, ...)

See notebooks/quickstart.ipynb for an end-to-end walkthrough.

If you run into a problem, first check the GitHub issues and the known issues in the docs.

Contributing

See CONTRIBUTING.md.

Methods description

Heidari, E., Moorman, A., et al. Segger: Fast and accurate cell segmentation of imaging-based spatial transcriptomics data. Methods description (2026).

Citation

If you use segger in your research, please cite:

@misc{heidari2026segger,
  title={Segger: Fast and accurate cell segmentation of imaging-based spatial transcriptomics data},
  author={Heidari, Elyas and Moorman, Andrew and others},
  note={Methods description},
  year={2026},
  howpublished={\url{https://github.com/dpeerlab/segger/blob/main/segger_methods.pdf}}
}

About

GNN-based cell segmentation of spatial transcriptomics data

Resources

Contributing

Stars

31 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages