Deciphering spatial heterogeneity by multimodal spatial transcriptomics modelling with SpatialModal.
The 6 matches
- [1] § 2 Materials and methods › 2.3 Data preprocessing ↔ Spatialmodal/data_process.py, lines 88 to 94 · score 0.75 · highly variable genes, Seurat v3, Scanpy, preprocessed · Report a mismatch
- [2] § 3 Results › 3.5 SpatialModal reveals spatiotemporal developmental trajectories in the embryonic heart ↔ Tutorial/Chicken_Heart.ipynb, lines 85 to 113 · score 0.62 · mural cells, endocardial cell, immature, cardiomyocytes, enriched, heart · Report a mismatch
- [3] § 3 Results › 3.2 SpatialModal delineates complex mouse brain structures ↔ Tutorial/Mouse_Brain.ipynb, lines 46 to 56 · score 0.61 · Davies Bouldin, Mouse Brain, Silhouette, DB, SC, clustering · Report a mismatch
- [4] § 2 Materials and methods › 2.3 Data preprocessing ↔ Tutorial/DLPFC.ipynb, lines 82 to 113 · score 0.50 · highly variable, Scanpy, HVGs, Genes expressed · Report a mismatch
- [5] § 3 Results › 3.2 SpatialModal delineates complex mouse brain structures ↔ Tutorial/Mouse_Brain.ipynb, lines 59 to 67 · score 0.50 · Mouse Brain, sagittal anterior, posterior, joint · Report a mismatch
- [6] § 2 Materials and methods › 2.2 Data description ↔ Tutorial/MTG.ipynb, lines 1 to 12 · score 0.50 · human middle temporal, MTG, gyrus, healthy, Alzheimer, disease · Report a mismatch
Paper
Loaded from Europe PMC by your browser; OSCR does not store it: doi.org · Europe PMC
The paper is loaded when this pane is shown.
The authors' code
Jupyter notebook · 90 lines · 3.2 KB · no license · 2 matches
- # %% [markdown]
- # ### **Tutorial:Mouse Brain**
- #
- # This experiment applies SpatialModal to mouse brain Sagittal Anterior, Sagittal Posterior, and Coronal slices, utilizing joint training for the sagittal sections to capture shared biological patterns. While this notebook specifically demonstrates the Coronal slice workflow, we also present the results of joint training to illustrate the framework's superior performance in integrating multiple tissue sections for enhanced spatial domain identification and gene reconstruction.
- # %% [markdown]
- # #### **Loading package**
- # %%
- import sys
- import os
- sys.path.append(os.path.abspath(".."))
- # %%
- import torch
- from Spatialmodal.spatialmodal import SpatialModal
- from Spatialmodal.reconstruction import RF
- from Spatialmodal.data_process import load_ST_file
- from Spatialmodal.utils import mclust_R
- from sklearn.decomposition import PCA
- import scanpy as sc
- from sklearn.metrics import silhouette_score, davies_bouldin_score
- import seaborn as sns
- import matplotlib.pyplot as plt
- import warnings
- warnings.filterwarnings("ignore")
- # %%
- device = torch.device('cuda:2' if torch.cuda.is_available() else 'cpu')
- # %% [markdown]
- # #### **Coronal slices**
- # %%
- sample = 'mouse_brain_coronal'
- fold = f"../Data/mouse_brain/{sample}"
- fold = "/home/zhaodongmin/SpatialModal/data/mouse_brain/mouse_brain_coronal"
- adata = load_ST_file(fold)
- n_clusters = 30
- # %%
- model = SpatialModal(adata, device=device, epochs=1000, fold=fold, image_use=True, if_img=True)
- adata = model.train()
- # %%
- pca = PCA(n_components=20, random_state=42)
- embedding = pca.fit_transform(adata.obsm['emb'].copy())
- adata.obsm['emb_pca'] = embedding
- mclust_R(adata, n_clusters, use_rep='emb_pca', key_added='domain')
- SC = silhouette_score(adata.obsm['emb_pca'], adata.obs['domain'])
- DB = davies_bouldin_score(adata.obsm['emb_pca'], adata.obs['domain'])
- sc.pl.spatial(adata, color='domain', show=True, img_key=None, size=1.5, title=f"SC={SC:.4f}, DB={DB:.4f}")
- # %% [markdown]
- # #### **Joint training**
- #
- # In this experiment, image features were first extracted individually from the sagittal anterior and posterior brain slices and subsequently concatenated to form a joint feature distribution. In this demonstration, we utilize a pre-processed .h5ad file composed of these combined sagittal datasets. For detailed information regarding the data construction process, please refer to the Methods section of the manuscript.
- # %%
- adata = sc.read_h5ad("/home/zhaodongmin/task_spa/data/mouse_brain_a_p/mouse_anterior_posterior_brain_merged.h5ad")
- adata
- # %%
- model = SpatialModal(adata, device=device, epochs=1000, image_use=True, if_img=True)
- adata = model.train()
- # %%
- pca = PCA(n_components=20, random_state=42)
- embedding = pca.fit_transform(adata.obsm['emb'].copy())
- adata.obsm['emb_pca'] = embedding
- mclust_R(adata, 36, use_rep='emb_pca', key_added='domain')
- rgb_values = sns.color_palette("tab20", len(adata.obs['domain'].unique()))
- color_fine = dict(zip(list(adata.obs['domain'].unique()), rgb_values))
- color_fine[1] = '#6B7900'
- color_fine[23] = '#63FFAC'
- plt.rcParams["figure.figsize"] = (12, 6)
- sc.pl.embedding(adata, basis="spatial",
- color="domain",
- s=100,
- palette=color_fine,
- show=False, )
- plt.gca().legend().set_visible(False)
Mouse_Brain.ipynb at commit abd5064, no license · at the source
Overview
- School of Computer Science, Northwestern Polytechnical University, Shaanxi, 710129, China
- Faculty of Data Science, City University of Macau, Macau, Macau 999078, China
- State Key Laboratory of Multimodal Artificial Intelligence Systems, Institute of Automation, Chinese Academy of Sciences, Beijing, 100190, China
Abstract
Motivation: Advances in spatial transcriptomics (ST) technologies have made it possible to jointly acquire gene expression and histological image information while preserving spatial coordinates. This breakthrough presents unprecedented opportunities for the precise dissection of spatial heterogeneity in complex tissues. However, existing computational methods remain limited in their capacity for effective integration and synergistic modelling of multimodal ST data.
Results: We propose SpatialModal, a multimodal graph learning framework that learns robust joint representations by combining a hierarchical representation strategy with a dual-level contrastive learning mechanism. We perform extensive validation of SpatialModal across diverse ST datasets spanning human and mouse tissues. The results demonstrate that SpatialModal effectively reveals intricate brain architectures in humans and mice, dissects tumour microenvironment heterogeneity in breast cancer, delineates Alzheimer’s disease patterns, and characterizes spatiotemporal developmental trajectories within the embryonic heart, underscoring its capability to decipher the spatial heterogeneity of biological tissues. Furthermore, SpatialModal exhibits remarkable versatility and robustness, maintaining superior efficacy even on unimodal datasets devoid of histological images, thereby ensuring its broad applicability across diverse ST platforms.
Availability and Implementation: SpatialModal is implemented in Python and is freely available at https://
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.
xingyili/SpatialModal
abd50647998a8ce44cd4de47dba3029f38cfc62f, 8 July 2026Availability: 1 check, the latest on 26 September 2026: the link answers
- 26 September 2026: the link answers
10 files
- Spatialmodal/
data_process.py , Python, 553 lines, 1 match - Spatialmodal/
reconstruction.py , Python, 188 lines - Spatialmodal/
spatialmodal.py , Python, 443 lines - Spatialmodal/
utils.py , Python, 101 lines - Tutorial/
Breast_Cancer.ipynb , Jupyter, 150 lines - Tutorial/
Chicken_Heart.ipynb , Jupyter, 161 lines, 1 match - Tutorial/
DLPFC.ipynb , Jupyter, 114 lines, 1 match - Tutorial/
MTG.ipynb , Jupyter, 67 lines, 1 match - Tutorial/
Mouse_Brain.ipynb , Jupyter, 90 lines, 2 matches - README.md, Text, 201 lines
Zenodo 21264356
Availability: 1 check, the latest on 26 September 2026: the link answers (HTTP 200)
- 26 September 2026: the link answers (HTTP 200)
10 files
- Spatialmodal/
data_process.py , Python, 553 lines - Spatialmodal/
reconstruction.py , Python, 188 lines - Spatialmodal/
spatialmodal.py , Python, 443 lines - Spatialmodal/
utils.py , Python, 101 lines - Tutorial/
Breast_Cancer.ipynb , Jupyter, 150 lines - Tutorial/
Chicken_Heart.ipynb , Jupyter, 161 lines - Tutorial/
DLPFC.ipynb , Jupyter, 114 lines - Tutorial/
MTG.ipynb , Jupyter, 67 lines - Tutorial/
Mouse_Brain.ipynb , Jupyter, 90 lines - README.md, Text, 201 lines
Availability and Implementation
SpatialModal is implemented in Python and is freely available at https://
Reproduced under the paper's license (CC BY), from the paper cited above.
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;
- 18 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
- zenodo:18220735, at Zenodo; found in “Data availability”
Data availability
The data underlying this article are publicly available on Zenodo at 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, 11 authors, 10 MeSH terms, 4 funders, 38 references.
Cite
This paper
Li, X., Zhao, D., Jia, X., Du, G., Xu, J., Qi, Y., Chen, Y., Wu, Y., Gu, J., Zhu, J., & Shang, X. (2026). Deciphering spatial heterogeneity by multimodal spatial transcriptomics modelling with SpatialModal. Bioinformatics (Oxford, England), 42(8), btag540. https://
BibTeX
@article{li2026decipheri
author = {Li, Xingyi and Zhao, Dongmin and Jia, Xiangting and Du, Gaoyuan and Xu, Jialuo and Qi, Yang and Chen, Yiqi and Wu, Yingfu and Gu, Jia and Zhu, Junnan and Shang, Xuequn},
title = {{Deciphering spatial heterogeneity by multimodal spatial transcriptomics modelling with SpatialModal}},
journal = {Bioinformatics (Oxford, England)},
year = {2026},
month = aug,
volume = {42},
number = {8},
pages = {btag540},
publisher = {Oxford University Press},
issn = {1367-4803},
doi = {10.1093/
url = {https://
pmid = {42482153},
pmcid = {PMC13453310}
}
RIS
TY - JOUR
AU - Li, Xingyi
AU - Zhao, Dongmin
AU - Jia, Xiangting
AU - Du, Gaoyuan
AU - Xu, Jialuo
AU - Qi, Yang
AU - Chen, Yiqi
AU - Wu, Yingfu
AU - Gu, Jia
AU - Zhu, Junnan
AU - Shang, Xuequn
TI - Deciphering spatial heterogeneity by multimodal spatial transcriptomics modelling with SpatialModal
T2 - Bioinformatics (Oxford, England)
J2 - Bioinformatics
PY - 2026
DA - 2026/
VL - 42
IS - 8
SP - btag540
SN - 1367-4803
PB - Oxford University Press
DO - 10.1093/
UR - https://
LA - en
ER -
CSL-JSON
{
"id": "10.1093/
"type": "article-journal",
"title": "Deciphering spatial heterogeneity by multimodal spatial transcriptomics modelling with SpatialModal",
"container-title": "Bioinformatics (Oxford, England)",
"author": [
{
"family": "Li",
"given": "Xingyi"
},
{
"family": "Zhao",
"given": "Dongmin"
},
{
"family": "Jia",
"given": "Xiangting"
},
{
"family": "Du",
"given": "Gaoyuan"
},
{
"family": "Xu",
"given": "Jialuo"
},
{
"family": "Qi",
"given": "Yang"
},
{
"family": "Chen",
"given": "Yiqi"
},
{
"family": "Wu",
"given": "Yingfu"
},
{
"family": "Gu",
"given": "Jia"
},
{
"family": "Zhu",
"given": "Junnan"
},
{
"family": "Shang",
"given": "Xuequn"
}
],
"container-title-short":
"volume": "42",
"issue": "8",
"page": "btag540",
"DOI": "10.1093/
"PMID": "42482153",
"PMCID": "PMC13453310",
"ISSN": "1367-4803",
"publisher": "Oxford University Press",
"URL": "https://
"language": "en",
"issued": {
"date-parts": [
[
2026,
8,
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.1002/advs.75969 [code]
- Accurately Deciphering Tissue Heterogeneity From Spatial Multi-Modal and Multi-Omics With STransformer.Journal: Advanced science (Weinheim, Baden-Wurttemberg, Germany)In common: PyTorch Geometric, anndata, Scanpy, 7 other tools, Alzheimer's / dementia, genetics / omics, mouse, 14 references, author Xingyi Li
- [2] 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, rpy2, anndata, 10 other tools, methods / tools, genetics / omics, 15 references
- [3] doi:10.1038/s41592-026-03034-9 [code]
- 3d-OT: a deep geometry-aware framework for heterogeneous slices alignment of spatial multi-omics.Journal: Nature methodsIn common: Squidpy, PyTorch Geometric, rpy2, 11 other tools, genetics / omics, mouse, 12 references
- [4] doi:10.1093/bib/bbaf316 [code]
- TriCLFF: a multi-modal feature fusion framework using contrastive learning for spatial domain identification.Journal: Briefings in bioinformaticsIn common: PyTorch Geometric, rpy2, anndata, 9 other tools, genetics / omics, mouse, 14 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: Squidpy, PyTorch Geometric, rpy2, 10 other tools, methods / tools, genetics / omics, 11 references
- [6] doi:10.1186/s12864-024-10469-x [code]
- HyperGCN: an effective deep representation learning framework for the integrative analysis of spatial transcriptomics data.Journal: BMC genomicsIn common: Squidpy, PyTorch Geometric, rpy2, 11 other tools, genetics / omics, mouse, 10 references
- [7] doi:10.1038/s41467-023-44367-9 [code]
- MENDER: fast and scalable tissue structure identification in spatial omics data.Journal: Nature communicationsIn common: Squidpy, PyTorch Geometric, rpy2, 10 other tools, methods / tools, genetics / omics, 11 references
- [8] doi:10.1093/bib/bbaf674 [code]
- Probabilistic-graph-base
d spatial context-aware framework for interpretable spatial omics denoising and augmentation. Journal: Briefings in bioinformaticsIn common: Squidpy, rpy2, imageio, 11 other tools, methods / tools, 10 references - [9] doi:10.1093/bioinformatics/btaf350 [code]
- Gene spatial integration: enhancing spatial transcriptomics analysis via deep learning and batch effect mitigation.Journal: Bioinformatics (Oxford, England)In common: Squidpy, rpy2, anndata, 8 other tools, genetics / omics, 12 references
- [10] doi:10.1093/bib/bbag298 [code]
- Empowering multifaceted analysis of spatial transcriptomics data with RGAST.Journal: Briefings in bioinformaticsIn common: PyTorch Geometric, rpy2, anndata, 9 other tools, methods / tools, genetics / omics, mouse, 10 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, 18 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:06fff167e4fc8944…
Add the badge to the code's README
If you are an author or a maintainer of this paper's code, you can add this badge. It says what OSCR knows of the paper (its code, its validated tracing map) and links the code to this page. Paste one of these snippets under the README's title. Keep the two marks around it, so that the badge can be replaced in place and is never added twice. OSCR changes nothing in your repository.
Markdown
<!-- oscr-badge:start -->
[](https://openscicode.org/badge/doi/10.1093/bioinformatics/btag540)
<!-- oscr-badge:end -->reStructuredText
.. oscr-badge:start
.. image:: https://openscicode.org/badge/doi/10.1093/bioinformatics/btag540.svg
:target: https://openscicode.org/badge/doi/10.1093/bioinformatics/btag540
:alt: OSCR
.. oscr-badge:endHTML
<!-- oscr-badge:start -->
<a href="https://openscicode.org/badge/doi/10.1093/bioinformatics/btag540"><img src="https://openscicode.org/badge/doi/10.1093/bioinformatics/btag540.svg" alt="OSCR"></a>
<!-- oscr-badge:end -->On GitHub, open the README, choose Edit (the pencil), paste the snippet under the title, then "Commit changes".
If you choose to, you can have the badge kept up to date for you, with oscr badge --write from the command line or with the GitHub Action in your repository's workflows. Every other form and option (a card, AsciiDoc, LaTeX, shields.io) is on the badge page.
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: code errors and mismatches between the code and the paper about this paper and its code, from readers and its authors, beside the paper and its tracing map.
Report a mismatch between the code and the paper · Report a code error (signed in)
Reproductions: reports from readers who ran the authors' code and did not get the paper's result, what they ran, with which environment, commit and data.
Report a reproduction failure (signed in)
Versions of its code: the releases of its code tied to a version of this paper (the preprint, the accepted manuscript, the version of record…), each with the tracing map versioned with it.
Activity: what happens around this paper: new versions of its record, its map's validation, discussions and reproductions. It opens with sign-in.
