Metadata-Version: 2.4
Name: spatiomic
Version: 0.4.2
Summary: A python toolbox for spatial omics analysis.
Author-email: Malte Kuehl <malte.kuehl@clin.au.dk>
Requires-Python: >=3.10
Description-Content-Type: text/markdown
Classifier: Development Status :: 4 - Beta
Classifier: License :: OSI Approved :: GNU General Public License v3 (GPLv3)
Classifier: Intended Audience :: Science/Research
Classifier: Intended Audience :: Healthcare Industry
Classifier: Natural Language :: English
Classifier: Typing :: Typed
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Operating System :: OS Independent
License-File: LICENSE
Requires-Dist: adjustText
Requires-Dist: anndata
Requires-Dist: colorcet
Requires-Dist: esda>=2.7.0
Requires-Dist: joblib
Requires-Dist: lazy_loader
Requires-Dist: matplotlib
Requires-Dist: networkx
Requires-Dist: numpy>=2
Requires-Dist: pandas>=2
Requires-Dist: pysal
Requires-Dist: python-igraph
Requires-Dist: scikit-image
Requires-Dist: scikit-learn
Requires-Dist: scipy>=1.15.0
Requires-Dist: seaborn
Requires-Dist: statsmodels
Requires-Dist: umap-learn
Requires-Dist: xpysom==1.0.7
Requires-Dist: aicspylibczi ; extra == "dev"
Requires-Dist: certifi ; extra == "dev"
Requires-Dist: coverage ; extra == "dev"
Requires-Dist: flit ; extra == "dev"
Requires-Dist: furo ; extra == "dev"
Requires-Dist: ipykernel ; extra == "dev"
Requires-Dist: ipywidgets ; extra == "dev"
Requires-Dist: jupyter-client ; extra == "dev"
Requires-Dist: jupyter-core ; extra == "dev"
Requires-Dist: mypy==1.17.0 ; extra == "dev"
Requires-Dist: myst-parser ; extra == "dev"
Requires-Dist: nbsphinx ; extra == "dev"
Requires-Dist: opencv-python-headless ; extra == "dev"
Requires-Dist: openpyxl ; extra == "dev"
Requires-Dist: pandas-stubs ; extra == "dev"
Requires-Dist: pandoc ; extra == "dev"
Requires-Dist: pre-commit ; extra == "dev"
Requires-Dist: pygments ; extra == "dev"
Requires-Dist: pytest ; extra == "dev"
Requires-Dist: pytest-datafiles ; extra == "dev"
Requires-Dist: readlif ; extra == "dev"
Requires-Dist: ruff==0.9.10 ; extra == "dev"
Requires-Dist: session-info2 ; extra == "dev"
Requires-Dist: sphinx ; extra == "dev"
Requires-Dist: sphinx-autoapi ; extra == "dev"
Requires-Dist: sphinx-autodoc-typehints ; extra == "dev"
Requires-Dist: sphinxcontrib-mermaid ; extra == "dev"
Requires-Dist: sphinx-copybutton ; extra == "dev"
Requires-Dist: sphinx-design ; extra == "dev"
Requires-Dist: sphinx-rtd-theme ; extra == "dev"
Requires-Dist: virtualenv ; extra == "dev"
Project-URL: Documentation, https://complextissue.github.io/spatiomic/
Project-URL: Home, https://github.com/complextissue/spatiomic
Project-URL: Source, https://github.com/complextissue/spatiomic
Provides-Extra: dev

# spatiomic

