tooluniverse-precision-oncology

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Precision Oncology Treatment Advisor

精准肿瘤学治疗顾问

Provide actionable treatment recommendations for cancer patients based on their molecular profile using CIViC, ClinVar, OpenTargets, ClinicalTrials.gov, and structure-based analysis.
KEY PRINCIPLES:
  1. Report-first - Create report file FIRST, update progressively
  2. Evidence-graded - Every recommendation has evidence level
  3. Actionable output - Prioritized treatment options, not data dumps
  4. Clinical focus - Answer "what should we do?" not "what exists?"
  5. English-first queries - Always use English terms in tool calls (mutations, drug names, cancer types), even if the user writes in another language. Only try original-language terms as a fallback. Respond in the user's language

基于CIViC、ClinVar、OpenTargets、ClinicalTrials.gov以及结构分析,为癌症患者提供基于其分子图谱的可执行治疗建议。
核心原则:
  1. 先出报告 - 优先创建报告文件,逐步更新内容
  2. 循证分级 - 每项建议都有证据等级
  3. 可执行输出 - 优先提供治疗方案,而非数据堆砌
  4. 临床聚焦 - 回答“我们该怎么做?”而非“有什么可用?”
  5. 查询优先用英文 - 工具调用中始终使用英文术语(突变、药物名称、癌症类型),即使用户使用其他语言提问。仅在无法获取结果时尝试原语言术语。最终用用户的语言回复

When to Use

适用场景

Apply when user asks:
  • "Patient has [cancer] with [mutation] - what treatments?"
  • "What are options for EGFR-mutant lung cancer?"
  • "Patient failed [drug], what's next?"
  • "Clinical trials for KRAS G12C?"
  • "Why isn't [drug] working anymore?"

当用户提出以下问题时使用:
  • "患者患有[癌症]且存在[突变],有哪些治疗方案?"
  • "EGFR突变型肺癌有哪些治疗选择?"
  • "患者使用[药物]治疗失败,接下来该怎么办?"
  • "针对KRAS G12C的临床试验有哪些?"
  • "为什么[药物]不再起效了?"

Phase 0: Tool Verification

阶段0:工具验证

CRITICAL: Verify tool parameters before first use.
ToolWRONGCORRECT
civic_get_variant
variant_name
id
(numeric)
civic_get_evidence_item
variant_id
id
OpenTargets_*
ensemblID
ensemblId
(camelCase)
search_clinical_trials
disease
condition

关键注意事项:首次使用前务必验证工具参数。
工具错误用法正确用法
civic_get_variant
variant_name
id
(数值型)
civic_get_evidence_item
variant_id
id
OpenTargets_*
ensemblID
ensemblId
(驼峰命名)
search_clinical_trials
disease
condition

Workflow Overview

工作流程概述

Input: Cancer type + Molecular profile (mutations, fusions, amplifications)

Phase 1: Profile Validation
├── Validate variant nomenclature
├── Resolve gene identifiers
└── Confirm cancer type (EFO/ICD)

Phase 2: Variant Interpretation
├── CIViC → Evidence for each variant
├── ClinVar → Pathogenicity
├── COSMIC → Somatic mutation frequency
├── GDC/TCGA → Real tumor data
├── DepMap → Target essentiality
├── OncoKB → FDA actionability levels (NEW)
├── cBioPortal → Cross-study mutation data (NEW)
├── Human Protein Atlas → Expression validation (NEW)
├── OpenTargets → Target-disease evidence
└── OUTPUT: Variant significance table + target validation + expression

Phase 2.5: Tumor Expression Context (NEW)
├── CELLxGENE → Cell-type specific expression in tumor
├── ChIPAtlas → Regulatory context
├── Cancer-specific expression patterns
└── OUTPUT: Expression validation

Phase 3: Treatment Options
├── Approved therapies (FDA label)
├── NCCN-recommended (literature)
├── Off-label with evidence
└── OUTPUT: Prioritized treatment list

Phase 3.5: Pathway & Network Analysis (NEW)
├── KEGG/Reactome → Pathway context
├── IntAct → Protein interactions
├── Drug combination rationale
└── OUTPUT: Biological context for combinations

Phase 4: Resistance Analysis (if prior therapy)
├── Known resistance mechanisms
├── Structure-based analysis (NvidiaNIM)
├── Network-based bypass pathways (IntAct)
└── OUTPUT: Resistance explanation + strategies

Phase 5: Clinical Trial Matching
├── Active trials for indication + biomarker
├── Eligibility filtering
└── OUTPUT: Matched trials

Phase 5.5: Literature Evidence (NEW)
├── PubMed → Published evidence
├── BioRxiv/MedRxiv → Recent preprints
├── OpenAlex → Citation analysis
└── OUTPUT: Supporting literature

Phase 6: Report Synthesis
├── Executive summary
├── Treatment recommendations (prioritized)
└── Next steps

输入: 癌症类型 + 分子图谱(突变、融合、扩增)

阶段1:图谱验证
├── 验证突变命名规范
├── 解析基因标识符
└── 确认癌症类型(EFO/ICD)

阶段2:突变解读
├── CIViC → 每个突变的循证依据
├── ClinVar → 致病性
├── COSMIC → 体细胞突变频率
├── GDC/TCGA → 真实肿瘤数据
├── DepMap → 靶点必要性
├── OncoKB → FDA可行动性等级(新增)
├── cBioPortal → 跨研究突变数据(新增)
├── Human Protein Atlas → 表达验证(新增)
├── OpenTargets → 靶点-疾病关联证据
└── 输出: 突变显著性表格 + 靶点验证 + 表达数据

阶段2.5:肿瘤表达背景(新增)
├── CELLxGENE → 肿瘤中细胞类型特异性表达
├── ChIPAtlas → 调控背景
├── 癌症特异性表达模式
└── 输出: 表达验证结果

阶段3:治疗方案
├── 获批疗法(FDA标签)
├── NCCN推荐方案(文献支持)
├── 有循证依据的超适应症用药
└── 输出: 优先级排序的治疗列表

阶段3.5:通路与网络分析(新增)
├── KEGG/Reactome → 通路背景
├── IntAct → 蛋白质相互作用
├── 联合用药依据
└── 输出: 联合用药的生物学背景

阶段4:耐药性分析(若有既往治疗史)
├── 已知耐药机制
├── 基于结构的分析(NvidiaNIM)
├── 基于网络的旁路通路(IntAct)
└── 输出: 耐药机制解释 + 应对策略

阶段5:临床试验匹配
├── 针对适应症+生物标志物的在研试验
├── 筛选入选资格
└── 输出: 匹配的临床试验

阶段5.5:文献证据(新增)
├── PubMed → 已发表证据
├── BioRxiv/MedRxiv → 最新预印本
├── OpenAlex → 引用分析
└── 输出: 支持性文献

阶段6:报告合成
├── 执行摘要
├── 优先级排序的治疗建议
└── 后续步骤

Phase 1: Profile Validation

阶段1:图谱验证

1.1 Resolve Gene Identifiers

1.1 解析基因标识符

python
def resolve_gene(tu, gene_symbol):
    """Resolve gene to all needed IDs."""
    ids = {}
    
    # Ensembl ID (for OpenTargets)
    gene_info = tu.tools.MyGene_query_genes(q=gene_symbol, species="human")
    ids['ensembl'] = gene_info.get('ensembl', {}).get('gene')
    
    # UniProt (for structure)
    uniprot = tu.tools.UniProt_search(query=gene_symbol, organism="human")
    ids['uniprot'] = uniprot[0].get('primaryAccession') if uniprot else None
    
    # ChEMBL target
    target = tu.tools.ChEMBL_search_targets(query=gene_symbol, organism="Homo sapiens")
    ids['chembl_target'] = target[0].get('target_chembl_id') if target else None
    
    return ids
python
def resolve_gene(tu, gene_symbol):
    """Resolve gene to all needed IDs."""
    ids = {}
    
    # Ensembl ID (for OpenTargets)
    gene_info = tu.tools.MyGene_query_genes(q=gene_symbol, species="human")
    ids['ensembl'] = gene_info.get('ensembl', {}).get('gene')
    
    # UniProt (for structure)
    uniprot = tu.tools.UniProt_search(query=gene_symbol, organism="human")
    ids['uniprot'] = uniprot[0].get('primaryAccession') if uniprot else None
    
    # ChEMBL target
    target = tu.tools.ChEMBL_search_targets(query=gene_symbol, organism="Homo sapiens")
    ids['chembl_target'] = target[0].get('target_chembl_id') if target else None
    
    return ids

