Metadata-Version: 2.4
Name: scyan
Version: 1.7.2
Summary: Single-cell Cytometry Annotation Network
Project-URL: Homepage, https://prism-oncology.github.io/scyan/
Project-URL: Repository, https://github.com/prism-oncology/scyan
Project-URL: Documentation, https://prism-oncology.github.io/scyan/
Author-email: Blampey Quentin <quentin.blampey@gmail.com>
License-Expression: BSD-3-Clause
License-File: LICENSE
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.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Topic :: Scientific/Engineering
Requires-Python: >=3.11
Requires-Dist: anndata>=0.12.0
Requires-Dist: fcsparser>=0.2.4
Requires-Dist: fcswrite>=0.6.2
Requires-Dist: flowutils>=1.2.0
Requires-Dist: lightning>=2.2.0
Requires-Dist: llvmlite>=0.38.1
Requires-Dist: seaborn>=0.12.2
Requires-Dist: torch>=2.2.0
Requires-Dist: umap-learn>=0.5.3
Provides-Extra: dev
Requires-Dist: ipykernel>=6.15.0; extra == 'dev'
Requires-Dist: ipywidgets>=7.7.1; extra == 'dev'
Requires-Dist: mkdocs-jupyter>=0.21.0; extra == 'dev'
Requires-Dist: mkdocs-material>=8.5.0; extra == 'dev'
Requires-Dist: mkdocstrings-python>=0.7.1; extra == 'dev'
Requires-Dist: mkdocstrings>=0.19.0; extra == 'dev'
Requires-Dist: pre-commit>=3.8.0; extra == 'dev'
Requires-Dist: pytest>=7.1.2; extra == 'dev'
Requires-Dist: ruff>=0.11.4; extra == 'dev'
Provides-Extra: discovery
Requires-Dist: leidenalg>=0.8.10; extra == 'discovery'
Provides-Extra: hydra
Requires-Dist: hydra-colorlog>=1.2.0; extra == 'hydra'
Requires-Dist: hydra-core>=1.2.0; extra == 'hydra'
Requires-Dist: hydra-optuna-sweeper>=1.2.0; extra == 'hydra'
Requires-Dist: wandb>=0.13.7; extra == 'hydra'
Description-Content-Type: text/markdown

<p align="center">
  <img src="https://github.com/prism-oncology/scyan/raw/main/docs/assets/logo.png" alt="scyan_logo" width="400"/>
</p>

<div align="center">

[![PyPI](https://img.shields.io/pypi/v/scyan.svg)](https://pypi.org/project/scyan)
[![Downloads](https://static.pepy.tech/badge/scyan)](https://pepy.tech/project/scyan)
[![Docs](https://img.shields.io/badge/docs-mkdocs-blue)](https://prism-oncology.github.io/scyan/)
![Build](https://github.com/prism-oncology/scyan/workflows/ci/badge.svg)
[![License](https://img.shields.io/pypi/l/scyan.svg)](https://github.com/prism-oncology/scyan/blob/main/LICENSE)
[![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)
[![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)

</div>

<p align="center"><i>
  🧬 <b>S</b>ingle-cell <b>Cy</b>tometry <b>A</b>nnotation <b>N</b>etwork
</i></p>

Based on biological knowledge prior, Scyan provides a fast cell population annotation without requiring any training label. It is an interpretable model that also corrects batch-effect and can be used for debarcoding, cell sampling, and population discovery.

# Documentation

The [complete documentation can be found here](https://prism-oncology.github.io/scyan/). It contains installation guidelines, tutorials, a description of the API, etc.

# Overview

Scyan is a Bayesian probabilistic model composed of a deep invertible neural network called a normalizing flow (the function $f_{\phi}$). It maps a latent distribution of cell expressions into the empirical distribution of cell expressions. This cell distribution is a mixture of gaussian-like distributions representing the sum of a cell-specific and a population-specific term. Also, interpretability and batch effect correction are based on the model latent space — more details in the article's Methods section.

<p align="center">
  <img src="https://github.com/prism-oncology/scyan/raw/main/docs/assets/overview.png" alt="overview_image"/>
</p>

# Getting started

## Installation

Scyan can be installed on every OS with `pip` for `python>=3.11`:

```bash
pip install scyan
```

## Basic usage / Demo

```py
import scyan

adata, table = scyan.data.load("aml") # Automatic loading

model = scyan.Scyan(adata, table)
model.fit()
model.predict()
```

This code should run in approximately 40 seconds (once the dataset is loaded).
For more usage demo, read the [tutorials](https://prism-oncology.github.io/scyan/tutorials/usage/) or the complete [documentation](https://prism-oncology.github.io/scyan/).

# Cite us

Our paper is published in ***Briefings in Bioinformatics*** and is available [here](https://doi.org/10.1093/bib/bbad260).
```txt
@article{10.1093/bib/bbad260,
    author = {Blampey, Quentin and Bercovici, Nadège and Dutertre, Charles-Antoine and Pic, Isabelle and Ribeiro, Joana Mourato and André, Fabrice and Cournède, Paul-Henry},
    title = "{A biology-driven deep generative model for cell-type annotation in cytometry}",
    journal = {Briefings in Bioinformatics},
    pages = {bbad260},
    year = {2023},
    month = {07},
    issn = {1477-4054},
    doi = {10.1093/bib/bbad260},
    url = {https://doi.org/10.1093/bib/bbad260},
    eprint = {https://academic.oup.com/bib/advance-article-pdf/doi/10.1093/bib/bbad260/50973199/bbad260.pdf},
}
```
