scvi-linearscvi

Train LinearSCVI to extract gene-to-factor loadings from raw scRNA-seq counts.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Trains an interpretable linear decoder model to uncover gene-to-factor loadings from raw scRNA-seq counts, enabling direct interpretation of latent factors and gene programs.

Core Features & Use Cases

  • Interpretable factor analysis: derive gene loadings for each latent dimension to define biological programs.
  • Compare with PCA on counts, benefiting from count-aware modeling and batch-friendly training.
  • Use cases: identify drivers of population structure, extract gene-signature lists, and annotate latent factors across samples.

Quick Start

Initialize an AnnData object with raw counts, configure LinearSCVI with a chosen number of latent factors, train the model, and retrieve the gene loadings.

Frequently Asked Questions about scvi-linearscvi

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

FAQPage Schema
How do I extract interpretable gene loadings from scRNA-seq counts?

To extract interpretable gene loadings from scRNA-seq counts, train a linear decoder model using raw counts to reveal gene-to-factor relationships. This approach directly maps latent dimensions to biological gene programs without requiring log transformation.

Can I use log-transformed data with scvi-tools LinearSCVI for factor analysis?

No, scvi-tools LinearSCVI for factor analysis requires raw scRNA-seq counts without log transformation. Using log-transformed data disrupts the count-aware modeling logic needed to accurately train the linear decoder and derive gene loadings.

What is the best way to identify drivers of population structure in single-cell datasets?

The best way to identify drivers of population structure in single-cell datasets is using interpretable factor analysis on raw counts. This method trains jointly across cells to derive latent factors and gene-signature lists that explain biological variation.

How does LinearSCVI compare to PCA for discovering gene programs in scRNA-seq?

LinearSCVI compares favorably to PCA for discovering gene programs by offering count-aware modeling and batch-friendly training. Unlike standard PCA, it uses a linear decoder on raw counts to provide interpretable latent factors directly linked to gene loadings.

Do I need to configure the number of latent factors before training an interpretable scRNA-seq model?

Yes, you need to configure the number of latent factors before training the interpretable scRNA-seq model. Initializing an AnnData object with raw counts and setting the latent factor count are required steps before model training and loadings retrieval.

Why does interpretable factor analysis require raw counts instead of normalized data?

Interpretable factor analysis requires raw counts because the underlying linear decoder model relies on count-aware modeling to accurately capture gene-to-factor loadings. Normalized or log-transformed data violates the distributional assumptions needed for joint training across cells.