期刊:Cell Reports Methods (2026-10-30) ·
DOI:10.1016/j.crmeth.2026.101646 ·
开源许可:MIT (allowed)
上游仓库:https://github.com/KEAML-JLU/RIF @ adcedc4a0a3a
# 1. 解压并自动构建隔离环境 + 运行真实数据自测
unzip rif-mcp.zip && cd rif-mcp
bash install.sh
.venv/bin/python selftest.py
# 2. 接入 Claude Code / Antigravity / Cursor (Stdio MCP)
claude mcp add rif -- "$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
generate_pseudo_labels
MCP Verified ✓
RIF preprocessing (HVG, normalisation, spatial kNN graph) and the two mclust pseudo-label sets used to supervise the GNN.
{"n_spots": 450, "n_genes_used": 600, "n_clusters": 5, "pseudo_label_sizes": {"1": 132, "2": 196, "3": 74, "4": 30, "5": 18}, "ari_between_views": 0.1986, "mean_uncertainty_normalised_view": 0.01605, "mclust_backend": "R mclust (Rscript, EEE)"}identify_spatial_domains
MCP Verified ✓
Train the pseudo-label supervised RIF graph network and ensemble the two views into fine-grained spatial domains.
{"n_spots": 450, "n_genes_used": 600, "n_clusters_requested": 5, "n_domains_found": 5, "domain_sizes": {"3": 153, "2": 110, "4": 90, "0": 65, "1": 32}, "ari_between_two_views": 0.1185, "ari_vs_pseudo_label": 0.2204, "silhouette_embedding": 0.0551, "max_epoch": 8, "mclust_backend": "R mclust (Rscript, EEE)"}detect_spatially_variable_genes
MCP Verified ✓
Detect spatially variable genes by interpreting the trained RIF network with a learnable gene mask per domain.
{"domains_explained": [1, 0], "genes_per_domain": {"1": 13, "0": 21}, "n_svg_genes": 28, "moran_mean_selected": 0.588, "moran_mean_all_genes": 0.2252, "moran_median_all_genes": 0.2011, "top_genes": [{"gene": "Gpr88", "moran_i": 0.8708}, {"gene": "Ttr", "moran_i": 0.8694}, {"gene": "Penk", "moran_i": 0.8279}, {"gene": "Pde10a", "moran_i": 0.8176}, {"gene": "Ppp1r1b", "moran_i": 0.817}], "explainer_epochs": 6}evaluate_spatial_domains
MCP Verified ✓
Score a domain assignment by spatial coherence, per-domain purity, embedding silhouette and optional ARI/NMI.
{"n_spots": 450, "n_domains": 5, "spatial_coherence": 0.8874, "expected_random_coherence": 0.2413, "coherence_gain": 0.6461, "silhouette_embedding": 0.0551, "reference_key": "pseudo_label", "n_spots_with_reference": 450, "ari_vs_reference": 0.2204, "nmi_vs_reference": 0.305}