1.2 Validate Variant Nomenclature

1.2 验证突变命名规范

  • HGVS protein: p.L858R, p.V600E
  • cDNA: c.2573T>G
  • Common names: T790M, G12C

  • HGVS蛋白命名: p.L858R, p.V600E
  • cDNA命名: c.2573T>G
  • 通用名称: T790M, G12C

Phase 2: Variant Interpretation

阶段2:突变解读

2.1 CIViC Evidence Query

2.1 CIViC证据查询

python
def get_civic_evidence(tu, gene_symbol, variant_name):
    """Get CIViC evidence for variant."""
    # Search for variant
    variants = tu.tools.civic_search_variants(query=f"{gene_symbol} {variant_name}")
    
    evidence_items = []
    for var in variants:
        # Get evidence items for this variant
        evi = tu.tools.civic_get_variant(id=var['id'])
        evidence_items.extend(evi.get('evidence_items', []))
    
    # Categorize by evidence type
    return {
        'predictive': [e for e in evidence_items if e['evidence_type'] == 'Predictive'],
        'prognostic': [e for e in evidence_items if e['evidence_type'] == 'Prognostic'],
        'diagnostic': [e for e in evidence_items if e['evidence_type'] == 'Diagnostic']
    }
python
def get_civic_evidence(tu, gene_symbol, variant_name):
    """Get CIViC evidence for variant."""
    # Search for variant
    variants = tu.tools.civic_search_variants(query=f"{gene_symbol} {variant_name}")
    
    evidence_items = []
    for var in variants:
        # Get evidence items for this variant
        evi = tu.tools.civic_get_variant(id=var['id'])
        evidence_items.extend(evi.get('evidence_items', []))
    
    # Categorize by evidence type
    return {
        'predictive': [e for e in evidence_items if e['evidence_type'] == 'Predictive'],
        'prognostic': [e for e in evidence_items if e['evidence_type'] == 'Prognostic'],
        'diagnostic': [e for e in evidence_items if e['evidence_type'] == 'Diagnostic']
    }

2.2 COSMIC Somatic Mutation Analysis (NEW)

2.2 COSMIC体细胞突变分析(新增)

python
def get_cosmic_mutations(tu, gene_symbol, variant_name=None):
    """Get somatic mutation data from COSMIC database."""
    
    # Get all mutations for gene
    gene_mutations = tu.tools.COSMIC_get_mutations_by_gene(
        operation="get_by_gene",
        gene=gene_symbol,
        max_results=100,
        genome_build=38
    )
    
    # If specific variant, search for it
    if variant_name:
        specific = tu.tools.COSMIC_search_mutations(
            operation="search",
            terms=f"{gene_symbol} {variant_name}",
            max_results=20
        )
        return {
            'specific_variant': specific.get('results', []),
            'all_gene_mutations': gene_mutations.get('results', [])
        }
    
    return gene_mutations

def get_cosmic_hotspots(tu, gene_symbol):
    """Identify mutation hotspots in COSMIC."""
    mutations = tu.tools.COSMIC_get_mutations_by_gene(
        operation="get_by_gene",
        gene=gene_symbol,
        max_results=500
    )
    
    # Count by position
    position_counts = Counter(m['MutationAA'] for m in mutations.get('results', []))
    hotspots = position_counts.most_common(10)
    
    return hotspots
Why COSMIC matters:
  • Gold standard for somatic cancer mutations
  • Provides cancer type distribution (which cancers have this mutation)
  • FATHMM pathogenicity prediction for novel variants
  • Identifies hotspots vs. rare mutations
python
def get_cosmic_mutations(tu, gene_symbol, variant_name=None):
    """Get somatic mutation data from COSMIC database."""
    
    # Get all mutations for gene
    gene_mutations = tu.tools.COSMIC_get_mutations_by_gene(
        operation="get_by_gene",
        gene=gene_symbol,
        max_results=100,
        genome_build=38
    )
    
    # If specific variant, search for it
    if variant_name:
        specific = tu.tools.COSMIC_search_mutations(
            operation="search",
            terms=f"{gene_symbol} {variant_name}",
            max_results=20
        )
        return {
            'specific_variant': specific.get('results', []),
            'all_gene_mutations': gene_mutations.get('results', [])
        }
    
    return gene_mutations

def get_cosmic_hotspots(tu, gene_symbol):
    """Identify mutation hotspots in COSMIC."""
    mutations = tu.tools.COSMIC_get_mutations_by_gene(
        operation="get_by_gene",
        gene=gene_symbol,
        max_results=500
    )
    
    # Count by position
    position_counts = Counter(m['MutationAA'] for m in mutations.get('results', []))
    hotspots = position_counts.most_common(10)
    
    return hotspots
COSMIC的重要性:
  • 体细胞癌症突变的金标准数据库
  • 提供癌症类型分布(哪些癌症存在该突变)
  • 为新型突变提供FATHMM致病性预测
  • 识别突变热点与罕见突变

2.3 GDC/TCGA Pan-Cancer Analysis (NEW)

2.3 GDC/TCGA泛癌分析(新增)

Access real patient tumor data from The Cancer Genome Atlas:
python
def get_tcga_mutation_data(tu, gene_symbol, cancer_type=None):
    """
    Get somatic mutations from TCGA via GDC.
    
    Answers: "How often is this mutation seen in real tumors?"
    """
    
    # Get mutation frequency across all TCGA
    frequency = tu.tools.GDC_get_mutation_frequency(
        gene_symbol=gene_symbol
    )
    
    # Get specific mutations
    mutations = tu.tools.GDC_get_ssm_by_gene(
        gene_symbol=gene_symbol,
        project_id=f"TCGA-{cancer_type}" if cancer_type else None,
        size=50
    )
    
    return {
        'frequency': frequency.get('data', {}),
        'mutations': mutations.get('data', {}),
        'note': 'Real patient tumor data from TCGA'
    }

def get_tcga_expression_profile(tu, gene_symbol, cancer_type):
    """Get gene expression data from TCGA."""
    
    # Map cancer type to TCGA project
    project_map = {
        'lung': 'TCGA-LUAD',
        'breast': 'TCGA-BRCA', 
        'colorectal': 'TCGA-COAD',
        'melanoma': 'TCGA-SKCM',
        'glioblastoma': 'TCGA-GBM'
    }
    project_id = project_map.get(cancer_type.lower(), f'TCGA-{cancer_type.upper()}')
    
    expression = tu.tools.GDC_get_gene_expression(
        project_id=project_id,
        size=20
    )
    
    return expression.get('data', {})

def get_tcga_cnv_status(tu, gene_symbol, cancer_type):
    """Get copy number status from TCGA."""
    
    project_map = {
        'lung': 'TCGA-LUAD',
        'breast': 'TCGA-BRCA'
    }
    project_id = project_map.get(cancer_type.lower(), f'TCGA-{cancer_type.upper()}')
    
    cnv = tu.tools.GDC_get_cnv_data(
        project_id=project_id,
        gene_symbol=gene_symbol,
        size=20
    )
    
    return cnv.get('data', {})
GDC Tools Summary:
ToolPurposeKey Parameters
GDC_get_mutation_frequency
Pan-cancer mutation stats
gene_symbol
GDC_get_ssm_by_gene
Specific mutations
gene_symbol
,
project_id
GDC_get_gene_expression
RNA-seq data
project_id
GDC_get_cnv_data
Copy number
project_id
,
gene_symbol
GDC_list_projects
Find TCGA projects
program="TCGA"
Why TCGA/GDC matters:
  • Real patient data - Not cell line or curated, actual tumor sequencing
  • Pan-cancer view - Same gene across 33 cancer types
  • Multi-omic - Mutations, expression, CNV together
  • Clinical correlation - Survival data available
