Paper2MCP v2 Verified Deliverable

Tangermeme: a toolkit for understanding *cis-*regulatory logic using deep learning models

期刊:Nature Methods (2026-10-08) · DOI:10.1038/s41592-026-03254-z · 开源许可:MIT (allowed)

上游仓库:https://github.com/jmschrei/tangermeme @ 937ba26052eb

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

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

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

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

tangermeme_ersatz_sequences MCP Verified ✓

Perform controlled in silico sequence manipulations (dinucleotide shuffle, shuffle, motif substitution, multi-motif spaced substitution, insertion, deletion, randomization) wrapping tangermeme.ersatz.

Selftest Summary: Applied tangermeme.ersatz.dinucleotide_shuffle to 12 sequences (len 200 -> 200), producing 60 sequences (mean GC 0.4471 -> 0.4471).
Metrics: {"operation": "dinucleotide_shuffle", "n_input_sequences": 12, "n_output_sequences": 60, "input_length": 200, "output_length": 200, "output_shape": [12, 5, 4, 200], "mean_gc_before": 0.447083, "mean_gc_after": 0.447083, "max_gc_abs_diff": 0.0}
tangermeme_predict MCP Verified ✓

Run batched, dtype- and device-managed sequence-to-function model predictions wrapping tangermeme.predict.predict.

Selftest Summary: Predicted [12, 2] outputs across 12 sequences (len=200) on cpu; task means=[1.341285, 1.13027].
Metrics: {"n_sequences": 12, "sequence_length": 200, "output_shape": [12, 2], "task_means": [1.341285, 1.13027], "max_prediction": 3.606397, "min_prediction": -0.102406, "device_used": "cpu"}
tangermeme_deep_lift_shap MCP Verified ✓

Compute nucleotide-level sequence attributions using DeepLIFT/SHAP (with exact convergence-delta verification) or in silico saturation mutagenesis (ISM), and plot sequence attribution logos.

Selftest Summary: Computed deep_lift_shap attributions of shape [12, 4, 200] for target 0 (peak attribution 0.3547, mean |Δy - Σattr|=1.27e-07).
Metrics: {"method": "deep_lift_shap", "target": 0, "n_sequences": 12, "attributions_shape": [12, 4, 200], "max_attribution": 0.35468, "min_attribution": -0.110993, "top_position_example0": 93, "device_used": "cpu", "mean_abs_convergence_delta": 1.2665987014770508e-07, "max_abs_convergence_delta": 4.76837158203125e-07}
tangermeme_call_seqlets MCP Verified ✓

Identify contiguous high-attribution regulatory spans (seqlets) via recursive_seqlets or tfmodisco_seqlets, optionally annotate against a MEME motif database with TOMTOM, and render annotated attribution logos.

Selftest Summary: Called 9 seqlets across 12 sequences using recursive (annotated motifs: {'FOSL2+JUND_MA1145.1': 7, 'ZN263_HUMAN.H11MO.0.A': 1, 'MA0636.1 BHLHE41': 1}).
Metrics: {"algorithm": "recursive", "n_sequences": 12, "sequence_length": 200, "n_seqlets": 9, "top_seqlet_pvalue": 4.1255217093372374e-14, "top_seqlet_attribution": 2.304164, "annotated_motif_counts": {"FOSL2+JUND_MA1145.1": 7, "ZN263_HUMAN.H11MO.0.A": 1, "MA0636.1 BHLHE41": 1}}
tangermeme_marginalize_motif MCP Verified ✓

Estimate in silico motif marginalization effect sizes across background sequences for a single DNA motif or an entire MEME motif database using tangermeme.marginalize.marginalize.

Selftest Summary: Marginalized 16 motif(s) across 24 sequences (target=1); strongest effect: MA0636.1 BHLHE41 (mean Δy=+2.2704 ± 0.2688).
Metrics: {"n_background_sequences": 24, "target": 1, "n_motifs_tested": 16, "top_motif": "MA0636.1 BHLHE41", "mean_before": 0.068446, "mean_after": 2.338877, "mean_delta": 2.270431, "std_delta": 0.268782, "device_used": "cpu"}

三、实测复现结果图展示

01_deeplift_vs_ism_attributions.png
02_recursive_seqlets_annotation.png
03_motif_marginalization_screen.png