Metadata-Version: 2.4
Name: harreman
Version: 0.1.3
Summary: Metabolic cell-cell communication inference in spatial transcriptomics.
Project-URL: Documentation, https://harreman.readthedocs.io/
Project-URL: Source, https://github.com/YosefLab/Harreman
Project-URL: Home-page, https://github.com/YosefLab/Harreman
Author-email: Oier Etxezarreta Arrastoa <oier.etxezarreta@weizmann.ac.il>
License: BSD 3-Clause License
        
        Copyright (c) 2025, Yosef Lab, Weizmann Institute of Science
        
        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
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Science/Research
Classifier: Natural Language :: English
Classifier: Operating System :: POSIX :: Linux
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Topic :: Scientific/Engineering :: Bio-Informatics
Requires-Python: <3.13,>=3.10
Requires-Dist: anndata
Requires-Dist: matplotlib
Requires-Dist: mplscience
Requires-Dist: muon
Requires-Dist: numpy
Requires-Dist: pandas
Requires-Dist: plotnine
Requires-Dist: scanpy
Requires-Dist: scipy
Requires-Dist: seaborn
Requires-Dist: sparse
Requires-Dist: torch
Provides-Extra: all
Requires-Dist: coverage; extra == 'all'
Requires-Dist: docutils!=0.18.*,!=0.19.*,>=0.8; extra == 'all'
Requires-Dist: ipykernel; extra == 'all'
Requires-Dist: ipython; extra == 'all'
Requires-Dist: jupyterlab; extra == 'all'
Requires-Dist: myst-nb; extra == 'all'
Requires-Dist: myst-parser; extra == 'all'
Requires-Dist: pandas; extra == 'all'
Requires-Dist: pytest; extra == 'all'
Requires-Dist: sphinx; extra == 'all'
Requires-Dist: sphinx-autodoc-typehints; extra == 'all'
Requires-Dist: sphinx-book-theme>=1.0.0; extra == 'all'
Requires-Dist: sphinx-copybutton; extra == 'all'
Requires-Dist: sphinx-design; extra == 'all'
Requires-Dist: sphinx-hoverxref; extra == 'all'
Requires-Dist: sphinx-rtd-theme; extra == 'all'
Requires-Dist: sphinx>=4.1; extra == 'all'
Requires-Dist: sphinxcontrib-bibtex>=1.0.0; extra == 'all'
Requires-Dist: sphinxext-opengraph; extra == 'all'
Provides-Extra: dev
Requires-Dist: myst-parser; extra == 'dev'
Requires-Dist: sphinx; extra == 'dev'
Requires-Dist: sphinx-rtd-theme; extra == 'dev'
Provides-Extra: docs
Requires-Dist: docutils!=0.18.*,!=0.19.*,>=0.8; extra == 'docs'
Requires-Dist: ipykernel; extra == 'docs'
Requires-Dist: ipython; extra == 'docs'
Requires-Dist: myst-nb; extra == 'docs'
Requires-Dist: myst-parser; extra == 'docs'
Requires-Dist: pandas; extra == 'docs'
Requires-Dist: sphinx-autodoc-typehints; extra == 'docs'
Requires-Dist: sphinx-book-theme>=1.0.0; extra == 'docs'
Requires-Dist: sphinx-copybutton; extra == 'docs'
Requires-Dist: sphinx-design; extra == 'docs'
Requires-Dist: sphinx-hoverxref; extra == 'docs'
Requires-Dist: sphinx-rtd-theme; extra == 'docs'
Requires-Dist: sphinx>=4.1; extra == 'docs'
Requires-Dist: sphinxcontrib-bibtex>=1.0.0; extra == 'docs'
Requires-Dist: sphinxext-opengraph; extra == 'docs'
Provides-Extra: docsbuild
Requires-Dist: docutils!=0.18.*,!=0.19.*,>=0.8; extra == 'docsbuild'
Requires-Dist: ipykernel; extra == 'docsbuild'
Requires-Dist: ipython; extra == 'docsbuild'
Requires-Dist: myst-nb; extra == 'docsbuild'
Requires-Dist: myst-parser; extra == 'docsbuild'
Requires-Dist: pandas; extra == 'docsbuild'
Requires-Dist: sphinx-autodoc-typehints; extra == 'docsbuild'
Requires-Dist: sphinx-book-theme>=1.0.0; extra == 'docsbuild'
Requires-Dist: sphinx-copybutton; extra == 'docsbuild'
Requires-Dist: sphinx-design; extra == 'docsbuild'
Requires-Dist: sphinx-hoverxref; extra == 'docsbuild'
Requires-Dist: sphinx-rtd-theme; extra == 'docsbuild'
Requires-Dist: sphinx>=4.1; extra == 'docsbuild'
Requires-Dist: sphinxcontrib-bibtex>=1.0.0; extra == 'docsbuild'
Requires-Dist: sphinxext-opengraph; extra == 'docsbuild'
Provides-Extra: tests
Requires-Dist: coverage; extra == 'tests'
Requires-Dist: pytest; extra == 'tests'
Provides-Extra: tutorials
Requires-Dist: jupyterlab; extra == 'tutorials'
Description-Content-Type: text/markdown

