要求 Python >=3.12;cellpose 分割等步骤需另行准备模型与依赖,README 未展开;Snakemake 流水线已弃用,建议改用 nf-core/sopa。
sopa
prism-oncologyBSD-3-Clause活跃维护面向空间组学的技术无关分析流水线,能处理 Xenium、Visium HD、MERSCOPE 等多种平台数据,扩展到百万级细胞规模。
Technology-invariant pipeline for spatial omics analysis that scales to millions of cells (Xenium / Visium HD / MERSCOPE / CosMx / PhenoCycler / MACSima / etc.)
pip install sopaREADME 未说明显存或 GPU 型号要求;仅提到针对大图像做了低内存设计,可扩展到 1TB+ 图像。
基于 SpatialData 的空间组学流水线,统一处理多种平台数据并扩展到百万细胞
面向空间组学的技术无关分析流水线,能处理 Xenium、Visium HD、MERSCOPE 等多种平台数据,扩展到百万级细胞规模。
核心能力
- 基于 SpatialData 标准数据结构统一读写与输出
- 支持 Xenium、Visium HD、MERSCOPE、CosMx 等平台
- 用重叠分块处理大图,可扩展到 1TB+ 图像
- 提供 API、nf-core/Nextflow 与 CLI 多种使用方式
- 内置 cellpose 分割与转录本聚合计数步骤
容易踩的坑
- v2.3.0最新正式版2026-11-04 · 2026-11-04 18:35 UTC
This version includes several deprecations, detailed below. This aligns with the current scope of Sopa, i.e., mainly maintaining (1) the API and (2) the Nextflow pipeline.
Added
- Enable GPU usage for InstanSeg by @quentinblampey in https://github.com/prism-oncology/sopa/pull/461
Changes
- Deprecate the snakemake pipeline by @quentinblampey in https://github.com/prism-oncology/sopa/pull/458 - we now recommend using nf-core/sopa instead. The snakemake workflow was archived here.
- Remove support for python 3.11 by @quentinblampey in https://github.com/prism-oncology/sopa/pull/460 in favor of python 3.14 now being added to the CI
- Deprecate tangram by @quentinblampey in https://github.com/prism-oncology/sopa/pull/460
- Never clip values by 0.99 quantile in raw readers by @quentinblampey in https://github.com/prism-oncology/sopa/pull/457
Full Changelog: https://github.com/prism-oncology/sopa/compare/v2.2.12...v2.3.0
- v2.2.122026-10-27 · 2026-10-27 10:11 UTC
查看更新说明
What's Changed
- feat: add InstanSeg segmentation method by @lguerard in https://github.com/prism-oncology/sopa/pull/447
- Document how to import an existing segmentation mask by @psgundla in https://github.com/prism-oncology/sopa/pull/448
- Fix Cellpose GPU use by @alihamraoui in https://github.com/prism-oncology/sopa/pull/451
- Docs update: recommend baysor/proseg installation via their bioconda recipes by @quentinblampey in https://github.com/prism-oncology/sopa/pull/456
New Contributors
- @psgundla made their first contribution in https://github.com/prism-oncology/sopa/pull/448
Full Changelog: https://github.com/prism-oncology/sopa/compare/v2.2.11...v2.2.12
- v2.2.112026-09-02 · 2026-09-02 14:50 UTC
查看更新说明
What's Changed
- Support the Baysor Cpp implementation by @alihamraoui in https://github.com/prism-oncology/sopa/pull/430
- Fix Stardist+Proseg usage on Visium HD for recent anndata versions by @quentinblampey in https://github.com/prism-oncology/sopa/pull/443
- Add CLI command to cache the cellpose model by @alihamraoui in https://github.com/prism-oncology/sopa/pull/445
- Minor documentation fixes by @quentinblampey in https://github.com/prism-oncology/sopa/pull/435
Full Changelog: https://github.com/prism-oncology/sopa/compare/v2.2.10...v2.2.11
- v2.2.102026-07-08 · 2026-07-08 11:02 UTC
查看更新说明
What's Changed
- Enable using a scale>0 in staining-based segmentation for CLI/pipeline by @alihamraoui in https://github.com/prism-oncology/sopa/pull/432
- Fix pandas / AnnData 0.13.0 compatibility by @alihamraoui in https://github.com/prism-oncology/sopa/pull/433
Full Changelog: https://github.com/prism-oncology/sopa/compare/v2.2.9...v2.2.10
- v2.2.92026-06-19 · 2026-06-19 14:31 UTC
查看更新说明
What's Changed
- Increase point write speed for sopa.io.explorer.write by @pakiessling in https://github.com/prism-oncology/sopa/pull/425
- Add
nucleus_shapes_keyto the writer by @quentinblampey in https://github.com/prism-oncology/sopa/pull/426 - Disable the check on the number of channels when using cellpose v4 + docs clarifications by @quentinblampey in https://github.com/prism-oncology/sopa/pull/429
Full Changelog: https://github.com/prism-oncology/sopa/compare/v2.2.8...v2.2.9
用户点评
登录用户的真实使用记录,可按版本和硬件筛选还没有人点评。第一个说出真实体验的人最有价值。
Built on top of SpatialData, Sopa enables processing and analyses of spatial omics data with single-cell resolution (spatial transcriptomics or multiplex imaging data) using a standard data structure and output. We currently support the following technologies: Xenium, Visium HD, MERSCOPE, CosMx, PhenoCycler, MACSima, Molecular Cartography, and others. Sopa was designed for generability and low memory consumption on large images (scales to 1TB+ images).
[!NOTE] You may also be interested in Novae, developed by the same authors, now published in Nature Methods 🎉
Documentation
Check Sopa's documentation to get started. It contains installation explanations, CLI/API details, and tutorials.
Overview
The following illustration describes the main steps of sopa:
Installation
Sopa can be installed from PyPI on all OS, for any Python version >=3.12. On a new environment, run the following command:
pip install sopa
[!NOTE] See this installation section for more details about extras and other installations modes.
Usage modes
Sopa comes in four different flavours, each corresponding to a different use case:
API: use directlysopaas a Python package for complete flexibility and customization (example below).nf-core/sopa: run Sopa with Nextflow (see this repo and the corresponding usage guide).Snakemake pipeline: choose a config, and run our pipeline on your spatial data in a couple of minutes (deprecated in favor ofnf-core/sopa, see the public archive here).CLI: use our command-line-interface for prototyping quickly your own pipeline (advanced users).
API usage
Below is a minimal example of API usage. For a complete API description, please refer to the documentation.
import sopa
sdata = sopa.io.xenium("path/to/data") # reading Xenium data
sopa.make_image_patches(sdata) # creating overlapping patches
sopa.segmentation.cellpose(sdata, "DAPI", diameter=30) # running cellpose segmentation
sopa.aggregate(sdata) # counting the transcripts inside the cells
Cite us
Our article is published in Nature Communications. You can cite Sopa as below:
Blampey, Q., Mulder, K., Gardet, M. et al. Sopa: a technology-invariant pipeline for analyses of image-based spatial omics.
Nat Commun 15, 4981 (2024). https://doi.org/10.1038/s41467-024-48981-z