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
Bulk Deconvolution: Estimate immune cell fractions from bulk RNA-seq.
Single-Cell Immune Profiling: Deep characterization of immune populations.
Spatial Immune Architecture: Map immune cell locations and neighborhoods.
Immune Phenotype Classification: Hot/cold/excluded tumor classification.
Functional State Analysis: Exhaustion, activation, memory signatures.
Response Prediction: Multi-modal immunotherapy response models.
Immune Cell Types Profiled
| Cell Type |
Subtypes |
Key Markers |
| T cells |
CD8+, CD4+, Treg, Th1/2/17 |
CD3, CD8, CD4, FOXP3 |
| B cells |
Naive, memory, plasma |
CD19, CD20, CD138 |
| NK cells |
CD56bright, CD56dim |
NKG7, NCAM1 |
| Macrophages |
M1, M2, TAM |
CD68, CD163, CD206 |
| Dendritic |
cDC1, cDC2, pDC |
CLEC9A, CD1C, BDCA2 |
| MDSC |
M-MDSC, PMN-MDSC |
CD33, CD11b, ARG1 |
| CAF |
myCAF, iCAF, apCAF |
FAP, ACTA2, COL1A1 |
Deconvolution Methods
| Method |
Algorithm |
Cell Types |
Best For |
| CIBERSORTx |
SVR |
22 |
Gold standard |
| xCell |
ssGSEA |
64 |
Comprehensive |
| EPIC |
Constrained regression |
8 |
Tumor/stroma |
| MCP-counter |
Marker genes |
10 |
Robust scores |
| quanTIseq |
Deconvolution |
10 |
Pan-cancer |
| TIMER2.0 |
Multiple |
Variable |
Integrated |
Workflow
Input: Bulk RNA-seq, scRNA-seq, spatial data, or IHC images.
Deconvolution: Estimate cell fractions from bulk data.
Single-Cell Analysis: Deep immune phenotyping if available.
Spatial Mapping: Localize immune populations in tissue.
Integration: Combine modalities for comprehensive profile.
Classification: Assign TME phenotype (hot/cold/excluded).
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
| Phenotype |
Characteristics |
Immunotherapy Response |
| Immune Hot |
High TIL infiltration, PD-L1+ |
Favorable |
| Immune Cold |
Low TIL, low inflammation |
Poor |
| Immune Excluded |
TILs at margin, not penetrating |
Intermediate |
| Immune Suppressed |
TILs + MDSCs/Tregs |
Variable |
Output Components
| Output |
Description |
Format |
| Cell Fractions |
Per-sample immune estimates |
.csv |
| TME Classification |
Hot/cold/excluded labels |
.csv |
| Immune Scores |
Composite signatures |
.csv |
| Spatial Maps |
Cell type locations |
.h5ad |
| Neighborhood Analysis |
Immune niches |
.csv |
| Response Prediction |
IO probability |
.json |
| Visualizations |
Deconvolution plots |
.png, .pdf |
Immune Signatures
| Signature |
Genes |
Interpretation |
| Cytotoxic |
PRF1, GZMB, GNLY |
T cell killing |
| Exhaustion |
PDCD1, LAG3, HAVCR2, TIGIT |
T cell dysfunction |
| IFN-gamma |
IFNG, STAT1, IRF1 |
Inflammation |
| TLS |
CD20, CD4, BCL6 |
Tertiary lymphoid |
| Exclusion |
TGFB1, FAP, COL1A1 |
Stromal 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
| Application |
TME Feature |
Clinical Decision |
| IO Selection |
Immune hot phenotype |
Prioritize IO |
| Combination |
Cold + excluded |
Consider combo |
| Prognosis |
TLS presence |
Favorable outcome |
| Biomarker |
CD8+ density |
Response prediction |
| Resistance |
MDSC enrichment |
Address suppression |
Performance Benchmarks
| Task |
Dataset |
Performance |
| IO Response |
NSCLC |
AUC 0.78 |
| IO Response |
Melanoma |
AUC 0.82 |
| TME Classification |
Pan-cancer |
Accuracy 85% |
| Survival |
TCGA |
C-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
| Metric |
Definition |
Clinical Relevance |
| Immune Distance |
Distance to tumor edge |
Exclusion |
| Clustering Coefficient |
Immune aggregation |
TLS formation |
| CD8/Treg Ratio |
Spatial ratio |
Effector balance |
| Contact Score |
Immune-tumor contacts |
Direct killing |
| Neighborhood Entropy |
Mixing vs segregation |
TME organization |
Special Considerations
- Reference Panel: Use cancer-type specific references
- Batch Correction: Normalize across samples/platforms
- Purity Effects: Account for tumor purity in deconvolution
- Single-Cell Validation: Validate bulk estimates with scRNA
- Spatial Context: Bulk loses spatial information
Therapeutic Implications
| TME State |
Therapeutic Strategy |
| Hot, PD-L1+ |
Anti-PD-1/PD-L1 |
| Cold |
Oncolytic virus, radiation, chemo |
| Excluded |
TGF-beta inhibition, VEGF targeting |
| Suppressed |
Treg depletion, MDSC targeting |
| TLS+ |
Excellent IO candidate |
Author
AI Group - Biomedical AI Platform
1---2name: tme-immune-profiling-agent3description: <!--4---5<!--6# COPYRIGHT NOTICE7# This file is part of the "Universal Biomedical Skills" project.8# Copyright (c) 2026 MD BABU MIA, PhD <md.babu.mia@mssm.edu>9# All Rights Reserved.10#11# This code is proprietary and confidential.12# Unauthorized copying of this file, via any medium is strictly prohibited.13#14# Provenance: Authenticated by MD BABU MIA1516-->1718---19name: 'tme-immune-profiling-agent'20description: 'Comprehensive AI-powered tumor microenvironment immune profiling integrating bulk deconvolution, single-cell analysis, and spatial transcriptomics for immunotherapy biomarker discovery.'21measurable_outcome: Execute skill workflow successfully with valid output within 15 minutes.22allowed-tools:23 - read_file24 - run_shell_command25---262728# TME Immune Profiling Agent2930The **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.3132## When to Use This Skill3334* When characterizing immune composition of tumor microenvironment.35* For predicting immunotherapy response from TME profiles.36* To identify immune cell states and functional programs.37* When analyzing spatial organization of immune infiltrates.38* For discovering TME-based biomarkers and therapeutic targets.3940## Core Capabilities41421. **Bulk Deconvolution**: Estimate immune cell fractions from bulk RNA-seq.43442. **Single-Cell Immune Profiling**: Deep characterization of immune populations.45463. **Spatial Immune Architecture**: Map immune cell locations and neighborhoods.47484. **Immune Phenotype Classification**: Hot/cold/excluded tumor classification.49505. **Functional State Analysis**: Exhaustion, activation, memory signatures.51526. **Response Prediction**: Multi-modal immunotherapy response models.5354## Immune Cell Types Profiled5556| Cell Type | Subtypes | Key Markers |57|-----------|----------|-------------|58| T cells | CD8+, CD4+, Treg, Th1/2/17 | CD3, CD8, CD4, FOXP3 |59| B cells | Naive, memory, plasma | CD19, CD20, CD138 |60| NK cells | CD56bright, CD56dim | NKG7, NCAM1 |61| Macrophages | M1, M2, TAM | CD68, CD163, CD206 |62| Dendritic | cDC1, cDC2, pDC | CLEC9A, CD1C, BDCA2 |63| MDSC | M-MDSC, PMN-MDSC | CD33, CD11b, ARG1 |64| CAF | myCAF, iCAF, apCAF | FAP, ACTA2, COL1A1 |6566## Deconvolution Methods6768| Method | Algorithm | Cell Types | Best For |69|--------|-----------|------------|----------|70| CIBERSORTx | SVR | 22 | Gold standard |71| xCell | ssGSEA | 64 | Comprehensive |72| EPIC | Constrained regression | 8 | Tumor/stroma |73| MCP-counter | Marker genes | 10 | Robust scores |74| quanTIseq | Deconvolution | 10 | Pan-cancer |75| TIMER2.0 | Multiple | Variable | Integrated |7677## Workflow78791. **Input**: Bulk RNA-seq, scRNA-seq, spatial data, or IHC images.80812. **Deconvolution**: Estimate cell fractions from bulk data.82833. **Single-Cell Analysis**: Deep immune phenotyping if available.84854. **Spatial Mapping**: Localize immune populations in tissue.86875. **Integration**: Combine modalities for comprehensive profile.88896. **Classification**: Assign TME phenotype (hot/cold/excluded).90917. **Output**: Immune profiles, visualizations, response predictions.9293## Example Usage9495**User**: "Profile the tumor microenvironment of this lung cancer cohort to identify immunotherapy responders."9697**Agent Action**:98```bash99python3 Skills/Immunology_Vaccines/TME_Immune_Profiling_Agent/tme_profiling.py \100 --bulk_rna expression_matrix.tsv \101 --scRNA_data scRNA_lung.h5ad \102 --spatial_data visium_tumor.h5ad \103 --cancer_type nsclc \104 --deconvolution_methods cibersortx,epic,mcpcounter \105 --response_labels clinical_response.csv \106 --output tme_profiles/107```108109## TME Phenotypes110111| Phenotype | Characteristics | Immunotherapy Response |112|-----------|-----------------|----------------------|113| Immune Hot | High TIL infiltration, PD-L1+ | Favorable |114| Immune Cold | Low TIL, low inflammation | Poor |115| Immune Excluded | TILs at margin, not penetrating | Intermediate |116| Immune Suppressed | TILs + MDSCs/Tregs | Variable |117118## Output Components119120| Output | Description | Format |121|--------|-------------|--------|122| Cell Fractions | Per-sample immune estimates | .csv |123| TME Classification | Hot/cold/excluded labels | .csv |124| Immune Scores | Composite signatures | .csv |125| Spatial Maps | Cell type locations | .h5ad |126| Neighborhood Analysis | Immune niches | .csv |127| Response Prediction | IO probability | .json |128| Visualizations | Deconvolution plots | .png, .pdf |129130## Immune Signatures131132| Signature | Genes | Interpretation |133|-----------|-------|----------------|134| Cytotoxic | PRF1, GZMB, GNLY | T cell killing |135| Exhaustion | PDCD1, LAG3, HAVCR2, TIGIT | T cell dysfunction |136| IFN-gamma | IFNG, STAT1, IRF1 | Inflammation |137| TLS | CD20, CD4, BCL6 | Tertiary lymphoid |138| Exclusion | TGFB1, FAP, COL1A1 | Stromal barrier |139140## AI/ML Components141142**Deconvolution Enhancement**:143- Deep learning deconvolution144- Multi-method ensemble145- Single-cell reference optimization146147**Response Prediction**:148- Multi-modal fusion (bulk + spatial)149- Survival analysis integration150- Transfer learning across cancers151152**Spatial Analysis**:153- Graph neural networks for niches154- Attention for region importance155- Cell-cell interaction networks156157## Clinical Applications158159| Application | TME Feature | Clinical Decision |160|-------------|-------------|-------------------|161| IO Selection | Immune hot phenotype | Prioritize IO |162| Combination | Cold + excluded | Consider combo |163| Prognosis | TLS presence | Favorable outcome |164| Biomarker | CD8+ density | Response prediction |165| Resistance | MDSC enrichment | Address suppression |166167## Performance Benchmarks168169| Task | Dataset | Performance |170|------|---------|-------------|171| IO Response | NSCLC | AUC 0.78 |172| IO Response | Melanoma | AUC 0.82 |173| TME Classification | Pan-cancer | Accuracy 85% |174| Survival | TCGA | C-index 0.72 |175176## Prerequisites177178* Python 3.10+179* CIBERSORTx, EPIC, xCell180* Scanpy, Squidpy181* PyTorch for deep learning182* R for certain deconvolution methods183184## Related Skills185186* TCR_Repertoire_Analysis_Agent - T cell specificity187* TCell_Exhaustion_Analysis_Agent - Exhaustion phenotyping188* Spatial_Epigenomics_Agent - Spatial analysis189* Nicheformer_Spatial_Agent - Spatial foundation models190191## Spatial Immune Metrics192193| Metric | Definition | Clinical Relevance |194|--------|------------|-------------------|195| Immune Distance | Distance to tumor edge | Exclusion |196| Clustering Coefficient | Immune aggregation | TLS formation |197| CD8/Treg Ratio | Spatial ratio | Effector balance |198| Contact Score | Immune-tumor contacts | Direct killing |199| Neighborhood Entropy | Mixing vs segregation | TME organization |200201## Special Considerations2022031. **Reference Panel**: Use cancer-type specific references2042. **Batch Correction**: Normalize across samples/platforms2053. **Purity Effects**: Account for tumor purity in deconvolution2064. **Single-Cell Validation**: Validate bulk estimates with scRNA2075. **Spatial Context**: Bulk loses spatial information208209## Therapeutic Implications210211| TME State | Therapeutic Strategy |212|-----------|---------------------|213| Hot, PD-L1+ | Anti-PD-1/PD-L1 |214| Cold | Oncolytic virus, radiation, chemo |215| Excluded | TGF-beta inhibition, VEGF targeting |216| Suppressed | Treg depletion, MDSC targeting |217| TLS+ | Excellent IO candidate |218219## Author220221AI Group - Biomedical AI Platform222223224<!-- AUTHOR_SIGNATURE: 9a7f3c2e-MD-BABU-MIA-2026-MSSM-SECURE -->