获取来自癌症基因组图谱(TCGA)的真实患者肿瘤数据:
python
def get_tcga_mutation_data(tu, gene_symbol, cancer_type=None):
    """
    Get somatic mutations from TCGA via GDC.
    
    Answers: "How often is this mutation seen in real tumors?"
    """
    
    # Get mutation frequency across all TCGA
    frequency = tu.tools.GDC_get_mutation_frequency(
        gene_symbol=gene_symbol
    )
    
    # Get specific mutations
    mutations = tu.tools.GDC_get_ssm_by_gene(
        gene_symbol=gene_symbol,
        project_id=f"TCGA-{cancer_type}" if cancer_type else None,
        size=50
    )
    
    return {
        'frequency': frequency.get('data', {}),
        'mutations': mutations.get('data', {}),
        'note': 'Real patient tumor data from TCGA'
    }

def get_tcga_expression_profile(tu, gene_symbol, cancer_type):
    """Get gene expression data from TCGA."""
    
    # Map cancer type to TCGA project
    project_map = {
        'lung': 'TCGA-LUAD',
        'breast': 'TCGA-BRCA', 
        'colorectal': 'TCGA-COAD',
        'melanoma': 'TCGA-SKCM',
        'glioblastoma': 'TCGA-GBM'
    }
    project_id = project_map.get(cancer_type.lower(), f'TCGA-{cancer_type.upper()}')
    
    expression = tu.tools.GDC_get_gene_expression(
        project_id=project_id,
        size=20
    )
    
    return expression.get('data', {})

def get_tcga_cnv_status(tu, gene_symbol, cancer_type):
    """Get copy number status from TCGA."""
    
    project_map = {
        'lung': 'TCGA-LUAD',
        'breast': 'TCGA-BRCA'
    }
    project_id = project_map.get(cancer_type.lower(), f'TCGA-{cancer_type.upper()}')
    
    cnv = tu.tools.GDC_get_cnv_data(
        project_id=project_id,
        gene_symbol=gene_symbol,
        size=20
    )
    
    return cnv.get('data', {})
GDC工具汇总:
工具用途关键参数
GDC_get_mutation_frequency
泛癌突变统计
gene_symbol
GDC_get_ssm_by_gene
获取特定突变
gene_symbol
,
project_id
GDC_get_gene_expression
RNA测序数据
project_id
GDC_get_cnv_data
拷贝数变异
project_id
,
gene_symbol
GDC_list_projects
查找TCGA项目
program="TCGA"
TCGA/GDC的重要性:
  • 真实患者数据 - 并非细胞系或整理后的数据,而是实际肿瘤测序结果
  • 泛癌视角 - 同一基因在33种癌症类型中的情况
  • 多组学整合 - 突变、表达、拷贝数变异数据结合
  • 临床相关性 - 可获取生存数据

2.4 DepMap Target Validation (NEW)

2.4 DepMap靶点验证(新增)

Assess gene essentiality using CRISPR knockout data from cancer cell lines:
python
def assess_target_essentiality(tu, gene_symbol, cancer_type=None):
    """
    Is this gene essential in cancer cell lines?
    
    Essential genes have negative dependency scores.
    Answers: "If we target this gene, will cancer cells die?"
    """
    
    # Get gene dependency data
    dependencies = tu.tools.DepMap_get_gene_dependencies(
        gene_symbol=gene_symbol
    )
    
    # Get cell lines for specific cancer type
    if cancer_type:
        cell_lines = tu.tools.DepMap_get_cell_lines(
            cancer_type=cancer_type,
            page_size=20
        )
        return {
            'gene': gene_symbol,
            'dependencies': dependencies.get('data', {}),
            'cell_lines': cell_lines.get('data', {}),
            'interpretation': 'Negative scores = gene is essential for cell survival'
        }
    
    return dependencies

def get_depmap_drug_sensitivity(tu, drug_name, cancer_type=None):
    """Get drug sensitivity data from DepMap."""
    
    drugs = tu.tools.DepMap_get_drug_response(
        drug_name=drug_name
    )
    
    return drugs.get('data', {})
DepMap Tools Summary:
ToolPurposeKey Parameters
DepMap_get_gene_dependencies
CRISPR essentiality
gene_symbol
DepMap_get_cell_lines
Cell line metadata
cancer_type
,
tissue
DepMap_search_cell_lines
Search by name
query
DepMap_get_drug_response
Drug sensitivity
drug_name
Why DepMap matters for Precision Oncology:
  • Target validation - Proves gene is essential for cancer survival
  • Cancer selectivity - Essential in cancer but not normal cells?
  • Resistance prediction - What other genes become essential when you knockout target?
  • Combination rationale - Identify synthetic lethal partners
Example Clinical Application:
markdown
undefined
利用癌症细胞系的CRISPR敲除数据评估基因必要性:
python
def assess_target_essentiality(tu, gene_symbol, cancer_type=None):
    """
    Is this gene essential in cancer cell lines?
    
    Essential genes have negative dependency scores.
    Answers: "If we target this gene, will cancer cells die?"
    """
    
    # Get gene dependency data
    dependencies = tu.tools.DepMap_get_gene_dependencies(
        gene_symbol=gene_symbol
    )
    
    # Get cell lines for specific cancer type
    if cancer_type:
        cell_lines = tu.tools.DepMap_get_cell_lines(
            cancer_type=cancer_type,
            page_size=20
        )
        return {
            'gene': gene_symbol,
            'dependencies': dependencies.get('data', {}),
            'cell_lines': cell_lines.get('data', {}),
            'interpretation': 'Negative scores = gene is essential for cell survival'
        }
    
    return dependencies

def get_depmap_drug_sensitivity(tu, drug_name, cancer_type=None):
    """Get drug sensitivity data from DepMap."""
    
    drugs = tu.tools.DepMap_get_drug_response(
        drug_name=drug_name
    )
    
    return drugs.get('data', {})
DepMap工具汇总:
工具用途关键参数
DepMap_get_gene_dependencies
CRISPR基因必要性
gene_symbol
DepMap_get_cell_lines
细胞系元数据
cancer_type
,
tissue
DepMap_search_cell_lines
按名称搜索细胞系
query
DepMap_get_drug_response
药物敏感性
drug_name
DepMap对精准肿瘤学的重要性:
  • 靶点验证 - 证明基因对癌症生存至关重要
  • 癌症选择性 - 仅在癌症细胞中必要,正常细胞中不必要?
  • 耐药性预测 - 敲除靶点后,哪些其他基因会成为必需?
  • 联合用药依据 - 识别合成致死搭档
临床应用示例:
markdown
undefined

Target Essentiality Assessment (DepMap)

靶点必要性评估(DepMap)

KRAS dependency in pancreatic cancer cell lines:
Cell LineKRAS Effect ScoreInterpretation
PANC-1-0.82Strongly essential
MIA PaCa-2-0.75Essential
BxPC-3-0.21Less dependent (KRAS WT)
Interpretation: KRAS-mutant pancreatic cancer lines are highly dependent on KRAS - validates targeting strategy.
Source: DepMap via
DepMap_get_gene_dependencies
undefined
胰腺癌系中KRAS的依赖性:
细胞系KRAS效应评分解读
PANC-1-0.82高度必需
MIA PaCa-2-0.75必需
BxPC-3-0.21依赖性较低(KRAS野生型)
解读:KRAS突变型胰腺癌细胞系高度依赖KRAS - 验证了靶向策略的有效性。
来源:DepMap via
DepMap_get_gene_dependencies
undefined

2.5 OncoKB Actionability Assessment (NEW)

2.5 OncoKB可行动性评估(新增)

OncoKB provides FDA-approved therapeutic actionability annotations:
python
def get_oncokb_annotations(tu, gene_symbol, variant_name, tumor_type=None):
    """
    Get OncoKB actionability annotations.
    
    OncoKB Level of Evidence:
    - Level 1: FDA-approved
    - Level 2: Standard care
    - Level 3A: Compelling clinical evidence
    - Level 3B: Standard care in different tumor type
    - Level 4: Biological evidence
    - R1/R2: Resistance evidence
    """
    
    # Annotate the specific variant
    annotation = tu.tools.OncoKB_annotate_variant(
        operation="annotate_variant",
        gene=gene_symbol,
        variant=variant_name,  # e.g., "V600E"
        tumor_type=tumor_type  # OncoTree code e.g., "MEL", "LUAD"
    )
    
    result = {
        'oncogenic': annotation.get('data', {}).get('oncogenic'),
        'mutation_effect': annotation.get('data', {}).get('mutationEffect'),
        'highest_sensitive_level': annotation.get('data', {}).get('highestSensitiveLevel'),
        'treatments': annotation.get('data', {}).get('treatments', [])
    }
    
    # Get gene-level info
    gene_info = tu.tools.OncoKB_get_gene_info(
        operation="get_gene_info",
        gene=gene_symbol
    )
    
    result['is_oncogene'] = gene_info.get('data', {}).get('oncogene', False)
    result['is_tumor_suppressor'] = gene_info.get('data', {}).get('tsg', False)
    
    return result

