OpenClaw-Medical-Skills tumor-heterogeneity-agent

<!--

install
source · Clone the upstream repo
git clone https://github.com/FreedomIntelligence/OpenClaw-Medical-Skills
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/FreedomIntelligence/OpenClaw-Medical-Skills "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/tumor-heterogeneity-agent" ~/.claude/skills/freedomintelligence-openclaw-medical-skills-tumor-heterogeneity-agent && rm -rf "$T"
OpenClaw · Install into ~/.openclaw/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/FreedomIntelligence/OpenClaw-Medical-Skills "$T" && mkdir -p ~/.openclaw/skills && cp -r "$T/skills/tumor-heterogeneity-agent" ~/.openclaw/skills/freedomintelligence-openclaw-medical-skills-tumor-heterogeneity-agent && rm -rf "$T"
manifest: skills/tumor-heterogeneity-agent/SKILL.md
source content
<!-- # COPYRIGHT NOTICE # This file is part of the "Universal Biomedical Skills" project. # Copyright (c) 2026 MD BABU MIA, PhD <md.babu.mia@mssm.edu> # All Rights Reserved. # # This code is proprietary and confidential. # Unauthorized copying of this file, via any medium is strictly prohibited. # # Provenance: Authenticated by MD BABU MIA -->

name: 'tumor-heterogeneity-agent' description: 'AI-powered intratumor heterogeneity analysis for clonal architecture reconstruction, subclonal evolution tracking, and therapy resistance prediction using multi-region and longitudinal sequencing.' measurable_outcome: Execute skill workflow successfully with valid output within 15 minutes. allowed-tools:

  • read_file
  • run_shell_command

Tumor Heterogeneity Agent

The Tumor Heterogeneity Agent provides comprehensive analysis of intratumor heterogeneity (ITH) for understanding clonal architecture, tracking subclonal evolution, and predicting therapy resistance. It integrates multi-region sequencing, single-cell data, and longitudinal samples to reconstruct tumor phylogenies and identify actionable subclones.

When to Use This Skill

  • When analyzing multi-region tumor sequencing for clonal architecture.
  • For tracking clonal evolution under treatment pressure.
  • To predict resistance emergence from subclonal populations.
  • When assessing tumor heterogeneity impact on treatment response.
  • For integrating single-cell and bulk sequencing for ITH analysis.

Core Capabilities

  1. Clonal Deconvolution: Infer clonal populations and their frequencies.

  2. Phylogeny Reconstruction: Build tumor evolutionary trees from variants.

  3. Subclonal Tracking: Monitor subclone dynamics over time.

  4. Resistance Prediction: Identify pre-existing resistant subclones.

  5. Multi-Region Integration: Combine spatial heterogeneity data.

  6. Single-Cell ITH: Integrate scDNA-seq for ground-truth clones.

Heterogeneity Metrics

MetricDefinitionClinical Relevance
MATH ScoreMutant-allele tumor heterogeneityITH quantification
Shannon IndexClonal diversityEvolutionary potential
Clone CountNumber of distinct clonesComplexity
Truncal Fraction% truncal mutationsTargetability
ITH ScoreComposite heterogeneityPrognosis

Workflow

  1. Input: Multi-region/longitudinal WES/WGS, copy number, tumor purity.

  2. Preprocessing: Variant calling, CNV calling, purity estimation.

  3. CCF Estimation: Calculate cancer cell fraction for each mutation.

  4. Clustering: Group mutations into clonal populations.

  5. Phylogeny: Reconstruct evolutionary tree.

  6. Temporal Analysis: Track clone dynamics over time.

  7. Output: Clone structures, phylogenies, heterogeneity metrics.

Example Usage

User: "Analyze the clonal architecture of this multi-region lung tumor sequencing to understand heterogeneity and identify resistant subclones."

Agent Action:

python3 Skills/Oncology/Tumor_Heterogeneity_Agent/ith_analysis.py \
    --multi_region_vcfs region1.vcf,region2.vcf,region3.vcf \
    --cnv_segments cnv_calls.seg \
    --purity 0.7,0.65,0.72 \
    --sample_names Primary,Met1,Met2 \
    --method pyclone-vi \
    --phylogeny_method citup \
    --output ith_analysis/

