Metadata-Version: 2.5
Name: harpy-analysis
Version: 0.5.3
Summary: single-cell spatial omics analysis that makes you happy.
Project-URL: Homepage, https://github.com/saeyslab/harpy
Project-URL: Documentation, https://harpy.readthedocs.io/en/latest/
Project-URL: Repository, https://github.com/saeyslab/harpy
Project-URL: Issues, https://github.com/saeyslab/harpy/issues
Project-URL: Changelog, https://github.com/saeyslab/harpy/releases
Project-URL: Paper, https://doi.org/10.1093/bioinformatics/btag122
Project-URL: SaeysLab, https://saeyslab.sites.vib.be/en
Project-URL: VIBSpatialCatalyst, https://vib.be/en/technologies/technology-portfolio/spatial-catalyst
Author: Saeys Lab, VIB spatial catalyst
License: BSD 3-Clause License
        
        Copyright (c) 2026, VIB vzw
        All rights reserved.
        
        Redistribution and use in source and binary forms, with or without
        modification, are permitted provided that the following conditions are met:
        
        1. Redistributions of source code must retain the above copyright notice, this
           list of conditions and the following disclaimer.
        
        2. Redistributions in binary form must reproduce the above copyright notice,
           this list of conditions and the following disclaimer in the documentation
           and/or other materials provided with the distribution.
        
        3. Neither the name of the copyright holder nor the names of its
           contributors may be used to endorse or promote products derived from
           this software without specific prior written permission.
        
        THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
        AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
        IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
        DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
        FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
        DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
        SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
        CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
        OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
        OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
