OSCR

3d-OT: a deep geometry-aware framework for heterogeneous slices alignment of spatial multi-omics.

Code ↔ Paper

11 matches between paragraphs of the paper and lines of its authors' code, computed by the harvester (lexical-v1). Click a colored paragraph or line to see its counterpart.

The 11 matches
  1. [1] § Methods › Parameters of baseline methods ↔ Benchmarking/COSMOS.ipynb, lines 31 to 38 · score 0.98 · edge_subset_sz, max_patience_aft, max_patience_bef, min_stop, regularization_acceleration, spatial_regularization_strength · Report a mismatch
  2. [2] § Methods › Parameters of baseline methods ↔ Benchmarking/COSMOS/cosmos.py, lines 153 to 293 · score 0.98 · edge_subset_sz, max_patience_aft, max_patience_bef, min_stop, regularization_acceleration, spatial_regularization_strength · Report a mismatch
  3. [3] § Methods › Parameters of baseline methods ↔ Benchmarking/SpaGCN.ipynb, lines 71 to 76 · score 0.72 · n_seed, t_seed, r_seed, tol, max · Report a mismatch
  4. [4] § Methods › Parameters of baseline methods ↔ Benchmarking/STAGATE_pyG/utils.py, lines 54 to 107 · score 0.63 · rad_cutoff, k_cutoff, spatial graphs · Report a mismatch
  5. [5] § Results › Benchmarking 3d-OT and existing methods on spatial single-omics data domain identification ↔ Benchmarking/GraphST.ipynb, lines 39 to 43 · score 0.61 · GraphST, adjusted Rand, normalized mutual, NMI, ARI, truth · Report a mismatch
  6. [6] § Results › Benchmarking 3d-OT and existing methods on spatial single-omics data domain identification ↔ Benchmarking/SpaNCMG.ipynb, lines 44 to 48 · score 0.60 · adjusted Rand, SpaNCMG, normalized mutual, NMI, ARI, truth · Report a mismatch
  7. [7] § Methods › Data preprocessing › Single-modal data preprocessing ↔ Benchmarking/COSMOS/cosmos.py, lines 108 to 151 · score 0.60 · highly variable genes, log transformed, Scanpy, preprocessing, matrix · Report a mismatch
  8. [8] § Results › Benchmarking 3d-OT and existing methods on simulated and experimental spatial multi-omics data domain identification ↔ Benchmarking/SpatialGlue.ipynb, lines 90 to 110 · score 0.59 · adjusted mutual information, SpatialGlue, AMI, homogeneity, NMI, ARI · Report a mismatch
  9. [9] § Methods › Data preprocessing › Multimodal data preprocessing ↔ Benchmarking/COSMOS.ipynb, lines 17 to 29 · score 0.53 · filtered gene, ADT, Scanpy, peak, preprocess, transformed · Report a mismatch
  10. [10] § Methods › Data preprocessing › Multimodal data preprocessing ↔ Benchmarking/COSMOS/cosmos.py, lines 108 to 151 · score 0.51 · log transformed, Scanpy, filtered, preprocess, PCA, transcriptomic · Report a mismatch
  11. [11] § Results › Benchmarking 3d-OT and existing methods on simulated and experimental spatial multi-omics data domain identification ↔ Benchmarking/COSMOS.ipynb, lines 73 to 93 · score 0.51 · adjusted mutual information, AMI, homogeneity, COSMOS, NMI, ARI · 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 · 96 lines · 3.3 KB · Apache-2.0 · 3 matches

  1. # %%
  2. import pandas as pd
  3. import numpy as np
  4. import scanpy as sc
  5. import matplotlib
  6. import matplotlib.pyplot as plt
  7. from umap import UMAP
  8. import sklearn
  9. import seaborn as sns
  10. from COSMOS import cosmos
  11. from COSMOS.pyWNN import pyWNN
  12. import h5py
  13. import warnings
  14. warnings.filterwarnings('ignore')
  15. random_seed = 20
  16. # %%
  17. adata_omics1=sc.read_h5ad('/home/dbj/mouse/SpatialGlue/Mouse_Brain/adata_RNA.h5ad')
  18. adata_omics2=sc.read_h5ad('/home/dbj/mouse/SpatialGlue/Mouse_Brain/adata_peaks_normalized.h5ad')
  19. adata_omics1.var_names_make_unique()
  20. adata_omics2.var_names_make_unique()
  21. sc.pp.filter_genes(adata_omics1, min_cells=10)
  22. sc.pp.highly_variable_genes(adata_omics1, flavor="seurat_v3", n_top_genes=3000)
  23. adata_omics1 = adata_omics1[:, adata_omics1.var['highly_variable']].copy() # Filter for highly variable genes
  24. # Convert to CSC format
  25. # Preprocess adata2 (ADT) - optionally apply the same transformation
  26. sc.pp.highly_variable_genes(adata_omics2, flavor="seurat_v3", n_top_genes=3000)
  27. adata_omics2 = adata_omics2[:, adata_omics2.var['highly_variable']].copy()
  28. # %%
  29. cosmos_comb = cosmos.Cosmos(adata1=adata_omics1,adata2=adata_omics2)
  30. cosmos_comb.preprocessing_data(n_neighbors = 16)
  31. cosmos_comb.train(spatial_regularization_strength=0.01, z_dim=50,
  32. lr=1e-3, wnn_epoch = 500, total_epoch=1000, max_patience_bef=10, max_patience_aft=30, min_stop=200,
  33. random_seed=random_seed, gpu=0, regularization_acceleration=True, edge_subset_sz=1000000)
  34. weights = cosmos_comb.weights
  35. df_embedding = pd.DataFrame(cosmos_comb.embedding)
  36. # %%
  37. adata_new = adata_omics1.copy()
  38. embedding_adata = sc.AnnData(df_embedding)
  39. sc.pp.neighbors(embedding_adata, n_neighbors=50, use_rep='X')
  40. # Manualy setting resolution for clustering
  41. res = 1.48
  42. sc.tl.louvain(embedding_adata, resolution=res)
  43. adata_new.obs['COSMOS'] = list(embedding_adata.obs["louvain"].cat.codes)
  44. adata_new.obs["COSMOS"]=adata_new.obs["COSMOS"].astype('category')
  45. # %%
  46. import matplotlib.pyplot as plt
  47. import copy
  48. plt.rcParams['figure.figsize'] = (4,4)
  49. plt.rcParams['font.size'] = 15
  50. fig, ax = plt.subplots()
  51. sc.pl.embedding(adata_new,basis='spatial',color='COSMOS',size=70,ax=ax)
  52. # %%
  53. adata=sc.read_h5ad('/home/dbj/mouse/spatialglue_alldata/Dataset7_Mouse_Brain_ATAC/3d-OT.h5ad')
  54. import matplotlib.pyplot as plt
  55. import copy
  56. plt.rcParams['figure.figsize'] = (4,4)
  57. plt.rcParams['font.size'] = 15
  58. fig, ax = plt.subplots()
  59. sc.pl.embedding(adata,basis='spatial',color='truth',size=25,ax=ax)
  60. # %%
  61. adata_new=adata_new[adata_new.obs_names.isin(adata.obs_names)]
  62. # %%
  63. import numpy as np
  64. from sklearn.metrics import (homogeneity_score,mutual_info_score,v_measure_score,adjusted_mutual_info_score,normalized_mutual_info_score,adjusted_rand_score
  65. )
  66. true_labels = np.array(adata.obs['truth'])
  67. cluster_labels = np.array(adata_new.obs['COSMOS'])
  68. homogeneity = homogeneity_score(true_labels, cluster_labels)
  69. mutual_info = mutual_info_score(true_labels, cluster_labels)
  70. v_measure = v_measure_score(true_labels, cluster_labels)
  71. ami = adjusted_mutual_info_score(true_labels, cluster_labels)
  72. nmi = normalized_mutual_info_score(true_labels, cluster_labels)
  73. ari = adjusted_rand_score(true_labels, cluster_labels)
  74. print("Homogeneity:", homogeneity)
  75. print("Mutual Information:", mutual_info)
  76. print("V-Measure:", v_measure)
  77. print("AMI:", ami)
  78. print("NMI:", nmi)
  79. print("ARI:", ari)
  80. # %%