def get_oncokb_cnv_annotation(tu, gene_symbol, alteration_type, tumor_type=None):
    """Get OncoKB annotation for copy number alterations."""
    
    annotation = tu.tools.OncoKB_annotate_copy_number(
        operation="annotate_copy_number",
        gene=gene_symbol,
        copy_number_type=alteration_type,  # "AMPLIFICATION" or "DELETION"
        tumor_type=tumor_type
    )
    
    return {
        'oncogenic': annotation.get('data', {}).get('oncogenic'),
        'treatments': annotation.get('data', {}).get('treatments', [])
    }
OncoKB Level Mapping:
OncoKB LevelOur TierDescription
LEVEL_1★★★FDA-recognized biomarker
LEVEL_2★★★Standard care
LEVEL_3A★★☆Compelling clinical evidence
LEVEL_3B★★☆Different tumor type
LEVEL_4★☆☆Biological evidence
LEVEL_R1ResistanceFDA-approved resistance marker
LEVEL_R2ResistanceCompelling resistance evidence
OncoKB提供FDA批准的治疗可行动性注释:
python
def get_oncokb_annotations(tu, gene_symbol, variant_name, tumor_type=None):
    """
    Get OncoKB actionability annotations.
    
    OncoKB Level of Evidence:
    - Level 1: FDA-approved
    - Level 2: Standard care
    - Level 3A: Compelling clinical evidence
    - Level 3B: Standard care in different tumor type
    - Level 4: Biological evidence
    - R1/R2: Resistance evidence
    """
    
    # Annotate the specific variant
    annotation = tu.tools.OncoKB_annotate_variant(
        operation="annotate_variant",
        gene=gene_symbol,
        variant=variant_name,  # e.g., "V600E"
        tumor_type=tumor_type  # OncoTree code e.g., "MEL", "LUAD"
    )
    
    result = {
        'oncogenic': annotation.get('data', {}).get('oncogenic'),
        'mutation_effect': annotation.get('data', {}).get('mutationEffect'),
        'highest_sensitive_level': annotation.get('data', {}).get('highestSensitiveLevel'),
        'treatments': annotation.get('data', {}).get('treatments', [])
    }
    
    # Get gene-level info
    gene_info = tu.tools.OncoKB_get_gene_info(
        operation="get_gene_info",
        gene=gene_symbol
    )
    
    result['is_oncogene'] = gene_info.get('data', {}).get('oncogene', False)
    result['is_tumor_suppressor'] = gene_info.get('data', {}).get('tsg', False)
    
    return result

def get_oncokb_cnv_annotation(tu, gene_symbol, alteration_type, tumor_type=None):
    """Get OncoKB annotation for copy number alterations."""
    
    annotation = tu.tools.OncoKB_annotate_copy_number(
        operation="annotate_copy_number",
        gene=gene_symbol,
        copy_number_type=alteration_type,  # "AMPLIFICATION" or "DELETION"
        tumor_type=tumor_type
    )
    
    return {
        'oncogenic': annotation.get('data', {}).get('oncogenic'),
        'treatments': annotation.get('data', {}).get('treatments', [])
    }
OncoKB等级映射:
OncoKB等级我方分级描述
LEVEL_1★★★FDA认可的生物标志物
LEVEL_2★★★标准治疗方案
LEVEL_3A★★☆充分临床证据
LEVEL_3B★★☆其他肿瘤类型的标准治疗
LEVEL_4★☆☆生物学证据
LEVEL_R1耐药性FDA批准的耐药标志物
LEVEL_R2耐药性充分耐药证据

2.6 cBioPortal Cross-Study Analysis (NEW)

2.6 cBioPortal跨研究分析(新增)

Aggregate mutation data across multiple cancer studies:
python
def get_cbioportal_mutations(tu, gene_symbols, study_id="brca_tcga"):
    """
    Get mutation data from cBioPortal across cancer studies.
    
    Provides: Mutation types, protein changes, co-mutations.
    """
    
    # Get mutations for genes in study
    mutations = tu.tools.cBioPortal_get_mutations(
        study_id=study_id,
        gene_list=",".join(gene_symbols)  # e.g., "EGFR,KRAS"
    )
    
    # Parse results
    results = []
    for mut in mutations or []:
        results.append({
            'gene': mut.get('gene', {}).get('hugoGeneSymbol'),
            'protein_change': mut.get('proteinChange'),
            'mutation_type': mut.get('mutationType'),
            'sample_id': mut.get('sampleId'),
            'validation_status': mut.get('validationStatus')
        })
    
    return results

def get_cbioportal_cancer_studies(tu, cancer_type=None):
    """Get available cancer studies from cBioPortal."""
    
    studies = tu.tools.cBioPortal_get_cancer_studies(limit=50)
    
    if cancer_type:
        studies = [s for s in studies if cancer_type.lower() in s.get('cancerTypeId', '').lower()]
    
    return studies

def analyze_co_mutations(tu, gene_symbol, study_id):
    """Find frequently co-mutated genes."""
    
    # Get molecular profiles
    profiles = tu.tools.cBioPortal_get_molecular_profiles(study_id=study_id)
    
    # Get mutation data
    mutations = tu.tools.cBioPortal_get_mutations(
        study_id=study_id,
        gene_list=gene_symbol
    )
    
    return {
        'profiles': profiles,
        'mutations': mutations,
        'study_id': study_id
    }
cBioPortal Use Cases:
Use CaseToolParameters
Find mutation frequency
cBioPortal_get_mutations
study_id
,
gene_list
List available studies
cBioPortal_get_cancer_studies
limit
Get molecular profiles
cBioPortal_get_molecular_profiles
study_id
Analyze co-mutationsMultiple toolsCombined analysis
汇总多癌症研究中的突变数据:
python
def get_cbioportal_mutations(tu, gene_symbols, study_id="brca_tcga"):
    """
    Get mutation data from cBioPortal across cancer studies.
    
    Provides: Mutation types, protein changes, co-mutations.
    """
    
    # Get mutations for genes in study
    mutations = tu.tools.cBioPortal_get_mutations(
        study_id=study_id,
        gene_list=",".join(gene_symbols)  # e.g., "EGFR,KRAS"
    )
    
    # Parse results
    results = []
    for mut in mutations or []:
        results.append({
            'gene': mut.get('gene', {}).get('hugoGeneSymbol'),
            'protein_change': mut.get('proteinChange'),
            'mutation_type': mut.get('mutationType'),
            'sample_id': mut.get('sampleId'),
            'validation_status': mut.get('validationStatus')
        })
    
    return results

def get_cbioportal_cancer_studies(tu, cancer_type=None):
    """Get available cancer studies from cBioPortal."""
    
    studies = tu.tools.cBioPortal_get_cancer_studies(limit=50)
    
    if cancer_type:
        studies = [s for s in studies if cancer_type.lower() in s.get('cancerTypeId', '').lower()]
    
    return studies

def analyze_co_mutations(tu, gene_symbol, study_id):
    """Find frequently co-mutated genes."""
    
    # Get molecular profiles
    profiles = tu.tools.cBioPortal_get_molecular_profiles(study_id=study_id)
    
    # Get mutation data
    mutations = tu.tools.cBioPortal_get_mutations(
        study_id=study_id,
        gene_list=gene_symbol
    )
    
    return {
        'profiles': profiles,
        'mutations': mutations,
        'study_id': study_id
    }
cBioPortal应用场景:
应用场景工具参数
查找突变频率
cBioPortal_get_mutations
study_id
,
gene_list
列出可用研究
cBioPortal_get_cancer_studies
limit
获取分子图谱
cBioPortal_get_molecular_profiles
study_id
分析共突变多工具组合联合分析

