OpenClaw-Medical-Skills tme-immune-profiling-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/tme-immune-profiling-agent" ~/.claude/skills/freedomintelligence-openclaw-medical-skills-tme-immune-profiling-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/tme-immune-profiling-agent" ~/.openclaw/skills/freedomintelligence-openclaw-medical-skills-tme-immune-profiling-agent && rm -rf "$T"
manifest: skills/tme-immune-profiling-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: 'tme-immune-profiling-agent' description: 'Comprehensive AI-powered tumor microenvironment immune profiling integrating bulk deconvolution, single-cell analysis, and spatial transcriptomics for immunotherapy biomarker discovery.' measurable_outcome: Execute skill workflow successfully with valid output within 15 minutes. allowed-tools:

  • read_file
  • run_shell_command

TME Immune Profiling Agent

The TME Immune Profiling Agent provides comprehensive tumor microenvironment (TME) immune profiling by integrating multiple data modalities including bulk RNA-seq deconvolution, single-cell transcriptomics, spatial transcriptomics, and multiplex immunofluorescence. It enables biomarker discovery for immunotherapy response and TME-based patient stratification.

When to Use This Skill

  • When characterizing immune composition of tumor microenvironment.
  • For predicting immunotherapy response from TME profiles.
  • To identify immune cell states and functional programs.
  • When analyzing spatial organization of immune infiltrates.
  • For discovering TME-based biomarkers and therapeutic targets.

Core Capabilities

  1. Bulk Deconvolution: Estimate immune cell fractions from bulk RNA-seq.

  2. Single-Cell Immune Profiling: Deep characterization of immune populations.

  3. Spatial Immune Architecture: Map immune cell locations and neighborhoods.

  4. Immune Phenotype Classification: Hot/cold/excluded tumor classification.

  5. Functional State Analysis: Exhaustion, activation, memory signatures.

  6. Response Prediction: Multi-modal immunotherapy response models.

Immune Cell Types Profiled

Cell TypeSubtypesKey Markers
T cellsCD8+, CD4+, Treg, Th1/2/17CD3, CD8, CD4, FOXP3
B cellsNaive, memory, plasmaCD19, CD20, CD138
NK cellsCD56bright, CD56dimNKG7, NCAM1
MacrophagesM1, M2, TAMCD68, CD163, CD206
DendriticcDC1, cDC2, pDCCLEC9A, CD1C, BDCA2
MDSCM-MDSC, PMN-MDSCCD33, CD11b, ARG1
CAFmyCAF, iCAF, apCAFFAP, ACTA2, COL1A1

Deconvolution Methods

MethodAlgorithmCell TypesBest For
CIBERSORTxSVR22Gold standard
xCellssGSEA64Comprehensive
EPICConstrained regression8Tumor/stroma
MCP-counterMarker genes10Robust scores
quanTIseqDeconvolution10Pan-cancer
TIMER2.0MultipleVariableIntegrated

Workflow

  1. Input: Bulk RNA-seq, scRNA-seq, spatial data, or IHC images.

  2. Deconvolution: Estimate cell fractions from bulk data.

  3. Single-Cell Analysis: Deep immune phenotyping if available.

  4. Spatial Mapping: Localize immune populations in tissue.

  5. Integration: Combine modalities for comprehensive profile.

  6. Classification: Assign TME phenotype (hot/cold/excluded).

  7. Output: Immune profiles, visualizations, response predictions.

Example Usage

User: "Profile the tumor microenvironment of this lung cancer cohort to identify immunotherapy responders."

Agent Action:

python3 Skills/Immunology_Vaccines/TME_Immune_Profiling_Agent/tme_profiling.py \
    --bulk_rna expression_matrix.tsv \
    --scRNA_data scRNA_lung.h5ad \
    --spatial_data visium_tumor.h5ad \
    --cancer_type nsclc \
    --deconvolution_methods cibersortx,epic,mcpcounter \
    --response_labels clinical_response.csv \
    --output tme_profiles/

TME Phenotypes

PhenotypeCharacteristicsImmunotherapy Response
Immune HotHigh TIL infiltration, PD-L1+Favorable
Immune ColdLow TIL, low inflammationPoor
Immune ExcludedTILs at margin, not penetratingIntermediate
Immune SuppressedTILs + MDSCs/TregsVariable

Output Components

OutputDescriptionFormat
Cell FractionsPer-sample immune estimates.csv
TME ClassificationHot/cold/excluded labels.csv
Immune ScoresComposite signatures.csv
Spatial MapsCell type locations.h5ad
Neighborhood AnalysisImmune niches.csv
Response PredictionIO probability.json
VisualizationsDeconvolution plots.png, .pdf

Immune Signatures

SignatureGenesInterpretation
CytotoxicPRF1, GZMB, GNLYT cell killing
ExhaustionPDCD1, LAG3, HAVCR2, TIGITT cell dysfunction
IFN-gammaIFNG, STAT1, IRF1Inflammation
TLSCD20, CD4, BCL6Tertiary lymphoid
ExclusionTGFB1, FAP, COL1A1Stromal barrier

AI/ML Components

Deconvolution Enhancement:

  • Deep learning deconvolution
  • Multi-method ensemble
  • Single-cell reference optimization

Response Prediction:

  • Multi-modal fusion (bulk + spatial)
  • Survival analysis integration
  • Transfer learning across cancers

Spatial Analysis:

  • Graph neural networks for niches
  • Attention for region importance
  • Cell-cell interaction networks

Clinical Applications

ApplicationTME FeatureClinical Decision
IO SelectionImmune hot phenotypePrioritize IO
CombinationCold + excludedConsider combo
PrognosisTLS presenceFavorable outcome
BiomarkerCD8+ densityResponse prediction
ResistanceMDSC enrichmentAddress suppression

Performance Benchmarks

TaskDatasetPerformance
IO ResponseNSCLCAUC 0.78
IO ResponseMelanomaAUC 0.82
TME ClassificationPan-cancerAccuracy 85%
SurvivalTCGAC-index 0.72

Prerequisites

  • Python 3.10+
  • CIBERSORTx, EPIC, xCell
  • Scanpy, Squidpy
  • PyTorch for deep learning
  • R for certain deconvolution methods

Related Skills

  • TCR_Repertoire_Analysis_Agent - T cell specificity
  • TCell_Exhaustion_Analysis_Agent - Exhaustion phenotyping
  • Spatial_Epigenomics_Agent - Spatial analysis
  • Nicheformer_Spatial_Agent - Spatial foundation models

Spatial Immune Metrics

MetricDefinitionClinical Relevance
Immune DistanceDistance to tumor edgeExclusion
Clustering CoefficientImmune aggregationTLS formation
CD8/Treg RatioSpatial ratioEffector balance
Contact ScoreImmune-tumor contactsDirect killing
Neighborhood EntropyMixing vs segregationTME organization

Special Considerations

  1. Reference Panel: Use cancer-type specific references
  2. Batch Correction: Normalize across samples/platforms
  3. Purity Effects: Account for tumor purity in deconvolution
  4. Single-Cell Validation: Validate bulk estimates with scRNA
  5. Spatial Context: Bulk loses spatial information

Therapeutic Implications

TME StateTherapeutic Strategy
Hot, PD-L1+Anti-PD-1/PD-L1
ColdOncolytic virus, radiation, chemo
ExcludedTGF-beta inhibition, VEGF targeting
SuppressedTreg depletion, MDSC targeting
TLS+Excellent IO candidate

Author

AI Group - Biomedical AI Platform

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