Inferensys

Glossary

Query-to-Reference Mapping

The computational projection of new single-cell transcriptomic or epigenomic profiles onto an established reference atlas to rapidly annotate cell types, identify novel states, and harmonize data without full dataset reintegration.
Data scientist building training data pipeline on laptop, data preprocessing visible, technical workspace.
COMPUTATIONAL PROJECTION

What is Query-to-Reference Mapping?

Query-to-reference mapping is the computational projection of new single-cell profiles onto an established reference atlas to rapidly annotate cell types, identify novel states, and harmonize data without full dataset reintegration.

Query-to-reference mapping anchors unlabeled single-cell transcriptomes to a curated reference atlas by identifying mutual nearest neighbors in a shared latent space. This supervised approach bypasses computationally expensive de novo clustering and manual cell type annotation, enabling rapid classification of incoming data against a gold-standard taxonomy.

The process relies on dimensionality reduction techniques like PCA and transfer learning algorithms such as scArches or Symphony. By projecting query cells into the reference embedding, the method not only assigns known labels but also flags novelty—cells that fall outside the reference manifold—indicating previously uncharacterized states or populations.

REFERENCE-BASED ANNOTATION

Key Characteristics of Query-to-Reference Mapping

The computational projection of new single-cell profiles onto an established reference atlas to rapidly annotate cell types, identify novel states, and harmonize data without full dataset reintegration.

01

Reference Atlas Construction

A foundational step requiring a high-quality, expertly annotated reference dataset. The atlas must capture the full breadth of expected biological heterogeneity. Seurat, scArches, and Azimuth provide pre-built references for human tissues. Key considerations include:

  • Cell-type granularity: Fine subtypes vs. broad lineages
  • Batch diversity: Multiple donors and technologies for robustness
  • Quality control: Removal of doublets and ambient RNA contamination
02

Projection via Dimensionality Reduction

Query cells are embedded into the reference's low-dimensional space without recomputing the full manifold. Methods include:

  • PCA projection: Linear mapping using pre-computed gene loadings
  • CCA-based alignment: Canonical correlation anchors query and reference subspaces
  • scVI latent space: Probabilistic projection through the trained encoder network This step preserves the reference structure while accommodating new data points.
03

Anchor-Based Transfer

Algorithms identify mutual nearest neighbors between query and reference cells in the shared embedding. These 'anchors' form the basis for transferring discrete labels and continuous scores. Seurat's FindTransferAnchors function scores each anchor pair by:

  • Shared neighborhood overlap
  • Distance in the joint embedding
  • Consistency across multiple anchor pairs High-scoring anchors drive confident label assignments.
04

Label Transfer & Uncertainty Quantification

Cell-type annotations are propagated from reference to query via the anchor set. Each query cell receives a classification score reflecting prediction confidence. Methods output:

  • Predicted cell type: The highest-scoring label
  • Prediction score: A value between 0 and 1
  • Mapping score: How well the query cell fits the reference distribution Low mapping scores flag novel cell states absent from the reference, a critical feature for discovery.
05

Harmonization Without Reintegration

Unlike full data integration, query mapping leaves the reference embedding unchanged. This enables:

  • Scalability: New datasets are processed incrementally
  • Reproducibility: Reference coordinates remain fixed across studies
  • Atlas-level queries: Rapid annotation against massive consortia like the Human Cell Atlas This approach decouples exploratory analysis from reference maintenance.
06

Novelty Detection & Rejection

A critical quality control mechanism identifies query cells that do not match any reference state. Techniques include:

  • k-NN distance thresholding: Flagging cells far from reference neighbors
  • Out-of-distribution detection: Using the scVI model's reconstruction error
  • Entropy-based filtering: Removing cells with uniformly low prediction scores These cells may represent novel populations, technical artifacts, or entirely new biological states requiring further investigation.
QUERY-TO-REFERENCE MAPPING

Frequently Asked Questions

Clear, technical answers to the most common questions about projecting new single-cell profiles onto established reference atlases for rapid annotation and harmonization.

Query-to-reference mapping is a computational framework that projects new single-cell transcriptomic profiles onto an existing, well-annotated reference atlas to rapidly classify cell types, identify novel states, and harmonize data without performing a full de novo dataset integration. The process works by identifying mutual nearest neighbors or learning a shared latent space between the query cells and the reference, effectively transferring labels and embedding coordinates from the reference onto the new data. This approach is foundational for building single-cell foundation models and enables consistent, scalable annotation across large-scale consortia like the Human Cell Atlas. Unlike traditional clustering, which requires re-running the entire pipeline when new samples arrive, query mapping treats the reference as a fixed coordinate system, allowing for incremental, memory-efficient analysis.

COMPARATIVE ANALYSIS

Query-to-Reference Mapping vs. Data Integration

Distinguishing between projecting new data onto a fixed reference and harmonizing multiple datasets in a shared latent space.

FeatureQuery-to-Reference MappingData IntegrationLabel Transfer

Core Objective

Project new query cells onto a fixed, pre-built reference atlas

Harmonize multiple disparate datasets into a unified, batch-corrected embedding

Propagate annotations from a reference to a query using learned similarities

Input Data

1 reference + 1 query dataset

2+ datasets for joint embedding

1 labeled reference + 1 unlabeled query

Reference Immutability

Batch Correction Method

Uses pre-computed reference structure; no joint optimization

Joint latent space learning with explicit batch effect modeling

Relies on reference labels; may use anchor-based or classifier-based transfer

Computational Cost

Low; reference processed once, query projected rapidly

High; full joint factorization or neural network training required

Moderate; depends on anchor finding or model inference

Novel Cell Type Detection

Detects unassigned or novel states via distance to reference

Novel populations emerge naturally in the shared embedding

Limited; forces classification into existing reference labels

Scalability to Atlas-Level Data

Excellent; designed for millions of reference cells

Degrades with dataset count and size; memory-intensive

Good; constrained by reference size and label granularity

Key Algorithms

Symphony, scArches, Azimuth

Harmony, scVI, Seurat CCA, Scanorama

Seurat Anchor Transfer, SingleR, CellTypist

Prasad Kumkar

About the author

Prasad Kumkar

CEO & MD, Inference Systems

Prasad Kumkar is the CEO & MD of Inference Systems and writes about AI systems architecture, LLM infrastructure, model serving, evaluation, and production deployment. Over 5+ years, he has worked across computer vision models, L5 autonomous vehicle systems, and LLM research, with a focus on taking complex AI ideas into real-world engineering systems.

His work and writing cover AI systems, large language models, AI agents, multimodal systems, autonomous systems, inference optimization, RAG, evaluation, and production AI engineering.