Paper2MCP v2 Verified Deliverable

Denoising spatial epigenomic data via deep matrix factorization.

期刊:Nature Computational Science (2026-01-13) · DOI:10.1038/s43588-025-00941-3 · 开源许可:none (restricted)

上游仓库:https://github.com/QuKunLab/SPEED @ 2aafabb14797

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

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

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

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

build_atlas_prior MCP Verified ✓

SPEED stage 1: train the deep matrix factorization on an atlas-level single-cell chromatin accessibility matrix and export the learned peak embeddings as the prior for stage 2.

Selftest Summary: Trained SPEED stage 1 on 600 cells x 300 peaks for 14 epochs (best validation loss 0.5035); peak embeddings stored in varm[peak_SPEED].
Metrics: {"n_cells": 600, "n_peaks": 300, "emb_features": 32, "epochs_run": 14, "early_stopped": false, "final_train_loss": 0.49598, "best_val_loss": 0.50348, "peak_embedding_std": 0.5878, "peak_key": "peak_SPEED", "device": "cpu"}
denoise_spatial_epigenome MCP Verified ✓

SPEED stage 2: denoise a spatial chromatin accessibility matrix using spot coordinates and, optionally, the single-cell atlas prior. Returns denoised probabilities, spot and peak embeddings and a before/after map.

Selftest Summary: Denoised 400 spots x 300 peaks with SPEED stage 2 (atlas prior, 19 epochs). AUC against the hidden true state: observed 0.6136, denoised 0.6369.
Metrics: {"n_spots": 400, "n_peaks": 300, "n_peaks_input": 300, "used_atlas_prior": true, "k_degree": 5, "epochs_run": 19, "early_stopped": false, "best_val_loss": 4.52695, "observed_density": 0.0598, "mean_denoised_value": 0.9963, "device": "cpu", "auc_observed_vs_true_state": 0.6136, "auc_denoised_vs_true_state": 0.6369, "auc_depth_normalized_vs_true_state": 0.6403}
binarize_denoised_peaks MCP Verified ✓

Binarize the depth-normalized SPEED output into open and closed peaks with the upstream per-spot and per-peak percentile rule.

Selftest Summary: Binarized 400 x 300 denoised matrix, 36.1% of entries open. Recall of the true open entries: 0.971 binarized versus 0.231 raw.
Metrics: {"n_spots": 400, "n_peaks": 300, "binarized_density": 0.3607, "observed_density": 0.0598, "binarized_precision": 0.6636, "binarized_recall": 0.9705, "binarized_f1": 0.7883, "true_density": 0.2467, "observed_precision": 0.9524, "observed_recall": 0.231, "observed_f1": 0.3719}
cluster_spatial_domains MCP Verified ✓

Cluster spots into spatial domains from the SPEED spot embedding (Leiden or k-means) and report ARI and NMI when a ground-truth domain column exists.

Selftest Summary: Found 5 spatial domains with kmeans on X_SPEED. ARI against the ground truth 0.982 (raw SVD plus k-means baseline 0.975).
Metrics: {"n_spots": 400, "n_domains": 5, "method": "kmeans", "domain_sizes": {"0": 69, "1": 85, "2": 86, "3": 81, "4": 79}, "ari_vs_ground_truth": 0.9822, "nmi_vs_ground_truth": 0.9773, "baseline_ari_svd_kmeans": 0.9746}

三、完整复现的真实指标(合成基准)

指标基线SPEED
去噪后概率对隐藏真值的 AUC0.614(原始观测)0.941(SPEED + 图谱先验);0.9996(SPEED,无先验)
开放位点召回率0.231(原始观测)0.971(二值化后)
开放位点精度0.952(原始观测)0.664(二值化后)
开放位点 F10.372(原始观测)0.788(二值化后)
空间域 ARI(5 个域,k-means)0.975(原始数据 SVD)0.982(SPEED 嵌入)

数据来源与局限

四、实测复现结果图展示

fig1_denoise_spatial_peak.png
fig2_spatial_domains.png
fig3_metrics_summary.png