This release is a pre-release and may not be stable for production use.
segger
GNN-based cell segmentation of spatial transcriptomics data.
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.
Full documentation - installation, quickstart, outputs, API reference, etc.: segger-segmentation.readthedocs.io
Installation
segger requires CUDA 13 and Python 3.13.
Clone the repo, then use conda or pixi:
git clone https://github.com/dpeerlab/segger.git && cd segger
# conda
conda env create -n segger -f environment.yml
conda activate segger
# pixi
pixi install
pixi shell
Alternatively, install directly from GitHub without cloning:
pip install --extra-index-url https://pypi.nvidia.com --extra-index-url https://download.pytorch.org/whl/cu130 git+https://github.com/dpeerlab/segger.git
Usage
segger segment \
-i /path/to/your/ist/data/ \
-o /path/to/save/outputs/
# export different data formats (e.g. boundaries, spatialdata, anndata, xeniumranger, ...)
segger export boundaries \
-s /path/to/save/outputs/segger_segmentation.parquet \
-o /path/to/export/
# export spatialdata. transcripts are added to the existing sdata
segger export spatialdata \
-s /path/to/save/outputs/segger_segmentation.parquet \
--sdata /path/to/sdata.zarr
# for Xenium data to visualise in xenium explorer
segger export xeniumranger \
-s /path/to/save/outputs/segger_segmentation.parquet \
-i /path/to/your/ist/data/ \
-o /path/to/export/
See notebooks/quickstart.ipynb for an end-to-end walkthrough.
Contributing
See CONTRIBUTING.md.
Methods description
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}}
}
Metadata
Release files for segger 1.0.0rc1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| segger-1.0.0rc1.tar.gz | 91.7 kB | Without provenance | Details for segger-1.0.0rc1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| segger-1.0.0rc1-py3-none-any.whl | Python 3 | none | any | Details for segger-1.0.0rc1-py3-none-any.whl |
Total release size: 198.1 kB
Release files / segger-1.0.0rc1.tar.gz
| Download URL | segger-1.0.0rc1.tar.gz |
|---|---|
| Size | 91.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
36a3f11174e93baa56970bdac24e10dad9788f7590c35ae38450958f09eca291
|
|
BLAKE2b-256 checksum How to use checksums |
b4d3635045d7f50329bad20b0409683d0fa3294a12fed5d5f8e4dc1c7d41c961
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.18
|
Release files / segger-1.0.0rc1-py3-none-any.whl
| Download URL | segger-1.0.0rc1-py3-none-any.whl |
|---|---|
| Size | 106.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1f4bf8f888337a64bdb1a5af472ccb50e6020f30477b93dcc67d1833105a3444
|
|
BLAKE2b-256 checksum How to use checksums |
a125cdc6f3116a0421d874390cd3d52062eae9114ede835164051a22a8b9b9ae
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.18
|
Security for segger 1.0.0rc1
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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
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.