| name | scientific-pharmacogenomics |
| description | ファーマコゲノミクス (薬理ゲノム学) 解析スキル。PharmGKB/ClinPGx による
遺伝子-薬物相互作用照会、CPIC ガイドライン取得・解釈、Star アレル分類、
代謝酵素表現型判定 (PM/IM/NM/RM/UM)、FDA 薬理ゲノムバイオマーカー、
投与量レコメンデーション、PGx レポート生成を統合した
個別化薬物療法支援パイプライン。
|
| tu_tools | [{"key":"fda_pharmacogenomic_biomarkers","name":"FDA PGx Biomarkers","description":"FDA 薬理ゲノミクスバイオマーカーテーブル"}] |
Scientific Pharmacogenomics
遺伝子型に基づく薬物選択・用量調整を支援する
ファーマコゲノミクスパイプライン。CPIC/DPWG ガイドライン・PharmGKB・
FDA PGx バイオマーカーのデータベース照会と解釈を統合。
When to Use
- 遺伝子型に基づく薬物選択・投与量調整が必要なとき
- CPIC/DPWG ガイドラインの系統的照会が必要なとき
- Star アレル分類・代謝酵素表現型 (PM/IM/NM/RM/UM) を判定するとき
- FDA 承認ファーマコゲノミクスバイオマーカーを確認するとき
- 個別化薬物療法レポートを生成するとき
Quick Start
1. 遺伝子-薬物相互作用照会
import pandas as pd
import json
def query_gene_drug_interactions(gene_symbol, data_source="PharmGKB"):
"""
遺伝子-薬物相互作用の照会。
主要 PGx 遺伝子:
- CYP2D6: コデイン, タモキシフェン, トラマドール
- CYP2C19: クロピドグレル, エスシタロプラム, オメプラゾール
- CYP2C9: ワルファリン, フェニトイン
- CYP3A5: タクロリムス
- DPYD: フルオロウラシル, カペシタビン
- TPMT/NUDT15: アザチオプリン, 6-MP
- UGT1A1: イリノテカン
- SLCO1B1: シンバスタチン
- HLA-B: アバカビル (*57:01), カルバマゼピン (*15:02)
- VKORC1: ワルファリン
"""
print(f" Querying {data_source} for gene: {gene_symbol}")
query_fields = {
"gene": gene_symbol,
"clinical_annotations": "Tier 1A-3",
"drug_labels": "FDA/EMA/PMDA/HCSC",
"guideline_annotations": "CPIC/DPWG/CPNDS",
"variant_annotations": "Clinical significance",
"pathway_annotations": "PK/PD pathways",
}
return query_fields
def get_cpic_guidelines(gene_symbol=None, drug_name=None):
"""
CPIC ガイドラインの取得。
CPIC Level:
- Level A: 処方変更を義務付ける強力なエビデンス
- Level A/B: 処方変更を推奨するエビデンス
- Level B: 考慮すべきエビデンス
- Level C: 情報提供レベル
- Level D: 有用なデータなし
"""
print(f" Querying CPIC guidelines:")
if gene_symbol:
print(f" Gene: {gene_symbol}")
if drug_name:
print(f" Drug: {drug_name}")
return {"gene": gene_symbol, "drug": drug_name, "level": "pending"}
2. Star アレル分類・表現型判定
import pandas as pd
import numpy as np
def star_allele_annotation(gene, genotype_variants):
"""
Star アレル分類パイプライン。
PharmCAT (Pharmacogenomics Clinical Annotation Tool) 互換の
Star アレルコール → 表現型変換。
Parameters:
gene: 対象遺伝子 (e.g., "CYP2D6")
genotype_variants: {rsID: genotype} 辞書
"""
cyp2d6_alleles = {
"*1": {"function": "Normal", "activity_score": 1.0},
"*2": {"function": "Normal", "activity_score": 1.0},
"*3": {"function": "No function", "activity_score": 0.0},
"*4": {"function": "No function", "activity_score": 0.0},
"*5": {"function": "No function (gene deletion)", "activity_score": 0.0},
"*6": {"function": "No function", "activity_score": 0.0},
"*9": {"function": "Decreased", "activity_score": 0.5},
"*10": {"function": "Decreased", "activity_score": },
: {: , : },
: {: , : },
}
()
()
()
cyp2d6_alleles
():
as1, as2 = activity_scores
total_as = as1 + as2
total_as == :
phenotype =
total_as < :
phenotype =
total_as <= :
phenotype =
total_as <= :
phenotype =
:
phenotype =
()
()
()
()
gene == phenotype:
()
()
{: gene, : diplotype,
: total_as, : phenotype}
3. FDA PGx バイオマーカー照会
import pandas as pd
def query_fda_pgx_biomarkers(drug_name=None, gene_name=None,
biomarker_type=None):
"""
FDA 承認ファーマコゲノミクスバイオマーカーの照会。
FDA PGx Labeling Categories:
- Required: テスト必須 (e.g., HLA-B*57:01 for abacavir)
- Recommended: テスト推奨
- Actionable: PGx 情報あり
- Informative: 参考情報
300+ の遺伝子-薬物ペアが FDA ラベルに記載。
"""
print(" Querying FDA Pharmacogenomic Biomarkers:")
if drug_name:
print(f" Drug: {drug_name}")
if gene_name:
print(f" Gene: {gene_name}")
if biomarker_type:
print(f" Type: {biomarker_type}")
key_biomarkers = [
{"gene": "HLA-B*57:01", "drug": "Abacavir", "action": "Required",
"recommendation": "HLA-B*57:01 陽性 → 禁忌 (過敏反応リスク)"},
{"gene": "CYP2C19", "drug": "Clopidogrel", "action": "Actionable",
"recommendation": "PM → 代替抗血小板薬 (ticagrelor/prasugrel)"},
{"gene": "DPYD", "drug": "5-FU/Capecitabine", "action": "Recommended",
: },
{: , : , : ,
: },
{: , : , : ,
: },
]
pd.DataFrame(key_biomarkers)
():
cpic_table = {
(, , ): ,
(, , ): ,
(, , ): ,
(, , ): ,
(, , ): ,
}
key = (gene, phenotype.split()[], drug)
recommendation = cpic_table.get(key, )
result = {
: gene,
: phenotype,
: drug,
: recommendation,
: ,
: ,
}
()
()
()
()
result
4. PGx レポート生成
import json
import pandas as pd
from datetime import datetime
def generate_pgx_report(patient_results, output_file="results/pgx_report.json"):
"""
包括的 PGx レポート生成。
含まれる情報:
- 患者遺伝子型サマリ
- Star アレル → 表現型マッピング
- 各薬物の CPIC/DPWG レコメンデーション
- FDA バイオマーカーステータス
- アクショナブル所見ハイライト
"""
import os
os.makedirs(os.path.dirname(output_file), exist_ok=True)
report = {
"report_type": "Pharmacogenomics Report",
"generated_at": datetime.now().isoformat(),
"patient_id": patient_results.get("patient_id", "anonymous"),
"genes_tested": [],
"actionable_findings": [],
"drug_recommendations": [],
}
for gene_result in patient_results.get("gene_results", []):
gene_entry = {
"gene": gene_result["gene"],
"diplotype": gene_result["diplotype"],
"phenotype": gene_result["phenotype"],
"activity_score": gene_result.get("activity_score"),
}
report["genes_tested"].append(gene_entry)
if "PM" in gene_result["phenotype"] or "UM" in gene_result["phenotype"]:
report[].append({
: gene_result[],
: gene_result[],
: ,
})
(output_file, ) f:
json.dump(report, f, ensure_ascii=, indent=)
()
()
()
report
References
Output Files
| ファイル | 形式 |
|---|
results/pgx_report.json | JSON |
results/gene_drug_interactions.csv | CSV |
results/star_allele_calls.csv | CSV |
results/dosing_recommendations.csv | CSV |
figures/pgx_phenotype_summary.png | PNG |
利用可能ツール
ToolUniverse SMCP 経由で利用可能な外部ツール。
| カテゴリ | 主要ツール | 用途 |
|---|
| PharmGKB | PharmGKB_search_drugs | 薬物検索 (遺伝子関連) |
| PharmGKB | PharmGKB_search_genes | PGx 遺伝子検索 |
| PharmGKB | PharmGKB_get_drug_details | 薬物詳細 (クロスリファレンス) |
| PharmGKB | PharmGKB_get_gene_details | 遺伝子詳細 (アレル情報) |
| PharmGKB | PharmGKB_get_clinical_annotations | 遺伝子-薬物臨床アノテーション |
| PharmGKB | PharmGKB_get_dosing_guidelines | CPIC/DPWG 用量ガイドライン |
| PharmGKB | PharmGKB_search_variants | 遺伝的変異検索 |
| FDA | fda_pharmacogenomic_biomarkers | FDA PGx バイオマーカー一覧 |
| FDA | FDA_get_pharmacogenomics_info_by_drug_name | 薬物名で PGx 情報取得 |
| FDA | FDA_get_drug_name_by_pharmacogenomics | PGx から薬物名取得 |
| OpenTargets | OpenTargets_drug_pharmacogenomics_data | 薬物 PGx データ |
参照スキル
| スキル | 関連 |
|---|
scientific-variant-interpretation | ACMG/AMP バリアント解釈 |
scientific-pharmacovigilance | 市販後安全性監視 |
scientific-clinical-decision-support | 臨床意思決定 |
scientific-precision-oncology | 腫瘍 PGx (OncoKB) |
scientific-population-genetics | 集団間アレル頻度差 |
依存パッケージ
pandas, numpy, json