[![Version](https://img.shields.io/pypi/v/spatiomic)](https://pypi.org/project/spatiomic/)
[![License](https://img.shields.io/pypi/l/spatiomic)](https://github.com/complextissue/spatiomic)
[![Python Version Required](https://img.shields.io/pypi/pyversions/spatiomic)](https://pypi.org/project/spatiomic/)
[![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)
[![pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit&logoColor=white)](https://github.com/pre-commit/pre-commit)
[![GitHub CI](https://github.com/complextissue/spatiomic/actions/workflows/ci.yml/badge.svg)](https://github.com/complextissue/spatiomic/actions/workflows/ci.yml)
[![GitHub Pages](https://github.com/complextissue/spatiomic/actions/workflows/docs.yml/badge.svg)](https://spatiomic.org)
[![codecov](https://codecov.io/gh/complextissue/spatiomic/branch/main/graph/badge.svg?token=TLXB333GQV)](https://codecov.io/gh/complextissue/spatiomic)
![PyPi Downloads](https://img.shields.io/pepy/dt/spatiomic?label=PyPi%20downloads)

`spatiomic` is a computational library for the analysis of *spati*al prote*omic*s (with some functions also being useful for other *-omics*).

The main goal of this package is to organize different packages and methods that are commonly used when dealing with high-dimensional imaging data behind a single API that allows for scalable high-performance computing applications, whenever possible on the GPU.

## Installation

`spatiomic` is available through PyPi:

```bash
pip install spatiomic
```

For the best GPU-accelerated experience (optional), a CUDA-compatible GPU and installation of the `cupy`, `cuml`, `cuGraph` and `cuCIM` packages is necessary. Please consult the [RAPIDS.AI installation guide](https://docs.rapids.ai/install) for further information.

Installation time should not exceed 5 minutes on a standard desktop computer with an average network connection.

## Documentation

Detailled documentation is made available at: [https://spatiomic.org](https://spatiomic.org).

The documentation also contains a small simulated dataset used for clustering, for more information, please refer to the `Pixel-based clustering` section of the documentation.

### Building the documentation

The documentation can be build locally by navigating to the `docs` folder and running: `make html`.
This requires that the development requirements of the package as well as the package itself have been installed in the same virtual environment and that `pandoc` has been added, e.g. by running `brew install pandoc` on macOS operating systems.

## System requirements

### Hardware requirements

`spatiomic` does not come with any specific hardware requirements. For an optimal experience and analysis of very large datasets, a CUDA-enabled GPU and sufficient RAM (e.g., >= 48 Gb) is recommended.

### Software requirements

#### Operating systems

Though it should run on all systems that can run Python, `spatiomic` has specifically been confirmed to work on the following operating systems:

- Ubuntu 22.04
- Ubuntu 24.04
- macOS Sequoia 15.1.1

#### Python version & dependencies

`spatiomic` requires Python version 3.10 or above (3.12 recommended).

#### Code editors

We recommend developers use Visual Studio Code with the recommended extensions and settings contained in the `.vscode` folder to edit this codebase.

### GPUs

The use of a GPU is optional but greatly accelerates many common `spatiomic` analyses. While most recent CUDA-compatible devices are expected to work, the following GPUs have been tested:

- NVIDIA RTX 6000 Ada
- NVIDIA QUADRO RTX 8000
- NVIDIA V100

Using a modern computer (e.g., an M-series MacBook) without a CUDA-enabled GPU, the sample script provided in the `Full example` section of the documentation should take a few minutes, depending on your hardware, typically less than 3 minutes if all the data is already downloaded and the package is installed. With a CUDA-enabled GPU, it should be significantly faster.

## Attribution & License

### License

The software is provided under the GNU General Public License, version 3 (GPL-3.0). Please consult `LICENSE.md` for further information.
The `glasbey_light` color palette available through `so.plot.colormap` is part of `colorcet` and distributed under the Creative Commons Attribution 4.0 International Public License (CC-BY).

### Citation

`spatiomic` was developed for use with multiplexed immunofluorescence imaging data at [Aarhus University](https://au.dk/) by [Malte Kuehl](https://github.com/maltekuehl) with valuable inputs, code additions and feedback from other lab members, supervisors and collaborators. If you use this package in an academic setting, please cite this repository according to the information in the `CITATION.cff` file.

