Navigating cell maps by deep learning integration of single-cell and spatially resolved transcriptomics.
The 6 matches
- [1] § Materials and methods › Cell-to-spot mapping algorithm ↔ Cell2Map/map_optimizer.py, lines 26–150 · score 0.77 · Mahalanobis distance, Euclidean distance, density term, inverse, cosine, PyTorch
- [2] § Materials and methods › Overview of Cell2Map ↔ Cell2Map/map_optimizer.py, lines 26–150 · score 0.62 · distance term, density term, cosine, Mahalanobis, Euclidean, mapping
- [3] § Materials and methods › Benchmark datasets and case study for Cell2Map evaluation ↔ uncertainty_quantification.R, lines 1–42 · score 0.59 · pseudo bulk, CytoSPACE, scRNA, single cell, transcriptome, seq
- [4] § Materials and methods › Cell-to-spot mapping algorithm ↔ Cell2Map/map_utils.py, lines 56–123 · score 0.57 · mapping matrix, mapped cells, divergence, Mahalanobis, PyTorch, density
- [5] § Materials and methods › Data preprocessing and preparation ↔ Cell2Map/map_utils.py, lines 23–51 · score 0.55 · Scanpy, filtering, log1p, pp, intersection, genes
- [6] § Results › Cell2Map is robust in mapping different scRNA-seq datasets to breast cancer SRT data ↔ uncertainty_quantification.R, lines 1–42 · score 0.50 · cell assignments, CytoSPACE, breast, scRNA, cancer, transcriptomics
Paper
Loaded from Europe PMC by your browser, not stored by OSCR: doi.org · Europe PMC
The paper is loaded when this pane is shown.
The authors' code
Python · 150 lines · 5.2 KB · GPL-3.0 · 2 matches
- import numpy as np
- import pandas as pd
- import torch
- import torch.nn as nn
- import logging
- from torch.nn.functional import softmax, cosine_similarity
- import torch.nn.functional as F
- from . import utils as ut
- from . import loss as ls
- import random
- from sklearn.cluster import KMeans
- from sklearn.neighbors import NearestNeighbors
- from sklearn.metrics import (adjusted_rand_score,
- normalized_mutual_info_score,)
- def seed_everything(seed_value):
- random.seed(seed_value)
- np.random.seed(seed_value)
- torch.manual_seed(seed_value)
- torch.cuda.manual_seed(seed_value)
- torch.cuda.manual_seed_all(seed_value)
- torch.backends.cudnn.deterministic = True
- torch.backends.cudnn.benchmark = True
- class Mapper:
- def __init__(self,
- S,
- G,
- d,
- a,
- b,
- D,
- device='cpu',
- lambda_d=0,
- lambda_g1=1.0,
- lambda_g2=0,
- alpha=1,
- lambda_mahalanobis=0.7,
- lambda_distance=0.01,
- adata_map=None,
- ):
- self.S=torch.tensor(S,device=device, dtype=torch.float32)
- self.G=torch.tensor(G,device=device, dtype=torch.float32)
- self.target_cell_count=d is not None
- if self.target_cell_count:
- self.d=torch.tensor(d,device=device, dtype=torch.float32)
- self.lambda_d=lambda_d
- self.lambda_g1 = lambda_g1
- self.lambda_g2 = lambda_g2
- self.alpha = alpha
- self.lambda_mahalanobis=lambda_mahalanobis
- self.lambda_distance=lambda_distance
- self.D = torch.tensor(D, device=device, dtype=torch.float32)
- self.a = torch.tensor(a, device=device, dtype=torch.float32)
- self.b = torch.tensor(b, device=device, dtype=torch.float32)
- M0 = a[:, None] * b[None, :] if adata_map is None else (1/np.sum(adata_map)) * adata_map
- self.M = torch.tensor(M0, device=device, requires_grad=True, dtype=torch.float32)
- self.d_loss = nn.L1Loss()
- def _loss_fn(self,verbose=True):
- M_probs = F.softmax(F.relu(self.M)+ 1e-10, dim=1)
- M_probs = torch.clamp(M_probs, min=1e-10,max=1 - 1e-10)
- if self.target_cell_count:
- d_pred = torch.log(M_probs.sum(axis=0) / self.M.shape[0])
- count_term=self.lambda_d*self.d_loss(d_pred, self.d)
- else:
- count_term=None
- G_pred = torch.matmul(M_probs.t(), self.S)
- euclidean_distance_loss = F.pairwise_distance(G_pred, self.G,p=2).mean()
- cov_matrix = torch.cov(torch.cat((G_pred, self.G), dim=0).t())
- inv_cov_matrix = torch.inverse(cov_matrix)
- diff = G_pred - self.G
- mahalanobis_distance_loss = torch.sqrt(torch.sum((diff @ inv_cov_matrix) * diff, dim=1)).mean()
- combined_distance_loss = (1-self.lambda_mahalanobis) * euclidean_distance_loss + self.lambda_mahalanobis * mahalanobis_distance_loss
- distance_term = self.lambda_distance * combined_distance_loss
- gv_term = self.lambda_g1 * cosine_similarity(G_pred, self.G, dim=0).mean()
- vg_term = self.lambda_g2 * cosine_similarity(G_pred, self.G, dim=1).mean()
- expression_term1 = self.alpha * ls.exp_loss(self.D, M_probs/len(self.a))
- total_loss =-(gv_term + vg_term)+expression_term1-distance_term
- if count_term is not None:
- total_loss += count_term
- if verbose:
- print(
- f"Total_loss: {total_loss.item():.3f}, "
- f"gv_term: {gv_term.item():.3f}, "
- f"vg_term: {vg_term.item():.3f}, "
- f"density_term: {count_term.item():.3f}, "
- f"expression_term: {expression_term1.item():.3f}, "
- f"distance_term:{distance_term.item():.3f},"
- )
- return total_loss, M_probs
- def train(self, num_epochs, learning_rate=0.1, print_each=100):
- seed_value = 1000
- print("seed:" + str(seed_value))
- seed_everything(seed_value)
- optimizer = torch.optim.AdamW([self.M], lr=learning_rate,weight_decay=1e-6)
- scheduler = torch.optim.lr_scheduler. ReduceLROnPlateau(optimizer, mode='min', factor=0.1, patience=10)
- if print_each:
- logging.info(f"Printing scores every {print_each} epochs.")
- """
- {
- "total_loss": [],
- "main_loss": [],
- "vg_reg": [],
- "kl_reg": [],
- "entropy_reg": []
- }
- """
- for t in range(num_epochs):
- if print_each is None or t % print_each != 0:
- run_loss = self._loss_fn(verbose=False)
- else:
- run_loss = self._loss_fn(verbose=True)
- loss = run_loss[0]
- result=run_loss[-1]
- optimizer.zero_grad()
- loss.backward()
- optimizer.step()
- scheduler.step(loss)
- with torch.no_grad():
- output =result.cpu().numpy()
- return output
map_optimizer.py at commit a5b92c2, under GPL-3.0 · at the source
Overview
- Department of Data Science, College of Computer and Information Engineering, Tianjin Normal University, 393 Binshui West Road, Xiqing District, Tianjin, Tianjin 300387, China
- Department of Physiology, College of Arts and Sciences, University of Pennsylvania, 3600 Market Street, Philadelphia, PA 19104, United States
- Department of Biological and Biomedical Sciences, College of Science and Mathematics, Rowan University, 201 Mullica Hill Road, Glassboro, NJ 08028, United States
Abstract
Single-cell RNA sequencing (scRNA-seq) enables genome-wide gene expression profiling at single-cell resolution but loses the spatial context essential for interpreting cell identity and tissue organization. In contrast, spatially resolved transcriptomics (SRT) preserves spatial information but typically lacks single-cell resolution or complete transcriptome coverage. To obtain a more comprehensive view of heterogeneous spatial domains and cellular gene expression, we present Cell2Map, an unsupervised deep learning method that integrates scRNA-seq and SRT data from the same tissue region. Cell2Map assigns individual cells to SRT spots using a graph attention autoencoder equipped with a specially designed multi-term objective function that jointly optimizes expression-based, density-based, and embedding-level similarity and distance constraints. On benchmark datasets from mouse cerebellum and hippocampus, Cell2Map achieves higher single-cell mapping precision and overall accuracy than three popular methods (Celloc, CytoSPACE, Tangram) across a range of noise levels and spot cell densities. In real cancer applications, Cell2Map resolves intratumoral heterogeneity by accurately localizing tumor subclones and separating normal epithelial cells from ductal carcinoma in situ regions, and more faithfully reconstructs tumor microenvironments and immune-cell localization than competing approaches. Across breast cancer and myocardial infarction datasets, Cell2Map consistently attains higher sensitivity with fewer false positives, in close agreement with histological and biological annotations.
Reproduced under the paper's license (CC BY), from the paper cited above.
Repositories
Its files are read in the Code ↔ Paper reader above, with 6 matches between paragraphs and lines of code.
digitalcytometry/cytospace
bb7fe12ab4466ef5e38dcac4c3ece07012060d60, 20 February 2025Availability: 1 check, the latest on 27 September 2026: the link answers
- 27 September 2026: the link answers
17 files
- cytospace/
Prepare_input_files/ , R, 123 linesgenerate_cytospace_from_ seurat_object.R - cytospace/
Prepare_input_files/ , R, 65 linesgenerate_cytospace_input _from_spaceranger_output .R - cytospace/
__init__.py , Python, 1 line - cytospace/
common/ , Python, 2 lines__init__.py - cytospace/
common/ , Python, 89 linesargument_parser.py - cytospace/
common/ , Python, 215 linescommon.py - cytospace/
cytospace.py , Python, 717 lines - cytospace/
get_cellfracs_seuratv3.R , R, 196 lines - cytospace/
linear_assignment_solver , Python, 1 lines/ __init__.py - cytospace/
linear_assignment_solver , Python, 97 liness/ linear_assignment_solver s.py - cytospace/
post_processing/ , Python, 2 lines__init__.py - cytospace/
post_processing/ , Python, 342 linesplot.py - cytospace/
post_processing/ , Python, 116 linespost_processing.py - setup.py, Python, 18 lines
- uncertainty_quantificati
on.R , R, 202 lines, 2 matches - LICENSE, License, 8 lines
- README.md, Text, 647 lines
shaoqiangzhang/Cell2Map
a5b92c2e44b9839f53fe2ca8db7c68c7d39c3195, 27 February 2026Availability: 1 check, the latest on 27 September 2026: the link answers
- 27 September 2026: the link answers
15 files
- Cell2Map/
__init__.py , Python, 6 lines - Cell2Map/
autoencoder.py , Python, 343 lines - Cell2Map/
common.py , Python, 117 lines - Cell2Map/
loss.py , Python, 44 lines - Cell2Map/
map_optimizer.py , Python, 150 lines, 2 matches - Cell2Map/
map_utils.py , Python, 123 lines, 2 matches - Cell2Map/
utils.py , Python, 122 lines - test/
Run_DCIS1.ipynb , Jupyter, 124 lines - test/
Run_DCIS1_with_STsample1 , Jupyter, 128 lines.ipynb - test/
Run_DCIS2.ipynb , Jupyter, 125 lines - test/
Run_HER2+_with_STsample1 , Jupyter, 127 lines.ipynb - test/
Run_MI.ipynb , Jupyter, 123 lines - test/
Run_simulated_mouse_hipp , Jupyter, 128 linesocampus.ipynb - LICENSE, License, 674 lines
- README.md, Text, 145 lines
The paper's code and data availability statement is in the Data section.
Tracing map
Proposed by the machine: these links were found in the paper and verified at the source, without human review. The map will receive a Zenodo DOI once one of the paper's authors has validated it with their ORCID.
What the map holds:
- 2 repositories of the authors' code, each at its verified commit, with its license and how the link was found in the paper;
- 28 scripts, each with its path and the digest of its content;
- 6 matches between paragraphs of the paper and lines of the code (method lexical-v1);
- neither the text of the paper nor the code itself.
Its JSON (tracing-map.json) is deposited on Zenodo with its DOI once the map is validated.
Data
Datasets cited
- geo:GSE176078, at NCBI GEO; found in “Data availability”
Data availability
The simulated data of mouse cerebellum and hippocampus can be obtained from https://
Reproduced under the paper's license (CC BY), from the paper cited above.
Versions
The history of this record: each version stored by the harvester or made by a correction of its authors or of the maintainers of its code, and what changed in its facts. The texts of the paper (its abstract, its availability statements) are not part of it; versions that changed only those are not listed.
Version 1, 27 September 2026: the first record
Recorded: type, language, journal, volume, issue, pages, dates, 4 authors, 5 keywords, 10 MeSH terms, 3 funders, 67 references.
Cite
This paper
Chen, Y., Chen, R., Zhang, S., & Chen, Y. (2026). Navigating cell maps by deep learning integration of single-cell and spatially resolved transcriptomics. Briefings in bioinformatics, 27(4), bbag404. https://
BibTeX
@article{chen2026navigat
author = {Chen, Yanan and Chen, Ruoyu and Zhang, Shaoqiang and Chen, Yong},
title = {{Navigating cell maps by deep learning integration of single-cell and spatially resolved transcriptomics}},
journal = {Briefings in bioinformatics},
year = {2026},
month = may,
volume = {27},
number = {4},
pages = {bbag404},
publisher = {Oxford University Press},
issn = {1467-5463},
doi = {10.1093/
url = {https://
pmid = {42531062},
pmcid = {PMC13435232}
}
RIS
TY - JOUR
AU - Chen, Yanan
AU - Chen, Ruoyu
AU - Zhang, Shaoqiang
AU - Chen, Yong
TI - Navigating cell maps by deep learning integration of single-cell and spatially resolved transcriptomics
T2 - Briefings in bioinformatics
J2 - Brief Bioinform
PY - 2026
DA - 2026/
VL - 27
IS - 4
SP - bbag404
SN - 1467-5463
PB - Oxford University Press
DO - 10.1093/
UR - https://
LA - en
ER -
CSL-JSON
{
"id": "10.1093/
"type": "article-journal",
"title": "Navigating cell maps by deep learning integration of single-cell and spatially resolved transcriptomics",
"container-title": "Briefings in bioinformatics",
"author": [
{
"family": "Chen",
"given": "Yanan"
},
{
"family": "Chen",
"given": "Ruoyu"
},
{
"family": "Zhang",
"given": "Shaoqiang"
},
{
"family": "Chen",
"given": "Yong"
}
],
"container-title-short":
"volume": "27",
"issue": "4",
"page": "bbag404",
"DOI": "10.1093/
"PMID": "42531062",
"PMCID": "PMC13435232",
"ISSN": "1467-5463",
"publisher": "Oxford University Press",
"URL": "https://
"language": "en",
"issued": {
"date-parts": [
[
2026,
5,
1
]
]
}
}
The tracing map gets a citation of its own once an author has validated it and it has a DOI.
Similar papers
The papers with a page that share the most with this one: the tools found in their code, their categories, datasets, cited references and authors, the rarest counting most.
- [1] doi:10.21203/rs.3.rs-9676637/v1 [code]
- A Comprehensive Benchmarking of Spatial Deconvolution and Domain Detection Methods across Diverse Tissues and Spatial Transcriptomic TechnologiesJournal: Research Square (preprint)In common: PyTorch Geometric, anndata, Scanpy, 10 other tools, genetics / omics, 7 references
- [2] doi:10.1093/nar/gkag706 [code]
- scDifformer: diffusion-based post-training for virtual cell modeling across large-scale single-cell data.Journal: Nucleic acids researchIn common: PyTorch Geometric, anndata, Scanpy, 9 other tools, 5 references
- [3] doi:10.1093/bioinformatics/btag540 [code]
- Deciphering spatial heterogeneity by multimodal spatial transcriptomics modelling with SpatialModal.Journal: Bioinformatics (Oxford, England)In common: PyTorch Geometric, anndata, Scanpy, 7 other tools, genetics / omics, mouse, 6 references
- [4] doi:10.1016/j.isci.2026.117206 [code]
- ReliST: A model-agnostic risk layer for spatial transcriptomics deconvolution.Journal: iScienceIn common: anndata, Scanpy, PyTorch, 5 other tools, genetics / omics, mouse, 8 references
- [5] doi:10.1038/s41592-026-03194-8 [code]
- Beyond benchmarking: an expert-guided consensus approach to spatially aware clustering.Journal: Nature methodsIn common: PyTorch Geometric, anndata, Scanpy, 9 other tools, genetics / omics, 4 references
- [6] doi:10.1093/bib/bbag298 [code]
- Empowering multifaceted analysis of spatial transcriptomics data with RGAST.Journal: Briefings in bioinformaticsIn common: PyTorch Geometric, anndata, Scanpy, 6 other tools, genetics / omics, mouse, 6 references
- [7] doi:10.1038/s42003-026-10259-z [code]
- Spatial transcriptomic profiling of developing mouse hearts reveals a spatially patterned signaling environment.Journal: Communications biologyIn common: anndata, Scanpy, Seurat, 8 other tools, genetics / omics, mouse, cellular / molecular, 4 references
- [8] doi:10.1002/advs.77003 [code]
- SemanticST: A Scalable Multi-Contextual Graph Learning Framework for Uncovering Spatial Niches and Robust Multi-Sample Integration in Spatial Transcriptomics.Journal: Advanced science (Weinheim, Baden-Wurttemberg, Germany)In common: PyTorch Geometric, anndata, Scanpy, 7 other tools, genetics / omics, 5 references
- [9] doi:10.1038/s41467-026-71759-4 [code]
- CellNiche represents cellular microenvironments in atlas-scale spatial omics data with contrastive learning.Journal: Nature communicationsIn common: PyTorch Geometric, anndata, Scanpy, 6 other tools, other condition, mouse, cellular / molecular, 5 references
- [10] doi:10.1038/s41593-026-02293-1 [code]
- Optics-free spatial genomics for mapping mammalian brain aging by IRISeq.Journal: Nature neuroscienceIn common: Scanpy, Seurat, tidyverse, 5 other tools, genetics / omics, mouse, cellular / molecular, 7 references
Contribute
The authors of this paper can claim it, correct its record and validate its tracing map, and the maintainers of its code (its owner, or a public member of its organization) correct what it says of their repository; anyone signed in can ask for its removal. Every request goes to OSCR's own machine, which answers it; your account page follows them.
Sign in with ORCID to claim this paper as one of its authors, correct its record or validate its tracing map: when the paper's metadata lists your ORCID iD, you are recognized at once. Maintainers of its code: sign in with GitHub, then claim the repository on your account page.
Claim this paper
Correct its record
Say what each link of this record is, remove the ones that are not the paper's, add the ones that are missing. The correction becomes a new version of the record, in its Versions section.
Validate its tracing map
You validate the map as this page shows it: 2 repositories of the authors' code, each at its verified commit and with its license, 28 scripts, and 6 matches between paragraphs and code (see the Code and Map sections). It then receives a DOI on Zenodo, with you (your ORCID iD) and OSCR as its creators; the code itself is not deposited.
The map's fingerprint: sha256:8101dab258c390dc…
Add the badge to its README
The badge links the code to this page. Copy one of these into the README of the paper's code: only you decide where it goes, and nothing is changed for you.
Markdown
[, paste the snippet at the top, then “Commit changes…” and, to review it first, “Create a new branch and start a pull request”. You open the pull request; OSCR asks for no permission.
Request its removal
To ask OSCR to remove this record, the copies of its authors' scripts or its tracing map, use the removal request page: signed in, you say who you are, what to remove and why, then review and confirm the request. Published rules decide every request (how).
Discussion, reproductions, activity
Discussion: questions and error reports about this paper and its code, from signed-in readers and its authors. It opens with sign-in.
Reproductions: reports from readers who ran the authors' code: what they reproduced, with which environment, commit and data. It opens with sign-in.
Activity: what happens around this paper: new versions of its record, its map's validation, discussions and reproductions. It opens with sign-in.
