Paper2MCP v2 Verified Deliverable

DGAT: a dual-graph attention network for inferring spatial protein landscapes from transcriptomics

期刊:Nature Communications (2026-05-21) · DOI:10.1038/s41467-026-73114-z · 开源许可:none (restricted)

上游仓库:https://github.com/osmanbeyoglulab/DGAT @ 6e115a6c6c43

Pytest: passed MCP Stdio Selftest: passed Relocated Fresh Install: passed

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

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

# 2. 接入 Claude Code / Antigravity / Cursor (Stdio MCP)
claude mcp add dgat -- "$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

二、已验证科学工具清单(5 个工具)

preprocess_spatial_cite_seq MCP Verified ✓

Quality-control, clean antibody names, CLR/log1p normalize, and align spatial transcriptomics and optional paired spatial proteomics (Spatial-CITE-seq / CytAssist) AnnData files.

Selftest Summary: Preprocessed paired spatial CITE-seq dataset (120 spots, 82 genes, 31 proteins).
Metrics: {"mode": "paired_spatial_cite_seq", "n_spots_raw": 120, "n_genes_raw": 560, "n_spots_qc": 120, "n_genes_qc": 82, "n_proteins_qc": 31, "n_encoding_genes": 28, "median_genes_per_spot": 26.0}
build_dual_spatial_graph MCP Verified ✓

Construct DGAT heterogeneous dual-graph PyG HeteroData combining spatial proximity k-NN and molecular similarity k-NN edges for mRNA and optional protein modalities.

Selftest Summary: Built DGAT dual graph for LymphNode_A1_mini: 120 spots, 1660 mRNA edges, 1689 protein edges.
Metrics: {"sample_name": "LymphNode_A1_mini", "has_protein": true, "num_nodes": 120, "num_genes": 560, "num_proteins": 31, "num_mrna_edges": 1660, "num_protein_edges": 1689, "dual_overlap_edges": 260, "mean_mrna_degree": 13.833, "spatial_k": 6, "feature_k": 10}
train_dgat_model MCP Verified ✓

Train the DGAT Dual-Graph Attention Network (GATEncoder with 16-head feature attention, Decoder_mRNA, Decoder_Protein) with latent alignment and cross-modal prediction losses.

Selftest Summary: Trained DGAT model (560 genes -> 31 proteins, 2 epochs, final_loss=11.0078).
Metrics: {"n_train_samples": 1, "n_genes": 560, "n_proteins": 31, "epochs_run": 2, "final_loss": 11.00776, "final_mrna_recon_rmse": 1.25092, "final_protein_pred_rmse": 0.58331, "final_latent_align_mse": 1.12486, "model_dir": "/tmp/p2m_selftest_4zpaqid7/train_dgat_model", "val_mean_spearman": 0.03696}
predict_spatial_proteins MCP Verified ✓

Impute spatial protein abundance from transcriptomics-only ST data using a trained DGAT model (or on-the-fly paired reference training) and optionally benchmark against measured ADT.

Selftest Summary: Predicted spatial abundance for 31 proteins across 100 spots.
Metrics: {"n_spots": 100, "n_proteins": 31, "mean_predicted_expression": 0.60576, "std_predicted_expression": 0.26351, "mean_protein_spearman": 0.03303, "median_protein_spearman": 0.01048, "mean_cell_spearman": 0.09632, "rmse": 0.38982, "mrna_baseline_mean_spearman": 0.05771}
analyze_spatial_protein_domains MCP Verified ✓

Perform Leiden spatial domain clustering, Adjusted Rand Index evaluation, and univariate/bivariate Moran's I spatial co-localization analysis on DGAT-imputed protein profiles.

Selftest Summary: Identified 5 spatial protein domains across 100 spots (mean Moran's I=0.206, 52 co-localized pairs).
Metrics: {"n_spots": 100, "n_proteins": 31, "n_clusters": 5, "mean_morans_i": 0.20639, "max_morans_i": 0.57132, "n_colocalized_pairs": 52, "top_colocalized_pairs": [{"pair": "ACTA2--PECAM1", "bivariate_morans_i": 0.3368}, {"pair": "PTPRC_1--BCL2", "bivariate_morans_i": 0.3149}, {"pair": "CD3E--CD4", "bivariate_morans_i": 0.3142}, {"pair": "CD8A--CD3E", "bivariate_morans_i": 0.3095}, {"pair": "PDCD1--CD4", "bivariate_morans_i": 0.3078}, {"pair": "CR2--PDCD1", "bivariate_morans_i": 0.3021}, {"pair": "CD4--CD27", "bivariate_morans_i": 0.2972}, {"pair": "PTPRC_1--CD8A", "bivariate_morans_i": 0.2954}]}

三、实测复现结果图展示

dgat_spatial_domains_leiden.png
dgat_spatial_protein_landscapes.png
dgat_training_and_protein_corr.png