Paper2MCP v2 Verified Deliverable

Cell shapes decode molecular phenotypes in image-based spatial proteomics

期刊:Cell systems (2026-04-20) · DOI:10.1016/j.cels.2026.101589 · 开源许可:none (restricted)

上游仓库:https://github.com/CellProfiling/2D_shapespace @ 2db86e6a6f7b

Pytest: passed MCP Stdio Selftest: passed Relocated Fresh Install: passed
数据说明(请务必阅读):本包没有在真实 Human Protein Atlas 细胞上验证。上游 README 指定的 K-562 测试数据集(ell-vault.stanford.edu)在复现期间持续返回 HTTP 502,两个 Zenodo 记录(18579832、18579978)只含代码快照,Internet Archive 也没有存档。因此下方所有测试、示例和结果图都基于 16 个合成细胞(椭圆细胞 + 偏心椭圆核 + 高斯蛋白信号,固定随机种子)。它们只说明工具链能端到端运行,并能还原夹具里人为构造的结构;不代表任何真实细胞生物学结论。

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

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

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

compute_shape_coefficients MCP Verified ✓

Align single-cell cell and nucleus masks and compute Fourier shape coefficients of both contours (step s2 of the shapespace pipeline), with per-cell rotation angle, nucleus centroid and reconstruction error.

Selftest Summary: Computed 32-coefficient Fourier shapes for 16/16 cells with fft_nuclei_major_axis; mean contour reconstruction error 1.11px (cell), 0.49px (nucleus).
Metrics: {"n_input_cells": 16, "n_ok": 16, "n_failed": 0, "failed": {}, "align_method": "fft_nuclei_major_axis", "n_coef": 32, "mean_recon_err_cell_px": 1.1072, "mean_recon_err_nucleus_px": 0.4934}
build_shapespace_pca MCP Verified ✓

Fit PCA on the cell and nucleus Fourier coefficients to build the shape space, report explained variance, and plot the average cell and the shape variation along each principal component.

Selftest Summary: PCA shape space from 16 cells: PC1-PC3 explain [68.55, 17.22, 8.45]% of variance; 4 PCs reach 95%.
Metrics: {"n_cells": 16, "n_rows_skipped": 0, "n_components": 16, "explained_variance_pct_top": [68.55, 17.22, 8.45], "n_pc_for_variance_target": 4, "variance_target": 95.0}
extract_cell_landmarks MCP Verified ✓

Extract the thin-plate-spline landmarks of one cell: nucleus centroid, nucleus contour points and cell contour points, restarted at a common anchor.

Selftest Summary: Extracted 97 landmarks (32 nucleus, 64 cell contour points) from cell_00.npy.
Metrics: {"n_landmarks": 97, "nucleus_centroid_row": 86.363, "nucleus_centroid_col": 87.193, "image_shape": [160, 160]}
warp_protein_to_average_cell MCP Verified ✓

Rotate one cell with its alignment angle and morph its protein image onto the average cell shape with a two-step thin-plate-spline warp, then remove small artefacts with an Otsu threshold.

Selftest Summary: Warped cell_00.npy onto the average cell (74 x 110 px); mean landmark displacement 18.4 px.
Metrics: {"theta_deg": 6.9818565992413255, "output_shape": [74, 110], "n_landmarks": 97, "mean_landmark_displacement_px": 18.416, "max_landmark_displacement_px": 29.677, "nonzero_fraction_after_cleanup": 0.16}

三、复现结果图展示(合成数据,非真实细胞)

protein_warp_to_average_cell.png
shapespace_PC1_variation.png
shapespace_PC2_variation.png