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.)

v2.3.0发布于 2026-11-04 18:35 UTC299star53fork同步于 2026-11-11 00:00 UTC

怎么上手

由 README 提炼,执行前请确认
pip install sopa
硬件要求按 README 说明

README 未说明显存或 GPU 型号要求;仅提到针对大图像做了低内存设计,可扩展到 1TB+ 图像。

下载:源码 zip·GitHub Releases(安装包)本站不镜像安装包

项目说明

由 README 自动翻译提炼

基于 SpatialData 的空间组学流水线,统一处理多种平台数据并扩展到百万细胞

面向空间组学的技术无关分析流水线,能处理 Xenium、Visium HD、MERSCOPE 等多种平台数据,扩展到百万级细胞规模。

核心能力

  • 基于 SpatialData 标准数据结构统一读写与输出
  • 支持 Xenium、Visium HD、MERSCOPE、CosMx 等平台
  • 用重叠分块处理大图,可扩展到 1TB+ 图像
  • 提供 API、nf-core/Nextflow 与 CLI 多种使用方式
  • 内置 cellpose 分割与转录本聚合计数步骤

容易踩的坑

要求 Python >=3.12;cellpose 分割等步骤需另行准备模型与依赖,README 未展开;Snakemake 流水线已弃用,建议改用 nf-core/sopa。

内容由模型根据 README 生成,可能不完整或不准确,以官方文档为准。看原文 README

最近发版

5 个版本v2.3.0
  1. 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

    Changes

    Full Changelog: https://github.com/prism-oncology/sopa/compare/v2.2.12...v2.3.0

  2. v2.2.122026-10-27 · 2026-10-27 10:11 UTC
    查看更新说明

    What's Changed

    New Contributors

    Full Changelog: https://github.com/prism-oncology/sopa/compare/v2.2.11...v2.2.12

  3. v2.2.112026-09-02 · 2026-09-02 14:50 UTC
    查看更新说明

    What's Changed

    Full Changelog: https://github.com/prism-oncology/sopa/compare/v2.2.10...v2.2.11

  4. v2.2.102026-07-08 · 2026-07-08 11:02 UTC
    查看更新说明

    What's Changed

    Full Changelog: https://github.com/prism-oncology/sopa/compare/v2.2.9...v2.2.10

  5. v2.2.92026-06-19 · 2026-06-19 14:31 UTC
    查看更新说明

    What's Changed

    Full Changelog: https://github.com/prism-oncology/sopa/compare/v2.2.8...v2.2.9

用户点评

登录用户的真实使用记录,可按版本和硬件筛选
共 0 条

    还没有人点评。第一个说出真实体验的人最有价值。

    README 原文

    未翻译

    PyPI Downloads Docs Build License uv Ruff

    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 directly sopa as 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 of nf-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