@nahisaho/satori 0.17.0 → 0.19.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.
Files changed (24) hide show
  1. package/README.md +85 -38
  2. package/package.json +1 -1
  3. package/src/.github/skills/scientific-alphafold-structures/SKILL.md +256 -0
  4. package/src/.github/skills/scientific-arrayexpress-expression/SKILL.md +264 -0
  5. package/src/.github/skills/scientific-civic-evidence/SKILL.md +292 -0
  6. package/src/.github/skills/scientific-compound-screening/SKILL.md +4 -0
  7. package/src/.github/skills/scientific-crossref-metadata/SKILL.md +313 -0
  8. package/src/.github/skills/scientific-depmap-dependencies/SKILL.md +239 -0
  9. package/src/.github/skills/scientific-disease-research/SKILL.md +4 -0
  10. package/src/.github/skills/scientific-drugbank-resources/SKILL.md +269 -0
  11. package/src/.github/skills/scientific-gnomad-variants/SKILL.md +356 -0
  12. package/src/.github/skills/scientific-gtex-tissue-expression/SKILL.md +271 -0
  13. package/src/.github/skills/scientific-gwas-catalog/SKILL.md +267 -0
  14. package/src/.github/skills/scientific-icgc-cancer-data/SKILL.md +351 -0
  15. package/src/.github/skills/scientific-metabolomics-databases/SKILL.md +4 -0
  16. package/src/.github/skills/scientific-opentargets-genetics/SKILL.md +299 -0
  17. package/src/.github/skills/scientific-pharmgkb-pgx/SKILL.md +306 -0
  18. package/src/.github/skills/scientific-protein-interaction-network/SKILL.md +4 -0
  19. package/src/.github/skills/scientific-rare-disease-genetics/SKILL.md +4 -0
  20. package/src/.github/skills/scientific-rcsb-pdb-search/SKILL.md +280 -0
  21. package/src/.github/skills/scientific-reactome-pathways/SKILL.md +242 -0
  22. package/src/.github/skills/scientific-semantic-scholar/SKILL.md +298 -0
  23. package/src/.github/skills/scientific-uniprot-proteome/SKILL.md +273 -0
  24. package/src/.github/skills/scientific-variant-interpretation/SKILL.md +4 -0
