Single-cell Variational Inference

This page is under construction. For now, please learn more about scVI in our user guide.

# scVI is for end-to-end analysis of scRNA-seq data
import anndata
import scvi
# read data and prepare for scvi-tools
adata ="my_data.h5ad"), batch_key="batch")
model = scvi.model.SCVI(adata)
# get integrated low-dimensional representation
adata.obsm["X_scvi"] = model.get_latent_representation()
# normalized expression
adata.layers["scvi_norm"] = model.get_normalized_expression()
# differential expression
results = model.differential_expression(
groupby="cell types",