Skip to main content

ScGen - Predicting single cell perturbations.

Project description

scGen PyPI version Build Status Documentation Status Downloads

Introduction

scGen is a generative model to predict single-cell perturbation response across cell types, studies and species (Nature Methods, 2019). scGen is implemented using the scvi-tools framework.

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:

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:

pip install scgen

or install the development version via pip:

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.

Reproducing paper results

In order to reproduce paper results visit here.

References

Lotfollahi, Mohammad and Wolf, F. Alexander and Theis, Fabian J. "scGen predicts single-cell perturbation responses." Nature Methods, 2019. pdf

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

scgen-2.0.0.tar.gz (25.0 kB view details)

Uploaded Source

Built Distribution

scgen-2.0.0-py3-none-any.whl (24.3 kB view details)

Uploaded Python 3

File details

Details for the file scgen-2.0.0.tar.gz.

File metadata

  • Download URL: scgen-2.0.0.tar.gz
  • Upload date:
  • Size: 25.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.6 CPython/3.8.2 Darwin/19.6.0

File hashes

Hashes for scgen-2.0.0.tar.gz
Algorithm Hash digest
SHA256 9db2df1b49dfb5792b86a951c174c69b53acdc4f4fea4244d45fcf14333debb3
MD5 70bc02515e7704e2e91a2a51525c8749
BLAKE2b-256 ff3f063df59df28a1eb26a688be7e82741d5ede2a79daae3b76c1b776ead0caa

See more details on using hashes here.

File details

Details for the file scgen-2.0.0-py3-none-any.whl.

File metadata

  • Download URL: scgen-2.0.0-py3-none-any.whl
  • Upload date:
  • Size: 24.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.6 CPython/3.8.2 Darwin/19.6.0

File hashes

Hashes for scgen-2.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7a9cb4e8bde29f0035cbafced31f096e324fd8c9da5a276574a5e42ee5cb69cb
MD5 911bf6852bf401ffef43c966e1c07729
BLAKE2b-256 171427e76fdfebf7674eefbacde698c298fd3eb16f9d812ddc40bf94c201474f

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page