2.7 Human Protein Atlas Expression (NEW)

2.7 Human Protein Atlas表达验证(新增)

Validate target expression in tumor vs normal tissues:
python
def get_hpa_expression(tu, gene_symbol):
    """
    Get protein expression data from Human Protein Atlas.
    
    Critical for validating:
    - Target is expressed in tumor tissue
    - Target has differential tumor vs normal expression
    """
    
    # Search for gene
    gene_info = tu.tools.HPA_search_genes_by_query(search_query=gene_symbol)
    
    if not gene_info:
        return None
    
    # Get tissue expression data
    ensembl_id = gene_info[0].get('Ensembl') if gene_info else None
    
    # Comparative expression in cancer cell lines
    cell_line_data = tu.tools.HPA_get_comparative_expression_by_gene_and_cellline(
        gene_name=gene_symbol,
        cell_line="a549"  # Lung cancer cell line
    )
    
    return {
        'gene_info': gene_info,
        'cell_line_expression': cell_line_data
    }

def check_tumor_specific_expression(tu, gene_symbol, cancer_type):
    """Check if target has tumor-specific expression pattern."""
    
    # Map cancer type to cell line
    cancer_to_cellline = {
        'lung': 'a549',
        'breast': 'mcf7',
        'liver': 'hepg2',
        'cervical': 'hela',
        'prostate': 'pc3'
    }
    
    cell_line = cancer_to_cellline.get(cancer_type.lower(), 'a549')
    
    expression = tu.tools.HPA_get_comparative_expression_by_gene_and_cellline(
        gene_name=gene_symbol,
        cell_line=cell_line
    )
    
    return expression
HPA Expression Validation Output:
markdown
undefined
验证靶点在肿瘤与正常组织中的表达:
python
def get_hpa_expression(tu, gene_symbol):
    """
    Get protein expression data from Human Protein Atlas.
    
    Critical for validating:
    - Target is expressed in tumor tissue
    - Target has differential tumor vs normal expression
    """
    
    # Search for gene
    gene_info = tu.tools.HPA_search_genes_by_query(search_query=gene_symbol)
    
    if not gene_info:
        return None
    
    # Get tissue expression data
    ensembl_id = gene_info[0].get('Ensembl') if gene_info else None
    
    # Comparative expression in cancer cell lines
    cell_line_data = tu.tools.HPA_get_comparative_expression_by_gene_and_cellline(
        gene_name=gene_symbol,
        cell_line="a549"  # Lung cancer cell line
    )
    
    return {
        'gene_info': gene_info,
        'cell_line_expression': cell_line_data
    }

def check_tumor_specific_expression(tu, gene_symbol, cancer_type):
    """Check if target has tumor-specific expression pattern."""
    
    # Map cancer type to cell line
    cancer_to_cellline = {
        'lung': 'a549',
        'breast': 'mcf7',
        'liver': 'hepg2',
        'cervical': 'hela',
        'prostate': 'pc3'
    }
    
    cell_line = cancer_to_cellline.get(cancer_type.lower(), 'a549')
    
    expression = tu.tools.HPA_get_comparative_expression_by_gene_and_cellline(
        gene_name=gene_symbol,
        cell_line=cell_line
    )
    
    return expression
HPA表达验证输出:
markdown
undefined

Expression Validation (Human Protein Atlas)

表达验证(Human Protein Atlas)

GeneTumor Cell LineExpressionNormal TissueDifferential
EGFRA549 (lung)HighLow-MediumTumor-elevated
ALKH3122 (lung)HighNot detectedTumor-specific
HER2MCF7 (breast)MediumLowElevated
Source: Human Protein Atlas via
HPA_get_comparative_expression_by_gene_and_cellline
undefined
基因肿瘤细胞系表达水平正常组织差异表达
EGFRA549(肺癌)低-中肿瘤高表达
ALKH3122(肺癌)未检测到肿瘤特异性
HER2MCF7(乳腺癌)高表达
来源:Human Protein Atlas via
HPA_get_comparative_expression_by_gene_and_cellline
undefined

2.8 Evidence Level Mapping

2.8 证据等级映射

CIViC LevelOur TierMeaning
A★★★FDA-approved, guideline
B★★☆Clinical evidence
C★★☆Case study
D★☆☆Preclinical
E☆☆☆Inferential
CIViC等级我方分级含义
A★★★FDA批准、指南推荐
B★★☆临床证据
C★★☆病例研究
D★☆☆临床前研究
E☆☆☆推论性证据

2.4 Output Table

2.4 输出表格

markdown
undefined
markdown
undefined

Variant Interpretation

突变解读

VariantGeneSignificanceEvidence LevelClinical Implication
L858REGFROncogenic driver★★★ (Level A)Sensitive to EGFR TKIs
T790MEGFRResistance★★★ (Level A)Resistant to 1st/2nd gen TKIs
突变基因显著性证据等级临床意义
L858REGFR致癌驱动因子★★★(A级)对EGFR TKI敏感
T790MEGFR耐药突变★★★(A级)对1/2代TKI耐药

COSMIC Mutation Frequency

COSMIC突变频率

GeneMutationCOSMIC CountPrimary Cancer TypesFATHMM Prediction
EGFRL858R15,234Lung (85%), Colorectal (5%)Pathogenic
EGFRT790M8,567Lung (95%)Pathogenic
BRAFV600E45,678Melanoma (50%), Colorectal (15%)Pathogenic
基因突变COSMIC计数主要癌症类型FATHMM预测
EGFRL858R15,234肺癌(85%)、结直肠癌(5%)致病性
EGFRT790M8,567肺癌(95%)致病性
BRAFV600E45,678黑色素瘤(50%)、结直肠癌(15%)致病性

TCGA/GDC Patient Tumor Data (NEW)

TCGA/GDC患者肿瘤数据(新增)

GeneTCGA ProjectSSM CasesCNV AmpCNV Del% Samples
EGFRTCGA-LUAD15689528%
EGFRTCGA-GBM45312257%
KRASTCGA-PAAD1348192%
Source: GDC via
GDC_get_mutation_frequency
,
GDC_get_cnv_data
基因TCGA项目SSM病例数拷贝数扩增拷贝数缺失样本占比
EGFRTCGA-LUAD15689528%
EGFRTCGA-GBM45312257%
KRASTCGA-PAAD1348192%
来源:GDC via
GDC_get_mutation_frequency
,
GDC_get_cnv_data

DepMap Target Essentiality (NEW)

DepMap靶点必要性(新增)

GeneMean Effect (All)Mean Effect (Cancer Type)SelectivityInterpretation
EGFR-0.15-0.45 (lung)Cancer-selectiveGood target
KRAS-0.82-0.91 (pancreatic)EssentialHard to target
MYC-0.95-0.93Pan-essentialChallenging target
Effect score <-0.5 = strongly essential for cell survival Source: DepMap via
DepMap_get_gene_dependencies
Combined Sources: CIViC, ClinVar, COSMIC, GDC/TCGA, DepMap

---
基因平均效应(所有细胞系)平均效应(特定癌症类型)选择性解读
EGFR-0.15-0.45(肺癌)癌症选择性优质靶点
KRAS-0.82-0.91(胰腺癌)必需难以靶向
MYC-0.95-0.93泛必需具有挑战性的靶点
效应评分<-0.5 = 对细胞生存高度必需 来源:DepMap via
DepMap_get_gene_dependencies
综合来源:CIViC、ClinVar、COSMIC、GDC/TCGA、DepMap

---

Phase 2.5: Tumor Expression Context (NEW)

阶段2.5:肿瘤表达背景(新增)

2.5.1 Cell-Type Expression in Tumor (CELLxGENE)

2.5.1 肿瘤中细胞类型特异性表达(CELLxGENE)

