scvi-contrastivevi

Separate perturbation-specific from background variation in single-cell datasets.

1|Updated Nov 20, 2025
One-click install
npx skills add https://github.com/tony-zhelonkin/SciAgent-toolkit --skill scvi-contrastivevi
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: scvi-contrastivevi
Source: https://github.com/tony-zhelonkin/SciAgent-toolkit/tree/main/skills/scvi-contrastivevi
Command: npx skills add https://github.com/tony-zhelonkin/SciAgent-toolkit --skill scvi-contrastivevi

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

ContrastiveVI enables analysis of perturbation experiments by separating salient (perturbation-specific) variation from background (shared) variation in single-cell data.

Core Features & Use Cases

  • Identify target vs background effects in Perturb-seq and related experiments.
  • Train models with dual latent spaces to visualize perturbation effects and adjust for confounders.
  • Use differential expression analysis focused on perturbation-specific signals.

Quick Start

Identify target and background cells, set up an AnnData object with counts, initialize ContrastiveVI, train with n_latent and n_salient, and extract latent representations for downstream analysis.

Frequently Asked Questions about scvi-contrastivevi

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I isolate perturbation-specific signals in single-cell Perturb-seq data?

You can isolate perturbation-specific signals in single-cell data by using ContrastiveVI, which separates salient perturbation-specific variation from shared background variation in raw counts datasets.

What is the best way to analyze drug-treatment effects versus background variation in single-cell datasets?

Analyzing drug-treatment effects against background variation is done by training ContrastiveVI with dual latent spaces, allowing you to visualize perturbation effects while adjusting for shared confounders.

How do I set up AnnData objects for contrastive analysis of disease versus healthy cells?

To set up AnnData objects for contrastive analysis, load your raw counts and call ContrastiveVI.setup_anndata, ensuring target and background cells are properly identified for model initialization.

Can I perform differential expression focused on perturbation-specific signals in single-cell data?

Yes, you can perform differential expression on the salient latent space extracted after training ContrastiveVI, focusing strictly on perturbation-specific signals rather than shared background variation.

Do I need to configure specific latent space dimensions for single-cell perturbation analysis?

Yes, training ContrastiveVI requires configuring both n_latent for the total latent space and n_salient for the perturbation-specific dimensions to accurately separate signals in single-cell data.

When should I separate salient and background variation instead of using standard single-cell analysis?

You should separate salient and background variation when working with Perturb-seq, drug-treatment studies, or disease-versus-healthy comparisons requiring target-versus-background analysis on raw counts.