Skip to main content

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 with multiple cell types and conditions and predict 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

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

Release files for scgen 2.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for scgen 2.1.0
File Size Uploaded
scgen-2.1.0.tar.gz 25.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for scgen 2.1.0
File Interpreter ABI Platform
scgen-2.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 49.4 kB

Release files / scgen-2.1.0.tar.gz

Download URL scgen-2.1.0.tar.gz
Size 25.0 kB
Tags Source
SHA-256 checksum
How to use checksums
0f3f23ee596b20906c22b6a324ca930b70b78c93e18d9c1846214ee84ab872bf
BLAKE2b-256 checksum
How to use checksums
eb501dd661a53115498b3a9bc4d08a899ee63cb860fad70e4a775bd526622911
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.13 CPython/3.9.6 Darwin/20.5.0

Release files / scgen-2.1.0-py3-none-any.whl

Download URL scgen-2.1.0-py3-none-any.whl
Size 24.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1cf2efc967feca0940e00e539e1e0c4115aead2110b0890d83cd42e006d9cc5e
BLAKE2b-256 checksum
How to use checksums
ce943aaa9d873964852535af09b9ee12958e3ffda8ed25aec95635e9b133ca00
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.13 CPython/3.9.6 Darwin/20.5.0

Release history Release notifications | RSS feed

This release

2.1.0 This release

2 release files

2.0.0

2 release files

1.1.5

2 release files

1.1.4

2 release files

1.1.3

2 release files

1.1.2

2 release files

1.1.1

2 release files

1.1.0

2 release files

1.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page