COSMOS.ipynb at commit 39a7cb0, under Apache-2.0 · at the source

Overview

Authors: Bingjie Dai1, Litai Yi1, Peizhuo Wang2, Hanshuang Li1, Pengwei Hu1, Yancheng Song1, Jixiang Xing1, Zhenxing Feng3, Zhiyuan Yuan4, Yongchun Zuo1
  1. State Key Laboratory of Reproductive Regulation and Breeding of Grassland Livestock, Institutes of Biomedical Sciences, College of Life Sciences, Inner Mongolia University, Hohhot, China
  2. School of Life Science and Technology, Xidian University, Shanxi, Xi’an, China
  3. College of Sciences, Inner Mongolia University of Technology, Hohhot, China
  4. Center for Medical Research and Innovation, Shanghai Pudong Hospital, Fudan University Pudong Medical Center, Institute of Science and Technology for Brain-Inspired Intelligence, MOE Key Laboratory of Computational Neuroscience and Brain-Inspired Intelligence, Fudan University, Shanghai, China
Journal: Nature methods, volume 23, issue 4, pages 760-771
Dates: received 13 April 2025; accepted 17 February 2026; published online 27 March 2026; in print 2026
Type: Research article · Language: English
License: CC BY-NC-ND
Identifiers: DOI 10.1038/s41592-026-03034-9 · PMID 41896691 · PMCID PMC13076234 · OpenAlex W7141016961
Open access: hybrid, a free copy (OpenAlex)
Status: code verified (how the code is found and verified)
Categories: genetics / omics (modality), mouse (organism)
Methods: Smoothing, state filtering, decompositions, Machine learning, fMRI & imaging
Keywords: Machine learning, Computational models
MeSH: Computational Biology*, Imaging, Three-Dimensional*, Algorithms, Animals, Brain, Embryonic Development, Mice, Multiomics (* major topic)
Topic: Single-cell and spatial transcriptomics (Molecular Biology, Biochemistry, Genetics and Molecular Biology), according to OpenAlex
Citations: cited by 4 papers (Europe PMC); 68 references in the paper

