@nahisaho/satori 0.18.0 → 0.20.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +79 -39
- package/package.json +1 -1
- package/src/.github/skills/scientific-admet-pharmacokinetics/SKILL.md +4 -0
- package/src/.github/skills/scientific-biobank-cohort/SKILL.md +268 -0
- package/src/.github/skills/scientific-cancer-genomics/SKILL.md +7 -0
- package/src/.github/skills/scientific-cell-line-resources/SKILL.md +4 -0
- package/src/.github/skills/scientific-chembl-assay-mining/SKILL.md +4 -0
- package/src/.github/skills/scientific-civic-evidence/SKILL.md +292 -0
- package/src/.github/skills/scientific-compound-screening/SKILL.md +4 -0
- package/src/.github/skills/scientific-depmap-dependencies/SKILL.md +239 -0
- package/src/.github/skills/scientific-disease-research/SKILL.md +4 -0
- package/src/.github/skills/scientific-drug-target-profiling/SKILL.md +4 -0
- package/src/.github/skills/scientific-drugbank-resources/SKILL.md +269 -0
- package/src/.github/skills/scientific-gdc-portal/SKILL.md +280 -0
- package/src/.github/skills/scientific-gnomad-variants/SKILL.md +356 -0
- package/src/.github/skills/scientific-immunoinformatics/SKILL.md +4 -0
- package/src/.github/skills/scientific-metabolic-flux/SKILL.md +306 -0
- package/src/.github/skills/scientific-metabolic-modeling/SKILL.md +4 -0
- package/src/.github/skills/scientific-metabolomics/SKILL.md +4 -0
- package/src/.github/skills/scientific-metabolomics-databases/SKILL.md +4 -0
- package/src/.github/skills/scientific-microbiome-metagenomics/SKILL.md +4 -0
- package/src/.github/skills/scientific-monarch-ontology/SKILL.md +260 -0
- package/src/.github/skills/scientific-opentargets-genetics/SKILL.md +299 -0
- package/src/.github/skills/scientific-pharmacology-targets/SKILL.md +10 -0
- package/src/.github/skills/scientific-precision-oncology/SKILL.md +4 -0
- package/src/.github/skills/scientific-protein-interaction-network/SKILL.md +4 -0
- package/src/.github/skills/scientific-rare-disease-genetics/SKILL.md +4 -0
- package/src/.github/skills/scientific-rcsb-pdb-search/SKILL.md +280 -0
- package/src/.github/skills/scientific-reactome-pathways/SKILL.md +242 -0
- package/src/.github/skills/scientific-spatial-multiomics/SKILL.md +293 -0
- package/src/.github/skills/scientific-stitch-chemical-network/SKILL.md +318 -0
- package/src/.github/skills/scientific-string-network-api/SKILL.md +4 -0
- package/src/.github/skills/scientific-uniprot-proteome/SKILL.md +273 -0
- package/src/.github/skills/scientific-variant-interpretation/SKILL.md +4 -0
|
@@ -0,0 +1,260 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: scientific-monarch-ontology
|
|
3
|
+
description: |
|
|
4
|
+
Monarch Initiative 疾患-表現型オントロジースキル。
|
|
5
|
+
Monarch Initiative API を用いた疾患-遺伝子-表現型
|
|
6
|
+
アソシエーション・HPO フェノタイピング・
|
|
7
|
+
遺伝子-疾患推定・オントロジーセマンティック検索。
|
|
8
|
+
ToolUniverse 連携: monarch。
|
|
9
|
+
tu_tools:
|
|
10
|
+
- key: monarch
|
|
11
|
+
name: Monarch Initiative
|
|
12
|
+
description: 疾患-表現型-遺伝子オントロジー統合 API
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
# Scientific Monarch Initiative Ontology
|
|
16
|
+
|
|
17
|
+
Monarch Initiative API を活用した疾患-遺伝子-表現型
|
|
18
|
+
アソシエーション取得・HPO ベースフェノタイピング・
|
|
19
|
+
セマンティックオントロジー検索パイプラインを提供する。
|
|
20
|
+
|
|
21
|
+
## When to Use
|
|
22
|
+
|
|
23
|
+
- 疾患の関連遺伝子・表現型 (HPO) を検索するとき
|
|
24
|
+
- 遺伝子から関連疾患・表現型を逆引きするとき
|
|
25
|
+
- HPO 用語でフェノタイプマッチングするとき
|
|
26
|
+
- オントロジー用語間の意味的類似度を計算するとき
|
|
27
|
+
- 疾患-表現型-遺伝子の三者間アソシエーションを統合するとき
|
|
28
|
+
|
|
29
|
+
---
|
|
30
|
+
|
|
31
|
+
## Quick Start
|
|
32
|
+
|
|
33
|
+
## 1. 疾患-遺伝子-表現型アソシエーション
|
|
34
|
+
|
|
35
|
+
```python
|
|
36
|
+
import requests
|
|
37
|
+
import pandas as pd
|
|
38
|
+
|
|
39
|
+
MONARCH_API = "https://api.monarchinitiative.org/v3/api"
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
def monarch_disease_genes(disease_id, limit=50):
|
|
43
|
+
"""
|
|
44
|
+
Monarch — 疾患→関連遺伝子取得。
|
|
45
|
+
|
|
46
|
+
Parameters:
|
|
47
|
+
disease_id: str — 疾患 ID
|
|
48
|
+
(例: "MONDO:0007254" = breast cancer)
|
|
49
|
+
limit: int — 最大結果数
|
|
50
|
+
"""
|
|
51
|
+
url = f"{MONARCH_API}/association"
|
|
52
|
+
params = {
|
|
53
|
+
"subject": disease_id,
|
|
54
|
+
"category": "biolink:GeneToDiseaseAssociation",
|
|
55
|
+
"limit": limit,
|
|
56
|
+
}
|
|
57
|
+
resp = requests.get(url, params=params, timeout=30)
|
|
58
|
+
resp.raise_for_status()
|
|
59
|
+
data = resp.json()
|
|
60
|
+
|
|
61
|
+
rows = []
|
|
62
|
+
for item in data.get("items", []):
|
|
63
|
+
obj = item.get("object", {})
|
|
64
|
+
rows.append({
|
|
65
|
+
"disease_id": disease_id,
|
|
66
|
+
"gene_id": obj.get("id", ""),
|
|
67
|
+
"gene_label": obj.get("label", ""),
|
|
68
|
+
"relation": item.get("predicate", ""),
|
|
69
|
+
"source": "; ".join(
|
|
70
|
+
item.get("provided_by", [])),
|
|
71
|
+
})
|
|
72
|
+
|
|
73
|
+
df = pd.DataFrame(rows)
|
|
74
|
+
print(f"Monarch disease→genes: {disease_id} "
|
|
75
|
+
f"→ {len(df)} genes")
|
|
76
|
+
return df
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
def monarch_disease_phenotypes(disease_id, limit=100):
|
|
80
|
+
"""
|
|
81
|
+
Monarch — 疾患→表現型 (HPO) 取得。
|
|
82
|
+
|
|
83
|
+
Parameters:
|
|
84
|
+
disease_id: str — 疾患 ID
|
|
85
|
+
limit: int — 最大結果数
|
|
86
|
+
"""
|
|
87
|
+
url = f"{MONARCH_API}/association"
|
|
88
|
+
params = {
|
|
89
|
+
"subject": disease_id,
|
|
90
|
+
"category":
|
|
91
|
+
"biolink:DiseaseToPhenotypicFeatureAssociation",
|
|
92
|
+
"limit": limit,
|
|
93
|
+
}
|
|
94
|
+
resp = requests.get(url, params=params, timeout=30)
|
|
95
|
+
resp.raise_for_status()
|
|
96
|
+
data = resp.json()
|
|
97
|
+
|
|
98
|
+
rows = []
|
|
99
|
+
for item in data.get("items", []):
|
|
100
|
+
obj = item.get("object", {})
|
|
101
|
+
rows.append({
|
|
102
|
+
"disease_id": disease_id,
|
|
103
|
+
"phenotype_id": obj.get("id", ""),
|
|
104
|
+
"phenotype_label": obj.get("label", ""),
|
|
105
|
+
"frequency": item.get("frequency_qualifier",
|
|
106
|
+
""),
|
|
107
|
+
"onset": item.get("onset_qualifier", ""),
|
|
108
|
+
})
|
|
109
|
+
|
|
110
|
+
df = pd.DataFrame(rows)
|
|
111
|
+
print(f"Monarch disease→phenotypes: {disease_id} "
|
|
112
|
+
f"→ {len(df)} HPO terms")
|
|
113
|
+
return df
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
## 2. 遺伝子→疾患逆引き
|
|
117
|
+
|
|
118
|
+
```python
|
|
119
|
+
def monarch_gene_diseases(gene_id, limit=50):
|
|
120
|
+
"""
|
|
121
|
+
Monarch — 遺伝子→関連疾患取得。
|
|
122
|
+
|
|
123
|
+
Parameters:
|
|
124
|
+
gene_id: str — 遺伝子 ID
|
|
125
|
+
(例: "HGNC:1100" = BRCA1)
|
|
126
|
+
limit: int — 最大結果数
|
|
127
|
+
"""
|
|
128
|
+
url = f"{MONARCH_API}/association"
|
|
129
|
+
params = {
|
|
130
|
+
"subject": gene_id,
|
|
131
|
+
"category": "biolink:GeneToDiseaseAssociation",
|
|
132
|
+
"limit": limit,
|
|
133
|
+
}
|
|
134
|
+
resp = requests.get(url, params=params, timeout=30)
|
|
135
|
+
resp.raise_for_status()
|
|
136
|
+
data = resp.json()
|
|
137
|
+
|
|
138
|
+
rows = []
|
|
139
|
+
for item in data.get("items", []):
|
|
140
|
+
obj = item.get("object", {})
|
|
141
|
+
rows.append({
|
|
142
|
+
"gene_id": gene_id,
|
|
143
|
+
"disease_id": obj.get("id", ""),
|
|
144
|
+
"disease_label": obj.get("label", ""),
|
|
145
|
+
"relation": item.get("predicate", ""),
|
|
146
|
+
})
|
|
147
|
+
|
|
148
|
+
df = pd.DataFrame(rows)
|
|
149
|
+
print(f"Monarch gene→diseases: {gene_id} "
|
|
150
|
+
f"→ {len(df)} diseases")
|
|
151
|
+
return df
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
## 3. エンティティ検索・オントロジー用語
|
|
155
|
+
|
|
156
|
+
```python
|
|
157
|
+
def monarch_search(query, category=None, limit=25):
|
|
158
|
+
"""
|
|
159
|
+
Monarch — エンティティテキスト検索。
|
|
160
|
+
|
|
161
|
+
Parameters:
|
|
162
|
+
query: str — 検索クエリ
|
|
163
|
+
category: str — カテゴリフィルタ
|
|
164
|
+
(例: "biolink:Disease", "biolink:Gene",
|
|
165
|
+
"biolink:PhenotypicFeature")
|
|
166
|
+
limit: int — 最大結果数
|
|
167
|
+
"""
|
|
168
|
+
url = f"{MONARCH_API}/search"
|
|
169
|
+
params = {"q": query, "limit": limit}
|
|
170
|
+
if category:
|
|
171
|
+
params["category"] = category
|
|
172
|
+
|
|
173
|
+
resp = requests.get(url, params=params, timeout=30)
|
|
174
|
+
resp.raise_for_status()
|
|
175
|
+
data = resp.json()
|
|
176
|
+
|
|
177
|
+
rows = []
|
|
178
|
+
for item in data.get("items", []):
|
|
179
|
+
rows.append({
|
|
180
|
+
"id": item.get("id", ""),
|
|
181
|
+
"label": item.get("name", ""),
|
|
182
|
+
"category": item.get("category", ""),
|
|
183
|
+
"description": (item.get("description", "")
|
|
184
|
+
or "")[:200],
|
|
185
|
+
})
|
|
186
|
+
|
|
187
|
+
df = pd.DataFrame(rows)
|
|
188
|
+
print(f"Monarch search: '{query}' → {len(df)}")
|
|
189
|
+
return df
|
|
190
|
+
```
|
|
191
|
+
|
|
192
|
+
## 4. Monarch 統合パイプライン
|
|
193
|
+
|
|
194
|
+
```python
|
|
195
|
+
def monarch_pipeline(disease_query,
|
|
196
|
+
output_dir="results"):
|
|
197
|
+
"""
|
|
198
|
+
Monarch 統合パイプライン。
|
|
199
|
+
|
|
200
|
+
Parameters:
|
|
201
|
+
disease_query: str — 疾患名 or ID
|
|
202
|
+
output_dir: str — 出力ディレクトリ
|
|
203
|
+
"""
|
|
204
|
+
from pathlib import Path
|
|
205
|
+
output_dir = Path(output_dir)
|
|
206
|
+
output_dir.mkdir(parents=True, exist_ok=True)
|
|
207
|
+
|
|
208
|
+
# 1) 疾患検索
|
|
209
|
+
diseases = monarch_search(disease_query,
|
|
210
|
+
category="biolink:Disease")
|
|
211
|
+
diseases.to_csv(output_dir / "monarch_diseases.csv",
|
|
212
|
+
index=False)
|
|
213
|
+
|
|
214
|
+
if diseases.empty:
|
|
215
|
+
print(f"Monarch: '{disease_query}' not found")
|
|
216
|
+
return {"diseases": diseases}
|
|
217
|
+
|
|
218
|
+
disease_id = diseases.iloc[0]["id"]
|
|
219
|
+
|
|
220
|
+
# 2) 関連遺伝子
|
|
221
|
+
genes = monarch_disease_genes(disease_id)
|
|
222
|
+
genes.to_csv(output_dir / "monarch_genes.csv",
|
|
223
|
+
index=False)
|
|
224
|
+
|
|
225
|
+
# 3) 表現型 (HPO)
|
|
226
|
+
phenotypes = monarch_disease_phenotypes(disease_id)
|
|
227
|
+
phenotypes.to_csv(
|
|
228
|
+
output_dir / "monarch_phenotypes.csv",
|
|
229
|
+
index=False)
|
|
230
|
+
|
|
231
|
+
print(f"Monarch pipeline: {disease_query} "
|
|
232
|
+
f"→ {output_dir}")
|
|
233
|
+
return {"genes": genes, "phenotypes": phenotypes}
|
|
234
|
+
```
|
|
235
|
+
|
|
236
|
+
---
|
|
237
|
+
|
|
238
|
+
## ToolUniverse 連携
|
|
239
|
+
|
|
240
|
+
| TU Key | ツール名 | 連携内容 |
|
|
241
|
+
|--------|---------|---------|
|
|
242
|
+
| `monarch` | Monarch Initiative | 疾患-表現型-遺伝子オントロジー統合 |
|
|
243
|
+
|
|
244
|
+
## パイプライン統合
|
|
245
|
+
|
|
246
|
+
```
|
|
247
|
+
disease-research → monarch-ontology → rare-disease-genetics
|
|
248
|
+
(GWAS/DisGeNET) (Monarch API) (OMIM/Orphanet)
|
|
249
|
+
│ │ ↓
|
|
250
|
+
variant-interpretation ───┘ ontology-enrichment
|
|
251
|
+
(ClinVar/ACMG) (EFO/OLS/Enrichr)
|
|
252
|
+
```
|
|
253
|
+
|
|
254
|
+
## パイプライン出力
|
|
255
|
+
|
|
256
|
+
| ファイル | 説明 | 次スキル |
|
|
257
|
+
|---------|------|---------|
|
|
258
|
+
| `results/monarch_diseases.csv` | 疾患検索結果 | → disease-research |
|
|
259
|
+
| `results/monarch_genes.csv` | 関連遺伝子 | → variant-interpretation |
|
|
260
|
+
| `results/monarch_phenotypes.csv` | HPO 表現型 | → rare-disease-genetics |
|
|
@@ -0,0 +1,299 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: scientific-opentargets-genetics
|
|
3
|
+
description: |
|
|
4
|
+
Open Targets Platform 遺伝学スキル。Open Targets Platform
|
|
5
|
+
GraphQL API を用いた標的-疾患アソシエーション・薬剤
|
|
6
|
+
エビデンス・L2G 遺伝的関連・ファーマコゲノミクス検索。
|
|
7
|
+
ToolUniverse 連携: opentarget。
|
|
8
|
+
tu_tools:
|
|
9
|
+
- key: opentarget
|
|
10
|
+
name: Open Targets
|
|
11
|
+
description: 標的-疾患アソシエーション GraphQL API
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
# Scientific Open Targets Genetics
|
|
15
|
+
|
|
16
|
+
Open Targets Platform GraphQL API を活用した標的-疾患
|
|
17
|
+
アソシエーションスコア取得・薬剤エビデンス検索・L2G
|
|
18
|
+
遺伝的関連パイプラインを提供する。
|
|
19
|
+
|
|
20
|
+
## When to Use
|
|
21
|
+
|
|
22
|
+
- 遺伝子 (標的) と疾患のアソシエーションスコアを検索するとき
|
|
23
|
+
- 薬剤エビデンスデータを取得するとき
|
|
24
|
+
- GWAS バリアントから遺伝子を L2G スコアでマッピングするとき
|
|
25
|
+
- 標的の安全性プロファイルを確認するとき
|
|
26
|
+
- ファーマコゲノミクスデータを検索するとき
|
|
27
|
+
|
|
28
|
+
---
|
|
29
|
+
|
|
30
|
+
## Quick Start
|
|
31
|
+
|
|
32
|
+
## 1. 標的-疾患アソシエーション
|
|
33
|
+
|
|
34
|
+
```python
|
|
35
|
+
import requests
|
|
36
|
+
import pandas as pd
|
|
37
|
+
|
|
38
|
+
OT_API = ("https://api.platform.opentargets.org"
|
|
39
|
+
"/api/v4/graphql")
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
def ot_target_disease_assoc(target_id, limit=25):
|
|
43
|
+
"""
|
|
44
|
+
Open Targets — 標的-疾患アソシエーション。
|
|
45
|
+
|
|
46
|
+
Parameters:
|
|
47
|
+
target_id: str — Ensembl Gene ID
|
|
48
|
+
(例: "ENSG00000012048" = BRCA1)
|
|
49
|
+
limit: int — 最大結果数
|
|
50
|
+
"""
|
|
51
|
+
query = """
|
|
52
|
+
query targetDisease($id: String!, $size: Int!) {
|
|
53
|
+
target(ensemblId: $id) {
|
|
54
|
+
id
|
|
55
|
+
approvedSymbol
|
|
56
|
+
associatedDiseases(page: {size: $size, index: 0}) {
|
|
57
|
+
count
|
|
58
|
+
rows {
|
|
59
|
+
disease { id name }
|
|
60
|
+
score
|
|
61
|
+
datatypeScores {
|
|
62
|
+
componentId: id
|
|
63
|
+
score
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
"""
|
|
70
|
+
variables = {"id": target_id, "size": limit}
|
|
71
|
+
resp = requests.post(OT_API,
|
|
72
|
+
json={"query": query,
|
|
73
|
+
"variables": variables},
|
|
74
|
+
timeout=30)
|
|
75
|
+
resp.raise_for_status()
|
|
76
|
+
data = resp.json()["data"]["target"]
|
|
77
|
+
|
|
78
|
+
rows = []
|
|
79
|
+
for r in data["associatedDiseases"]["rows"]:
|
|
80
|
+
row = {
|
|
81
|
+
"target_id": target_id,
|
|
82
|
+
"target_symbol": data["approvedSymbol"],
|
|
83
|
+
"disease_id": r["disease"]["id"],
|
|
84
|
+
"disease_name": r["disease"]["name"],
|
|
85
|
+
"overall_score": r["score"],
|
|
86
|
+
}
|
|
87
|
+
for dt in r["datatypeScores"]:
|
|
88
|
+
row[dt["componentId"]] = dt["score"]
|
|
89
|
+
rows.append(row)
|
|
90
|
+
|
|
91
|
+
df = pd.DataFrame(rows)
|
|
92
|
+
total = data["associatedDiseases"]["count"]
|
|
93
|
+
print(f"OT associations: {data['approvedSymbol']} "
|
|
94
|
+
f"→ {len(df)}/{total} diseases")
|
|
95
|
+
return df
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
## 2. 薬剤エビデンス
|
|
99
|
+
|
|
100
|
+
```python
|
|
101
|
+
def ot_drug_evidence(target_id, disease_id, limit=50):
|
|
102
|
+
"""
|
|
103
|
+
Open Targets — 薬剤エビデンス。
|
|
104
|
+
|
|
105
|
+
Parameters:
|
|
106
|
+
target_id: str — Ensembl Gene ID
|
|
107
|
+
disease_id: str — EFO Disease ID
|
|
108
|
+
(例: "EFO_0000305" = breast carcinoma)
|
|
109
|
+
limit: int — 最大結果数
|
|
110
|
+
"""
|
|
111
|
+
query = """
|
|
112
|
+
query drugEvidence($ensemblId: String!,
|
|
113
|
+
$efoId: String!,
|
|
114
|
+
$size: Int!) {
|
|
115
|
+
disease(efoId: $efoId) {
|
|
116
|
+
id
|
|
117
|
+
name
|
|
118
|
+
evidences(
|
|
119
|
+
ensemblIds: [$ensemblId]
|
|
120
|
+
datasourceIds: ["chembl"]
|
|
121
|
+
size: $size
|
|
122
|
+
) {
|
|
123
|
+
count
|
|
124
|
+
rows {
|
|
125
|
+
id
|
|
126
|
+
score
|
|
127
|
+
drug {
|
|
128
|
+
id name drugType
|
|
129
|
+
maximumClinicalTrialPhase
|
|
130
|
+
mechanismsOfAction {
|
|
131
|
+
rows { actionType }
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
clinicalPhase
|
|
135
|
+
clinicalStatus
|
|
136
|
+
urls { niceName url }
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
"""
|
|
142
|
+
variables = {"ensemblId": target_id,
|
|
143
|
+
"efoId": disease_id,
|
|
144
|
+
"size": limit}
|
|
145
|
+
resp = requests.post(OT_API,
|
|
146
|
+
json={"query": query,
|
|
147
|
+
"variables": variables},
|
|
148
|
+
timeout=30)
|
|
149
|
+
resp.raise_for_status()
|
|
150
|
+
data = resp.json()["data"]["disease"]
|
|
151
|
+
|
|
152
|
+
results = []
|
|
153
|
+
for ev in data["evidences"]["rows"]:
|
|
154
|
+
drug = ev.get("drug", {})
|
|
155
|
+
moas = drug.get("mechanismsOfAction", {})
|
|
156
|
+
moa_list = [m["actionType"]
|
|
157
|
+
for m in moas.get("rows", [])]
|
|
158
|
+
results.append({
|
|
159
|
+
"disease": data["name"],
|
|
160
|
+
"drug_id": drug.get("id", ""),
|
|
161
|
+
"drug_name": drug.get("name", ""),
|
|
162
|
+
"drug_type": drug.get("drugType", ""),
|
|
163
|
+
"max_phase": drug.get(
|
|
164
|
+
"maximumClinicalTrialPhase", 0),
|
|
165
|
+
"clinical_phase": ev.get("clinicalPhase", ""),
|
|
166
|
+
"clinical_status": ev.get(
|
|
167
|
+
"clinicalStatus", ""),
|
|
168
|
+
"moa": "; ".join(moa_list),
|
|
169
|
+
"score": ev.get("score", 0),
|
|
170
|
+
})
|
|
171
|
+
|
|
172
|
+
df = pd.DataFrame(results)
|
|
173
|
+
print(f"OT drug evidence: {len(df)} entries")
|
|
174
|
+
return df
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
## 3. L2G 遺伝的関連 (Locus-to-Gene)
|
|
178
|
+
|
|
179
|
+
```python
|
|
180
|
+
def ot_l2g_variants(study_id, limit=50):
|
|
181
|
+
"""
|
|
182
|
+
Open Targets Genetics — L2G バリアント-遺伝子マッピング。
|
|
183
|
+
|
|
184
|
+
Parameters:
|
|
185
|
+
study_id: str — GWAS Study ID
|
|
186
|
+
(例: "GCST004988")
|
|
187
|
+
limit: int — 最大結果数
|
|
188
|
+
"""
|
|
189
|
+
# OT Genetics API
|
|
190
|
+
OT_GENETICS = ("https://api.genetics.opentargets.org"
|
|
191
|
+
"/graphql")
|
|
192
|
+
query = """
|
|
193
|
+
query l2g($studyId: String!, $size: Int!) {
|
|
194
|
+
studyLocus2GeneTable(studyId: $studyId,
|
|
195
|
+
pageSize: $size) {
|
|
196
|
+
rows {
|
|
197
|
+
gene { id symbol }
|
|
198
|
+
variant { id rsId }
|
|
199
|
+
yProbaModel
|
|
200
|
+
yProbaDistance
|
|
201
|
+
yProbaInteraction
|
|
202
|
+
yProbaMolecularQTL
|
|
203
|
+
yProbaPathogenicity
|
|
204
|
+
hasColoc
|
|
205
|
+
distanceToLocus
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
"""
|
|
210
|
+
variables = {"studyId": study_id, "size": limit}
|
|
211
|
+
resp = requests.post(OT_GENETICS,
|
|
212
|
+
json={"query": query,
|
|
213
|
+
"variables": variables},
|
|
214
|
+
timeout=30)
|
|
215
|
+
resp.raise_for_status()
|
|
216
|
+
data = resp.json()["data"]["studyLocus2GeneTable"]
|
|
217
|
+
|
|
218
|
+
rows = []
|
|
219
|
+
for r in data["rows"]:
|
|
220
|
+
rows.append({
|
|
221
|
+
"gene_id": r["gene"]["id"],
|
|
222
|
+
"gene_symbol": r["gene"]["symbol"],
|
|
223
|
+
"variant_id": r["variant"]["id"],
|
|
224
|
+
"rsid": r["variant"]["rsId"],
|
|
225
|
+
"l2g_score": r["yProbaModel"],
|
|
226
|
+
"distance_score": r["yProbaDistance"],
|
|
227
|
+
"interaction_score": r["yProbaInteraction"],
|
|
228
|
+
"qtl_score": r["yProbaMolecularQTL"],
|
|
229
|
+
"pathogenicity": r["yProbaPathogenicity"],
|
|
230
|
+
"has_coloc": r["hasColoc"],
|
|
231
|
+
})
|
|
232
|
+
|
|
233
|
+
df = pd.DataFrame(rows)
|
|
234
|
+
if not df.empty:
|
|
235
|
+
df = df.sort_values("l2g_score", ascending=False)
|
|
236
|
+
print(f"OT L2G: {study_id} → {len(df)} gene mappings")
|
|
237
|
+
return df
|
|
238
|
+
```
|
|
239
|
+
|
|
240
|
+
## 4. Open Targets 統合パイプライン
|
|
241
|
+
|
|
242
|
+
```python
|
|
243
|
+
def ot_pipeline(gene_symbol, ensembl_id,
|
|
244
|
+
output_dir="results"):
|
|
245
|
+
"""
|
|
246
|
+
Open Targets 統合パイプライン。
|
|
247
|
+
|
|
248
|
+
Parameters:
|
|
249
|
+
gene_symbol: str — 遺伝子シンボル (例: "BRCA1")
|
|
250
|
+
ensembl_id: str — Ensembl Gene ID
|
|
251
|
+
output_dir: str — 出力ディレクトリ
|
|
252
|
+
"""
|
|
253
|
+
from pathlib import Path
|
|
254
|
+
output_dir = Path(output_dir)
|
|
255
|
+
output_dir.mkdir(parents=True, exist_ok=True)
|
|
256
|
+
|
|
257
|
+
# 1) 標的-疾患アソシエーション
|
|
258
|
+
assoc = ot_target_disease_assoc(ensembl_id)
|
|
259
|
+
assoc.to_csv(output_dir / "ot_associations.csv",
|
|
260
|
+
index=False)
|
|
261
|
+
|
|
262
|
+
# 2) トップ疾患の薬剤エビデンス
|
|
263
|
+
if not assoc.empty:
|
|
264
|
+
top_disease = assoc.iloc[0]["disease_id"]
|
|
265
|
+
drugs = ot_drug_evidence(ensembl_id, top_disease)
|
|
266
|
+
drugs.to_csv(output_dir / "ot_drugs.csv",
|
|
267
|
+
index=False)
|
|
268
|
+
|
|
269
|
+
print(f"OT pipeline: {gene_symbol} → {output_dir}")
|
|
270
|
+
return {"associations": assoc}
|
|
271
|
+
```
|
|
272
|
+
|
|
273
|
+
---
|
|
274
|
+
|
|
275
|
+
## ToolUniverse 連携
|
|
276
|
+
|
|
277
|
+
| TU Key | ツール名 | 連携内容 |
|
|
278
|
+
|--------|---------|---------|
|
|
279
|
+
| `opentarget` | Open Targets | 標的-疾患アソシエーション GraphQL (~55 tools) |
|
|
280
|
+
|
|
281
|
+
## パイプライン統合
|
|
282
|
+
|
|
283
|
+
```
|
|
284
|
+
disease-research → opentargets-genetics → drug-target-profiling
|
|
285
|
+
(疾患遺伝子) (OT Platform API) (標的プロファイリング)
|
|
286
|
+
│ │ ↓
|
|
287
|
+
variant-interpretation ────┘ pharmacogenomics
|
|
288
|
+
(ClinVar/VEP) │ (薬理ゲノミクス)
|
|
289
|
+
↓
|
|
290
|
+
gnomad-variants
|
|
291
|
+
(集団頻度)
|
|
292
|
+
```
|
|
293
|
+
|
|
294
|
+
## パイプライン出力
|
|
295
|
+
|
|
296
|
+
| ファイル | 説明 | 次スキル |
|
|
297
|
+
|---------|------|---------|
|
|
298
|
+
| `results/ot_associations.csv` | 標的-疾患スコア | → disease-research |
|
|
299
|
+
| `results/ot_drugs.csv` | 薬剤エビデンス | → drug-target-profiling |
|
|
@@ -4,6 +4,16 @@ description: |
|
|
|
4
4
|
薬理学的ターゲットプロファイリングスキル。BindingDB 結合親和性、
|
|
5
5
|
GPCRdb GPCR 構造-活性、GtoPdb 薬理学、BRENDA 酵素動態、
|
|
6
6
|
Pharos 未解明ターゲット(TDL)の統合解析パイプライン。
|
|
7
|
+
tu_tools:
|
|
8
|
+
- key: bindingdb
|
|
9
|
+
name: BindingDB
|
|
10
|
+
description: 結合親和性データベース
|
|
11
|
+
- key: gtopdb
|
|
12
|
+
name: GtoPdb
|
|
13
|
+
description: Guide to PHARMACOLOGY
|
|
14
|
+
- key: brenda
|
|
15
|
+
name: BRENDA
|
|
16
|
+
description: 酵素動態データベース
|
|
7
17
|
---
|
|
8
18
|
|
|
9
19
|
# Scientific Pharmacology Targets
|
|
@@ -4,6 +4,10 @@ description: |
|
|
|
4
4
|
精密腫瘍学スキル。CIViC・OncoKB・cBioPortal・COSMIC・GDC/TCGA を統合し、
|
|
5
5
|
腫瘍ゲノムプロファイリング・分子標的選定・バイオマーカー評価・治療推奨を支援。
|
|
6
6
|
「がんゲノム解析して」「腫瘍プロファイリングして」「OncoKB で検索して」で発火。
|
|
7
|
+
tu_tools:
|
|
8
|
+
- key: oncokb
|
|
9
|
+
name: OncoKB
|
|
10
|
+
description: 精密腫瘍学アノテーション
|
|
7
11
|
---
|
|
8
12
|
|
|
9
13
|
# Scientific Precision Oncology
|
|
@@ -6,6 +6,10 @@ description: |
|
|
|
6
6
|
ネットワーク構築・解析パイプライン。GO/KEGG 富化、相互作用パートナー発見、
|
|
7
7
|
組織特異的ネットワーク (HumanBase)、化合物-標的ネットワーク対応。
|
|
8
8
|
14 の ToolUniverse SMCP ツールと連携。
|
|
9
|
+
tu_tools:
|
|
10
|
+
- key: intact
|
|
11
|
+
name: IntAct
|
|
12
|
+
description: 分子相互作用データベース (EBI)
|
|
9
13
|
---
|
|
10
14
|
|
|
11
15
|
# Scientific Protein Interaction Network
|