Metadata-Version: 2.1
Name: novae
Version: 0.1.0
Summary: Graph-based foundation model for spatial transcriptomics data
Home-page: https://mics-lab.github.io/novae/
License: BSD-3-Clause
Author: Quentin Blampey
Author-email: quentin.blampey@gmail.com
Requires-Python: >=3.9,<3.13
Classifier: License :: OSI Approved :: BSD License
Classifier: Operating System :: MacOS :: MacOS X
Classifier: Operating System :: Microsoft :: Windows
Classifier: Operating System :: POSIX :: Linux
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Scientific/Engineering
Provides-Extra: dev
Requires-Dist: black (>=22.8.0) ; extra == "dev"
Requires-Dist: flake8 (>=7.0.0) ; extra == "dev"
Requires-Dist: griffe (<1.0.0) ; extra == "dev"
Requires-Dist: huggingface-hub (>=0.24.0)
Requires-Dist: ipykernel (>=6.22.0) ; extra == "dev"
Requires-Dist: ipywidgets (>=8.1.2) ; extra == "dev"
Requires-Dist: isort (>=5.10.1) ; extra == "dev"
Requires-Dist: lightning (>=2.2.1)
Requires-Dist: mkdocs-jupyter (>=0.21.0) ; extra == "dev"
Requires-Dist: mkdocs-material (>=8.5.6) ; extra == "dev"
Requires-Dist: mkdocstrings (>=0.19.0) ; extra == "dev"
Requires-Dist: mkdocstrings-python (>=0.7.1) ; extra == "dev"
Requires-Dist: pre-commit (>=3.8.0) ; extra == "dev"
Requires-Dist: pydantic (>=2.8.2) ; extra == "dev"
Requires-Dist: pytest (>=7.1.3) ; extra == "dev"
Requires-Dist: pytest-cov (>=5.0.0) ; extra == "dev"
Requires-Dist: pyyaml (>=6.0.1) ; extra == "dev"
Requires-Dist: safetensors (>=0.4.3)
Requires-Dist: scanpy (>=1.9.8)
Requires-Dist: torch (>=2.2.1)
Requires-Dist: torch-geometric (>=2.5.2)
Requires-Dist: wandb (>=0.17.2) ; extra == "dev"
Project-URL: Documentation, https://mics-lab.github.io/novae/
Project-URL: Repository, https://github.com/MICS-Lab/novae
Description-Content-Type: text/markdown

<p align="center">
  <img src="https://raw.githubusercontent.com/MICS-Lab/novae/main/docs/assets/banner.png" alt="novae_banner" width="100%"/>
</p>

<div align="center">

[![PyPI](https://img.shields.io/pypi/v/novae.svg)](https://pypi.org/project/novae)
[![Downloads](https://static.pepy.tech/badge/novae)](https://pepy.tech/project/novae)
[![Docs](https://img.shields.io/badge/docs-mkdocs-blue)](https://mics-lab.github.io/novae)
![Build](https://github.com/MICS-Lab/novae/workflows/ci/badge.svg)
[![Code Style](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/python/black)
[![License](https://img.shields.io/pypi/l/novae.svg)](https://github.com/MICS-Lab/novae/blob/main/LICENSE)
[![Imports: isort](https://img.shields.io/badge/imports-isort-blueviolet)](https://pycqa.github.io/isort/)
[![codecov](https://codecov.io/gh/MICS-Lab/novae/graph/badge.svg?token=FFI44M52O9)](https://codecov.io/gh/MICS-Lab/novae)

</div>

<p align="center"><b><i>
  💫 Graph-based foundation model for spatial transcriptomics data
</b></i></p>

Novae is a deep learning model for spatial domain assignments of spatial transcriptomics data (at both single-cell or spot resolution). It works across multiple gene panels, tissues, and technologies. Novae offers several additional features, including: (i) native batch-effect correction, (ii) analysis of spatially variable genes and pathways, and (iii) architecture analysis of tissue slides.

## Documentation

Check [Novae's documentation](https://mics-lab.github.io/novae/) to get started. It contains installation explanations, API details, and tutorials.

## Overview

<p align="center">
  <img src="https://raw.githubusercontent.com/MICS-Lab/novae/main/docs/assets/Figure1.png" alt="novae_overview" width="100%"/>
</p>

> **(a)** Novae was trained on a large dataset, and is shared on [Hugging Face Hub](https://huggingface.co/collections/MICS-Lab/novae-669cdf1754729d168a69f6bd). **(b)** Illustration of the main tasks and properties of Novae. **(c)** Illustration of the method behing Novae (self-supervision on graphs, adapted from [SwAV](https://arxiv.org/abs/2006.09882)).


## Installation

### PyPI

`novae` can be installed via `PyPI` on all OS, for `python>=3.9`.

```
pip install novae
```

### Editable mode

To install `novae` in editable mode (e.g., to contribute), clone the repository and choose among the options below.

```sh
pip install -e .                 # pip, minimal dependencies
pip install -e '.[dev]'          # pip, all extras
poetry install                   # poetry, minimal dependencies
poetry install --all-extras      # poetry, all extras
```

## Usage

Here is a minimal usage example. For more details, refer to the [documentation](https://mics-lab.github.io/novae/).

```python
import novae

model = novae.Novae.from_pretrained("MICS-Lab/novae-human-0")

model.compute_representations(adata, zero_shot=True)
model.assign_domains(adata)
```

## Cite us

```txt
TODO: submit preprint (coming soon)
```

