Paper2MCP v2 Verified Deliverable

Multiscale domain identification for spatial transcriptomics via persistent homology

期刊:Cell Reports Methods (2026-03-30) · DOI:10.1016/j.crmeth.2026.101376 · 开源许可:MIT (allowed)

上游仓库:https://github.com/pzbeamer/phd-ms @ 32e5a7776e1d

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

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

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

# 2. 接入 Claude Code / Antigravity / Cursor (Stdio MCP)
claude mcp add phd-ms -- "$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

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

cluster_multires_leiden MCP Verified ✓

Run Leiden clustering of a spatially aware embedding (for example GraphST) at several resolutions; the PHD-MS preprocessing step.

Selftest Summary: Leiden clustering of 1200 spots at 6 resolutions: clusters per resolution [10, 16, 17, 22, 27, 27].
Metrics: {"n_spots": 1200, "clusters_per_resolution": {"leiden_0.150": 10, "leiden_0.310": 16, "leiden_0.470": 17, "leiden_0.630": 22, "leiden_0.790": 27, "leiden_0.950": 27}}
find_multiscale_domains MCP Verified ✓

Link clusters across resolutions into a cluster graph and use 0-dimensional persistent homology to find multiscale domains with persistence and per-spot coreness.

Selftest Summary: Found 154 multiscale domains from 8 clusterings (jaccard overlap); most persistent domain has persistence 1.000.
Metrics: {"n_domains": 154, "n_clusterings": 8, "index": "jaccard", "top_persistence": [1.0, 1.0, 1.0, 0.9917, 0.969]}
assign_hard_domains MCP Verified ✓

Turn selected multiscale domains into a hard spatial clustering by giving each spot the domain with the highest coreness.

Selftest Summary: Assigned 1200 of 1200 spots to 3 selected domains [0, 1, 2]; 0 spots unassigned.
Metrics: {"spots_per_domain": {"domain_0": 451, "domain_1": 739, "domain_2": 10}, "n_unassigned": 0, "domain_indices": [0, 1, 2]}
benchmark_multiscale_domains MCP Verified ✓

Benchmark multiscale domains against an annotated ground truth with NMI and Wasserstein distance, and compare with the best single-resolution Leiden clustering.

Selftest Summary: Benchmark vs cluster: multiscale NMI 0.632; single-scale leiden_0.379 NMI 0.717.
Metrics: {"n_domains_used": 20, "multiscale_nmi": 0.6320978923894611, "baseline_key": "leiden_0.379", "baseline_nmi": 0.7166119838083175}

三、实测复现结果图展示

clusterings_grid.png
domains_top10_grid.png
heterogeneity.png
persistence_barcode.png