License-File: LICENSE
Keywords: anndata,bioinformatics,image-analysis,scanpy,scverse,single-cell,spatial-omics,spatial-proteomics,spatial-transcriptomics,spatialdata
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: BSD License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Topic :: Scientific/Engineering :: Bio-Informatics
Classifier: Topic :: Scientific/Engineering :: Image Processing
Requires-Python: <3.15,>=3.12
Requires-Dist: anndata>=0.13
Requires-Dist: crick
Requires-Dist: distributed
Requires-Dist: filelock
Requires-Dist: flowsom
Requires-Dist: lazy-loader>=0.4
Requires-Dist: leidenalg>=0.9.1
Requires-Dist: ome-zarr>=0.14.0
Requires-Dist: pyrootutils
Requires-Dist: rasterio>=1.3.2
Requires-Dist: scanpy>=1.11.1
Requires-Dist: scikit-learn>=1.3.1
Requires-Dist: seaborn>=0.12.2
Requires-Dist: session-info2
Requires-Dist: spatialdata-io>=0.7.0
Requires-Dist: spatialdata-plot
Requires-Dist: spatialdata>=0.7.3
Requires-Dist: tifffile>=2026.5.2
Requires-Dist: universal-pathlib
Requires-Dist: voronoi-diagram-for-polygons>=0.1.6
Requires-Dist: zarr>=3.2.1
Provides-Extra: benchmark
Requires-Dist: asv; extra == 'benchmark'
Provides-Extra: cellpose
Requires-Dist: cellpose<5,>=3.1.1.3; extra == 'cellpose'
Provides-Extra: cellpose3
Requires-Dist: cellpose<4,>=3.1.1.3; extra == 'cellpose3'
Provides-Extra: cellpose4
Requires-Dist: cellpose<5,>=4; extra == 'cellpose4'
Provides-Extra: dev
Requires-Dist: asv; extra == 'dev'
Requires-Dist: bokeh; extra == 'dev'
Requires-Dist: cellpose<5,>=3.1.1.3; extra == 'dev'
Requires-Dist: harpy-vitessce; (python_version >= '3.12') and extra == 'dev'
Requires-Dist: instanseg-torch>=0.1.1; extra == 'dev'
Requires-Dist: ipython; extra == 'dev'
Requires-Dist: ipywidgets; extra == 'dev'
Requires-Dist: joypy; extra == 'dev'
Requires-Dist: marimo>=0.24.2; extra == 'dev'
Requires-Dist: myst-nb; extra == 'dev'
Requires-Dist: nbconvert; extra == 'dev'
Requires-Dist: opencv-python-headless; extra == 'dev'
Requires-Dist: pre-commit; extra == 'dev'
Requires-Dist: pytest; extra == 'dev'
Requires-Dist: pytest-cov; extra == 'dev'
Requires-Dist: pytest-xdist; extra == 'dev'
Requires-Dist: shibuya>=2026.7.12; extra == 'dev'
Requires-Dist: sphinx-autodoc-typehints; extra == 'dev'
Requires-Dist: sphinx-copybutton; extra == 'dev'
Requires-Dist: sphinx-design; extra == 'dev'
Requires-Dist: sphinx>=4.5; extra == 'dev'
Requires-Dist: sphinxcontrib-bibtex>=1.0.0; extra == 'dev'
Requires-Dist: sphinxcontrib-mermaid; extra == 'dev'
Requires-Dist: supervenn>=0.5.0; extra == 'dev'
Requires-Dist: textalloc; extra == 'dev'
Requires-Dist: tox; extra == 'dev'
Requires-Dist: tqdm; extra == 'dev'
Requires-Dist: twine>=4.0.2; extra == 'dev'
Provides-Extra: docs
Requires-Dist: myst-nb; extra == 'docs'
Requires-Dist: shibuya>=2026.7.12; extra == 'docs'
Requires-Dist: sphinx-autodoc-typehints; extra == 'docs'
Requires-Dist: sphinx-copybutton; extra == 'docs'
Requires-Dist: sphinx-design; extra == 'docs'
Requires-Dist: sphinx>=4.5; extra == 'docs'
Requires-Dist: sphinxcontrib-bibtex>=1.0.0; extra == 'docs'
Requires-Dist: sphinxcontrib-mermaid; extra == 'docs'
Provides-Extra: extra
Requires-Dist: bokeh; extra == 'extra'
Requires-Dist: cellpose<5,>=3.1.1.3; extra == 'extra'
Requires-Dist: harpy-vitessce; (python_version >= '3.12') and extra == 'extra'
Requires-Dist: instanseg-torch>=0.1.1; extra == 'extra'
Requires-Dist: ipython; extra == 'extra'
Requires-Dist: ipywidgets; extra == 'extra'
Requires-Dist: joypy; extra == 'extra'
Requires-Dist: marimo>=0.24.2; extra == 'extra'
Requires-Dist: nbconvert; extra == 'extra'
Requires-Dist: opencv-python-headless; extra == 'extra'
Requires-Dist: supervenn>=0.5.0; extra == 'extra'
Requires-Dist: textalloc; extra == 'extra'
Requires-Dist: tqdm; extra == 'extra'
Provides-Extra: instanseg
Requires-Dist: instanseg-torch>=0.1.1; extra == 'instanseg'
Provides-Extra: napari
Requires-Dist: napari[all]>=0.7.1; extra == 'napari'
Requires-Dist: spatiato>=0.2.0; extra == 'napari'
Provides-Extra: notebook
Requires-Dist: bokeh; extra == 'notebook'
Requires-Dist: ipython; extra == 'notebook'
Requires-Dist: ipywidgets; extra == 'notebook'
Requires-Dist: joypy; extra == 'notebook'
Requires-Dist: marimo>=0.24.2; extra == 'notebook'
Requires-Dist: nbconvert; extra == 'notebook'
Requires-Dist: supervenn>=0.5.0; extra == 'notebook'
Requires-Dist: textalloc; extra == 'notebook'
Requires-Dist: tqdm; extra == 'notebook'
Provides-Extra: opencv
Requires-Dist: opencv-python-headless; extra == 'opencv'
Provides-Extra: spatiato
Requires-Dist: napari[all]>=0.7.1; extra == 'spatiato'
Requires-Dist: spatiato>=0.2.0; extra == 'spatiato'
Provides-Extra: test
Requires-Dist: opencv-python-headless; extra == 'test'
Requires-Dist: pytest; extra == 'test'
Requires-Dist: pytest-cov; extra == 'test'
Requires-Dist: pytest-xdist; extra == 'test'
Requires-Dist: tox; extra == 'test'
Provides-Extra: vitessce
Requires-Dist: harpy-vitessce; (python_version >= '3.12') and extra == 'vitessce'
Description-Content-Type: text/markdown

