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.
Glossary
Query-to-Reference Mapping

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.
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.
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.
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
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.
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.
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.
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.
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.
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.
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.
| Feature | Query-to-Reference Mapping | Data Integration | Label 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 |
Enabling Efficiency, Speed & Accuracy
Intelligent Analysis, Decision & Execution
We build AI systems for teams that need search across company data, workflow automation across tools, or AI features inside products and internal software.
Talk to Us
Search across company data
Give teams answers from docs, tickets, runbooks, and product data with sources and permissions.
Useful when people spend too long searching or get different answers from different systems.

Automate internal workflows
Use AI to route work, draft outputs, trigger actions, and keep approvals and logs in place.
Useful when repetitive work moves across multiple tools and teams.

Add AI to products and internal tools
Build assistants, guided actions, or decision support into the software your team or customers already use.
Useful when AI needs to be part of the product, not a separate tool.
Related Terms
Core computational techniques and data structures that enable accurate query-to-reference mapping in single-cell genomics.
Label Transfer
A supervised machine learning approach that projects cell-type annotations from a well-characterized reference atlas onto a new query dataset. The algorithm identifies mutual nearest neighbors or uses classification models trained on the reference to assign identities, eliminating the need for manual marker-gene curation. This is the foundational mechanism behind query-to-reference mapping pipelines.
Data Integration
The computational alignment of multiple single-cell datasets into a shared latent space. Unlike query mapping, integration co-embeds all datasets simultaneously, correcting for batch effects while preserving biological variation. Methods like Harmony and scVI are often used to build the reference atlases that query mapping projects onto.
Batch Effect Correction
A preprocessing step that removes technical variation introduced by different laboratories, protocols, or sequencing runs. Effective correction is critical for building a robust reference atlas; uncorrected batch effects cause query cells to map incorrectly. Modern deep learning methods learn batch-invariant latent representations.
scVI
Single-cell Variational Inference, a deep generative model based on a variational autoencoder. It learns a probabilistic latent representation of gene expression while explicitly modeling batch effects and zero-inflation. scVI is frequently used to build the reference embeddings that query cells are projected into during mapping.
Cell Type Annotation
The process of assigning biological identities to cell clusters by comparing their gene expression signatures to known marker genes or reference databases. Query-to-reference mapping automates this traditionally manual process, enabling rapid annotation of millions of cells against curated atlases like the Human Cell Atlas.
Uniform Manifold Approximation and Projection (UMAP)
A nonlinear dimensionality reduction technique that preserves both local and global data structure. In query mapping workflows, UMAP is used to visualize where newly projected query cells fall relative to the reference embedding, allowing researchers to visually confirm that mapped cells land in biologically appropriate neighborhoods.

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.
Partnered with leading AI, data, and software stack.
How We Work
Custom AI workflows for your Business
One-fit-all AI don't work for modern businesses. At Inferensys, we aim to understand your business & custom requirements; which we use to define most efficient agentic workflows, the data, and the tools for your business.
01
Review the use case
We understand the task, the users, and where AI can actually help.
Read more02
Pick the right approach
We define what needs search, automation, or product integration.
Read more03
Build the first useful version
We implement the part that proves the value first.
Read more04
Improve from there
We add the checks and visibility needed to keep it useful.
Read moreThe first call is a practical review of your use case and the right next step.
Talk to Us