| name | scientific-precision-oncology |
| description | 精密腫瘍学スキル。CIViC・OncoKB・cBioPortal・COSMIC・GDC/TCGA を統合し、
腫瘍ゲノムプロファイリング・分子標的選定・バイオマーカー評価・治療推奨を支援。
「がんゲノム解析して」「腫瘍プロファイリングして」「OncoKB で検索して」で発火。
|
| tu_tools | [{"key":"oncokb","name":"OncoKB","description":"精密腫瘍学アノテーション"}] |
Scientific Precision Oncology
精密腫瘍学(Precision Oncology)のための統合解析スキル。
腫瘍ゲノムデータベース(CIViC, OncoKB, cBioPortal, COSMIC, GDC/TCGA)を
横断的に活用し、分子特性に基づく治療戦略の立案を支援する。
When to Use
- 腫瘍体細胞変異のアクショナビリティ評価
- CIViC / OncoKB エビデンスレベル検索
- cBioPortal / TCGA 変異頻度・共起解析
- バイオマーカー駆動の治療推奨
- 分子標的治療のエビデンス統合
- がん種横断的なドライバー変異分析
Quick Start
精密腫瘍学パイプライン
Phase 1: Tumor Profiling
- 体細胞変異・CNV・融合遺伝子の同定
- TMB (Tumor Mutational Burden) 算出
- MSI (Microsatellite Instability) 判定
↓
Phase 2: Variant Annotation
- CIViC GraphQL API クエリ
- OncoKB Annotation API
- COSMIC / cBioPortal 変異頻度
↓
Phase 3: Actionability Assessment
- OncoKB Evidence Level (1-4, R1-R2)
- CIViC Evidence Rating (A-E)
- AMP/ASCO/CAP Tiering (I-IV)
↓
Phase 4: Treatment Selection
- 分子標的薬マッチング
- 併用療法候補の同定
- 耐性メカニズムの評価
↓
Phase 5: Clinical Trial Matching
- ClinicalTrials.gov API 検索
- 適格基準の自動マッチング
- バイオマーカー駆動試験の優先順位付け
↓
Phase 6: Molecular Tumor Board Report
- 統合ゲノムレポート生成
- 治療推奨サマリー
- エビデンステーブル
Workflow
1. CIViC (Clinical Interpretation of Variants in Cancer)
import requests
import pandas as pd
CIVIC_URL = "https://civicdb.org/api/graphql"
def query_civic_variant(gene, variant_name):
"""CIViC で遺伝子バリアントのエビデンスを検索"""
query = """
query($gene: String!) {
genes(name: $gene) {
nodes {
name
description
variants {
nodes {
name
variantTypes { name }
evidenceItems {
nodes {
status
evidenceType
evidenceLevel
evidenceDirection
significance
disease { name }
therapies { name }
source { citation }
}
}
}
}
}
}
}
"""
resp = requests.post(CIVIC_URL, json={"query": query, "variables": {"gene": gene}})
data = resp.json()["data"]["genes"]["nodes"]
results = []
for g in data:
for v in g["variants"]["nodes"]:
if variant_name.upper() in v["name"].upper():
for ev in v["evidenceItems"]["nodes"]:
if ev["status"] == "accepted":
results.append({
"gene": g["name"],
"variant": v["name"],
"type": ev["evidenceType"],
"level": ev["evidenceLevel"],
"direction": ev["evidenceDirection"],
"significance": ev["significance"],
"disease": ev["disease"]["name"] if ev["disease"] else "",
"therapies": ", ".join(t["name"] for t in ev["therapies"]),
"citation": ev["source"]["citation"] if ev["source"] else "",
})
return pd.DataFrame(results)
civic_results = query_civic_variant("BRAF", "V600E")
print(f"CIViC evidence items: {len(civic_results)}")
print(civic_results[["gene", "variant", "level", "significance", "therapies"]].head(10))
2. OncoKB Annotation
ONCOKB_URL = "https://www.oncokb.org/api/v1"
ONCOKB_TOKEN = "YOUR_ONCOKB_TOKEN"
def annotate_oncokb(gene, variant, tumor_type=None):
"""OncoKB でバリアントをアノテーション"""
headers = {"Authorization": f"Bearer {ONCOKB_TOKEN}"}
params = {"hugoSymbol": gene, "alteration": variant}
if tumor_type:
params["tumorType"] = tumor_type
resp = requests.get(f"{ONCOKB_URL}/annotate/mutations/byHGVSg",
headers=headers, params=params)
data = resp.json()
return {
"gene": gene,
"variant": variant,
"oncogenic": data.get("oncogenic", ""),
"mutation_effect": data.get("mutationEffect", {}).get("knownEffect", ""),
"highest_sensitive_level": data.get("highestSensitiveLevel", ""),
"highest_resistance_level": data.get("highestResistanceLevel", ""),
"treatments": [
{
"drugs": ", ".join(d["drugName"] for d in t.get("drugs", [])),
"level": t.get("level", ""),
"indication": t.get(, {}).get(, ),
}
t data.get(, [])
],
}
ONCOKB_LEVELS = {
: ,
: ,
: ,
: ,
: ,
: ,
: ,
}
3. cBioPortal 解析
CBIOPORTAL_URL = "https://www.cbioportal.org/api"
def query_cbioportal_mutations(gene, study_ids=None):
"""cBioPortal で変異頻度を取得"""
if study_ids is None:
resp = requests.get(f"{CBIOPORTAL_URL}/studies",
params={"keyword": "tcga_pan_can_atlas"})
study_ids = [s["studyId"] for s in resp.json()]
all_mutations = []
for study_id in study_ids:
profiles = requests.get(
f"{CBIOPORTAL_URL}/molecular-profiles",
params={"studyId": study_id}
).json()
mut_profiles = [p for p in profiles if p["molecularAlterationType"] == "MUTATION_EXTENDED"]
if not mut_profiles:
continue
profile_id = mut_profiles[0]["molecularProfileId"]
mutations = requests.get(
f"{CBIOPORTAL_URL}/molecular-profiles/{profile_id}/mutations",
params={"entrezGeneId": gene_to_entrez(gene)}
).json()
for m in mutations:
all_mutations.append({
"study": study_id,
"sample_id": m.get(, ),
: m.get(, ),
: m.get(, ),
: m.get(, ),
})
df = pd.DataFrame(all_mutations)
df.empty:
freq = df[].value_counts().head()
()
(freq)
df
():
mapping = {: , : , : , : , : }
mapping.get(gene_symbol, )
4. TMB / MSI 算出
def calculate_tmb(mutations_df, exome_size_mb=38.0):
"""
Tumor Mutational Burden (TMB) 算出
TMB = nonsynonymous mutations / exome size (Mb)
"""
nonsynonymous = mutations_df[
mutations_df["mutation_type"].isin([
"Missense_Mutation", "Nonsense_Mutation",
"Frame_Shift_Del", "Frame_Shift_Ins",
"In_Frame_Del", "In_Frame_Ins",
"Splice_Site", "Translation_Start_Site",
])
]
tmb = len(nonsynonymous) / exome_size_mb
if tmb >= 20:
category = "TMB-Very High"
elif tmb >= 10:
category = "TMB-High"
elif tmb >= 5:
category = "TMB-Intermediate"
else:
category = "TMB-Low"
return {"tmb": round(tmb, 2), "category": category,
"nonsynonymous_count": len(nonsynonymous)}
def assess_msi(microsatellite_loci_results):
"""
MSI (Microsatellite Instability) 判定
Bethesda Panel: BAT25, BAT26, D2S123, D5S346, D17S250
"""
unstable_count = sum(1 for r in microsatellite_loci_results r[] == )
total = (microsatellite_loci_results)
unstable_count >= :
status =
unstable_count == :
status =
:
status =
{: status, : unstable_count, : total}
5. 分子腫瘍ボードレポート生成
import json
def generate_mtb_report(patient_id, variants, civic_data, oncokb_data,
tmb_result, msi_result, output_dir="results"):
"""Molecular Tumor Board (MTB) レポート生成"""
report = {
"patient_id": patient_id,
"report_date": pd.Timestamp.now().isoformat(),
"genomic_profile": {
"tmb": tmb_result,
"msi": msi_result,
"variants": variants,
},
"actionable_findings": [],
"clinical_trials": [],
}
for v in variants:
finding = {
"gene": v["gene"],
"variant": v["variant"],
"oncokb_level": oncokb_data.get(f"{v['gene']}_{v['variant']}", {}).get("highest_sensitive_level", ""),
"civic_evidence": [],
"therapies": [],
}
civic_match = civic_data[
(civic_data["gene"] == v["gene"]) &
(civic_data["variant"].str.contains(v["variant"], case=False))
]
for _, ev in civic_match.iterrows():
finding["civic_evidence"].append({
"level": ev[],
: ev[],
: ev[],
})
report[].append(finding)
finding report[]:
level = finding[]
level [, ]:
finding[] =
level [, ]:
finding[] =
level == :
finding[] =
:
finding[] =
(, ) f:
json.dump(report, f, indent=, default=)
md =
md +=
md +=
md +=
md +=
md +=
md +=
md +=
f_ report[]:
therapies = .join((
e[] e f_[] e[]
))
md +=
(, ) f_out:
f_out.write(md)
report
Best Practices
- 多データベースクロスバリデーション: CIViC + OncoKB + COSMIC の一致を重視
- がん種特異的解釈: 同じ変異でもがん種により臨床的意義が異なる
- エビデンスレベルの階層: Level 1 > 2 > 3A > 3B > 4 の優先順位に従う
- 耐性変異を見逃さない: 一次耐性・獲得耐性の両方を評価
- TMB/MSI を免疫療法判断の補助指標に: TMB-High (≥10) → Pembrolizumab 適応
- VUS (Variant of Unknown Significance) の扱い: 機能予測ツールを補助的に使用
Completeness Checklist
References
Output Files
| ファイル | 形式 | 生成タイミング |
|---|
results/mtb_report.json | 分子腫瘍ボードレポート(JSON) | プロファイリング完了時 |
results/mtb_report.md | MTB レポート(Markdown) | レポート生成時 |
results/variant_actionability.json | バリアント臨床的意義(JSON) | アノテーション完了時 |
利用可能ツール
ToolUniverse SMCP 経由で利用可能な外部ツール。
| カテゴリ | 主要ツール | 用途 |
|---|
| OncoKB | OncoKB_annotate_variant | 体細胞変異の臨床的アノテーション |
| OncoKB | OncoKB_get_cancer_genes | がん遺伝子リスト取得 |
| CIViC | civic_search_evidence_items | 臨床エビデンス検索 |
| CIViC | civic_get_variant | バリアント臨床解釈 |
| COSMIC | COSMIC_get_mutations_by_gene | 体細胞変異頻度データ |
| GDC | GDC_get_mutation_frequency | TCGA 変異頻度 |
| ClinicalTrials | search_clinical_trials | 腫瘍学臨床試験マッチング |
参照スキル
| スキル | 連携 |
|---|
scientific-variant-interpretation | ← 生殖細胞系変異の ACMG 分類 |
scientific-clinical-decision-support | → 治療推奨の臨床意思決定反映 |
scientific-bioinformatics | ← RNA-seq 発現データ解析 |
scientific-network-analysis | ← シグナル経路解析・ドライバー予測 |
scientific-drug-target-profiling | ← 標的ドラッガビリティ評価 |
scientific-disease-research | ← がん種の疫学・遺伝的背景 |
scientific-deep-research | ← 腫瘍学最新文献リサーチ |
scientific-pharmacogenomics | ← PGx 代謝型・投与量調整 |