Skip to main content
scientific-protein-interaction-network タンパク質-タンパク質相互作用 (PPI) ネットワーク解析スキル。STRING、IntAct、
BioGRID、STITCH (化学-タンパク質) 相互作用データベースを統合した
ネットワーク構築・解析パイプライン。GO/KEGG 富化、相互作用パートナー発見、
組織特異的ネットワーク (HumanBase)、化合物-標的ネットワーク対応。
14 の ToolUniverse SMCP ツールと連携。
Jump to install Skills Marketplace Discover and explore AI skills built by the community.
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Copy promptShow prompt details A direct command skips the review prompt. Inspect the source before running it.
npx skills add https://github.com/nahisaho/satori --skill scientific-protein-interaction-networkThe command stays on one line. Scroll horizontally to inspect it before copying.
Prefer a local copy? Download the files currently available to SkillsMP.
Download Zip Downloading... Related occupations SOC
Based on SOC occupation classification
More from this repository name scientific-protein-interaction-network description タンパク質-タンパク質相互作用 (PPI) ネットワーク解析スキル。STRING、IntAct、
BioGRID、STITCH (化学-タンパク質) 相互作用データベースを統合した
ネットワーク構築・解析パイプライン。GO/KEGG 富化、相互作用パートナー発見、
組織特異的ネットワーク (HumanBase)、化合物-標的ネットワーク対応。
14 の ToolUniverse SMCP ツールと連携。
tu_tools [{"key":"intact","name":"IntAct","description":"分子相互作用データベース (EBI)"}]
Scientific Protein Interaction Network
STRING / IntAct / BioGRID / STITCH の 4 大 PPI データベースを統合した
タンパク質相互作用ネットワーク解析パイプラインを提供する。
When to Use
DEG や変異遺伝子の PPI ネットワークを構築するとき
ハブタンパク質やボトルネックの特定が必要なとき
化合物と標的タンパク質の相互作用を調べるとき
組織特異的な相互作用ネットワークを評価するとき
PPI データに基づく GO/KEGG 富化やモジュール解析を行うとき
Quick Start
1. STRING PPI ネットワーク取得
import requests
import pandas as pd
import networkx as nx
def string_get_interactions (proteins, species=9606 ,
score_threshold=400 ,
network_type="functional" ):
"""
STRING API v12 による PPI ネットワーク取得。
Parameters:
proteins: list — タンパク質名/UniProt ID リスト
species: int — NCBI Taxonomy ID (9606=Homo sapiens)
score_threshold: int — 信頼スコア閾値 (0-1000)
network_type: "functional" or "physical"
"""
base = "https://string-db.org/api/json"
resolve_url =
resolved = []
batch [proteins[i:i+ ] i ( , (proteins), )]:
params = {
: .join(batch),
: species,
: ,
}
resp = requests.get(resolve_url, params=params)
r resp.json():
resolved.append(r[ ])
resolved:
( )
pd.DataFrame(), nx.Graph()
interaction_url =
params = {
: .join(resolved),
: species,
: score_threshold,
: network_type,
}
resp = requests.get(interaction_url, params=params)
interactions = resp.json()
edges = []
i interactions:
edges.append({
: i[ ],
: i[ ],
: i[ ],
: i.get( , ),
: i.get( , ),
: i.get( , ),
: i.get( , ),
: i.get( , ),
: i.get( , ),
: i.get( , ),
})
df = pd.DataFrame(edges)
G = nx.Graph()
_, row df.iterrows():
G.add_edge(row[ ], row[ ],
weight=row[ ] / )
(
)
df, G
f"{base} /get_string_ids"
for
in
10
for
in
range
0
len
10
"identifiers"
"\r"
"species"
"limit"
1
for
in
"stringId"
if
not
print
"No proteins resolved"
return
f"{base} /network"
"identifiers"
"\r"
"species"
"required_score"
"network_type"
for
in
"protein_a"
"preferredName_A"
"protein_b"
"preferredName_B"
"score"
"score"
"nscore"
"nscore"
0
"fscore"
"fscore"
0
"pscore"
"pscore"
0
"ascore"
"ascore"
0
"escore"
"escore"
0
"dscore"
"dscore"
0
"tscore"
"tscore"
0
for
in
"protein_a"
"protein_b"
"score"
1000.0
print
f"STRING network: {G.number_of_nodes()} nodes, "
f"{G.number_of_edges()} edges (score ≥ {score_threshold} )"
return
2. IntAct 分子相互作用検索 def intact_search_interactions (query, species="human" ,
interaction_type=None ,
max_results=200 ):
"""
IntAct REST API による分子相互作用検索。
Parameters:
query: str — タンパク質名/UniProt ID
species: str or int — "human" or taxonomy ID
interaction_type: str — MI term (e.g., "MI:0407" physical association)
"""
url = "https://www.ebi.ac.uk/intact/ws/interaction/findInteractions"
params = {
"query" : query,
"maxResults" : max_results,
}
if species:
params["species" ] = species
resp = requests.get(url, params=params)
if resp.status_code != 200 :
print (f"IntAct error: {resp.status_code} " )
return pd.DataFrame()
data = resp.json()
interactions = data.get("content" , [])
results = []
for ix in interactions:
interactor_a = ix.get("interactorA" , {})
interactor_b = ix.get("interactorB" , {})
results.append({
"interactor_a" : interactor_a.get("preferredIdentifier" , "" ),
"interactor_a_name" : interactor_a.get("shortLabel" , "" ),
"interactor_b" : interactor_b.get("preferredIdentifier" , "" ),
"interactor_b_name" : interactor_b.get("shortLabel" , "" ),
"interaction_type" : ix.get("interactionType" , "" ),
"detection_method" : ix.get("detectionMethod" , "" ),
"confidence" : ix.get("confidenceValue" , 0 ),
"publication" : ix.get("pubmedId" , "" ),
})
df = pd.DataFrame(results)
print (f"IntAct: {len (df)} interactions for '{query} '" )
return df
3. STITCH 化合物-タンパク質相互作用 def stitch_chemical_protein (chemicals, species=9606 ,
score_threshold=400 ):
"""
STITCH API による化合物-タンパク質相互作用検索。
Parameters:
chemicals: list — 化合物名/CID リスト
species: int — NCBI Taxonomy ID
score_threshold: int — 信頼スコア閾値
"""
url = "http://stitch.embl.de/api/json/interactionsList"
params = {
"identifiers" : "\r" .join(chemicals),
"species" : species,
"required_score" : score_threshold,
}
resp = requests.get(url, params=params)
interactions = resp.json()
results = []
for i in interactions:
results.append({
"chemical" : i.get("preferredName_A" , "" ),
"protein" : i.get("preferredName_B" , "" ),
"score" : i.get("score" , 0 ),
"type_a" : "chemical" if i.get("ncbiTaxonId_A" ) == -1 else "protein" ,
})
df = pd.DataFrame(results)
print (f"STITCH: {len (df)} chemical-protein interactions" )
return df
4. PPI ネットワーク解析 (中心性・モジュール) def analyze_ppi_network (G, community_method="louvain" ):
"""
PPI ネットワークのトポロジー解析。
Parameters:
G: nx.Graph — PPI ネットワーク
community_method: "louvain" or "label_propagation"
"""
if G.number_of_nodes() == 0 :
return {}
degree_cent = nx.degree_centrality(G)
betweenness = nx.betweenness_centrality(G)
closeness = nx.closeness_centrality(G)
hubs = sorted (degree_cent.items(), key=lambda x: -x[1 ])[:10 ]
bottlenecks = sorted (betweenness.items(), key=lambda x: -x[1 ])[:10 ]
if community_method == "louvain" :
from community import community_louvain
partition = community_louvain.best_partition(G)
else :
communities = nx.community.label_propagation_communities(G)
partition = {}
for i, comm in enumerate (communities):
for node in comm:
partition[node] = i
n_communities = len (set (partition.values()))
stats = {
"nodes" : G.number_of_nodes(),
"edges" : G.number_of_edges(),
"density" : round (nx.density(G), 4 ),
"avg_clustering" : round (nx.average_clustering(G), 4 ),
"connected_components" : nx.number_connected_components(G),
"communities" : n_communities,
"hub_proteins" : [h[0 ] for h in hubs],
"bottleneck_proteins" : [b[0 ] for b in bottlenecks],
}
centrality_df = pd.DataFrame({
"protein" : list (degree_cent.keys()),
"degree_centrality" : list (degree_cent.values()),
"betweenness" : [betweenness[n] for n in degree_cent.keys()],
"closeness" : [closeness[n] for n in degree_cent.keys()],
"community" : [partition.get(n, -1 ) for n in degree_cent.keys()],
}).sort_values("degree_centrality" , ascending=False )
print (f"PPI analysis: {stats['nodes' ]} nodes, {stats['edges' ]} edges, "
f"{n_communities} communities" )
return stats, centrality_df, partition
5. PPI ネットワーク可視化 def visualize_ppi_network (G, partition=None , hub_proteins=None ,
output="figures/ppi_network.png" ,
layout="spring" ):
"""
PPI ネットワークの可視化。
"""
import matplotlib.pyplot as plt
import os
os.makedirs(os.path.dirname(output), exist_ok=True )
fig, ax = plt.subplots(figsize=(14 , 14 ))
if layout == "spring" :
pos = nx.spring_layout(G, k=1.5 , seed=42 )
elif layout == "kamada_kawai" :
pos = nx.kamada_kawai_layout(G)
node_sizes = [300 + 100 * G.degree(n) for n in G.nodes()]
if partition:
import matplotlib.cm as cm
n_comm = len (set (partition.values()))
colors = [cm.Set3(partition.get(n, 0 ) / max (n_comm, 1 )) for n in G.nodes()]
else :
colors = "steelblue"
nx.draw_networkx_edges(G, pos, alpha=0.2 , ax=ax)
nx.draw_networkx_nodes(G, pos, node_size=node_sizes,
node_color=colors, alpha=0.8 , ax=ax)
if hub_proteins:
labels = {n: n for n in G.nodes() if n in hub_proteins}
else :
labels = {n: n for n in G.nodes() if G.degree(n) >= 5 }
nx.draw_networkx_labels(G, pos, labels, font_size=8 , ax=ax)
ax.set_title(f"PPI Network ({G.number_of_nodes()} proteins, "
f"{G.number_of_edges()} interactions)" )
ax.axis("off" )
plt.tight_layout()
plt.savefig(output, dpi=300 , bbox_inches="tight" )
plt.close()
print (f"Saved: {output} " )
References
Output Files ファイル 形式 results/string_interactions.csvCSV results/intact_interactions.csvCSV results/stitch_interactions.csvCSV results/ppi_centrality.csvCSV results/ppi_network.graphmlGraphML figures/ppi_network.pngPNG
利用可能ツール カテゴリ 主要ツール 用途 IntAct intact_search_interactions分子相互作用検索 IntAct intact_get_interactions相互作用データ取得 IntAct intact_get_interactor相互作用因子詳細 IntAct intact_get_interaction_details相互作用詳細 IntAct intact_get_interaction_networkネットワーク取得 IntAct intact_get_interactions_by_organism生物種別相互作用 IntAct intact_get_interactions_by_complex複合体別相互作用 IntAct intact_get_complex_details複合体詳細 STRING/BioGRID STRING_get_protein_interactionsSTRING PPI 取得 STRING/BioGRID BioGRID_get_interactionsBioGRID 相互作用取得 STITCH STITCH_get_chemical_protein_interactions化合物-タンパク質相互作用 STITCH STITCH_get_interaction_partners相互作用パートナー STITCH STITCH_resolve_identifier化合物 ID 解決 HumanBase humanbase_ppi_analysis組織特異的 PPI 解析
参照スキル スキル 関連 scientific-drug-target-profiling標的タンパク質 → PPI 拡張 scientific-network-analysis汎用ネットワーク解析手法 scientific-pathway-enrichmentPPI モジュール → パスウェイ富化 scientific-protein-structure-analysis構造情報 → 相互作用界面 scientific-systems-biologyGRN ↔ PPI 統合
依存パッケージ networkx, requests, pandas, matplotlib, python-louvain (community)