Abstract

The abstract is not reproduced here: the paper's license (CC BY-NC-ND) does not allow it. Read it in the paper, at the publisher or on Europe PMC.

Repositories

Its files are read in the Code ↔ Paper reader above, with 11 matches between paragraphs and lines of code.

dbjzs/3d-OT

License: Apache-2.0
State: the link answers, verified on 30 September 2026
Evidence: files inventoried
Commit: 39a7cb02748d83299cd471f172f3b972896e61d8, 6 May 2026
Languages: Python (68), Jupyter (30)
Size: 147 files, 98 scripts
Software Heritage: not archived
Found in: “Code availability”
Holds: README, license file, environment (requirements.txt, setup.py), documentation, 17 notebooks
Not found: CITATION.cff, tests, continuous integration
Tools: NumPy (59 files), PyTorch (57 files), pandas (34 files), Scanpy (29 files), scikit-learn (27 files), SciPy (27 files), Matplotlib (25 files), PyTorch Geometric (14 files), anndata (12 files), rpy2 (7 files), seaborn (6 files), Harmony (3 files), NetworkX (3 files), h5py (1 file), OpenCV (1 file), Pillow (1 file), Plotly (1 file), Squidpy (1 file), statsmodels (1 file), UMAP (1 file)
Availability: 1 check, the latest on 30 September 2026: the link answers
  • 30 September 2026: the link answers
100 files
At the source: github.com/dbjzs/3d-OT

3d-ot.readthedocs.io

License: none: the authors keep all their rights
State: the link answers, verified on 30 September 2026
Evidence: the link answers
Software Heritage: not checked
Found in: “Code availability”
Not found: README, license file, CITATION.cff, environment file, tests, continuous integration, documentation
Availability: 1 check, the latest on 30 September 2026: the link answers (HTTP 200)
  • 30 September 2026: the link answers (HTTP 200)