# Harreman

[![License](https://img.shields.io/badge/License-BSD_3--Clause-blue.svg)](https://github.com/YosefLab/Harreman/blob/main/LICENSE)
[![Stars](https://img.shields.io/github/stars/YosefLab/Harreman?logo=GitHub&color=yellow)](https://github.com/YosefLab/Harreman/stargazers)
[![PyPI](https://img.shields.io/pypi/v/harreman.svg)](https://pypi.org/project/harreman)
[![Harreman](https://github.com/YosefLab/Harreman/actions/workflows/test.yml/badge.svg)](https://github.com/YosefLab/Harreman/actions/workflows/test.yml)
[![Coverage](https://codecov.io/gh/YosefLab/Harreman/branch/main/graph/badge.svg?token=KuSsL5q3l7)](https://codecov.io/gh/YosefLab/Harreman)
[![Code Style](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/python/black)
[![Downloads](https://pepy.tech/badge/harreman)](https://pepy.tech/project/harreman)
[![Docs](https://readthedocs.org/projects/harreman/badge/?version=latest)](https://harreman.readthedocs.io/en/latest/)

Harreman is an algorithm and open-source software for inference of metabolic exchanges in tissues using spatial transcriptomics. Harreman employs a series of spatial correlation statistics to enable multiscale insight: from stratification of tissues into regions with different metabolic characteristics, to inference of which metabolites are exchanged within each region, and to identification of the specific subsets of cells that are exchanging these metabolites (through import and export reactions).

![overview](docs/figs/Harreman_pipeline.png)

## Resources
- Tutorials, user guide, API reference, installation guide, and release notes are available in the [Documentation](https://harreman.readthedocs.io/en).

## Installation
We suggest using a package manager like `conda` or `mamba` to install the package.

```bash
conda create -n harreman-env python=3.12
conda activate harreman-env
pip install harreman
```

## Tutorials
- For tutorials on how to run the PyTorch version of Hotspot with Harreman, visit the [Hotspot tutorials](https://harreman.readthedocs.io/en/latest/tutorials/hotspot_tutorials.html).
- To get familiar with the Harreman pipeline on the case studies used in the manuscript, visit the [Harreman tutorials](https://harreman.readthedocs.io/en/latest/tutorials/harreman_tutorials.html).

## Test statistics
All test statistics available in the Harreman pipeline are described in the [User guide](https://harreman.readthedocs.io/en/latest/user_guide/index.html). Currently implemented test statistics are:
- [Test statistic 1](https://harreman.readthedocs.io/en/latest/user_guide/test_statistic_1.html): Is gene *a* spatially autocorrelated?
- [Test statistic 2](https://harreman.readthedocs.io/en/latest/user_guide/test_statistic_2.html): Are genes *a* and *b* spatially co-localized (or interacting with each other)?
- [Test statistic 3](https://harreman.readthedocs.io/en/latest/user_guide/test_statistic_3.html): Is metabolite *m* spatially autocorrelated?
- [Test statistic 4](https://harreman.readthedocs.io/en/latest/user_guide/test_statistic_4.html): Are metabolites $m_1$ and $m_2$ spatially co-localized?
- [Test statistic 5](https://harreman.readthedocs.io/en/latest/user_guide/test_statistic_5.html): Do genes *a* and *b* interact when expressed by cell types *t* and *u*, respectively?
- [Test statistic 6](https://harreman.readthedocs.io/en/latest/user_guide/test_statistic_6.html): Is metabolite *m* exchanged by cell types *t* and *u*?
- [Test statistic 7](https://harreman.readthedocs.io/en/latest/user_guide/test_statistic_7.html): Do genes *a* and *b* interact when *a* is expressed by cell *i* and *b* by spatially nearby cells?
- [Test statistic 8](https://harreman.readthedocs.io/en/latest/user_guide/test_statistic_8.html): Is metabolite *m* exchanged by cell *i* and other spatially proximal cells?
- [Test statistic 9](https://harreman.readthedocs.io/en/latest/user_guide/test_statistic_9.html): Do genes *a* and *b* interact when *a* is expressed by cell *i* (that belongs to cell type *t*) and *b* by spatially nearby cells (that belong to cell type *u*)?
- [Test statistic 10](https://harreman.readthedocs.io/en/latest/user_guide/test_statistic_10.html): Is metabolite *m* exchanged by cell *i* (that belongs to cell type *t*) and other spatially proximal cells (that belong to cell type *u*)?

## Reference
- **Metabolic zonation and characterization of tissue slices with spatial transcriptomics**.
  *bioRxiv, 2025*. https://doi.org/10.1101/2025.11.11.687271

