scvi-scarches-reference-mapping

Map query datasets to reference atlases with scArches architectural surgery.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Maps a query dataset onto an existing scvi-tools or scArches reference atlas using architectural surgery to project unseen cells without retraining from scratch.

Core Features & Use Cases

  • Prepare_query_anndata for gene padding to ensure compatibility with the reference.
  • load_query_data to attach the query to the reference workflow and enable transformation.
  • Fine-tuning with a frozen encoder (weight_decay=0) to preserve reference structure.
  • scANVI or weighted-KNN label transfer for efficient annotation transfer.
  • Novel-cell-state detection from low confidence and hierarchical ontology transfer via treearches-hierarchy-learning.
  • Supports both scvi-tools natives (scVI, scANVI, totalVI, MultiVI) and scarches models (trVAE, scGen, expiMap, treeArches, scPoli).
  • Reference-training flags required: use_layer_norm=both, use_batch_norm=none, encode_covariates=True.
  • For de novo integration without a reference: scvi-basic.

Quick Start

Run the end-to-end scArches workflow to map your query data to a pretrained reference.

Frequently Asked Questions about scvi-scarches-reference-mapping

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

FAQPage Schema
How do I map a query single-cell dataset onto an existing reference atlas?

To map a query single-cell dataset onto a reference atlas, you can use scArches architectural surgery to project unseen cells without retraining from scratch, attaching the query data via load_query_data and fine-tuning with weight_decay=0.

What single-cell models are supported for reference mapping and label transfer?

Reference mapping supports scvi-tools natives like scVI, scANVI, totalVI, and MultiVI, alongside scArches models including trVAE, scGen, expiMap, treeArches, and scPoli for efficient label transfer.

Do I need specific configuration flags to train a reference atlas for architectural surgery?

Yes, training a reference atlas for architectural surgery requires specific flags: use_layer_norm=both, use_batch_norm=none, and encode_covariates=True to ensure compatibility with query mapping.

Can I detect novel cell states when mapping query data to a reference?

You can detect novel cell states during reference mapping by identifying low confidence scores from scANVI or weighted-KNN label transfer, and by using treearches-hierarchy-learning for hierarchical ontology transfer.

How do I handle gene padding discrepancies between my query data and the reference atlas?

To handle gene padding discrepancies between query data and a reference atlas, use the prepare_query_anndata function to ensure gene compatibility before attaching the query for transformation.

What is the best way to integrate single-cell data without using an existing reference atlas?

For de novo integration without a reference atlas, use scvi-basic instead of scArches reference mapping, as architectural surgery specifically requires a pretrained reference model to project unseen cells.