Zenodo 15089426

License: CC-BY-4.0
State: the link answers, verified on 30 September 2026
Evidence: files inventoried
Size: 1 file
Software Heritage: not checked
Found in: the references
Not found: README, license file, CITATION.cff, environment file, tests, continuous integration, documentation
Availability: 1 check, the latest on 30 September 2026: the link answers (HTTP 200)
  • 30 September 2026: the link answers (HTTP 200)
At the source:

Code availability statement

The paper has a code availability statement. Its license (CC BY-NC-ND) does not allow reproducing it here; in short, from what the harvester recognized in it:

Read it in the paper: doi.org/10.1038/s41592-026-03034-9.

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:

  • 3 repositories of the authors' code, each at its verified commit, with its license and how the link was found in the paper;
  • 98 scripts, each with its path and the digest of its content;
  • 11 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

Code and data availability statement

The paper has a code and data availability statement. Its license (CC BY-NC-ND) does not allow reproducing it here; in short, from what the harvester recognized in it:

Read it in the paper: doi.org/10.1038/s41592-026-03034-9.

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, 30 September 2026: the first record

Recorded: type, language, journal, volume, issue, pages, dates, 10 authors, 2 keywords, 8 MeSH terms, 2 funders, 63 references.

Cite

This paper

Dai, B., Yi, L., Wang, P., Li, H., Hu, P., Song, Y., Xing, J., Feng, Z., Yuan, Z., & Zuo, Y. (2026). 3d-OT: a deep geometry-aware framework for heterogeneous slices alignment of spatial multi-omics. Nature methods, 23(4), 760-771. https://doi.org/10.1038/s41592-026-03034-9

BibTeX