python
def get_tumor_expression_context(tu, gene_symbol, cancer_type):
    """Get cell-type specific expression in tumor microenvironment."""
    
    # Get expression in tumor and normal cells
    expression = tu.tools.CELLxGENE_get_expression_data(
        gene=gene_symbol,
        tissue=cancer_type  # e.g., "lung", "breast"
    )
    
    # Cell metadata for context
    cell_metadata = tu.tools.CELLxGENE_get_cell_metadata(
        gene=gene_symbol
    )
    
    # Identify tumor vs normal expression
    tumor_expression = [c for c in expression if 'tumor' in c.get('cell_type', '').lower()]
    normal_expression = [c for c in expression if 'normal' in c.get('cell_type', '').lower()]
    
    return {
        'tumor_expression': tumor_expression,
        'normal_expression': normal_expression,
        'ratio': calculate_tumor_normal_ratio(tumor_expression, normal_expression)
    }
Why it matters:
  • Confirms target is expressed in tumor cells (not just stroma)
  • Identifies potential resistance from tumor heterogeneity
  • Supports drug selection based on expression patterns
python
def get_tumor_expression_context(tu, gene_symbol, cancer_type):
    """Get cell-type specific expression in tumor microenvironment."""
    
    # Get expression in tumor and normal cells
    expression = tu.tools.CELLxGENE_get_expression_data(
        gene=gene_symbol,
        tissue=cancer_type  # e.g., "lung", "breast"
    )
    
    # Cell metadata for context
    cell_metadata = tu.tools.CELLxGENE_get_cell_metadata(
        gene=gene_symbol
    )
    
    # Identify tumor vs normal expression
    tumor_expression = [c for c in expression if 'tumor' in c.get('cell_type', '').lower()]
    normal_expression = [c for c in expression if 'normal' in c.get('cell_type', '').lower()]
    
    return {
        'tumor_expression': tumor_expression,
        'normal_expression': normal_expression,
        'ratio': calculate_tumor_normal_ratio(tumor_expression, normal_expression)
    }
重要性:
  • 确认靶点在肿瘤细胞中表达(而非仅基质细胞)
  • 识别肿瘤异质性导致的潜在耐药性
  • 根据表达模式支持药物选择

2.5.2 Output for Report

2.5.2 报告输出示例

markdown
undefined
markdown
undefined

2.5 Tumor Expression Context

2.5 肿瘤表达背景

Target Expression in Tumor Microenvironment (CELLxGENE)

肿瘤微环境中的靶点表达(CELLxGENE)

GeneTumor CellsNormal CellsTumor/Normal RatioInterpretation
EGFRHigh (TPM=85)Medium (TPM=25)3.4xGood target
METMedium (TPM=35)Low (TPM=8)4.4xPotential bypass
AXLHigh (TPM=120)Low (TPM=15)8.0xResistance marker
基因肿瘤细胞正常细胞肿瘤/正常比值解读
EGFR高(TPM=85)中(TPM=25)3.4倍优质靶点
MET中(TPM=35)低(TPM=8)4.4倍潜在旁路通路
AXL高(TPM=120)低(TPM=15)8.0倍耐药标志物

Cell Type Distribution

细胞类型分布

  • EGFR-high cells: Tumor epithelial (85%), CAFs (10%), immune (5%)
  • MET-high cells: Tumor epithelial (70%), endothelial (20%), immune (10%)
Clinical Relevance: EGFR highly expressed in tumor epithelial cells. AXL overexpression in tumor suggests potential resistance mechanism.
Source: CELLxGENE Census

---
  • EGFR高表达细胞: 肿瘤上皮细胞(85%)、癌相关成纤维细胞(10%)、免疫细胞(5%)
  • MET高表达细胞: 肿瘤上皮细胞(70%)、内皮细胞(20%)、免疫细胞(10%)
临床相关性: EGFR在肿瘤上皮细胞中高表达。AXL在肿瘤中过表达提示潜在耐药机制。
来源:CELLxGENE Census

---

Phase 3: Treatment Options

阶段3:治疗方案

3.1 Approved Therapies

3.1 获批疗法

Query order:
  1. OpenTargets_get_associated_drugs_by_target_ensemblId
    → Approved drugs
  2. DailyMed_search_spls
    → FDA label details
  3. ChEMBL_get_drug_mechanisms_of_action_by_chemblId
    → Mechanism
查询顺序:
  1. OpenTargets_get_associated_drugs_by_target_ensemblId
    → 获批药物
  2. DailyMed_search_spls
    → FDA标签详情
  3. ChEMBL_get_drug_mechanisms_of_action_by_chemblId
    → 作用机制

3.2 Treatment Prioritization

3.2 治疗方案优先级

PriorityCriteria
1st LineFDA-approved for indication + biomarker (★★★)
2nd LineClinical trial evidence, guideline-recommended (★★☆)
3rd LineOff-label with mechanistic rationale (★☆☆)
优先级标准
一线方案针对适应症+生物标志物的FDA获批疗法(★★★)
二线方案有临床试验证据、指南推荐的方案(★★☆)
三线方案有机制依据的超适应症用药(★☆☆)

3.3 Output Format

3.3 输出格式

markdown
undefined
markdown
undefined

Treatment Recommendations

治疗建议

First-Line Options

一线方案

1. Osimertinib (Tagrisso) ★★★
  • FDA-approved for EGFR T790M+ NSCLC
  • Evidence: AURA3 trial (ORR 71%, mPFS 10.1 mo)
  • Source: FDA label, PMID:27959700
1. Osimertinib(Tagrisso) ★★★
  • FDA批准用于EGFR T790M+非小细胞肺癌
  • 证据:AURA3试验(客观缓解率71%,中位无进展生存期10.1个月)
  • 来源:FDA标签,PMID:27959700

Second-Line Options

二线方案

2. Combination: Osimertinib + [Agent] ★★☆
  • Evidence: Phase 2 data
  • Source: NCT04487080

---
2. 联合疗法:Osimertinib + [药物] ★★☆
  • 证据:2期临床数据
  • 来源:NCT04487080

---

Phase 3.5: Pathway & Network Analysis (NEW)

阶段3.5:通路与网络分析(新增)

3.5.1 Pathway Context (KEGG/Reactome)

3.5.1 通路背景(KEGG/Reactome)

python
def get_pathway_context(tu, gene_symbols, cancer_type):
    """Get pathway context for drug combinations and resistance."""
    
    pathway_map = {}
    for gene in gene_symbols:
        # KEGG pathways
        kegg_gene = tu.tools.kegg_find_genes(query=f"hsa:{gene}")
        if kegg_gene:
            pathways = tu.tools.kegg_get_gene_info(gene_id=kegg_gene[0]['id'])
            pathway_map[gene] = pathways.get('pathways', [])
        
        # Reactome disease score
        reactome = tu.tools.reactome_disease_target_score(
            disease=cancer_type,
            target=gene
        )
        pathway_map[f"{gene}_reactome"] = reactome
    
    return pathway_map
python
def get_pathway_context(tu, gene_symbols, cancer_type):
    """Get pathway context for drug combinations and resistance."""
    
    pathway_map = {}
    for gene in gene_symbols:
        # KEGG pathways
        kegg_gene = tu.tools.kegg_find_genes(query=f"hsa:{gene}")
        if kegg_gene:
            pathways = tu.tools.kegg_get_gene_info(gene_id=kegg_gene[0]['id'])
            pathway_map[gene] = pathways.get('pathways', [])
        
        # Reactome disease score
        reactome = tu.tools.reactome_disease_target_score(
            disease=cancer_type,
            target=gene
        )
        pathway_map[f"{gene}_reactome"] = reactome
    
    return pathway_map

3.5.2 Protein Interaction Network (IntAct)

3.5.2 蛋白质相互作用网络(IntAct)

python
def get_resistance_network(tu, drug_target, bypass_candidates):
    """Find protein interactions that may mediate resistance."""
    
    # Get interaction network for drug target
    network = tu.tools.intact_get_interaction_network(
        gene=drug_target,
        depth=2  # Include 2nd degree connections
    )
    
    # Find bypass pathway candidates in network
    bypass_in_network = [
        node for node in network['nodes']
        if node['gene'] in bypass_candidates
    ]
    
    return {
        'network': network,
        'bypass_connections': bypass_in_network,
        'total_interactors': len(network['nodes'])
    }
