期刊:Nature Communications (2026-07-24) ·
DOI:10.1038/s41467-026-74928-7 ·
开源许可:GPL-3.0 (allowed)
上游仓库:https://git.bioconductor.org/packages/retrofit @ 615f5ffcf1a7
# 1. 解压并自动构建隔离环境 + 运行真实数据自测
unzip retrofit-mcp.zip && cd retrofit-mcp
bash install.sh
.venv/bin/python selftest.py
# 2. 接入 Claude Code / Antigravity / Cursor (Stdio MCP)
claude mcp add retrofit -- "$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
retrofit_decompose
MCP Verified ✓
Reference-free Bayesian Poisson-Gamma SSVI NMF deconvolution of spatial transcriptomics counts (wraps retrofit::decompose).
{"n_genes": 160, "n_spots": 120, "n_components": 12, "iterations": 80, "lambda_bg": 0.01, "kappa": 0.5, "theta_min": 0.00108, "theta_max": 0.02948, "theta_sum": 0.14787, "final_rel_err_w": 3.126825, "final_rel_err_h": 0.549818}retrofit_annotate_correlations
MCP Verified ✓
Post hoc greedy one-to-one mapping of RETROFIT latent components to cell types via scRNA-seq correlation (wraps retrofit::annotateWithCorrelations).
{"n_common_genes": 160, "n_spots": 120, "k_cell_types": 8, "mean_correlation": 0.478687, "ranked_cells": ["Epithelial", "Muscle", "Fibroblasts", "Neural", "Endothelium", "Myo.Meso", "Pericytes", "Immune"], "ranked_correlations": [0.911211, 0.692248, 0.675103, 0.482645, 0.368125, 0.329165, 0.310711, 0.06029], "mean_celltype_proportions": {"Epithelial": 0.179019, "Fibroblasts": 0.164249, "Myo.Meso": 0.165816, "Endothelium": 0.071579, "Pericytes": 0.122726, "Neural": 0.084349, "Immune": 0.121841, "Muscle": 0.090421}}retrofit_annotate_markers
MCP Verified ✓
Post hoc greedy one-to-one mapping of RETROFIT latent components to cell types via curated marker genes (wraps retrofit::annotateWithMarkers).
{"n_genes": 160, "n_spots": 120, "k_cell_types": 8, "ranked_cells": ["Muscle", "Epithelial", "Pericytes", "Fibroblasts", "Immune", "Neural", "Endothelium", "Myo.Meso"], "max_gene_sums": [0.677011, 0.546622, 0.438482, 0.367285, 0.344756, 0.283937, 0.265503, 0.316026], "mean_celltype_proportions": {"Endothelium": 0.117432, "Epithelial": 0.170657, "Fibroblasts": 0.158466, "Immune": 0.152345, "Muscle": 0.079371, "Myo.Meso": 0.126161, "Neural": 0.08042, "Pericytes": 0.115148}}retrofit_deconvolve_and_annotate
MCP Verified ✓
One-step reference-free deconvolution and post hoc single-cell and/or marker annotation with optional spatial visualization (wraps retrofit::retrofit).
{"n_genes": 160, "n_spots": 120, "n_components": 12, "iterations": 80, "k_cell_types": 8, "marker_ranked_cells": ["Muscle", "Epithelial", "Pericytes", "Fibroblasts", "Immune", "Neural", "Endothelium", "Myo.Meso"], "sc_ranked_cells": ["Epithelial", "Muscle", "Fibroblasts", "Neural", "Endothelium", "Myo.Meso", "Pericytes", "Immune"], "sc_mean_correlation": 0.478687, "mean_celltype_proportions": {"Endothelium": 0.117432, "Epithelial": 0.170657, "Fibroblasts": 0.158466, "Immune": 0.152345, "Muscle": 0.079371, "Myo.Meso": 0.126161, "Neural": 0.08042, "Pericytes": 0.115148}, "spot_diversity_groups": {"group1_dominant_pct": 28.33, "group2_colocalized_pct": 21.67, "group3_heterogeneous_pct": 50.0}}

