Metadata-Version: 2.1
Name: scgen
Version: 2.0.0
Summary: ScGen - Predicting single cell perturbations.
Home-page: https://github.com/theislab/scgen
License: MIT
Author: Mohammad lotfollahi
Author-email: mohammad.lotfollahi@helmholtz-muenchen.de
Requires-Python: >=3.7,<4.0
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: MIT License
Classifier: Natural Language :: English
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.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Topic :: Scientific/Engineering :: Bio-Informatics
Provides-Extra: dev
Provides-Extra: docs
Provides-Extra: tutorials
Requires-Dist: adjustText
Requires-Dist: anndata (>=0.7.5)
Requires-Dist: black (>=20.8b1); extra == "dev"
Requires-Dist: codecov (>=2.0.8); extra == "dev"
Requires-Dist: flake8 (>=3.7.7); extra == "dev"
Requires-Dist: importlib-metadata (>=1.0,<2.0); python_version < "3.8"
Requires-Dist: ipython (>=7.1.1); extra == "docs"
Requires-Dist: isort (>=5.7); extra == "dev"
Requires-Dist: jupyter (>=1.0); extra == "dev"
Requires-Dist: leidenalg; extra == "tutorials"
Requires-Dist: loompy (>=3.0.6); extra == "dev" or extra == "tutorials"
Requires-Dist: nbconvert (>=5.4.0); extra == "dev"
Requires-Dist: nbformat (>=4.4.0); extra == "dev"
Requires-Dist: nbsphinx-link; extra == "docs"
Requires-Dist: nbsphinx; extra == "docs"
Requires-Dist: pre-commit (>=2.7.1); extra == "dev"
Requires-Dist: pydata-sphinx-theme (>=0.4.0); extra == "docs"
Requires-Dist: pytest (>=4.4); extra == "dev"
Requires-Dist: python-igraph; extra == "tutorials"
Requires-Dist: scanpy (>=1.6)
Requires-Dist: scanpydoc (>=0.5); extra == "docs"
Requires-Dist: scikit-misc (>=0.1.3); extra == "tutorials"
Requires-Dist: scvi-tools (>=0.9.0)
Requires-Dist: seaborn (>=0.11)
Requires-Dist: sphinx (>=3.0,<4.0); extra == "docs"
Requires-Dist: sphinx-autodoc-typehints; extra == "docs"
Requires-Dist: sphinx-material; extra == "docs"
Requires-Dist: typing_extensions; (python_version < "3.8") and (extra == "docs")
Project-URL: Documentation, https://scgen.readthedocs.io
Description-Content-Type: text/markdown

# scGen [![PyPI version](https://badge.fury.io/py/scgen.svg)](https://badge.fury.io/py/scgen) [![Build Status](https://travis-ci.com/theislab/scGen.svg?branch=master)](https://travis-ci.com/theislab/scGen) [![Documentation Status](https://readthedocs.org/projects/scgen/badge/?version=latest)](https://scgen.readthedocs.io/en/latest/?badge=latest) [![Downloads](https://pepy.tech/badge/scgen)](https://pepy.tech/project/scgen)




<img align="center" src="./sketch/sketch.png?raw=true">

## Introduction
scGen is a generative model to predict single-cell perturbation response across cell types, studies and species
  [(Nature Methods, 2019)](https://www.nature.com/articles/s41592-019-0494-8). scGen is implemented using the [scvi-tools framework](https://scvi-tools.org/).

## Getting Started
What you can do with scGen:

* Train on a dataset wih multiple cell types and conditions and predict the the perturbation effect on the cell type
which you only have in one condition. This scenario can be extended to multiple species where you want to predict
the effect of a specific species using another or all the species.

* Train on a dataset where you have two conditions (e.g. control and perturbed) and predict on second dataset
with similar genes.

* Remove batch effect on labeled data. In this scenario you need to provide cell_type and batch labels to
the method. Note that `batch_removal` does not require all cell types to be present in all datasets (batches). If
you have dataset specific cell type it will preserved as before.

* We assume there exist two conditions in you dataset (e.g. control and perturbed). You can train the model and with
your data and predict the perturbation for the cell type/species of interest.

* We recommend to use normalized data for the training. A simple example for normalization pipeline using scanpy:

``` python
import scanpy as sc
adata = sc.read(data)
sc.pp.normalize_total(adata)
sc.pp.log1p(adata)
```
* We further recommend to use highly variable genes (HVG). For the most examples in the paper we used top ~7000
HVG. However, this is optional and highly depend on your application and computational power.




## Installation

### Installation with pip
To install the latest version scGen via pip:
```bash
pip install scgen
```

or install the development version via pip:
```bash
pip install git+https://github.com/theislab/scgen.git
```


On Windows machines you may need to download a C++ compiler if you wish to build from source yourself.

## Examples

See examples at our [documentation site](https://scgen.readthedocs.io/).

## Reproducing paper results
In order to reproduce paper results visit [here](https://github.com/M0hammadL/scGen_reproducibility).

## References

Lotfollahi, Mohammad and Wolf, F. Alexander and Theis, Fabian J.
**"scGen predicts single-cell perturbation responses."**
Nature Methods, 2019. [pdf](https://rdcu.be/bMlbD)

