User#
Import scvi-tools as:
import scvi
Model#
Automatic identification of zero-inflated genes [Clivio et al., 2019]. |
|
Conditional version of single-cell Variational Inference. |
|
Multi-resolution deconvolution of Spatial Transcriptomics data (DestVI) [Lopez et al., 2022]. |
|
Linearly-decoded VAE [Svensson et al., 2020]. |
|
Peak Variational Inference for chromatin accessilibity analysis [Ashuach et al., 2022]. |
|
Single-cell annotation using variational inference [Xu et al., 2021]. |
|
single-cell Variational Inference [Lopez et al., 2018]. |
|
total Variational Inference [Gayoso et al., 2021]. |
|
Integration of multi-modal and single-modality data [Ashuach et al., 2023]. |
|
Amortized Latent Dirichlet Allocation [Blei et al., 2003]. |
|
|
External models#
Reimplementation of CellAssign for reference-based annotation [Zhang et al., 2019]. |
|
Joint VAE for imputing missing genes in spatial data [Lopez et al., 2019]. |
|
Reimplementation of Stereoscope [Andersson et al., 2020]. |
|
Reimplementation of Stereoscope [Andersson et al., 2020]. |
|
Doublet detection in scRNA-seq [Bernstein et al., 2020]. |
|
Ambient RNA removal in scRNA-seq data [Sheng et al., 2022]. |
|
Reimplementation of Tangram [Biancalani et al., 2021]. |
|
|
|
contrastive variational inference [Weinberger et al., 2023]. |
|
Peak Variational Inference using a Poisson distribution [Martens et al., 2023]. |
|
|
|
Multi-resolution Variational Inference (MrVI) [Boyeau et al., 2024]. |
|
Model class for methylVI [Weinberger and Lee, 2023] |
|
Decipher model for single-cell data analysis [Nazaret et al., 2023]. |
|
ResolVI addresses noise and bias in single-cell resolved spatial transcriptomics data. |
|
Integration with cVAE & optional VampPrior and latent cycle-consistency. |
Data loading#
scvi-tools
relies entirely on the AnnData format. For convenience, we have included data loaders from the AnnData API. Scanpy also has utilities to load data that are outputted by 10x’s Cell Ranger software.
Read .h5ad-formatted hdf5 file. |
|
Read .csv file. |
|
Read .loom-formatted hdf5 file. |
|
Read .txt, .tab, .data (text) file. |
|
Read scATAC-seq data outputted by 10x Genomics software. |
|
Read Multiome (scRNA + scATAC) data outputted by 10x Genomics software. |
Basic preprocessing#
For general single-cell preprocessing, we defer to our friends at Scanpy, and specifically their preprocessing module (scanpy.pp
).
All scvi-tools
models require raw UMI count data. The count data can be safely stored in an AnnData layer as one of the first steps of a Scanpy single-cell workflow:
adata.layers["counts"] = adata.X.copy()
Here we maintain a few package specific utilities for feature selection, etc.
Rank and select genes based on the enrichment of zero counts. |
|
Organize anndata object loaded from 10x for scvi models. |
|
Concatenate multiome and single-modality input anndata objects. |
|
Add DNA sequence to AnnData object. |
|
Convert scATAC-seq read counts to appoximate fragment counts. |
Model hyperparameter tuning#
scvi-tools
supports automatic model hyperparameter tuning using Ray Tune.
|
|
|
Model hub#
We have a hub for pre-trained scvi-tools
models that is hosted on huggingface.
Using the functionality that scvi-tools
provides, users can download pre-trained scvi-tools
models (and datasets)
from this platform, and model generators can upload their own pre-trained scvi-tools
models to this platform.
Encapsulates the required metadata for scvi-tools hub models. |
|
A helper for creating a ModelCard for scvi-tools hub models. |
|
Wrapper for |
Model criticism#
|
Utilities#
Here we maintain miscellaneous general methods.
Returns a minified AnnData. |
Configuration#
An instance of the ScviConfig
is available as scvi.settings
and allows configuring scvi-tools.
Config manager for scvi-tools. |