期刊:Nature Communications (2026-09-03) ·
DOI:10.1038/s41467-026-76871-z ·
开源许可:none (restricted)
上游仓库:https://github.com/SydneyBioX/wSIR_2024 @ 9542f056761a
# 1. 解压并自动构建隔离环境 + 运行真实数据自测
unzip wsir-mcp.zip && cd wsir-mcp
bash install.sh
.venv/bin/python selftest.py
# 2. 接入 Claude Code / Antigravity / Cursor (Stdio MCP)
claude mcp add wsir -- "$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
tune_wsir_params
MCP Verified ✓
Grid-search wSIR spatial weighting (alpha) and tiling (slices) hyperparameters using repeated train/test spatial distance correlation.
{"best_alpha": 4.0, "best_slices": 3, "best_metric_value": 0.24, "sir_baseline_metric": 0.2247, "metric_name": "DC", "n_cells": 450, "n_genes": 120, "n_combinations": 4}fit_wsir_embedding
MCP Verified ✓
Fit Weighted Sliced Inverse Regression (wSIR) on single- or multi-sample spatial transcriptomics data.
{"n_cells": 450, "n_genes": 120, "estd": 15, "alpha": 4.0, "slices": 6, "var_threshold": 0.95, "variance_explained_ratio": 0.9512, "dc_vs_coords": 0.4749, "cd_vs_coords": 0.28, "top_eigenvalues": [0.0083, 0.0057, 0.0022]}project_and_transfer
MCP Verified ✓
Project unseen single-cell or spatial expression data into a fitted wSIR latent space and transfer cell-type labels via KNN.
{"n_query_cells": 350, "n_common_genes": 120, "n_dims_used": 15, "dc_vs_coords": 0.3885, "cd_vs_coords": 0.2391, "knn_accuracy": 0.5143, "n_predicted_classes": 15}analyze_wsir_genes_umap
MCP Verified ✓
Rank top spatially loaded genes per wSIR direction and visualize gene expression on wSIR UMAP.
{"n_cells": 450, "n_genes": 120, "estd": 15, "n_top_gene_entries": 16, "n_unique_top_genes": 16, "top_genes_dir1": ["Hoxa1", "Pitx1", "Otx2", "Bmp4", "Setd1b"]}

