Single-cell Cytometry Annotation Network
Project description
Scyan stands for Single-cell Cytometry Annotation Network. Based on biological knowledge prior, it provides a fast cell population annotation without requiring any training label. Scyan 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. 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.
Getting started
Scyan can be installed on every OS with pip
or poetry
.
On macOS / Linux, python>=3.8,<3.11
is required, while python>=3.8,<3.10
is required on Windows. The preferred Python version is 3.9
.
Install from PyPI (recommended)
pip install scyan
Install locally (if you want to contribute)
Advice (optional): We advise creating a new environment via a package manager (except if you use Poetry, which will automatically create the environment). For instance, you can create a new
conda
environment:conda create --name scyan python=3.9 conda activate scyan
Clone the repository and move to its root:
git clone https://github.com/MICS-Lab/scyan.git
cd scyan
Choose one of the following, depending on your needs (it should take at most a few minutes):
pip install . # pip minimal installation (library only)
pip install -e . # pip installation in editable mode
pip install -e '.[dev,hydra,discovery]' # pip installation with all the extras
poetry install -E 'dev hydra discovery' # poetry installation with all the extras
Basic usage / Demo
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 or the complete documentation.
Technical description
Scyan is a Python library based on:
- AnnData, a data library that works nicely with single-cell data
- Pytorch, a deep learning framework
- Pytorch Lightning, for model training
Optionally, it also supports:
- Hydra, for project configuration
- Weight & Biases, for model monitoring
Cite us
Our paper is published in Briefings in Bioinformatics and is available here.
@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},
}
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file scyan-1.6.2.tar.gz
.
File metadata
- Download URL: scyan-1.6.2.tar.gz
- Upload date:
- Size: 57.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.9.16 Linux/6.5.0-1021-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 187a9f9f64211cfb813fd844ac57d55add67f158961674afb4a4281de44c17d3 |
|
MD5 | 2a9a58966f25eb4e4ff9268f1f0ea3ba |
|
BLAKE2b-256 | 3d693faea734b9e40187c6f895b49bc4126cccd9767204cf5324af86f4537a1d |
File details
Details for the file scyan-1.6.2-py3-none-any.whl
.
File metadata
- Download URL: scyan-1.6.2-py3-none-any.whl
- Upload date:
- Size: 69.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.9.16 Linux/6.5.0-1021-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6661375c83ba906142a306e3ecbc437398101af1dc1369362574c9e4465cd9ac |
|
MD5 | 60a88d62700673c431117491bb4deb2b |
|
BLAKE2b-256 | bee380dd5cb5c457dfb4368eafb2fbe4b32874bb94300b992229408dd8c584e6 |