Integrate spatial transcriptomics with universal gene, cell, and tissue embeddings.
Current manuscript: An agentic AI spatial molecular foundation model of the brain. See release notes for the distinction between the manuscript workflows and the current software, including anchor alignment and Agent v2.
For manuscript analysis code, see paper_code. The current manuscript describes a frozen code and analysis archive at Zenodo. Use that archive and its run configurations for paper reproduction.
We provide an interactive online database of the molCCF.
FuseMap package requires a standard computer with optional GPU to support the in-memory operations.
This package is supported for Linux. The package has been tested on the following system:
- Linux: Ubuntu 20.04
FuseMap mainly depends on the Python scientific stack.
dgl
numpy
scipy
scikit-learn
pandas
pytorch
scanpy
seaborn
Use Python 3.9–3.11 (3.10 recommended). Install this checkout with:
python -m pip install .For notebook dependencies, use python -m pip install ".[tutorials]".
The PyPI package is installed with python -m pip install fusemap; see the
release notes for this checkout's version.
import fusemap
fusemap.integrate("./data", "./output")For bead mapping with deconvolution, install the 1.2.0 source release:
python -m pip install "fusemap[tutorials] @ git+https://github.com/wanglab-broad/FuseMap.git@v1.2.0"fusemap.map_to_reference(
"./new_beads", "./mapped", "./reference_model",
bead_files="slideseq", sig_ref="merfish,starmap",
reference_data_folder_path="./reference_data",
)This trains query adaptation and fits bead mixtures against frozen reference
archetypes without retraining the reference model. The original reference
expression files are read once to build signatures. Subsequent queries can use
reference_signatures_path="./mapped/reference_signatures.npz" instead of
reference_data_folder_path and sig_ref. Mixtures are written to stageB_pi.npz;
the original mapped embeddings are preserved as _nodeconv. See
Tutorial 2.1 for the readouts
and their interpretation. Archetype weights are not calibrated cell counts.
The classic Agent uses python -m pip install ".[agent]" from this repository.
Agent v2 uses a separate environment and a registered scientific kernel; follow
the Agent setup instructions.
These notebooks are included in the repository and linked from the tutorial index. You can also open them directly on GitHub:
| Tutorial | Notebook | Prerequisite |
|---|---|---|
| 2.3 | Cross-species mapping: marmoset to mouse molCCF | molCCF reference; marmoset data available from the corresponding authors upon reasonable request |
| 3.3 | Subregion discovery and spatially associated cell states | Tutorial 1.2 cell, tissue, and gene embeddings |
| 3.4 | Targeted gene panel selection | Tutorial 1.2 data and gene embedding; uses Leiden modules as a teaching adaptation of the paper's WGCNA workflow |
The current manuscript is titled An agentic AI spatial molecular foundation model of the brain. The earlier public preprint can be cited as:
Yichun He, Hao Sheng, Hailing Shi, Wendy Xueyi Wang, Zefang Tang, Jia Liu, Xiao Wang. Towards a universal spatial molecular atlas of the mouse brain. Preprint at bioRxiv https://www.biorxiv.org/content/10.1101/2024.05.27.594872v1 (2024).