Deconvolution Methods

MethodApproachBest For
PyClone-VIVariational inferenceLarge datasets
SciCloneKernel densityHigh purity
EXPANDSProbabilisticMulti-region
CanopyEM algorithmCNV integration
ClonevolPhylogeny-awareLongitudinal
CITUPInteger programmingTree optimization

Input Requirements

InputFormatRequired
Somatic VariantsVCF with depthYes
Copy NumberSEG fileYes
Tumor PurityFloat (0-1)Yes
Sample MetadataTSVYes
Normal BAMBAMRecommended

Output Components

OutputDescriptionFormat
Clone AssignmentsMutation-to-clone mapping.csv
Clone FrequenciesPer-sample clone fractions.csv
Phylogenetic TreeNewick and visualization.nwk, .pdf
ITH MetricsHeterogeneity scores.json
Subclone VariantsClone-specific mutations.vcf
Evolution PlotClone dynamics over time.png
Actionable SubclonesDruggable clone mutations.csv

Clonal Classification

Clone TypeDefinitionImplications
TruncalPresent in all samplesIdeal targets
BranchPresent in subsetRegional targets
PrivateSingle sample onlyLocal significance
ResistantExpand under therapyResistance mechanism

AI/ML Components

Clone Inference:

  • Variational autoencoders for CCF estimation
  • Dirichlet process mixture models
  • Graph neural networks for phylogeny

Resistance Prediction:

  • Time-series models for clone trajectories
  • Classification of resistant signatures
  • Drug-clone interaction prediction

Multi-Region Integration:

  • Multi-task learning across regions
  • Spatial models for regional patterns
  • Transfer learning across cancers

Clinical Applications

ApplicationITH InsightClinical Action
Treatment SelectionTruncal vs branch targetsPrioritize truncal targets
Resistance MonitoringPre-existing resistant clonesEarly combination therapy
PrognosisITH scoreRisk stratification
Biomarker DevelopmentClonal biomarkersRobust biomarker selection

Cancer-Specific Patterns

Cancer TypeTypical ITHKey Drivers
Lung (NSCLC)HighEGFR, KRAS subclonal
BreastModerate-HighPIK3CA, ESR1 evolution
ColorectalModerateKRAS, BRAF clonal
RenalVery HighVHL truncal, diverse branches
MelanomaHighBRAF/NRAS truncal

Prerequisites

  • Python 3.10+
  • PyClone-VI, SciClone
  • CITUP, Clonevol
  • CNVkit/FACETS for CNV
  • R with clonal evolution packages

Related Skills

  • ctDNA_Dynamics_MRD_Agent - Liquid biopsy tracking
  • Single_Cell_CNV_Agent - scDNA-seq analysis
  • HRD_Analysis_Agent - Genomic instability
  • Pan_Cancer_MultiOmics_Agent - Multi-omic integration

Phylogeny Visualization

View TypeShowsBest For
Fish PlotClone dynamics over timeLongitudinal
Tree DiagramBranching evolutionMulti-region
Muller PlotPopulation dynamicsTreatment response
Clone MapSpatial distributionMulti-region spatial

Special Considerations

  1. Sampling Bias: Multi-region captures more heterogeneity
  2. Purity Effects: Low purity reduces clone resolution
  3. CNV Complexity: High CNV burden complicates CCF
  4. Single-Cell Validation: Ground truth from scDNA-seq
  5. Temporal Resolution: Frequent sampling improves tracking

Resistance Mechanisms

MechanismDetectionIntervention
Pre-existing resistant cloneSubclonal at baselineCombination therapy
Acquired resistanceNew clone emergesSwitch therapy
Phenotypic plasticityExpression changeMonitor phenotype
MicroenvironmentTME evolutionImmunotherapy

Author

AI Group - Biomedical AI Platform

<!-- AUTHOR_SIGNATURE: 9a7f3c2e-MD-BABU-MIA-2026-MSSM-SECURE -->