@article{dai20263d,
author = {Dai, Bingjie and Yi, Litai and Wang, Peizhuo and Li, Hanshuang and Hu, Pengwei and Song, Yancheng and Xing, Jixiang and Feng, Zhenxing and Yuan, Zhiyuan and Zuo, Yongchun},
title = {{3d-OT: a deep geometry-aware framework for heterogeneous slices alignment of spatial multi-omics}},
journal = {Nature methods},
year = {2026},
month = mar,
volume = {23},
number = {4},
pages = {760--771},
publisher = {Nature Portfolio},
issn = {1548-7091},
doi = {10.1038/s41592-026-03034-9},
url = {https://doi.org/10.1038/s41592-026-03034-9},
pmid = {41896691},
pmcid = {PMC13076234}
}

RIS

TY - JOUR
AU - Dai, Bingjie
AU - Yi, Litai
AU - Wang, Peizhuo
AU - Li, Hanshuang
AU - Hu, Pengwei
AU - Song, Yancheng
AU - Xing, Jixiang
AU - Feng, Zhenxing
AU - Yuan, Zhiyuan
AU - Zuo, Yongchun
TI - 3d-OT: a deep geometry-aware framework for heterogeneous slices alignment of spatial multi-omics
T2 - Nature methods
J2 - Nat Methods
PY - 2026
DA - 2026/03/27
VL - 23
IS - 4
SP - 760
EP - 771
SN - 1548-7091
PB - Nature Portfolio
DO - 10.1038/s41592-026-03034-9
UR - https://doi.org/10.1038/s41592-026-03034-9
LA - en
ER -

CSL-JSON

{
"id": "10.1038/s41592-026-03034-9",
"type": "article-journal",
"title": "3d-OT: a deep geometry-aware framework for heterogeneous slices alignment of spatial multi-omics",
"container-title": "Nature methods",
"author": [
{
"family": "Dai",
"given": "Bingjie"
},
{
"family": "Yi",
"given": "Litai"
},
{
"family": "Wang",
"given": "Peizhuo"
},
{
"family": "Li",
"given": "Hanshuang"
},
{
"family": "Hu",
"given": "Pengwei"
},
{
"family": "Song",
"given": "Yancheng"
},
{
"family": "Xing",
"given": "Jixiang"
},
{
"family": "Feng",
"given": "Zhenxing"
},
{
"family": "Yuan",
"given": "Zhiyuan"
},
{
"family": "Zuo",
"given": "Yongchun"
}
],
"container-title-short": "Nat Methods",
"volume": "23",
"issue": "4",
"page": "760-771",
"DOI": "10.1038/s41592-026-03034-9",
"PMID": "41896691",
"PMCID": "PMC13076234",
"ISSN": "1548-7091",
"publisher": "Nature Portfolio",
"URL": "https://doi.org/10.1038/s41592-026-03034-9",
"language": "en",
"issued": {
"date-parts": [
[
2026,
3,
27
]
]
}
}

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.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, 9 other tools, genetics / omics, 19 references
[2] doi:10.1038/s41467-023-44367-9 [code]
MENDER: fast and scalable tissue structure identification in spatial omics data.
Journal: Nature communications
In common: Squidpy, PyTorch Geometric, rpy2, 12 other tools, genetics / omics, 10 references, author Zhiyuan Yuan
[3] doi:10.1093/bib/bbaf316 [code]
TriCLFF: a multi-modal feature fusion framework using contrastive learning for spatial domain identification.
Journal: Briefings in bioinformatics
In common: PyTorch Geometric, rpy2, anndata, 10 other tools, genetics / omics, mouse, 14 references
[4] doi:10.1038/s41588-024-01664-3 [code]
BANKSY unifies cell typing and tissue domain segmentation for scalable spatial omics data analysis.
Journal: Nature genetics
In common: Harmony, anndata, Scanpy, 14 other tools, genetics / omics, mouse, 11 references
[5] doi:10.1038/s41588-025-02120-6 [code]
Quantitative characterization of cell niches in spatially resolved omics data.
Journal: Nature genetics
In common: Squidpy, PyTorch Geometric, anndata, 11 other tools, genetics / omics, mouse, 12 references
[6] doi:10.1093/bioinformatics/btag540 [code]
Deciphering spatial heterogeneity by multimodal spatial transcriptomics modelling with SpatialModal.
Journal: Bioinformatics (Oxford, England)
In common: Squidpy, PyTorch Geometric, rpy2, 11 other tools, genetics / omics, mouse, 12 references
[7] 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 genomics
In common: Squidpy, PyTorch Geometric, rpy2, 14 other tools, genetics / omics, mouse, 8 references
[8] doi:10.1038/s41592-024-02316-4 [code]
Deciphering spatial domains from spatial multi-omics with SpatialGlue.
Journal: Nature methods
In common: rpy2, anndata, Scanpy, 7 other tools, NCBI GEO GSE263617, genetics / omics, mouse, 11 references
[9] doi:10.1093/gigascience/giae103 [code]
Unveiling patterns in spatial transcriptomics data: a novel approach utilizing graph attention autoencoder and multiscale deep subspace clustering network.
Journal: GigaScience
In common: PyTorch Geometric, rpy2, anndata, 12 other tools, genetics / omics, mouse, 10 references
[10] doi:10.1038/s41592-026-03194-8 [code]
Beyond benchmarking: an expert-guided consensus approach to spatially aware clustering.
Journal: Nature methods
In common: Squidpy, PyTorch Geometric, rpy2, 10 other tools, genetics / omics, 11 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.

Add the badge to the code's README

OSCR: the badge of this paper

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 -->
[![OSCR](https://openscicode.org/badge/doi/10.1038/s41592-026-03034-9.svg)](https://openscicode.org/badge/doi/10.1038/s41592-026-03034-9)
<!-- oscr-badge:end -->
reStructuredText
.. oscr-badge:start

.. image:: https://openscicode.org/badge/doi/10.1038/s41592-026-03034-9.svg
   :target: https://openscicode.org/badge/doi/10.1038/s41592-026-03034-9
   :alt: OSCR

.. oscr-badge:end
HTML
<!-- oscr-badge:start -->
<a href="https://openscicode.org/badge/doi/10.1038/s41592-026-03034-9"><img src="https://openscicode.org/badge/doi/10.1038/s41592-026-03034-9.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.