Developer#
Import scvi-tools as:
import scvi
Data Registration#
AnnDataFields delineate how scvi-tools refers to fields in AnnData objects. The AnnDataManager provides an interface for operating over a collection of AnnDataFields and an AnnData object.
Provides an interface to validate and process an AnnData object for use in scvi-tools. |
|
Validation checks for AnnOrMudata scvi-tools compat. |
|
Abstract class for a single AnnData/MuData field. |
|
An AnnDataField for layer or X attributes in the AnnData data structure. |
|
An AnnDataField for categorical .obs attributes in the AnnData data structure. |
|
An AnnDataField for categorical .var attributes in the AnnData data structure. |
|
An AnnDataField for a collection of numerical .obs fields in the AnnData data structure. |
|
An AnnDataField for a collection of numerical .var fields in the AnnData data structure. |
|
An AnnDataField for a collection of categorical .obs fields in AnnData. |
|
An AnnDataField for a collection of categorical .var fields in AnnData. |
|
An AnnDataField for an .obsm field in the AnnData data structure. |
|
An AnnDataField for a .varm field in the AnnData data structure. |
|
An AnnDataField for an protein data stored in an .obsm field of an AnnData object. |
|
An AnnDataField for string .uns attributes in the AnnData data structure. |
|
An AnnDataField for labels which include explicitly unlabeled cells. |
|
A wrapper class that adds MuData support for an AnnDataField. |
|
Wraps an AnnDataField with |
|
Extension of |
Data Loaders#
DataLoaders for loading tensors from AnnData objects. DataSplitters for splitting data into train/test/val.
DataLoader for loading tensors from AnnData objects. |
|
DataLoader that supports a list of list of indices to load. |
|
Creates data loaders |
|
DataLoader that supports semisupervised training. |
|
Creates data loaders |
Distributions#
Parameterizable probability distributions.
Poisson distribution. |
|
Negative binomial distribution. |
|
Negative binomial mixture distribution. |
|
Zero-inflated negative binomial distribution. |
|
Negative binomial parameterized by mean and inverse dispersion. |
|
|
Model (Base)#
These classes should be used to construct user-facing model classes.
Abstract class for scvi-tools models. |
|
Abstract base class for scvi-tools models that can handle minified data. |
|
Universal variational auto-encoder (VAE) methods. |
|
General purpose methods for RNA-seq analysis. |
|
Universal scArches implementation. |
|
General purpose unsupervised train method. |
|
Mixin class for training Pyro models. |
|
Mixin class for generating samples from posterior distribution. |
|
A callback to warmup a Pyro guide. |
|
A callback to warmup a Pyro guide and model. |
|
Unified class for differential computation. |
|
|
Module#
Existing module classes with respective generative and inference procedures.
Implementation of the AutoZI model [Clivio et al., 2019]. |
|
Basic fully-connected NN classifier. |
|
Linear-decoded Variational auto-encoder model. |
|
Model for multi-resolution deconvolution of spatial transriptomics. |
|
Variational auto-encoder model for ATAC-seq data. |
|
Variational auto-encoder model for joint paired + unpaired RNA-seq and ATAC-seq data. |
|
Single-cell annotation using variational inference. |
|
Total variational inference for CITE-seq data. |
|
Variational auto-encoder [Lopez et al., 2018]. |
|
Conditional Variational auto-encoder model. |
|
An amortized implementation of Latent Dirichlet Allocation [Blei et al., 2003]. |
|
Variational autoencoder model. |
External module#
Module classes in the external API with respective generative and inference procedures.
Joint variational auto-encoder for imputing missing genes in spatial data. |
|
Model for CellAssign. |
|
Model of scRNA-seq for deconvolution of spatial transriptomics. |
|
Model of single-cell RNA-sequencing data for deconvolution of spatial transriptomics. |
|
Tangram Mapper Model. |
|
PyTorch implementation of ScBasset [Yuan and Kelley, 2022]. |
|
Variational inference for contrastive analysis of RNA-seq data. |
|
Variational auto-encoder model. |
|
Multi-resolution Variational Inference (MrVI) module. |
|
PyTorch module for methylVI. |
|
Pyro Module for the Decipher model. |
|
Implementation of resolVI. |
|
CVAE with optional VampPrior and latent cycle consistency loss. |
Module (Base)#
These classes should be used to construct module classes that define generative models and inference schemes.
Abstract class for scvi-tools modules. |
|
Abstract base class for scvi-tools modules that can handle minified data. |
|
Base module class for Pyro models. |
|
Abstract class for Jax-based scvi-tools modules. |
|
|
|
Loss signature for models. |
|
Decorator for |
Neural networks#
Basic neural network building blocks.
A helper class to build fully-connected layers for a neural network. |
|
Encode data of |
|
Decodes data from latent space to data space. |
|
Decodes data from latent space of |
|
One hot a tensor of categories. |
|
|
Train#
TrainingPlans define train/test/val optimization steps for modules.
Train vaes with adversarial loss option to encourage latent space mixing. |
|
Lightning module task for SemiSupervised Training. |
|
Lightning module task to train Pyro scvi-tools modules. |
|
Lightning module task to train Pyro scvi-tools modules. |
|
Lightning module task to train Pyro scvi-tools modules. |
|
Lightweight wrapper of Pytorch Lightning Trainer. |
|
Lightning module task to train scvi-tools modules. |
|
TrainRunner calls Trainer.fit() and handles pre and post training procedures. |
|
|
|
|
|
Loud early stopping callback. |
Utilities#
Utility functions used by scvi-tools.
Progress bar with 'rich' and 'tqdm' styles. |
|
Class that is intended to process docstrings. |
|
A dictionary that allows for attribute-style access. |
|
Compute a heuristic for the default number of maximum epochs. |