python
def get_resistance_network(tu, drug_target, bypass_candidates):
    """Find protein interactions that may mediate resistance."""
    
    # Get interaction network for drug target
    network = tu.tools.intact_get_interaction_network(
        gene=drug_target,
        depth=2  # Include 2nd degree connections
    )
    
    # Find bypass pathway candidates in network
    bypass_in_network = [
        node for node in network['nodes']
        if node['gene'] in bypass_candidates
    ]
    
    return {
        'network': network,
        'bypass_connections': bypass_in_network,
        'total_interactors': len(network['nodes'])
    }

3.5.3 Output for Report

3.5.3 报告输出示例

markdown
undefined
markdown
undefined

3.5 Pathway & Network Analysis

3.5 通路与网络分析

Signaling Pathway Context (KEGG)

信号通路背景(KEGG)

PathwayGenes InvolvedRelevanceDrug Targets
EGFR signaling (hsa04012)EGFR, MET, ERBB3Primary pathwayOsimertinib, Capmatinib
PI3K-AKT (hsa04151)PIK3CA, AKT1DownstreamAlpelisib
RAS-MAPK (hsa04010)KRAS, BRAF, MEKBypass potentialSotorasib, Trametinib
通路涉及基因相关性药物靶点
EGFR信号通路(hsa04012)EGFR、MET、ERBB3主要通路Osimertinib、Capmatinib
PI3K-AKT通路(hsa04151)PIK3CA、AKT1下游通路Alpelisib
RAS-MAPK通路(hsa04010)KRAS、BRAF、MEK潜在旁路通路Sotorasib、Trametinib

Drug Combination Rationale

联合用药依据

Biological basis for combinations:
  • EGFR inhibition → compensatory MET activation (60% of cases)
  • Rationale for EGFR + MET inhibition: Block primary and bypass pathways
  • Network shows direct EGFR-MET interaction (IntAct: MI-score 0.75)
联合用药的生物学基础:
  • EGFR抑制 → MET代偿性激活(60%病例)
  • EGFR + MET抑制的依据: 阻断主通路与旁路通路
  • 网络显示EGFR与MET直接相互作用(IntAct: MI评分0.75)

Protein Interaction Network (IntAct)

蛋白质相互作用网络(IntAct)

TargetDirect InteractorsKey PartnersRelevance
EGFR156MET, ERBB2, ERBB3, GRB2Bypass pathways
MET89EGFR, HGF, GAB1Resistance mediator
Source: KEGG, Reactome, IntAct

---
靶点直接相互作用因子关键搭档相关性
EGFR156个MET、ERBB2、ERBB3、GRB2旁路通路
MET89个EGFR、HGF、GAB1耐药介导因子
来源:KEGG、Reactome、IntAct

---

Phase 4: Resistance Analysis

阶段4:耐药性分析

4.1 Known Mechanisms (Literature + CIViC)

4.1 已知机制(文献 + CIViC)

python
def analyze_resistance(tu, drug_name, gene_symbol):
    """Find known resistance mechanisms."""
    # CIViC resistance evidence
    resistance = tu.tools.civic_search_evidence_items(
        drug=drug_name,
        evidence_type="Predictive",
        clinical_significance="Resistance"
    )
    
    # Literature search
    papers = tu.tools.PubMed_search_articles(
        query=f'"{drug_name}" AND "{gene_symbol}" AND resistance',
        limit=20
    )
    
    return {'civic': resistance, 'literature': papers}
python
def analyze_resistance(tu, drug_name, gene_symbol):
    """Find known resistance mechanisms."""
    # CIViC resistance evidence
    resistance = tu.tools.civic_search_evidence_items(
        drug=drug_name,
        evidence_type="Predictive",
        clinical_significance="Resistance"
    )
    
    # Literature search
    papers = tu.tools.PubMed_search_articles(
        query=f'"{drug_name}" AND "{gene_symbol}" AND resistance',
        limit=20
    )
    
    return {'civic': resistance, 'literature': papers}

4.2 Structure-Based Analysis (NvidiaNIM)

4.2 基于结构的分析(NvidiaNIM)

When mutation affects drug binding:
python
def model_resistance_mechanism(tu, gene_ids, mutation, drug_smiles):
    """Model structural impact of resistance mutation."""
    # Get/predict structure
    structure = tu.tools.NvidiaNIM_alphafold2(sequence=wild_type_sequence)
    
    # Dock drug to wild-type
    wt_docking = tu.tools.NvidiaNIM_diffdock(
        protein=structure['structure'],
        ligand=drug_smiles,
        num_poses=5
    )
    
    # Compare binding site changes
    # Report: "T790M introduces bulky methionine, steric clash with erlotinib"

当突变影响药物结合时:
python
def model_resistance_mechanism(tu, gene_ids, mutation, drug_smiles):
    """Model structural impact of resistance mutation."""
    # Get/predict structure
    structure = tu.tools.NvidiaNIM_alphafold2(sequence=wild_type_sequence)
    
    # Dock drug to wild-type
    wt_docking = tu.tools.NvidiaNIM_diffdock(
        protein=structure['structure'],
        ligand=drug_smiles,
        num_poses=5
    )
    
    # Compare binding site changes
    # Report: "T790M introduces bulky methionine, steric clash with erlotinib"

Phase 5: Clinical Trial Matching

阶段5:临床试验匹配

5.1 Search Strategy

5.1 搜索策略

python
def find_trials(tu, condition, biomarker, location=None):
    """Find matching clinical trials."""
    # Search with biomarker
    trials = tu.tools.search_clinical_trials(
        condition=condition,
        intervention=biomarker,  # e.g., "EGFR"
        status="Recruiting",
        pageSize=50
    )
    
    # Get eligibility for top matches
    nct_ids = [t['nct_id'] for t in trials[:20]]
    eligibility = tu.tools.get_clinical_trial_eligibility_criteria(nct_ids=nct_ids)
    
    return trials, eligibility
python
def find_trials(tu, condition, biomarker, location=None):
    """Find matching clinical trials."""
    # Search with biomarker
    trials = tu.tools.search_clinical_trials(
        condition=condition,
        intervention=biomarker,  # e.g., "EGFR"
        status="Recruiting",
        pageSize=50
    )
    
    # Get eligibility for top matches
    nct_ids = [t['nct_id'] for t in trials[:20]]
    eligibility = tu.tools.get_clinical_trial_eligibility_criteria(nct_ids=nct_ids)
    
    return trials, eligibility

5.2 Output Format

5.2 输出格式

markdown
undefined
markdown
undefined

Clinical Trial Options

临床试验选项

NCT IDPhaseAgentBiomarker RequiredStatusLocation
NCT044870802Amivantamab + lazertinibEGFR T790MRecruitingUS, EU
NCT053886693Patritumab deruxtecanPrior osimertinibRecruitingUS
Source: ClinicalTrials.gov

---
NCT编号试验阶段试验药物所需生物标志物状态地点
NCT044870802期Amivantamab + lazertinibEGFR T790M招募中美国、欧盟
NCT053886693期Patritumab deruxtecan既往使用Osimertinib招募中美国
来源:ClinicalTrials.gov

---

Phase 5.5: Literature Evidence (NEW)

阶段5.5:文献证据(新增)

5.5.1 Published Literature (PubMed)

5.5.1 已发表文献(PubMed)

python
def search_treatment_literature(tu, cancer_type, biomarker, drug_name):
    """Search for treatment evidence in literature."""
    
    # Drug + biomarker combination
    drug_papers = tu.tools.PubMed_search_articles(
        query=f'"{drug_name}" AND "{biomarker}" AND "{cancer_type}"',
        limit=20
    )
    
    # Resistance mechanisms
    resistance_papers = tu.tools.PubMed_search_articles(
        query=f'"{drug_name}" AND resistance AND mechanism',
        limit=15
    )
    
    return {
        'treatment_evidence': drug_papers,
        'resistance_literature': resistance_papers
    }
python
def search_treatment_literature(tu, cancer_type, biomarker, drug_name):
    """Search for treatment evidence in literature."""
    
    # Drug + biomarker combination
    drug_papers = tu.tools.PubMed_search_articles(
        query=f'"{drug_name}" AND "{biomarker}" AND "{cancer_type}"',
        limit=20
    )
    
    # Resistance mechanisms
    resistance_papers = tu.tools.PubMed_search_articles(
        query=f'"{drug_name}" AND resistance AND mechanism',
        limit=15
    )
    
    return {
        'treatment_evidence': drug_papers,
        'resistance_literature': resistance_papers
    }

