{"name":"harpy-analysis","display_name":"harpy","visibility":"public","icon":"","categories":[],"schema_version":"0.2.1","on_activate":null,"on_deactivate":null,"contributions":{"commands":[{"id":"harpy-analysis.widgets.wizard_widget","title":"Wizard","python_name":"harpy.widgets._wizard_widget:wizard_widget","short_title":null,"category":null,"icon":null,"enablement":null},{"id":"harpy-analysis.widgets.clean_widget","title":"Cleaning","python_name":"harpy.widgets._clean_widget:clean_widget","short_title":null,"category":null,"icon":null,"enablement":null},{"id":"harpy-analysis.widgets.segment_widget","title":"Segment","python_name":"harpy.widgets._segment_widget:segment_widget","short_title":null,"category":null,"icon":null,"enablement":null},{"id":"harpy-analysis.widgets.allocate_widget","title":"Allocate","python_name":"harpy.widgets._allocate_widget:allocate_widget","short_title":null,"category":null,"icon":null,"enablement":null},{"id":"harpy-analysis.widgets.annotate_widget","title":"Annotate","python_name":"harpy.widgets._annotate_widget:annotate_widget","short_title":null,"category":null,"icon":null,"enablement":null}],"readers":null,"writers":null,"widgets":[{"command":"harpy-analysis.widgets.wizard_widget","display_name":"Wizard","autogenerate":false}],"sample_data":null,"themes":null,"menus":{},"submenus":null,"keybindings":null,"configuration":[]},"package_metadata":{"metadata_version":"2.4","name":"harpy-analysis","version":"0.3.0","dynamic":null,"platform":null,"supported_platform":null,"summary":"single-cell spatial proteomics analysis that makes you happy","description":"<!-- These badges won't work while the GitHub repo is private:\n[![License BSD-3](https://img.shields.io/pypi/l/harpy.svg?color=green)](https://github.com/saeyslab/harpy/raw/main/LICENSE)\n[![Python Version](https://img.shields.io/pypi/pyversions/harpy-analysis.svg?color=green)](https://python.org)\n[![codecov](https://codecov.io/gh/saeyslab/harpy/graph/badge.svg?token=7UXMDWVYFZ)](https://codecov.io/gh/saeyslab/harpy)\n[![napari hub](https://img.shields.io/endpoint?url=https://api.napari-hub.org/shields/harpy)](https://napari-hub.org/plugins/harpy)\n-->\n\n# **Harpy: single-cell spatial proteomics analysis that makes you happy** <img src=\"./docs/_static/img/logo.png\" align =\"right\" alt=\"\" width =\"150\"/>\n\n[![PyPI](https://img.shields.io/pypi/v/harpy-analysis.svg)](https://pypi.org/project/harpy-analysis)\n[![Downloads](https://static.pepy.tech/badge/harpy-analysis)](https://pepy.tech/project/harpy-analysis)\n[![Build Status](https://github.com//saeyslab/harpy/actions/workflows/build.yaml/badge.svg)](https://github.com//saeyslab/harpy/actions/)\n[![documentation badge](https://readthedocs.org/projects/harpy/badge/?version=latest)](https://harpy.readthedocs.io/en/latest/)\n[![Test Status](https://github.com//saeyslab/harpy/actions/workflows/run_tests.yml/badge.svg)](https://github.com//saeyslab/harpy/actions/)\n[![codecov](https://codecov.io/gh/saeyslab/harpy/branch/main/graph/badge.svg)](https://codecov.io/gh/saeyslab/harpy)\n[![License](https://img.shields.io/badge/license-Academic%20Non--commercial-blue)](./LICENSE)\n![GitHub repo size](https://img.shields.io/github/repo-size/saeyslab/harpy)\n[![uv](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/uv/main/assets/badge/v0.json)](https://github.com/astral-sh/uv)\n[![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)\n\n> 💫 **If you find Harpy useful, please give us a [⭐](https://github.com/saeyslab/harpy)!** It helps others discover the project and supports continued development.\n\n## Installation\n\n**Recommended** for end-users.\n\n<!--Install the latest `harpy-analysis` [PyPI package](https://pypi.org/project/harpy-analysis) with the `extra` dependencies in a local Python environment.-->\n\n```bash\nuv venv --python=3.12 # set python version\nsource .venv/bin/activate # activate the virtual environment\nuv pip install \"git+https://github.com/saeyslab/harpy.git#egg=harpy-analysis[extra]\" # use uv to pip install dependencies\npython -c 'import harpy; print(harpy.__version__)' # check if the package is installed\n```\n\n**Only for developers.** Clone this repository locally, install the `.[dev]` instead of the `[extra]` dependencies and read the contribution guide.\n\n```bash\n# Clone repository from GitHub\nuv venv --python=3.12 # set python version\nsource .venv/bin/activate # activate the virtual environment\nuv pip install -e '.[dev]' # use uv to pip install dependencies\npython -c 'import harpy; print(harpy.__version__)' # check if the package is installed\n# make changes\npython -m pytest # run the tests\n```\n\nCheckout the docs for [installation instructions](https://github.com/saeyslab/harpy/blob/main/docs/installation.md) using [conda](https://github.com/conda/conda).\n\n## 🧭 Tutorials and Guides\n\nExplore how to use Harpy for segmentation, shallow and deep feature extraction, clustering, and spatial analysis of gigapixel-scale multiplexed data with these step-by-step notebooks:\n\n---\n\n- **🚀 Basic Usage of Harpy**\n\n  Learn how to read in data, perform **tiled segmentation** using [**Cellpose**](https://github.com/MouseLand/cellpose) and [**Dask-CUDA**](https://docs.rapids.ai/api/dask-cuda/stable/), extract features, and carry out clustering. 👉 [Tutorial](./docs/tutorials/general/Harpy_feature_calculation.ipynb)\n\n---\n\n- **🔧 Technology specific advice**\n\n  Learn which technologies Harpy supports. 👉 [Notebook](./docs/tutorials/general/techno_specific.ipynb)\n\n---\n\n- **🧩 Pixel and Cell Clustering**\n\n  Learn how to perform unsupervised pixel- and cell-level clustering using `Harpy` together with [**FlowSOM**](https://github.com/saeyslab/FlowSOM_Python). 👉 [Tutorial](./docs/tutorials/general/FlowSOM_for_pixel_and_cell_clustering.ipynb)\n\n---\n\n- **✂️ Cell Segmentation**\n\n  Explore segmentation workflows in `Harpy` using different tools:\n  - With [**Instanseg**](https://github.com/instanseg/instanseg) 👉 [Tutorial](./docs/tutorials/general//Harpy_instanseg.ipynb)\n\n  - With [**Cellpose**](https://github.com/MouseLand/cellpose) 👉 [Tutorial ](./docs/tutorials/general/Harpy_feature_calculation.ipynb)\n\n  💡 Want us to add support for another segmentation method?\n  👉 [Open an issue](https://github.com/saeyslab/harpy/issues) and let us know!\n\n---\n\n- **🧪 Single-cell representations from highly multiplexed images and downstream use with [PyTorch](https://pytorch.org/)**\n\n  Learn how single-cell representations can be generated from highly multiplexed images. These representations can then be used downstream to train classifiers in PyTorch. 👉 [Tutorial](./docs/tutorials/general/generate_single_cell_representations.ipynb)\n\n---\n\n- **🧠 Deep Feature Extraction**\n\n  Discover how `Harpy` enables fast, scalable extraction of deep, cell-level features from multiplex imaging data with the [**KRONOS**](https://github.com/mahmoodlab/KRONOS) foundation model for proteomics. 👉 [Tutorial](./docs/tutorials/general/Featurize_with_kronos.ipynb)\n\n  💡 Want us to add support for another deep feature extraction method?\n  👉 [Open an issue](https://github.com/saeyslab/harpy/issues) and let us know!\n\n---\n\n- **🔬 Shallow Feature Extraction**\n\n  Learn to extract shallow features—such as **mean**, **median**, and **standard deviation** of intensities—from multiplex imaging data with `Harpy`. 👉 [Tutorial](./docs/tutorials/advanced/Harpy_aggregate_rasters.ipynb)\n\n---\n\n- **🧬 Spatial Transcriptomics**\n\n  Learn how to analyze spatial transcriptomics data with `Harpy`. For detailed information, refer to the [**SPArrOW documentation**](https://sparrow-pipeline.readthedocs.io/en/latest).\n\n  👉 [Tutorial (Mouse Liver, Resolve Molecular Cartography)](./docs/tutorials/advanced/Harpy_transcriptomics.ipynb)\n\n  👉 [Tutorial (Human Ovarian Cancer, Xenium 10x Genomics)](./docs/tutorials/advanced/Harpy_transcriptomics_xenium.ipynb)\n\n---\n\n- **🌐 Multiple samples and coordinate systems**\n\n  Learn how to work with multiple samples, instrinsic and micron coordinates. 👉 [Tutorial](./docs/tutorials/advanced/coordinate_systems.ipynb)\n\n---\n\n- **📐 Rasterize and vectorize labels and shapes**\n\n  Learn how to convert a segmentation mask (array) into its vectorized form, and segmentation boundaries (polygons) into their rasterized equivalents. This conversion is useful, for example, when integrating annotations (e.g., from [QuPath](https://qupath.github.io/)) into downstream spatial omics analysis.👉 [Tutorial](./docs/tutorials/advanced/Rasterize_and_vectorize.ipynb)\n\n---\n\n📚 For a complete list of tutorials, visit the [**Harpy documentation**](https://harpy.readthedocs.io/en/latest/tutorials).\n\n## Computational benchmark\n\nExplore the benchmark performance of **Harpy** on a large MACSima tonsil proteomics dataset. 👉 [Results](./docs/tutorials/general/benchmark.ipynb)\n\n## Usage\n\n[Learn](https://github.com/saeyslab/harpy/blob/main/docs/usage.md) how `Harpy` can be integrated into your workflow.\n\n## Contributing\n\nSee [here](https://github.com/saeyslab/harpy/blob/main/docs/contributing.md) for info on how to contribute to Harpy.\n\n## References\n\n- https://github.com/ashleve/lightning-hydra-template\n\n## License\n\nCheck the [license](https://github.com/saeyslab/harpy/blob/main/LICENSE). Harpy is free for academic usage.\nFor commercial usage, please contact Saeyslab.\n\n## Issues\n\nIf you encounter any problems, please [file an issue] along with a detailed description.\n\n[napari]: https://github.com/napari/napari\n[Cookiecutter]: https://github.com/audreyr/cookiecutter\n[BSD-3]: http://opensource.org/licenses/BSD-3-Clause\n[cookiecutter-napari-plugin]: https://github.com/napari/cookiecutter-napari-plugin\n[file an issue]: https://github.com/saeyslab/harpy/issues\n[napari]: https://github.com/napari/napari\n[tox]: https://tox.readthedocs.io/en/latest/\n[pip]: https://pypi.org/project/pip/\n[PyPI]: https://pypi.org/\n","description_content_type":"text/markdown","keywords":null,"home_page":null,"download_url":null,"author":"dambi","author_email":null,"maintainer":null,"maintainer_email":null,"license":"Academic Non-commercial Software License Agreement\n\nThe Licensed Software is developed by and on behalf of the Laboratory of Data Mining and Modelling for Biomedicine of VIB-UGent and is owned by VIB vzw, located at Suzanne Tassierstraat 1, B-9052 Zwijnaarde, Belgium (hereinafter referred to as \"VIB\"). By downloading or installing the Licensed Software, the user agrees with the terms and conditions below.\n\nDefinitions\n“Licensed Software” shall mean Harpy as available on GitHub.\n\"Effective Date\" shall mean the date on which you download or install Harpy (as available on GitHub) on your system and which provide you access to the Harpy tool.\n“Commercial Purposes” shall include (1) the use of Licensed Software to provide a service, information or data that is directly or indirectly conveyed to any third party against compensation, (2) any type of transfer of the Licensed Software for compensation, and (3) any other use of Licensed Software that supports commercial entities.\n\nLicense\n1.\tLicensed Software is the work of the Saeys lab. The copyright in Licensed Software is owned by VIB.\n2.\tSubject to the terms and conditions of this Agreement, VIB hereby grants and the user accepts a non-exclusive, non-transferable license to use the Licensed Software for strictly internal academic research use only, on your own behalf or on behalf of your institution, and not for Commercial Purposes.\n3.\tThe user confirms to be an academic user. For academic users, there is no license fee.\n4.\tThis license does not entitle the user to receive from VIB hard-copy documentation, technical support, telephone assistance, or enhancements or updates to the Licensed Software, and nothing contained herein shall be interpreted as to require VIB, its faculty, employees or students to provide maintenance, installation services, debugging, consultation or end-user support of any kind.\n5.\tThe title and copyright to Licensed Software and any associated programs and documentation shall remain with VIB. The user agrees to preserve the same.\n6.\tThe user agrees not to make any copies of Licensed Software except for use in the user’s laboratory, without VIB’s prior written consent.  The user agrees to place the appropriate copyright notice on any such copies.\n7.\tThe user shall not distribute Licensed Software to other laboratories within user’s institution. The user shall not transfer Licensed Software to another location or person outside of user’s institution without VIB’s prior and written permission.\n8.\tThe user shall not market or otherwise benefit commercially from any product utilizing any portion of Licensed Software, nor any derivative works of Licensed Software, without first entering into a separate commercial license with VIB.\n9.\tExcept as otherwise expressly permitted in this Agreement, the user must not (i) modify or create any derivative works of the Licensed Software or documentation, including customization, translation or localization; (ii) decompile, disassemble, reverse engineer, or otherwise attempt to derive the source code for the Licensed Software; (iii) remove or alter any trademark, logo, copyright or other proprietary notices, legends, symbols or labels in the Licensed Software.\n10.\tThe user acknowledges that the Licensed Software is proprietary to VIB. The software code shall be treated as trade secrets and confidential information of VIB, and the user agrees to use all reasonable efforts to hold the same in confidence. The user’s obligation for confidentiality shall not extend to any information which (i) is or becomes generally available to the public, (ii) is already known to or subsequently disclosed by third parties to the user and at its free disposal, or (iii) is independently developed by the user or its affiliates without the use of the confidential information disclosed by VIB, or (iv) is required by law or legal process to be disclosed.\n11.\tThe user acknowledges that Licensed Software is a research tool and provided free of charge, it is only provided “as is”. VIB makes no representations or warranties of any type whatsoever, express or implied, regarding the Licensed Software. VIB expressly disclaims all representations and warranties regarding the Licensed Software, including but not limited to any representations or warranties of merchantability or fitness for any particular application or that the use of the Licensed Software will not infringe any patents, copyrights or trademarks or other rights of third parties, or any warranty that the rights and licenses granted hereunder comprise all the rights and licenses necessary or desirable to use the Licensed Software for internal non-commercial research purposes as permitted by this Agreement. The entire risk as to the quality and performance of the Licensed Software is borne by the user.\n12.\tVIB shall not be responsible for losses of any kind resulting from the use of Licensed Software, and can in no way provide compensation for any losses sustained, including but not limited to, any obligation, liability, right, claim or remedy for tort, or for any actual or alleged infringement of patents, copyrights, trade secrets, or similar rights of third parties, nor any business expense, machine downtime or damages caused by any deficiency, defect or error in Licensed Software or mal-function thereof, nor any incidental or consequential damages, however caused.\n13.\tThe user will indemnify, defend and hold harmless VIB, its directors, officers, employees and agents from and against all liability, losses, damages and expenses (including attorney’s fees and costs) arising out of any claims, demands, actions or other proceedings made or instituted by any third party against any of them and arising out of or relating to any breach of this Agreement by the user, or any use of the Licensed Software by the user, except insofar as such claims or liability result from VIB’s gross negligence or willful misconduct.\n14.\tThis Agreement and the license rights granted herein shall become effective as of the date the user downloaded the Licensed Software and shall continue in full force until the user deletes the Licensed Software and any and all related files from the user’s computing system, unless terminated in accordance with this Section. Upon one party's breach of any agreement, covenant, or representation made in this Agreement, the agreement will automatically end thirty (30) days after such breach. Either party shall have the right, at any time, to terminate this Agreement without cause by written notice to the other party specifying the date of termination. Upon termination, the user shall destroy all full and partial copies of the Licensed Software. The user shall forward written notice to VIB that all programs containing Licensed Software have been deleted from all computer libraries and storage or memory devices and are no longer stored therein.\n15.\tThis Agreement shall be construed in accordance with the laws of Belgium. The courts of Belgium shall have exclusive jurisdiction.\n16.\tThe parties agree that this Agreement is the complete and exclusive agreement among the parties and supersedes all proposals and prior agreements whether written or oral, and all other communications among the parties relating to the subject matter of this Agreement. This Agreement cannot be modified except in writing and signed by both parties. Failure by either party at any time to enforce any of the provisions of this Agreement shall not constitute a waiver by such party of such provision nor in any way affect the validity of this Agreement.\n17.\tThe invalidity of singular provisions does not affect the validity of the entire understanding. The parties are obligated, however, to replace the invalid provisions by a regulation, which comes closest to the economic intent of the invalid provision. The same shall apply mutatis mutandis in case of a gap.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.","classifier":["Development Status :: 2 - Pre-Alpha","Framework :: napari","Intended Audience :: Developers","License :: OSI Approved :: BSD License","Operating System :: OS Independent","Programming Language :: Python","Programming Language :: Python :: 3","Programming Language :: Python :: 3 :: Only","Programming Language :: Python :: 3.10","Programming Language :: Python :: 3.11","Programming Language :: Python :: 3.12","Topic :: Software Development :: Testing"],"requires_dist":["crick","distributed","flowsom","lazy-loader>=0.4","leidenalg>=0.9.1","magicgui","omegaconf","pyrootutils","rasterio>=1.3.2","scanpy>=1.9.1","seaborn>=0.12.2","session-info2","spatialdata-io","spatialdata-plot","spatialdata>=0.4.0","universal-pathlib","voronoi-diagram-for-polygons>=0.1.6","basicpy==1.0.0; (python_version <= '3.11') and extra == 'basic'","jax<=0.4.23,>=0.4.6; (python_version <= '3.11') and extra == 'basic'","jaxlib<=0.4.23,>=0.4.6; (python_version <= '3.11') and extra == 'basic'","numpy<2; (python_version <= '3.11') and extra == 'basic'","asv; extra == 'benchmark'","cellpose>=2.2.3; extra == 'cellpose'","hydra-colorlog>=1.2.0; extra == 'cli'","hydra-core>=1.2.0; extra == 'cli'","hydra-submitit-launcher>=1.2.0; extra == 'cli'","submitit>=1.4.5; extra == 'cli'","flowsom; extra == 'clustering'","scikit-learn>=1.3.1; extra == 'clustering'","asv; extra == 'dev'","bokeh; extra == 'dev'","cellpose>=2.2.3; extra == 'dev'","flowsom; extra == 'dev'","hydra-colorlog>=1.2.0; extra == 'dev'","hydra-core>=1.2.0; extra == 'dev'","hydra-submitit-launcher>=1.2.0; extra == 'dev'","ipython; extra == 'dev'","ipywidgets; extra == 'dev'","joypy; extra == 'dev'","myst-nb; extra == 'dev'","napari-spatialdata>=0.2.6; extra == 'dev'","napari[all]>=0.4.18; extra == 'dev'","nbconvert; extra == 'dev'","opencv-python; extra == 'dev'","pre-commit; extra == 'dev'","pytest; extra == 'dev'","pytest-cov; extra == 'dev'","pytest-qt; extra == 'dev'","scikit-learn>=1.3.1; extra == 'dev'","sphinx-autodoc-typehints; extra == 'dev'","sphinx-book-theme>=1.0.0; extra == 'dev'","sphinx-copybutton; extra == 'dev'","sphinx-design; extra == 'dev'","sphinx-rtd-theme; extra == 'dev'","sphinx>=4.5; extra == 'dev'","sphinxcontrib-bibtex>=1.0.0; extra == 'dev'","submitit>=1.4.5; extra == 'dev'","supervenn>=0.5.0; extra == 'dev'","textalloc; extra == 'dev'","tox; extra == 'dev'","tqdm; extra == 'dev'","twine>=4.0.2; extra == 'dev'","myst-nb; extra == 'docs'","sphinx-autodoc-typehints; extra == 'docs'","sphinx-book-theme>=1.0.0; extra == 'docs'","sphinx-copybutton; extra == 'docs'","sphinx-design; extra == 'docs'","sphinx-rtd-theme; extra == 'docs'","sphinx>=4.5; extra == 'docs'","sphinxcontrib-bibtex>=1.0.0; extra == 'docs'","bokeh; extra == 'extra'","cellpose>=2.2.3; extra == 'extra'","flowsom; extra == 'extra'","hydra-colorlog>=1.2.0; extra == 'extra'","hydra-core>=1.2.0; extra == 'extra'","hydra-submitit-launcher>=1.2.0; extra == 'extra'","ipython; extra == 'extra'","ipywidgets; extra == 'extra'","joypy; extra == 'extra'","napari-spatialdata>=0.2.6; extra == 'extra'","napari[all]>=0.4.18; extra == 'extra'","nbconvert; extra == 'extra'","opencv-python; extra == 'extra'","scikit-learn>=1.3.1; extra == 'extra'","submitit>=1.4.5; extra == 'extra'","supervenn>=0.5.0; extra == 'extra'","textalloc; extra == 'extra'","tqdm; extra == 'extra'","napari-spatialdata>=0.2.6; extra == 'napari'","napari[all]>=0.4.18; extra == 'napari'","bokeh; extra == 'notebook'","ipython; extra == 'notebook'","ipywidgets; extra == 'notebook'","joypy; extra == 'notebook'","nbconvert; extra == 'notebook'","supervenn>=0.5.0; extra == 'notebook'","textalloc; extra == 'notebook'","tqdm; extra == 'notebook'","opencv-python; extra == 'opencv'","cellpose>=2.2.3; extra == 'segmentation'","opencv-python; extra == 'test'","pytest; extra == 'test'","pytest-cov; extra == 'test'","pytest-qt; extra == 'test'","tox; extra == 'test'"],"requires_python":"<3.13,>=3.10","requires_external":null,"project_url":["Bug Tracker, https://github.com/saeyslab/harpy/issues","Documentation, https://github.com/saeyslab/harpy#README.md","Source Code, https://github.com/saeyslab/harpy","User Support, https://github.com/saeyslab/harpy/issues"],"provides_extra":["basic","benchmark","cellpose","cli","clustering","dev","docs","extra","napari","notebook","opencv","segmentation","test"],"provides_dist":null,"obsoletes_dist":null},"npe1_shim":false}