期刊:Cell systems (2026-04-20) ·
DOI:10.1016/j.cels.2026.101589 ·
开源许可:none (restricted)
上游仓库:https://github.com/CellProfiling/2D_shapespace @ 2db86e6a6f7b
# 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
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.
{"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.
{"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.
{"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.
{"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}

