scvi-tools

Deep generative models for single-cell omics. Use when you need probabilistic batch correction (scVI), transfer learning, differential expression with uncertainty, or multi-modal integration (TOTALVI, MultiVI). Best for advanced modeling, batch effects, multimodal data. For standard analysis pipelines use scanpy.

Install

Hot:27

Download and extract to your skills directory

Copy command and send to AI Agent for auto-install:

Download and install this skill https://openskills.cc/api/download?slug=k-dense-ai-skills-scvi-tools&locale=en&source=copy

scvi-tools: A Framework for Deep Generative Models in Single-Cell Omics

Skills Overview


scvi-tools is a PyTorch-based framework for deep generative models in single-cell omics. It provides a complete solution for probabilistic batch correction, multimodal integration, and uncertainty quantification.

Suitable Use Cases

1. Batch Correction and Integration for Single-Cell RNA-seq Data


When you need to handle single-cell transcriptomics data from different batches, labs, or technologies, scvi-tools offers a probabilistic batch correction approach based on variational inference. Unlike traditional linear correction methods, the scVI model learns the underlying generative process of the data, preserving biological variation signals while removing batch effects. It is well suited for scenarios requiring the integration of multiple datasets, merging data across platforms, or handling technical noise.

2. Joint Analysis of Multimodal Single-Cell Data


For experimental technologies that measure multiple modalities at the same time, such as CITE-seq and multiome, scvi-tools provides dedicated multimodal integration models. totalVI supports joint modeling of protein and RNA data, while MultiVI can integrate multi-omics datasets with both paired and unpaired measurements. These models achieve unified analysis of different data types through a shared latent space, making them particularly suitable for complex experimental designs that leverage multiple measurement modalities simultaneously.

3. Spatial Transcriptomics and Specialized Modality Analysis


scvi-tools includes specialized models for spatial transcriptomics, such as DestVI for spatial deconvolution analysis, as well as tools for professional modalities like ATAC-seq, methylation, and flow cytometry. By using a unified theoretical framework and API design, these models provide consistent deep learning solutions for different types of single-cell data. They are suitable for research scenarios requiring handling non-standard data modalities or performing specialized analyses.

Core Features

1. Batch Correction via Deep Probabilistic Models


The core function of scvi-tools is to perform batch correction through deep generative models and variational inference. Unlike traditional correction methods, the scVI family of models (including scVI, scANVI, etc.) learns a probabilistic representation of the data. It can quantify uncertainty and provides statistical testing functionality. The models support GPU-accelerated training, can handle large-scale datasets with millions of cells, and all batch-corrected representations are generated within a probabilistic framework. This provides reliable uncertainty estimates for downstream differential expression analysis.

2. Unified API Support for Multiple Data Modalities


The framework offers a consistent API design for more than 20 specialized single-cell analysis models: data preparation (setup_anndata) → model training → feature extraction. All models are based on AnnData objects and integrate seamlessly with the scanpy ecosystem. Whether you are doing basic RNA-seq analysis or specialized spatial transcriptomics deconvolution, developers only need to learn the API pattern once to apply it to different data types and biological questions.

3. Probabilistic Differential Expression Analysis


Based on the trained generative models, scvi-tools provides differential expression analysis within a probabilistic framework. Compared with traditional methods, it can quantify uncertainty for expression changes of each gene and supports composite hypothesis testing, making it better suited to complex multimodal experimental designs. The analysis results directly include statistical significance assessment, eliminating the need for additional statistical testing steps and giving researchers more reliable biological insights.

Frequently Asked Questions

What types of analysis needs is scvi-tools suitable for?


scvi-tools is specifically designed for single-cell analysis scenarios that require deep probabilistic modeling—especially research involving pronounced batch effects, multimodal data integration, or uncertainty quantification. For standard analyses such as dimensionality reduction and clustering, scanpy may be more direct. If your data needs cross-study integration, merging across multi-technology platforms, or uses multimodal measurements such as CITE-seq, scvi-tools’ deep generative models can provide more powerful analytical capabilities than traditional methods.

What are the learning curve and technical requirements?


scvi-tools requires a Python 3.12+ environment and is built on PyTorch and PyTorch Lightning. Although the framework provides a unified API design, you still need to understand the basic concepts of deep learning and probabilistic modeling. Compared with traditional statistical methods, scvi-tools is more suitable for researchers with some programming experience. The official tutorials and documentation are detailed, and for users familiar with scanpy and AnnData, the learning cost is relatively manageable.

How should scvi-tools be used in combination with scanpy?


scvi-tools and scanpy are complementary rather than substitutes. A typical workflow is to use scvi-tools for “recomputation” steps such as batch correction, feature extraction, and multimodal integration, then store the results in an AnnData object. After that, use scanpy for downstream analyses such as visualization, clustering, and marker gene identification. The two frameworks are fully compatible with the AnnData data structure and can work together seamlessly. scvi-tools focuses on probabilistic modeling and deep learning, while scanpy focuses on statistical analysis and visualization. Using them together lets each play to its strengths.

    scvi-tools single-cell genomics deep generative model framework - Open Skills