Paper2MCP v2 Verified Deliverable

Integrating cytological images and spatial transcriptomics for cell segmentation with DISSECT.

期刊:Nature Computational Science (2026-07-09) · DOI:10.1038/s43588-026-01020-x · 开源许可:MIT (allowed)

上游仓库:https://github.com/zenglab-pku/DISSECT @ b75071ac66f6

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

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

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

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

dissect_prepare_spatial_region MCP Verified ✓

Load aligned cytological staining image and spatial transcriptomics table via DISSECT STReader, build spot count matrix, and extract a region of interest via RegionExtractor.

Selftest Summary: Prepared stereoseq spatial region (224x224 px) with 350 transcript spots (526 MIDs across 6 genes).
Metrics: {"image_height": 224, "image_width": 224, "n_transcript_records": 350, "total_mid_counts": 526, "n_unique_genes": 6, "nonzero_spot_pixels": 346}
dissect_propose_cell_anchors MCP Verified ✓

Propose candidate cell bounding-box anchors from a cytological image and deduplicate overlaps using DISSECT nms_numpy (GIoU/IoU/DIoU/CIoU).

Selftest Summary: Proposed 11 raw candidates and retained 11 cell anchors after GIoU NMS (iou_thresh=0.3).
Metrics: {"n_raw_candidates": 11, "n_kept_anchors": 11, "mean_box_area": 1092.8181818181818, "mean_score": 0.5773503067530268}
dissect_refine_joint_segmentation MCP Verified ✓

Refine cell masks by integrating cytological image gradients with transcriptomic Jensen-Shannon divergence gradient fields (DISSECT gradient_map + refine_mask_parallel).

Selftest Summary: Refined 10 cells from 11 anchors (alpha=0.5, gene=True), capturing 53.8% of transcript MIDs.
Metrics: {"n_candidate_boxes": 11, "n_refined_cells": 11, "n_final_cells": 10, "mean_cell_area_px": 956.6, "foreground_fraction": 0.1906, "transcript_capture_rate": 0.538, "captured_mid_counts": 283, "total_mid_counts": 526}
dissect_reconstruct_anndata MCP Verified ✓

Reconstruct a single-cell spatial AnnData (.h5ad) object from refined cell masks and transcripts using DISSECT mask2adata.load_cell and anchor.generate_cell_box.

Selftest Summary: Reconstructed single-cell AnnData (10 cells x 6 genes, 278 total MID counts).
Metrics: {"n_cells": 10, "n_genes": 6, "total_mid_counts": 278, "mean_counts_per_cell": 27.8, "median_counts_per_cell": 25.5, "mean_genes_per_cell": 2.4}

三、实测复现结果图展示

dissect_gradient_field_ablation.png
dissect_joint_segmentation.png
dissect_spatial_anndata_qc.png