Paper2MCP v2 Verified Deliverable

Resolving sensitivity, specificity and signal contamination in Xenium spatial transcriptomics

期刊:Nature Methods (2026-04-30) · DOI:10.1038/s41592-026-03089-8 · 开源许可:GPL-3.0 (allowed)

上游仓库:https://github.com/bdsc-tds/SPLIT @ e880e39c03a7

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

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

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

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

purify_counts MCP Verified ✓

Purify spatial counts with SPLIT (repository R code): re-attribute each cell's counts to its primary cell type from deconvolution weights and a reference profile, optionally also removing residual non-specific signal.

Selftest Summary: SPLIT purified 208/600 cells; removed 12.1% of counts.
Metrics: {"n_cells": 600, "n_genes": 48, "n_cells_purified": 208, "raw_total_counts": 74454.0, "purified_total_counts": 65459.39730285105, "fraction_counts_removed": 0.1208, "residual_contamination_removed": false}
compute_neighborhood_metrics MCP Verified ✓

Build a spatial kNN graph and run SPLIT's add_infiltration_metrics_to_neighborhood to count neighbours sharing each cell's primary or secondary (contaminating) type.

Selftest Summary: Neighbourhood infiltration metrics for 600 cells (k=10); 208 cells carry a secondary cell type.
Metrics: {"n_cells": 600, "n_cells_with_secondary_type": 208, "mean_neighbors_sharing_primary_type": 7.558, "mean_neighbors_sharing_secondary_type": 2.904, "frac_contaminated_cells_with_secondary_neighbor": 1.0}
reassign_residual_transcripts MCP Verified ✓

Purify with SPLIT, then reassign each purified cell's removed transcripts to neighbouring cells of its secondary type (SPLIT reassign_residual_counts).

Selftest Summary: Reassigned 8639.6 of 8994.6 removed transcripts (uniform mode); 0 purified cells had no receiving neighbour.
Metrics: {"raw_total_counts": 74454.0, "purified_total_counts": 65459.4, "reassigned_total_counts": 74099.0, "transcripts_removed_by_purification": 8994.6, "transcripts_reassigned_to_neighbors": 8639.6, "fraction_of_removed_reassigned": 0.9605, "n_cells_without_receivers": 0, "mode": "uniform", "l1_error_raw": 0.2533, "l1_error_purified": 0.1573, "l1_error_reassigned": 0.1282}
evaluate_purification MCP Verified ✓

Quantify purification: share of marker counts belonging to a cell type other than the cell's primary type, raw vs purified, per type, plus L1 error to native counts when provided.

Selftest Summary: Off-type marker share fell from 0.1688 to 0.0675 (60% reduction).
Metrics: {"n_cells": 600, "n_marker_genes": 40, "mean_off_type_fraction_raw": 0.1688, "mean_off_type_fraction_purified": 0.0675, "relative_reduction": 0.6001, "l1_error_raw": 0.2533, "l1_error_purified": 0.1573}

三、实测复现结果图展示

fig1_spillover_map_and_offtype_share.png
fig2_marker_heatmap_raw_vs_purified.png
fig3_error_to_native_counts.png