FADVI: Factor Disentanglement Variational Inference
FADVI (Factor Disentanglement Variational Inference) is a deep learning framework for disentangling batch effects and biological factors in single-cell RNA sequencing data. Built on top of scvi-tools, FADVI provides a robust solution for analyzing complex single-cell datasets.
Features
Batch Effect Correction: Effectively removes technical batch effects while preserving biological signal
Factor Disentanglement: Separates biological factors from technical confounders
scvi-tools Integration: Built on the proven scvi-tools framework for reliability and performance
Easy to Use: Simple API for both beginners and advanced users
Quick Start
Install FADVI using pip:
pip install fadvi
Basic usage:
import fadvi
import scanpy as sc
# Load your data
adata = sc.read_h5ad("your_data.h5ad")
# Setup data registration
fadvi.FADVI.setup_anndata(adata, batch_key="batch", labels_key="cell_type", unlabeled_category="Unknown")
# Initialize and train FADVI model
model = fadvi.FADVI(adata)
model.train(max_epochs=30)
# Get different latent representations
adata.obsm["X_fadvi_batch"] = model.get_latent_representation(representation="b")
adata.obsm["X_fadvi_label"] = model.get_latent_representation(representation="l")
adata.obsm["X_fadvi_residual"] = model.get_latent_representation(representation="r")