name: 'tcr-repertoire-analysis-agent'
description: 'AI-powered T-cell receptor repertoire analysis for cancer diagnosis, immunotherapy response prediction, and therapeutic TCR selection using deep learning and multi-layer ML approaches.'
measurable_outcome: Execute skill workflow successfully with valid output within 15 minutes.
allowed-tools:
- read_file
- run_shell_command
TCR Repertoire Analysis Agent
The TCR Repertoire Analysis Agent provides comprehensive T-cell receptor repertoire analysis for cancer immunology applications. It leverages deep learning and multi-layer machine learning approaches to analyze TCR diversity, predict immunotherapy response, identify tumor-reactive TCRs, and support therapeutic TCR selection for cancer immunotherapy.
When to Use This Skill
- When analyzing TCR repertoire for cancer diagnosis and staging.
- For predicting immunotherapy (anti-PD-1/PD-L1) response from TCR profiles.
- To identify tumor-reactive TCRs for adoptive cell therapy.
- When monitoring treatment response through TCR clonality changes.
- For selecting therapeutic TCRs for TCR-T cell therapy development.
Core Capabilities
Repertoire Diversity Analysis: Quantify TCR diversity, clonality, and convergence.
Cancer Diagnosis: Distinguish cancer types from TCR signatures.
Immunotherapy Response Prediction: Predict checkpoint inhibitor response.
Tumor-Reactive TCR Identification: Find neoantigen-specific TCRs.
TCR-pMHC Binding Prediction: Predict TCR epitope specificity.
Clonal Dynamics Tracking: Monitor TCR clones during treatment.
TCR Repertoire Metrics
| Metric |
Definition |
Clinical Significance |
| Clonality |
Gini coefficient of clone sizes |
Immune focusing |
| Shannon Entropy |
Diversity measure |
Immune breadth |
| Richness |
Unique clonotypes |
Repertoire depth |
| Top Clone % |
Largest clone fraction |
Dominant response |
| Convergent TCRs |
Shared across patients |
Public epitope response |
| Tumor-Infiltrating % |
TIL-derived TCRs |
Tumor reactivity |
Workflow
Input: TCR-seq data (bulk or single-cell), clinical metadata.
Preprocessing: CDR3 extraction, error correction, clustering.
Repertoire Analysis: Calculate diversity, clonality, convergence.
ML Classification: Cancer type, stage, response prediction.
TCR Prioritization: Rank tumor-reactive TCR candidates.
TCR-pMHC Prediction: Predict epitope specificity.
Output: Repertoire metrics, predictions, therapeutic candidates.
Example Usage
User: "Analyze the TCR repertoire from this melanoma patient's tumor and blood to predict immunotherapy response and identify tumor-reactive TCRs."
Agent Action:
python3 Skills/Immunology_Vaccines/TCR_Repertoire_Analysis_Agent/tcr_repertoire_analysis.py \
--tumor_tcr tumor_tils.tsv \
--blood_tcr pbmc_tcrs.tsv \
--cancer_type melanoma \
--hla_type HLA-A*02:01,HLA-B*07:02 \
--neoantigens patient_neoantigens.fasta \
--task response_prediction,tcr_identification \
--output tcr_analysis/
Input Formats
| Format |
Source |
Fields |
| AIRR-seq |
Standardized |
CDR3, V/J genes, count |
| MiXCR |
MiXCR pipeline |
Clone info, counts |
| 10x VDJ |
Single-cell |
CDR3, cell barcode |
| Custom TSV |
Any pipeline |
Flexible mapping |
Output Components
| Output |
Description |
Format |
| Repertoire Metrics |
Diversity scores |
.json |
| Response Prediction |
Immunotherapy probability |
.json |
| Cancer Classification |
Type/stage prediction |
.json |
| Tumor-Reactive TCRs |
Ranked candidates |
.csv |
| TCR-pMHC Predictions |
Epitope specificity |
.csv |
| Clonal Tracking |
Dynamics over time |
.csv |
| Visualizations |
Repertoire plots |
.png, .pdf |
Response Prediction Features
| Feature Category |
Features |
Importance |
| Diversity |
Shannon, Gini, richness |
High |
| Clonality |
Top clones, expansion |
High |
| Convergence |
Public TCRs, sharing |
Moderate |
| Sequence Features |
CDR3 length, motifs |
Moderate |
| TIL Characteristics |
TIL fraction, phenotype |
High |
AI/ML Components
Cancer Classification:
- Multi-layer ensemble (XGBoost, RF, SVM)
- TCR embedding networks
- Attention-based sequence models
Response Prediction:
- Cox regression with TCR features
- Deep survival analysis
- Multi-task learning (response + survival)
TCR-pMHC Prediction:
- AlphaFold3-based structural prediction
- Transformer models (TCR-BERT)
- Contrastive learning embeddings
Clinical Applications
| Application |
TCR Biomarker |
Clinical Utility |
| Diagnosis |
Cancer-specific TCRs |
Early detection |
| Staging |
Clonality patterns |
Disease extent |
| Prognosis |
Intratumoral diversity |
Survival prediction |
| Response |
Baseline clonality |
IO response |
| Monitoring |
Clone dynamics |
Treatment tracking |
| Therapy |
Tumor-reactive TCRs |
TCR-T development |
Performance Benchmarks
| Task |
Dataset |
Performance |
| Cancer vs Normal |
Digestive cancers |
AUC 0.91 |
| Metastasis Detection |
CRC |
AUC 0.85 |
| IO Response |
Melanoma |
AUC 0.78 |
| TCR-pMHC Prediction |
IEDB benchmark |
AUC 0.82 |
Prerequisites
- Python 3.10+
- MiXCR, TRUST4 for TCR calling
- immunarch, tcrdist3
- PyTorch, transformers
- AlphaFold3 (optional, for structure)
Related Skills
- TCR_pMHC_Prediction_Agent - Detailed TCR-epitope prediction
- Neoantigen_Prediction_Agent - Neoantigen identification
- TME_Immune_Profiling_Agent - Broader immune context
- TCell_Exhaustion_Analysis_Agent - T cell phenotyping
TCR Sequence Analysis
| CDR3 Feature |
Analysis |
Meaning |
| Length Distribution |
Histogram |
V(D)J usage |
| Amino Acid Usage |
Positional frequency |
Binding properties |
| Hydrophobicity |
CDR3 profile |
MHC interaction |
| Charge |
Net charge |
Peptide binding |
| Motif Enrichment |
k-mer analysis |
Epitope specificity |
Therapeutic TCR Selection Criteria
| Criterion |
Threshold |
Rationale |
| Tumor Enrichment |
>10-fold vs blood |
Tumor specificity |
| Clone Size |
Top 1% in tumor |
Functional expansion |
| Neoantigen Binding |
Predicted positive |
Target specificity |
| Safety (Cross-react) |
No self-peptide hits |
Safety |
| HLA Restriction |
Common alleles |
Broad applicability |
Special Considerations
- Sample Quality: Fresh samples preferred for TIL analysis
- Sequencing Depth: Sufficient depth for rare clones
- Batch Effects: Normalize across sequencing runs
- HLA Context: TCR analysis requires HLA typing
- Paired Chains: Single-cell for alpha-beta pairing
Cancer-Specific TCR Signatures
| Cancer Type |
Key TCR Features |
Public TCRs |
| Melanoma |
High clonality, MAA-reactive |
Yes |
| NSCLC |
Moderate diversity |
Limited |
| CRC-MSI |
Neoantigen-reactive |
Variable |
| HPV+ HNSCC |
HPV-E6/E7 reactive |
Yes |
Author
AI Group - Biomedical AI Platform
1---2name: tcr-repertoire-analysis-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: 'tcr-repertoire-analysis-agent'20description: 'AI-powered T-cell receptor repertoire analysis for cancer diagnosis, immunotherapy response prediction, and therapeutic TCR selection using deep learning and multi-layer ML approaches.'21measurable_outcome: Execute skill workflow successfully with valid output within 15 minutes.22allowed-tools:23 - read_file24 - run_shell_command25---262728# TCR Repertoire Analysis Agent2930The **TCR Repertoire Analysis Agent** provides comprehensive T-cell receptor repertoire analysis for cancer immunology applications. It leverages deep learning and multi-layer machine learning approaches to analyze TCR diversity, predict immunotherapy response, identify tumor-reactive TCRs, and support therapeutic TCR selection for cancer immunotherapy.3132## When to Use This Skill3334* When analyzing TCR repertoire for cancer diagnosis and staging.35* For predicting immunotherapy (anti-PD-1/PD-L1) response from TCR profiles.36* To identify tumor-reactive TCRs for adoptive cell therapy.37* When monitoring treatment response through TCR clonality changes.38* For selecting therapeutic TCRs for TCR-T cell therapy development.3940## Core Capabilities41421. **Repertoire Diversity Analysis**: Quantify TCR diversity, clonality, and convergence.43442. **Cancer Diagnosis**: Distinguish cancer types from TCR signatures.45463. **Immunotherapy Response Prediction**: Predict checkpoint inhibitor response.47484. **Tumor-Reactive TCR Identification**: Find neoantigen-specific TCRs.49505. **TCR-pMHC Binding Prediction**: Predict TCR epitope specificity.51526. **Clonal Dynamics Tracking**: Monitor TCR clones during treatment.5354## TCR Repertoire Metrics5556| Metric | Definition | Clinical Significance |57|--------|------------|----------------------|58| Clonality | Gini coefficient of clone sizes | Immune focusing |59| Shannon Entropy | Diversity measure | Immune breadth |60| Richness | Unique clonotypes | Repertoire depth |61| Top Clone % | Largest clone fraction | Dominant response |62| Convergent TCRs | Shared across patients | Public epitope response |63| Tumor-Infiltrating % | TIL-derived TCRs | Tumor reactivity |6465## Workflow66671. **Input**: TCR-seq data (bulk or single-cell), clinical metadata.68692. **Preprocessing**: CDR3 extraction, error correction, clustering.70713. **Repertoire Analysis**: Calculate diversity, clonality, convergence.72734. **ML Classification**: Cancer type, stage, response prediction.74755. **TCR Prioritization**: Rank tumor-reactive TCR candidates.76776. **TCR-pMHC Prediction**: Predict epitope specificity.78797. **Output**: Repertoire metrics, predictions, therapeutic candidates.8081## Example Usage8283**User**: "Analyze the TCR repertoire from this melanoma patient's tumor and blood to predict immunotherapy response and identify tumor-reactive TCRs."8485**Agent Action**:86```bash87python3 Skills/Immunology_Vaccines/TCR_Repertoire_Analysis_Agent/tcr_repertoire_analysis.py \88 --tumor_tcr tumor_tils.tsv \89 --blood_tcr pbmc_tcrs.tsv \90 --cancer_type melanoma \91 --hla_type HLA-A*02:01,HLA-B*07:02 \92 --neoantigens patient_neoantigens.fasta \93 --task response_prediction,tcr_identification \94 --output tcr_analysis/95```9697## Input Formats9899| Format | Source | Fields |100|--------|--------|--------|101| AIRR-seq | Standardized | CDR3, V/J genes, count |102| MiXCR | MiXCR pipeline | Clone info, counts |103| 10x VDJ | Single-cell | CDR3, cell barcode |104| Custom TSV | Any pipeline | Flexible mapping |105106## Output Components107108| Output | Description | Format |109|--------|-------------|--------|110| Repertoire Metrics | Diversity scores | .json |111| Response Prediction | Immunotherapy probability | .json |112| Cancer Classification | Type/stage prediction | .json |113| Tumor-Reactive TCRs | Ranked candidates | .csv |114| TCR-pMHC Predictions | Epitope specificity | .csv |115| Clonal Tracking | Dynamics over time | .csv |116| Visualizations | Repertoire plots | .png, .pdf |117118## Response Prediction Features119120| Feature Category | Features | Importance |121|------------------|----------|------------|122| Diversity | Shannon, Gini, richness | High |123| Clonality | Top clones, expansion | High |124| Convergence | Public TCRs, sharing | Moderate |125| Sequence Features | CDR3 length, motifs | Moderate |126| TIL Characteristics | TIL fraction, phenotype | High |127128## AI/ML Components129130**Cancer Classification**:131- Multi-layer ensemble (XGBoost, RF, SVM)132- TCR embedding networks133- Attention-based sequence models134135**Response Prediction**:136- Cox regression with TCR features137- Deep survival analysis138- Multi-task learning (response + survival)139140**TCR-pMHC Prediction**:141- AlphaFold3-based structural prediction142- Transformer models (TCR-BERT)143- Contrastive learning embeddings144145## Clinical Applications146147| Application | TCR Biomarker | Clinical Utility |148|-------------|---------------|------------------|149| Diagnosis | Cancer-specific TCRs | Early detection |150| Staging | Clonality patterns | Disease extent |151| Prognosis | Intratumoral diversity | Survival prediction |152| Response | Baseline clonality | IO response |153| Monitoring | Clone dynamics | Treatment tracking |154| Therapy | Tumor-reactive TCRs | TCR-T development |155156## Performance Benchmarks157158| Task | Dataset | Performance |159|------|---------|-------------|160| Cancer vs Normal | Digestive cancers | AUC 0.91 |161| Metastasis Detection | CRC | AUC 0.85 |162| IO Response | Melanoma | AUC 0.78 |163| TCR-pMHC Prediction | IEDB benchmark | AUC 0.82 |164165## Prerequisites166167* Python 3.10+168* MiXCR, TRUST4 for TCR calling169* immunarch, tcrdist3170* PyTorch, transformers171* AlphaFold3 (optional, for structure)172173## Related Skills174175* TCR_pMHC_Prediction_Agent - Detailed TCR-epitope prediction176* Neoantigen_Prediction_Agent - Neoantigen identification177* TME_Immune_Profiling_Agent - Broader immune context178* TCell_Exhaustion_Analysis_Agent - T cell phenotyping179180## TCR Sequence Analysis181182| CDR3 Feature | Analysis | Meaning |183|--------------|----------|---------|184| Length Distribution | Histogram | V(D)J usage |185| Amino Acid Usage | Positional frequency | Binding properties |186| Hydrophobicity | CDR3 profile | MHC interaction |187| Charge | Net charge | Peptide binding |188| Motif Enrichment | k-mer analysis | Epitope specificity |189190## Therapeutic TCR Selection Criteria191192| Criterion | Threshold | Rationale |193|-----------|-----------|-----------|194| Tumor Enrichment | >10-fold vs blood | Tumor specificity |195| Clone Size | Top 1% in tumor | Functional expansion |196| Neoantigen Binding | Predicted positive | Target specificity |197| Safety (Cross-react) | No self-peptide hits | Safety |198| HLA Restriction | Common alleles | Broad applicability |199200## Special Considerations2012021. **Sample Quality**: Fresh samples preferred for TIL analysis2032. **Sequencing Depth**: Sufficient depth for rare clones2043. **Batch Effects**: Normalize across sequencing runs2054. **HLA Context**: TCR analysis requires HLA typing2065. **Paired Chains**: Single-cell for alpha-beta pairing207208## Cancer-Specific TCR Signatures209210| Cancer Type | Key TCR Features | Public TCRs |211|-------------|------------------|-------------|212| Melanoma | High clonality, MAA-reactive | Yes |213| NSCLC | Moderate diversity | Limited |214| CRC-MSI | Neoantigen-reactive | Variable |215| HPV+ HNSCC | HPV-E6/E7 reactive | Yes |216217## Author218219AI Group - Biomedical AI Platform220221222<!-- AUTHOR_SIGNATURE: 9a7f3c2e-MD-BABU-MIA-2026-MSSM-SECURE -->