<!-- These badges won't work while the GitHub repo is private:
[![License BSD-3](https://img.shields.io/pypi/l/harpy-analysis.svg?color=green)](https://github.com/saeyslab/harpy/raw/main/LICENSE)
[![Python Version](https://img.shields.io/pypi/pyversions/harpy-analysis.svg?color=green)](https://python.org)
[![codecov](https://codecov.io/gh/saeyslab/harpy/graph/badge.svg?token=7UXMDWVYFZ)](https://codecov.io/gh/saeyslab/harpy)
-->

<div align="center">
  <img src="https://raw.githubusercontent.com/saeyslab/harpy/main/docs/_static/img/logo.png" alt="Harpy logo" width="200" />
  <h2>Single-cell spatial omics analysis that makes you happy.</h2>
</div>

<div align="center">

[![PyPI](https://img.shields.io/pypi/v/harpy-analysis?style=flat-square&label=pypi)](https://pypi.org/project/harpy-analysis)
[![Release Status](https://img.shields.io/github/actions/workflow/status/saeyslab/harpy/release.yaml?event=release&style=flat-square&label=release)](https://github.com/saeyslab/harpy/actions/workflows/release.yaml)
[![Build Status](https://img.shields.io/github/actions/workflow/status/saeyslab/harpy/build.yaml?branch=main&style=flat-square&label=build)](https://github.com/saeyslab/harpy/actions/)
[![Test Status](https://img.shields.io/github/actions/workflow/status/saeyslab/harpy/run_tests.yml?branch=main&style=flat-square&label=tests)](https://github.com/saeyslab/harpy/actions/)
[![pre-commit.ci status](https://img.shields.io/github/checks-status/saeyslab/harpy/main?style=flat-square&label=pre-commit)](https://results.pre-commit.ci/latest/github/saeyslab/harpy/main)
[![documentation badge](https://img.shields.io/readthedocs/harpy/latest?style=flat-square&label=docs)](https://harpy.readthedocs.io/en/latest/)
[![codecov](https://img.shields.io/codecov/c/github/saeyslab/harpy/main?style=flat-square&label=coverage)](https://codecov.io/gh/saeyslab/harpy)
[![Downloads](https://img.shields.io/pepy/dt/harpy-analysis?style=flat-square&label=downloads)](https://pepy.tech/project/harpy-analysis)
[![License](https://img.shields.io/badge/license-BSD%203--Clause-blue?style=flat-square)](./LICENSE)
[![DOI](https://img.shields.io/badge/DOI-10.5281%2Fzenodo.15546703-blue?style=flat-square)](https://doi.org/10.5281/zenodo.15546703)
[![Paper](https://img.shields.io/badge/paper-Bioinformatics%20btag122-blue?style=flat-square)](https://doi.org/10.1093/bioinformatics/btag122)
[![scverse ecosystem](https://img.shields.io/badge/scverse-ecosystem-blue?style=flat-square)](https://scverse.org/packages/#ecosystem)

</div>

<p align="center">
  <a href="https://harpy.readthedocs.io/en/latest/">Documentation</a>
  ·
  <a href="https://harpy.readthedocs.io/en/latest/quickstart.html">Quick Start</a>
  ·
  <a href="https://github.com/vibspatial/spatial_multi_omics_training">Tutorials</a>
  ·
  <a href="https://github.com/vibspatial/spatiato">spatiato</a>
  ·
  <a href="https://github.com/vibspatial/harpy_vitessce">harpy-vitessce</a>
</p>

> 💫 **If you find Harpy useful, please give us a [⭐](https://github.com/saeyslab/harpy)!** It helps others discover the project and supports continued development.

## Why Harpy?

Harpy is a spatial omics analysis library for spatial transcriptomics and proteomics, and part of the [scverse ecosystem](https://scverse.org/packages/#ecosystem). It bridges [`SpatialData`](https://spatialdata.scverse.org/) and downstream analysis tools such as [`AnnData`](https://anndata.readthedocs.io/), [`Scanpy`](https://scanpy.readthedocs.io/), and [`Squidpy`](https://squidpy.readthedocs.io/). It provides scalable, image- and geometry-aware computation to transform raw spatial data into analysis-ready representations, with a strong emphasis on interoperability and large-scale workflows.

In practice, Harpy offers fast, out-of-core image preprocessing, tiled segmentation, along with efficient aggregation workflows to generate `AnnData` tables and compute per-cell features from images, segmentation masks, and transcript coordinates. It also supports deep feature extraction, pixel- and cell-level clustering, and the construction of single-cell representations from highly multiplexed images.

- **Multi-platform support** for spatial transcriptomics and proteomics data.
- **Interoperable outputs** built on [SpatialData](https://github.com/scverse/spatialdata).
- **SpatialData and AnnData ergonomics**: read single tables and write only the components that changed (`obs`, `obsm`, `uns`, …) to a backed Zarr store with [`harpy.tb.io`](https://harpy.readthedocs.io/en/latest/api.html#table-io); add images, labels, shapes and points with [`harpy.im`](https://harpy.readthedocs.io/en/latest/api.html#image), [`harpy.sh`](https://harpy.readthedocs.io/en/latest/api.html#shape) and [`harpy.pt`](https://harpy.readthedocs.io/en/latest/api.html#points).
- **Scales to (very) large images**: tiled workflows with [Dask](https://www.dask.org/); optional GPU acceleration with [CuPy](https://cupy.dev/) and [PyTorch](https://pytorch.org/).
- **Scalable computational building blocks** for segmentation, feature extraction, clustering, and spatial analysis.

## Development and support

Harpy is actively developed and maintained by the [Saeys Lab](https://saeyslab.sites.vib.be/en) and [VIB Spatial Catalyst](https://vib.be/en/technologies/technology-portfolio/spatial-catalyst), part of VIB Technologies. VIB funds a dedicated development team, so Harpy gets long-term maintenance and continued development.

## Installation

```bash
pip install harpy-analysis
```

Optional extras:

| Extra        | Installs                                                                                                                                                            |
| ------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `[extra]`    | Segmentation (`cellpose`, `instanseg-torch`), OpenCV (`opencv-python-headless`), Vitessce (`harpy-vitessce`) and notebook tools (`marimo`, `ipywidgets`, `tqdm`, …) |
| `[spatiato]` | [spatiato](https://github.com/vibspatial/spatiato), the spatial omics interface for [napari](https://napari.org/stable/)                                            |

```bash
pip install "harpy-analysis[extra]"
```

For the developer setup and more details, see the [installation guide](https://harpy.readthedocs.io/en/latest/installation.html).

## Quickstart

See the short, runnable [guide](https://harpy.readthedocs.io/en/latest/quickstart.html).

## Ecosystem

- **[spatiato](https://github.com/vibspatial/spatiato)**: a spatial omics interface for [napari](https://napari.org/stable/), built on `SpatialData` and Harpy, for interactive exploration and analysis of `SpatialData` stores.
- **[harpy-vitessce](https://github.com/vibspatial/harpy_vitessce)**: interactive visualization of Harpy outputs with [Vitessce](https://github.com/vitessce/vitessce).
- **[Spatial multi-omics training](https://github.com/vibspatial/spatial_multi_omics_training)**: course notebooks on `SpatialData` objects, targeted transcriptomics and spatial proteomics with Harpy and spatiato.

## Computational benchmark

Explore the benchmark performance of **Harpy** on a large MACSima tonsil proteomics dataset. 👉 [Results](https://harpy.readthedocs.io/en/latest/tutorials/general/benchmark.html)

## Contributing

See the [contribution guide](https://harpy.readthedocs.io/en/latest/contributing.html) for info on how to contribute to Harpy.

## Citation

If you use Harpy in your work, please cite:

> Benjamin Rombaut, Arne Defauw, Frank Vernaillen, Julien Mortier, Evelien Van Hamme, Sofie Van Gassen, Ruth Seurinck, Yvan Saeys. _Scalable analysis of whole slide spatial proteomics with Harpy_. _Bioinformatics_ (2026), btag122. [https://doi.org/10.1093/bioinformatics/btag122](https://doi.org/10.1093/bioinformatics/btag122)

If you use Harpy for spatial transcriptomics analysis, please cite:

> Lotte Pollaris, Bavo Vanneste, Benjamin Rombaut, Arne Defauw, Frank Vernaillen, Julien Mortier, Wout Vanhenden, Liesbet Martens, Tinne Thone, Jean-Francois Hastir, Anna Bujko, Wouter Saelens, Jean-Christophe Marine, Hilde Nelissen, Evelien Van Hamme, Ruth Seurinck, Charlotte L. Scott, Martin Guilliams, Yvan Saeys. _SPArrOW: a flexible, interactive and scalable pipeline for spatial transcriptomics analysis_. [https://doi.org/10.1101/2024.07.04.601829](https://doi.org/10.1101/2024.07.04.601829)

<details>
<summary>BibTeX</summary>

```bibtex
@article{rombaut2026harpy,
  title   = {Scalable analysis of whole slide spatial proteomics with Harpy},
  author  = {Rombaut, Benjamin and Defauw, Arne and Vernaillen, Frank and Mortier, Julien and Van Hamme, Evelien and Van Gassen, Sofie and Seurinck, Ruth and Saeys, Yvan},
  journal = {Bioinformatics},
  volume  = {42},
  number  = {3},
  pages   = {btag122},
  year    = {2026},
  doi     = {10.1093/bioinformatics/btag122}
}

@article{pollaris2024sparrow,
  title   = {SPArrOW: a flexible, interactive and scalable pipeline for spatial transcriptomics analysis},
  author  = {Pollaris, Lotte and Vanneste, Bavo and Rombaut, Benjamin and Defauw, Arne and Vernaillen, Frank and Mortier, Julien and Vanhenden, Wout and Martens, Liesbet and Thon{\'e}, Tinne and Hastir, Jean-Francois and Bujko, Anna and Saelens, Wouter and Marine, Jean-Christophe and Nelissen, Hilde and Van Hamme, Evelien and Seurinck, Ruth and Scott, Charlotte L. and Guilliams, Martin and Saeys, Yvan},
  journal = {bioRxiv},
  year    = {2024},
  doi     = {10.1101/2024.07.04.601829}
}
```

</details>

## License

Harpy is licensed under the [BSD 3-Clause License](./LICENSE).

## Issues

If you encounter any problems, please [file an issue] along with a detailed description.

[file an issue]: https://github.com/saeyslab/harpy/issues