@@ -0,0 +1,313 @@
1
+ ---
2
+ name: scientific-crossref-metadata
3
+ description: |
4
+ CrossRef メタデータスキル。CrossRef REST API による
5
+ DOI 解決・論文メタデータ・引用数・ジャーナル情報・
6
+ 助成金情報検索。ToolUniverse 連携: crossref。
7
+ tu_tools:
8
+ - key: crossref
9
+ name: CrossRef
10
+ description: DOI 解決・論文メタデータ・引用数・ジャーナル情報
11
+ ---
12
+
13
+ # Scientific CrossRef Metadata
14
+
15
+ CrossRef REST API を活用した学術文献 DOI 解決・メタデータ検索・
16
+ 引用分析・ジャーナル情報・助成金レジストリ検索パイプラインを
17
+ 提供する。
18
+
19
+ ## When to Use
20
+
21
+ - DOI から論文メタデータを取得するとき
22
+ - 学術文献をタイトル・著者で検索するとき
23
+ - ジャーナルの ISSN やインパクト情報を調べるとき
24
+ - 論文の引用数・被引用数を確認するとき
25
+ - 研究助成金の情報を検索するとき
26
+ - 参考文献リストのメタデータを一括取得するとき
27
+ - 特定出版社やジャーナルの出版傾向を分析するとき
28
+
29
+ ---
30
+
31
+ ## Quick Start
32
+
33
+ ## 1. DOI 解決・論文メタデータ
34
+
35
+ ```python
36
+ import requests
37
+ import pandas as pd
38
+
39
+ CR_BASE = "https://api.crossref.org"
40
+ CR_HEADERS = {
41
+ "User-Agent": "SATORI/0.18.0 (mailto:your@email.com)",
42
+ }
43
+
44
+
45
+ def crossref_resolve_doi(doi):
46
+ """
47
+ CrossRef — DOI からメタデータ取得。
48
+
49
+ Parameters:
50
+ doi: str — DOI (例: "10.1038/s41586-020-2649-2")
51
+ """
52
+ url = f"{CR_BASE}/works/{doi}"
53
+ resp = requests.get(url, headers=CR_HEADERS, timeout=30)
54
+ resp.raise_for_status()
55
+ item = resp.json().get("message", {})
56
+
57
+ authors = []
58
+ for a in item.get("author", []):
59
+ name = f"{a.get('given', '')} {a.get('family', '')}"
60
+ authors.append(name.strip())
61
+
62
+ result = {
63
+ "doi": item.get("DOI", ""),
64
+ "title": " ".join(item.get("title", [])),
65
+ "authors": "; ".join(authors[:10]),
66
+ "journal": " ".join(
67
+ item.get("container-title", [])),
68
+ "publisher": item.get("publisher", ""),
69
+ "type": item.get("type", ""),
70
+ "published_date": _cr_date(
71
+ item.get("published-print") or
72
+ item.get("published-online")),
73
+ "citation_count": item.get(
74
+ "is-referenced-by-count", 0),
75
+ "reference_count": item.get("reference-count", 0),
76
+ "issn": ", ".join(item.get("ISSN", [])),
77
+ "url": item.get("URL", ""),
78
+ "abstract": (item.get("abstract") or "")[:500],
79
+ "funder": "; ".join(
80
+ f.get("name", "")
81
+ for f in item.get("funder", [])),
82
+ "license": _cr_license(item),
83
+ }
84
+
85
+ print(f"CrossRef DOI: {doi}")
86
+ print(f" {result['title'][:80]}")
87
+ print(f" Citations: {result['citation_count']}")
88
+ return result
89
+
90
+
91
+ def _cr_date(date_obj):
92
+ if not date_obj:
93
+ return ""
94
+ parts = date_obj.get("date-parts", [[]])[0]
95
+ return "-".join(str(p) for p in parts)
96
+
97
+
98
+ def _cr_license(item):
99
+ licenses = item.get("license", [])
100
+ if licenses:
101
+ return licenses[0].get("content-version", "")
102
+ return ""
103
+ ```
104
+
105
+ ## 2. 論文検索
106
+
107
+ ```python
108
+ def crossref_search_works(query, limit=50,
109
+ sort="relevance",
110
+ filter_type=None,
111
+ from_date=None):
112
+ """
113
+ CrossRef — 論文検索。
114
+
115
+ Parameters:
116
+ query: str — 検索クエリ
117
+ limit: int — 最大結果数
118
+ sort: str — ソート ("relevance", "published",
119
+ "is-referenced-by-count")
120
+ filter_type: str — 文献タイプフィルタ
121
+ (例: "journal-article")
122
+ from_date: str — 開始日 (例: "2020-01-01")
123
+ """
124
+ url = f"{CR_BASE}/works"
125
+ params = {
126
+ "query": query,
127
+ "rows": min(limit, 1000),
128
+ "sort": sort,
129
+ }
130
+
131
+ filters = []
132
+ if filter_type:
133
+ filters.append(f"type:{filter_type}")
134
+ if from_date:
135
+ filters.append(f"from-pub-date:{from_date}")
136
+ if filters:
137
+ params["filter"] = ",".join(filters)
138
+
139
+ resp = requests.get(url, params=params,
140
+ headers=CR_HEADERS, timeout=30)
141
+ resp.raise_for_status()
142
+ data = resp.json().get("message", {})
143
+
144
+ results = []
145
+ for item in data.get("items", []):
146
+ authors = []
147
+ for a in item.get("author", []):
148
+ name = f"{a.get('given', '')} {a.get('family', '')}"
149
+ authors.append(name.strip())
150
+ results.append({
151
+ "doi": item.get("DOI", ""),
152
+ "title": " ".join(item.get("title", [])),
153
+ "authors": "; ".join(authors[:5]),
154
+ "journal": " ".join(
155
+ item.get("container-title", [])),
156
+ "year": _cr_date(
157
+ item.get("published-print") or
158
+ item.get("published-online")),
159
+ "citations": item.get(
160
+ "is-referenced-by-count", 0),
161
+ "type": item.get("type", ""),
162
+ })
163
+
164
+ df = pd.DataFrame(results)
165
+ total = data.get("total-results", 0)
166
+ print(f"CrossRef search: {len(df)}/{total} works "
167
+ f"(query='{query}')")
168
+ return df
169
+ ```
170
+
171
+ ## 3. ジャーナル情報・助成金検索
172
+
173
+ ```python
174
+ def crossref_journal_info(issn):
175
+ """
176
+ CrossRef — ジャーナル情報取得。
177
+
178
+ Parameters:
179
+ issn: str — ISSN (例: "0028-0836")
180
+ """
181
+ url = f"{CR_BASE}/journals/{issn}"
182
+ resp = requests.get(url, headers=CR_HEADERS, timeout=30)
183
+ resp.raise_for_status()
184
+ data = resp.json().get("message", {})
185
+
186
+ counts = data.get("counts", {})
187
+ result = {
188
+ "issn": issn,
189
+ "title": data.get("title", ""),
190
+ "publisher": data.get("publisher", ""),
191
+ "subjects": "; ".join(
192
+ s.get("name", "")
193
+ for s in data.get("subjects", [])),
194
+ "total_dois": counts.get("total-dois", 0),
195
+ "current_dois": counts.get("current-dois", 0),
196
+ "backfile_dois": counts.get("backfile-dois", 0),
197
+ }
198
+
199
+ print(f"CrossRef journal: {result['title']} "
200
+ f"({result['total_dois']} DOIs)")
201
+ return result
202
+
203
+
204
+ def crossref_search_funders(query, limit=20):
205
+ """
206
+ CrossRef — 助成金機関検索。
207
+
208
+ Parameters:
209
+ query: str — 機関名 (例: "NIH", "JSPS")
210
+ limit: int — 最大結果数
211
+ """
212
+ url = f"{CR_BASE}/funders"
213
+ params = {"query": query, "rows": limit}
214
+ resp = requests.get(url, params=params,
215
+ headers=CR_HEADERS, timeout=30)
216
+ resp.raise_for_status()
217
+ data = resp.json().get("message", {})
218
+
219
+ results = []
220
+ for item in data.get("items", []):
221
+ results.append({
222
+ "funder_id": item.get("id", ""),
223
+ "name": item.get("name", ""),
224
+ "location": item.get("location", ""),
225
+ "alt_names": "; ".join(
226
+ item.get("alt-names", [])[:3]),
227
+ "work_count": item.get("work-count", 0),
228
+ })
229
+
230
+ df = pd.DataFrame(results)
231
+ print(f"CrossRef funders: {len(df)} (query='{query}')")
232
+ return df
233
+ ```
234
+
235
+ ## 4. CrossRef 統合パイプライン
236
+
237
+ ```python
238
+ def crossref_pipeline(query, dois=None,
239
+ output_dir="results"):
240
+ """
241
+ CrossRef 統合パイプライン。
242
+
243
+ Parameters:
244
+ query: str — 検索クエリ
245
+ dois: list[str] — DOI リスト (直接解決)
246
+ output_dir: str — 出力ディレクトリ
247
+ """
248
+ from pathlib import Path
249
+ output_dir = Path(output_dir)
250
+ output_dir.mkdir(parents=True, exist_ok=True)
251
+
252
+ # 1) 論文検索
253
+ works = crossref_search_works(query)
254
+ works.to_csv(output_dir / "works.csv", index=False)
255
+
256
+ # 2) DOI 一括解決
257
+ if dois:
258
+ resolved = []
259
+ for doi in dois:
260
+ try:
261
+ meta = crossref_resolve_doi(doi)
262
+ resolved.append(meta)
263
+ except Exception as e:
264
+ print(f" Warning: {doi} — {e}")
265
+ continue
266
+ resolved_df = pd.DataFrame(resolved)
267
+ resolved_df.to_csv(output_dir / "doi_resolved.csv",
268
+ index=False)
269
+
270
+ # 3) 引用分析
271
+ if not works.empty:
272
+ stats = {
273
+ "total_works": len(works),
274
+ "total_citations": works["citations"].sum(),
275
+ "mean_citations": works["citations"].mean(),
276
+ "median_citations": works["citations"].median(),
277
+ "max_citations": works["citations"].max(),
278
+ }
279
+ pd.DataFrame([stats]).to_csv(
280
+ output_dir / "citation_stats.csv", index=False)
281
+
282
+ print(f"CrossRef pipeline: {output_dir}")
283
+ return {"works": works}
284
+ ```
285
+
286
+ ---
287
+
288
+ ## ToolUniverse 連携
289
+
290
+ | TU Key | ツール名 | 連携内容 |
291
+ |--------|---------|---------|
292
+ | `crossref` | CrossRef | DOI 解決・メタデータ・引用・ジャーナル情報 |
293
+
294
+ ## パイプライン統合
295
+
296
+ ```
297
+ literature-search → crossref-metadata → citation-checker
298
+ (PubMed/NCBI) (CrossRef REST API) (引用品質検証)
299
+ │ │ ↓
300
+ semantic-scholar ──────┘ deep-research
301
+ (S2 Academic Graph) │ (知識統合)
302
+
303
+ bibliometrics
304
+ (書誌計量分析)
305
+ ```
306
+
307
+ ## パイプライン出力
308
+
309
+ | ファイル | 説明 | 次スキル |
310
+ |---------|------|---------|
311
+ | `results/works.csv` | 論文検索結果 | → semantic-scholar |
312
+ | `results/doi_resolved.csv` | DOI メタデータ | → citation-checker |
313
+ | `results/citation_stats.csv` | 引用統計 | → bibliometrics |
@@ -0,0 +1,239 @@
1
+ ---
2
+ name: scientific-depmap-dependencies
3
+ description: |
4
+ DepMap 依存性スキル。Cancer Dependency Map (DepMap) Portal
5
+ API によるがん細胞株 CRISPR/RNAi 依存性スコア・薬剤
6
+ 感受性データ・遺伝子効果取得。ToolUniverse 連携: depmap。
7
+ tu_tools:
8
+ - key: depmap
9
+ name: DepMap
10
+ description: がん細胞株依存性マップ API
11
+ ---
12
+
13
+ # Scientific DepMap Dependencies
14
+
15
+ Cancer Dependency Map (DepMap) Portal API を活用した
16
+ がん細胞株の CRISPR/RNAi 遺伝子依存性スコア取得・
17
+ 薬剤感受性データ・遺伝子効果パイプラインを提供する。
18
+
19
+ ## When to Use
20
+
21
+ - がん細胞株の遺伝子依存性 (CRISPR/RNAi) を調べるとき
22
+ - 遺伝子のがん選択的必須性を評価するとき
23
+ - 薬剤感受性データと遺伝子発現の相関を調べるとき
24
+ - 細胞株メタデータ (組織型・疾患サブタイプ) を取得するとき
25
+ - Cell Model Passports データを参照するとき
26
+
27
+ ---
28
+
29
+ ## Quick Start
30
+
31
+ ## 1. DepMap 細胞株検索・メタデータ
32
+
33
+ ```python
34
+ import requests
35
+ import pandas as pd
36
+
37
+ DEPMAP_API = "https://api.cellmodelpassports.sanger.ac.uk/v1"
38
+
39
+
40
+ def depmap_cell_lines(tissue=None, cancer_type=None,
41
+ limit=50):
42
+ """
43
+ DepMap / Cell Model Passports — 細胞株検索。
44
+
45
+ Parameters:
46
+ tissue: str — 組織型フィルタ (例: "Breast")
47
+ cancer_type: str — がん種フィルタ
48
+ (例: "Breast Carcinoma")
49
+ limit: int — 最大結果数
50
+ """
51
+ url = f"{DEPMAP_API}/models"
52
+ params = {"page_size": limit}
53
+ if tissue:
54
+ params["tissue"] = tissue
55
+ if cancer_type:
56
+ params["cancer_type"] = cancer_type
57
+
58
+ resp = requests.get(url, params=params, timeout=30)
59
+ resp.raise_for_status()
60
+ data = resp.json()
61
+
62
+ rows = []
63
+ for model in data.get("data", data
64
+ if isinstance(data, list)
65
+ else []):
66
+ if isinstance(model, dict):
67
+ rows.append({
68
+ "model_id": model.get("model_id", ""),
69
+ "model_name": model.get("model_name", ""),
70
+ "tissue": model.get("tissue", ""),
71
+ "cancer_type": model.get(
72
+ "cancer_type", ""),
73
+ "sample_site": model.get(
74
+ "sample_site", ""),
75
+ "gender": model.get("gender", ""),
76
+ })
77
+
78
+ df = pd.DataFrame(rows[:limit])
79
+ print(f"DepMap cell lines: {len(df)} models")
80
+ return df
81
+ ```
82
+
83
+ ## 2. CRISPR 遺伝子依存性スコア
84
+
85
+ ```python
86
+ def depmap_gene_dependency(gene_symbol,
87
+ dataset="Chronos_Combined"):
88
+ """
89
+ DepMap — 遺伝子依存性スコア取得。
90
+
91
+ Parameters:
92
+ gene_symbol: str — 遺伝子シンボル (例: "KRAS")
93
+ dataset: str — データセット名
94
+ (例: "Chronos_Combined", "RNAi_merged")
95
+ """
96
+ # DepMap Public Portal download URL
97
+ DEPMAP_PORTAL = "https://depmap.org/portal/api"
98
+
99
+ url = f"{DEPMAP_PORTAL}/dataset/search"
100
+ params = {"gene": gene_symbol,
101
+ "dataset": dataset}
102
+
103
+ try:
104
+ resp = requests.get(url, params=params,
105
+ timeout=30)
106
+ resp.raise_for_status()
107
+ data = resp.json()
108
+ except Exception:
109
+ # Fallback: alternative DepMap API
110
+ print(f" DepMap portal fallback for "
111
+ f"{gene_symbol}")
112
+ data = []
113
+
114
+ rows = []
115
+ if isinstance(data, list):
116
+ for entry in data:
117
+ if isinstance(entry, dict):
118
+ rows.append({
119
+ "gene": gene_symbol,
120
+ "cell_line": entry.get(
121
+ "cell_line_name", ""),
122
+ "depmap_id": entry.get(
123
+ "depmap_id", ""),
124
+ "dependency_score": entry.get(
125
+ "dependency", 0),
126
+ "dataset": dataset,
127
+ })
128
+
129
+ df = pd.DataFrame(rows)
130
+ if not df.empty:
131
+ df = df.sort_values("dependency_score")
132
+ print(f"DepMap dependency: {gene_symbol} "
133
+ f"→ {len(df)} cell lines")
134
+ return df
135
+ ```
136
+
137
+ ## 3. 薬剤感受性データ
138
+
139
+ ```python
140
+ def depmap_drug_sensitivity(compound_name=None,
141
+ limit=100):
142
+ """
143
+ DepMap — 薬剤感受性データ取得。
144
+
145
+ Parameters:
146
+ compound_name: str — 化合物名フィルタ
147
+ (例: "Paclitaxel")
148
+ limit: int — 最大結果数
149
+ """
150
+ url = f"{DEPMAP_API}/drugs"
151
+ params = {"page_size": limit}
152
+ if compound_name:
153
+ params["name"] = compound_name
154
+
155
+ resp = requests.get(url, params=params, timeout=30)
156
+ resp.raise_for_status()
157
+ data = resp.json()
158
+
159
+ rows = []
160
+ for drug in data.get("data", data
161
+ if isinstance(data, list)
162
+ else []):
163
+ if isinstance(drug, dict):
164
+ rows.append({
165
+ "drug_id": drug.get("drug_id", ""),
166
+ "drug_name": drug.get("drug_name", ""),
167
+ "target": drug.get("target", ""),
168
+ "pathway": drug.get("pathway", ""),
169
+ "n_cell_lines": drug.get(
170
+ "n_cell_lines_tested", 0),
171
+ })
172
+
173
+ df = pd.DataFrame(rows[:limit])
174
+ print(f"DepMap drugs: {len(df)} compounds")
175
+ return df
176
+ ```
177
+
178
+ ## 4. DepMap 統合パイプライン
179
+
180
+ ```python
181
+ def depmap_pipeline(gene_symbol,
182
+ output_dir="results"):
183
+ """
184
+ DepMap 統合パイプライン。
185
+
186
+ Parameters:
187
+ gene_symbol: str — 遺伝子シンボル
188
+ output_dir: str — 出力ディレクトリ
189
+ """
190
+ from pathlib import Path
191
+ output_dir = Path(output_dir)
192
+ output_dir.mkdir(parents=True, exist_ok=True)
193
+
194
+ # 1) 遺伝子依存性
195
+ deps = depmap_gene_dependency(gene_symbol)
196
+ deps.to_csv(output_dir / "depmap_dependency.csv",
197
+ index=False)
198
+
199
+ # 2) 関連薬剤
200
+ drugs = depmap_drug_sensitivity()
201
+ drugs.to_csv(output_dir / "depmap_drugs.csv",
202
+ index=False)
203
+
204
+ # 3) 依存性の高い細胞株
205
+ if not deps.empty:
206
+ top_dependent = deps.head(10)
207
+ top_dependent.to_csv(
208
+ output_dir / "depmap_top_dependent.csv",
209
+ index=False)
210
+
211
+ print(f"DepMap pipeline: {gene_symbol} → {output_dir}")
212
+ return {"dependency": deps, "drugs": drugs}
213
+ ```
214
+
215
+ ---
216
+
217
+ ## ToolUniverse 連携
218
+
219
+ | TU Key | ツール名 | 連携内容 |
220
+ |--------|---------|---------|
221
+ | `depmap` | DepMap | がん細胞株依存性マップ API |
222
+
223
+ ## パイプライン統合
224
+
225
+ ```
226
+ cancer-genomics → depmap-dependencies → precision-oncology
227
+ (がんゲノム) (DepMap Portal) (精密腫瘍学)
228
+ │ │ ↓
229
+ expression-analysis ──────┘ drug-target-profiling
230
+ (発現リスト) (標的プロファイリング)
231
+ ```
232
+
233
+ ## パイプライン出力
234
+
235
+ | ファイル | 説明 | 次スキル |
236
+ |---------|------|---------|
237
+ | `results/depmap_dependency.csv` | 依存性スコア | → cancer-genomics |
238
+ | `results/depmap_drugs.csv` | 薬剤感受性 | → drug-target-profiling |
239
+ | `results/depmap_top_dependent.csv` | 依存細胞株 | → precision-oncology |
@@ -5,6 +5,10 @@ description: |
5
5
  疾患-遺伝子関連解析・希少疾患診断支援・表現型-遺伝型マッピング・
6
6
  疫学的特性評価を支援。
7
7
  「疾患と遺伝子の関連を調べて」「希少疾患を診断して」「GWAS 結果を解析して」で発火。
8
+ tu_tools:
9
+ - key: disgenet
10
+ name: DisGeNET
11
+ description: 疾患-遺伝子関連スコア (GDA) データベース
8
12
  ---
9
13
 
10
14
  # Scientific Disease Research