期刊:Cell Reports Methods (2026-03-30) ·
DOI:10.1016/j.crmeth.2026.101376 ·
开源许可:MIT (allowed)
上游仓库:https://github.com/pzbeamer/phd-ms @ 32e5a7776e1d
# 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
cluster_multires_leiden
MCP Verified ✓
Run Leiden clustering of a spatially aware embedding (for example GraphST) at several resolutions; the PHD-MS preprocessing step.
{"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.
{"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.
{"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.
{"n_domains_used": 20, "multiscale_nmi": 0.6320978923894611, "baseline_key": "leiden_0.379", "baseline_nmi": 0.7166119838083175}