5.5.2 Preprints (BioRxiv/MedRxiv)

5.5.2 预印本(BioRxiv/MedRxiv)

python
def search_preprints(tu, cancer_type, biomarker):
    """Search preprints for cutting-edge findings."""
    
    # BioRxiv cancer research
    biorxiv = tu.tools.BioRxiv_search_preprints(
        query=f"{cancer_type} {biomarker} treatment",
        limit=10
    )
    
    # MedRxiv clinical studies
    medrxiv = tu.tools.MedRxiv_search_preprints(
        query=f"{cancer_type} {biomarker}",
        limit=10
    )
    
    return {
        'biorxiv': biorxiv,
        'medrxiv': medrxiv
    }
python
def search_preprints(tu, cancer_type, biomarker):
    """Search preprints for cutting-edge findings."""
    
    # BioRxiv cancer research
    biorxiv = tu.tools.BioRxiv_search_preprints(
        query=f"{cancer_type} {biomarker} treatment",
        limit=10
    )
    
    # MedRxiv clinical studies
    medrxiv = tu.tools.MedRxiv_search_preprints(
        query=f"{cancer_type} {biomarker}",
        limit=10
    )
    
    return {
        'biorxiv': biorxiv,
        'medrxiv': medrxiv
    }

5.5.3 Citation Analysis (OpenAlex)

5.5.3 引用分析(OpenAlex)

python
def analyze_key_papers(tu, key_papers):
    """Get citation metrics for key evidence papers."""
    
    analyzed = []
    for paper in key_papers[:10]:
        work = tu.tools.openalex_search_works(
            query=paper['title'],
            limit=1
        )
        if work:
            analyzed.append({
                'title': paper['title'],
                'citations': work[0].get('cited_by_count', 0),
                'year': work[0].get('publication_year'),
                'open_access': work[0].get('is_oa', False)
            })
    
    return analyzed
python
def analyze_key_papers(tu, key_papers):
    """Get citation metrics for key evidence papers."""
    
    analyzed = []
    for paper in key_papers[:10]:
        work = tu.tools.openalex_search_works(
            query=paper['title'],
            limit=1
        )
        if work:
            analyzed.append({
                'title': paper['title'],
                'citations': work[0].get('cited_by_count', 0),
                'year': work[0].get('publication_year'),
                'open_access': work[0].get('is_oa', False)
            })
    
    return analyzed

5.5.4 Output for Report

5.5.4 报告输出示例

markdown
undefined
markdown
undefined

5.5 Literature Evidence

5.5 文献证据

Key Clinical Studies

关键临床研究

PMIDTitleYearCitationsEvidence Type
27959700AURA3: Osimertinib vs chemotherapy...20172,450Phase 3 trial
30867819Mechanisms of osimertinib resistance...2019680Review
34125020Amivantamab + lazertinib Phase 1...2021320Phase 1 trial
PMID标题年份引用数证据类型
27959700AURA3: Osimertinib vs chemotherapy...20172,4503期临床试验
30867819Mechanisms of osimertinib resistance...2019680综述
34125020Amivantamab + lazertinib Phase 1...20213201期临床试验

Recent Preprints (Not Peer-Reviewed)

最新预印本(未同行评议)

SourceTitlePostedKey Finding
MedRxivNovel C797S resistance strategy...2024-01Fourth-gen TKI
BioRxivscRNA-seq reveals resistance...2024-02Cell state switch
⚠️ Note: Preprints have NOT undergone peer review. Interpret with caution.
来源标题发布日期关键发现
MedRxivNovel C797S resistance strategy...2024-01第四代TKI
BioRxivscRNA-seq reveals resistance...2024-02细胞状态转换
⚠️ 注意: 预印本未经过同行评议,请谨慎解读。

Evidence Summary

证据汇总

CategoryPapers FoundHigh-Impact (>100 citations)
Treatment efficacy258
Resistance mechanisms185
Combinations123
Source: PubMed, BioRxiv, MedRxiv, OpenAlex

---
类别找到文献数高影响力文献(>100引用)
治疗有效性258
耐药机制185
联合用药123
来源:PubMed、BioRxiv、MedRxiv、OpenAlex

---

Report Template

报告模板

File:
[PATIENT_ID]_oncology_report.md
markdown
undefined
文件:
[PATIENT_ID]_oncology_report.md
markdown
undefined

Precision Oncology Report

精准肿瘤学报告

Patient ID: [ID] | Date: [Date]
患者ID: [ID] | 日期: [日期]

Patient Profile

患者概况

  • Diagnosis: [Cancer type, stage]
  • Molecular Profile: [Mutations, fusions]
  • Prior Therapy: [Previous treatments]

  • 诊断: [癌症类型、分期]
  • 分子图谱: [突变、融合]
  • 既往治疗: [之前的治疗方案]

Executive Summary

执行摘要

[2-3 sentence summary of key findings and recommendation]

[2-3句话总结关键发现与建议]

1. Variant Interpretation

1. 突变解读

[Table with variants, significance, evidence levels]
[包含突变、显著性、证据等级的表格]

2. Treatment Recommendations

2. 治疗建议

First-Line Options

一线方案

[Prioritized list with evidence]
[带证据的优先级列表]

Second-Line Options

二线方案

[Alternative approaches]
[替代方案]

3. Resistance Analysis (if applicable)

3. 耐药性分析(如适用)

[Mechanism explanation, strategies to overcome]
[机制解释、克服策略]

4. Clinical Trial Options

4. 临床试验选项

[Matched trials with eligibility]
[匹配的试验与入选资格]

5. Next Steps

5. 后续步骤

  1. [Specific actionable recommendation]
  2. [Follow-up testing if needed]
  3. [Referral if appropriate]

  1. [具体可执行建议]
  2. [如需后续检测]
  3. [如需转诊]

Data Sources

数据来源

SourceQueryData Retrieved
CIViC[gene] [variant]Evidence items
ClinicalTrials.gov[condition]Active trials

---
来源查询内容获取数据
CIViC[基因] [突变]证据条目
ClinicalTrials.gov[适应症]在研试验

---

Completeness Checklist

完整性检查清单

Before finalizing report:
  • All variants interpreted with evidence levels
  • ≥1 first-line recommendation with ★★★ evidence (or explain why none)
  • Resistance mechanism addressed (if prior therapy failed)
  • ≥3 clinical trials listed (or "no matching trials")
  • Executive summary is actionable (says what to DO)
  • All recommendations have source citations

最终定稿前确认:
  • 所有突变均已解读并标注证据等级
  • 至少1项一线建议带有★★★证据(或说明无可用方案的原因)
  • 已解决耐药机制问题(若既往治疗失败)
  • 列出至少3项临床试验(或“无匹配试验”)
  • 执行摘要具备可行动性(明确说明要做什么)
  • 所有建议均有来源引用

Fallback Chains

备选方案链

PrimaryFallbackUse When
CIViC variantOncoKB (literature)Variant not in CIViC
OpenTargets drugsChEMBL activitiesNo approved drugs found
ClinicalTrials.govWHO ICTRPUS trials insufficient
NvidiaNIM_alphafold2AlphaFold DBAPI unavailable

首选工具备选工具使用场景
CIViC突变查询OncoKB(文献)突变未收录在CIViC中
OpenTargets药物查询ChEMBL活性数据未找到获批药物
ClinicalTrials.govWHO ICTRP美国试验数量不足
NvidiaNIM_alphafold2AlphaFold DBAPI不可用

Evidence Grading

证据分级

TierSymbolCriteriaExample
T1★★★FDA-approved, Level A evidenceOsimertinib for T790M
T2★★☆Phase 2/3 data, Level BCombination trials
T3★☆☆Preclinical, Level DNovel mechanisms
T4☆☆☆Computational onlyDocking predictions

分级符号标准示例
T1★★★FDA批准、A级证据Osimertinib用于T790M突变
T2★★☆2/3期临床数据、B级证据联合用药试验
T3★☆☆临床前研究、D级证据新型机制
T4☆☆☆仅计算分析对接预测

Tool Reference

工具参考

See TOOLS_REFERENCE.md for complete tool documentation.
完整工具文档请参考 TOOLS_REFERENCE.md