Paper2MCP v2 Verified Deliverable

Toward simultaneous pseudo-space reconstruction and cell-type deconvolution of single-cell spatial transcriptome using SpaDicer

期刊:Cell Reports Methods (2026-05-25) · DOI:10.1016/j.crmeth.2026.101465 · 开源许可:GPL-3.0 (allowed)

上游仓库:https://github.com/hliulab/SpaDicer @ 44c2b253d51e

Pytest: passed MCP Stdio Selftest: passed Relocated Fresh Install: passed

一、一键安装与 MCP 接入(本地 / 远程统一接口)

# 1. 解压并自动构建隔离环境 + 运行真实数据自测
unzip spadicer-mcp.zip && cd spadicer-mcp
bash install.sh
.venv/bin/python selftest.py

# 2. 接入 Claude Code / Antigravity / Cursor (Stdio MCP)
claude mcp add spadicer -- "$PWD/.venv/bin/python" "$PWD/server.py"

# 3. 或启动远程 Streamable HTTP MCP 服务端供团队/网页直接调用
.venv/bin/python server.py --transport http --host 0.0.0.0 --port 8000

二、已验证科学工具清单(5 个工具)

preprocess_spatial_data MCP Verified ✓

Preprocess paired scRNA-seq and ST expression matrices via Seurat v3 HVG selection, target_sum=1e4 normalization, log1p, and intersection/union gene alignment.

Selftest Summary: Preprocessed 240 scRNA-seq cells and 189 ST spots into 140 aligned HVGs (union, st_type=image).
Metrics: {"n_sc_cells": 240, "n_st_spots": 189, "n_selected_genes": 140, "n_sc_hvgs": 100, "n_st_hvgs": 100}
train_spadicer MCP Verified ✓

Train the SpaDicer cross-domain feature disentanglement network with adaptive gradient-norm weighting across cell-type classification, spatial regression, orthogonality, and reconstruction.

Selftest Summary: Trained SpaDicer (140 genes, 8 cell types) for 10 epochs: final loss=8.7458, train_acc=0.5625.
Metrics: {"epochs": 10, "n_genes": 140, "n_classes": 8, "final_total_loss": 8.7458, "final_sc_cls_loss": 1.5831, "final_st_reg_loss": 11.1992, "train_sc_accuracy": 0.5625}
reconstruct_pseudospace MCP Verified ✓

Infer single-cell pseudo-spatial (x, y) coordinates and extract disentangled shared/private embeddings using a trained SpaDicer model.

Selftest Summary: Reconstructed pseudo-spatial coordinates for 240 single cells across 8 cell types; mean X=5.24, Y=9.18.
Metrics: {"n_cells": 240, "n_celltypes": 8, "pred_x_mean": 5.2384, "pred_y_mean": 9.1754, "pred_x_std": 1.8592, "pred_y_std": 4.3991}
deconvolve_spots MCP Verified ✓

Deconvolve spatial transcriptomics spots into cell-type proportions via SpaDicer cross-domain inference and softmax normalization.

Selftest Summary: Deconvolved 189 ST spots into 8 cell types; top abundant: ExcitatoryL2and3=0.306, ExcitatoryL5=0.175, ExcitatoryL6=0.166.
Metrics: {"n_spots": 189, "n_celltypes": 8, "mean_dominant_fraction": 0.6043, "mean_proportions": {"ExcitatoryL2and3": 0.3063, "ExcitatoryL4": 0.0746, "ExcitatoryL5": 0.1747, "ExcitatoryL6": 0.1663, "Olig": 0.1334, "Endo": 0.0377, "Astro": 0.019, "Other": 0.0878}}
evaluate_spadicer MCP Verified ✓

Evaluate trained SpaDicer performance across single-cell classification AUROC, ST spatial coordinate PCCs, global composition JSD, and optional spot-level SSIM/RMSE.

Selftest Summary: Evaluated SpaDicer on 240 cells & 189 spots: sc_acc=0.842, AUROC=0.989, st_pdist_PCC=0.976, JSD=0.0623.
Metrics: {"n_sc_cells": 240, "n_st_spots": 189, "sc_accuracy": 0.8417, "sc_macro_auroc": 0.9895, "sc_micro_auroc": 0.9863, "st_pcc_x": 0.9509, "st_pcc_y": 0.9961, "st_pairwise_dist_pcc": 0.976, "global_composition_jsd": 0.0623}

三、实测复现结果图展示

fig1_training_and_disentanglement.png
fig2_pseudospace_reconstruction.png
fig3_spot_deconvolution.png