Total Variational Inference

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

# totalVI is for end-to-end analysis of CITE-seq data
import anndata
import scvi
# read data and prepare for scvi-tools
adata ="my_data.h5ad"), protein_expression_obsm_key="proteins")
model = scvi.model.TOTALVI(adata)
# get integrated low-dimensional representation
adata.obsm["X_totalvi"] = model.get_latent_representation()
# normalized expression
adata.layers["totalvi_norm"], adata.obsm["totalvi_pro_norm"] = model.get_normalized_expression()
# differential expression
results = model.differential_expression(
groupby="cell types",