askill
tcr-repertoire-analysis-agent

tcr-repertoire-analysis-agentSafety 95Repository

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.

13 stars
1.2k downloads
Updated 2/26/2026

Package Files

Loading files...
SKILL.md

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

  1. Repertoire Diversity Analysis: Quantify TCR diversity, clonality, and convergence.

  2. Cancer Diagnosis: Distinguish cancer types from TCR signatures.

  3. Immunotherapy Response Prediction: Predict checkpoint inhibitor response.

  4. Tumor-Reactive TCR Identification: Find neoantigen-specific TCRs.

  5. TCR-pMHC Binding Prediction: Predict TCR epitope specificity.

  6. Clonal Dynamics Tracking: Monitor TCR clones during treatment.

TCR Repertoire Metrics

MetricDefinitionClinical Significance
ClonalityGini coefficient of clone sizesImmune focusing
Shannon EntropyDiversity measureImmune breadth
RichnessUnique clonotypesRepertoire depth
Top Clone %Largest clone fractionDominant response
Convergent TCRsShared across patientsPublic epitope response
Tumor-Infiltrating %TIL-derived TCRsTumor reactivity

Workflow

  1. Input: TCR-seq data (bulk or single-cell), clinical metadata.

  2. Preprocessing: CDR3 extraction, error correction, clustering.

  3. Repertoire Analysis: Calculate diversity, clonality, convergence.

  4. ML Classification: Cancer type, stage, response prediction.

  5. TCR Prioritization: Rank tumor-reactive TCR candidates.

  6. TCR-pMHC Prediction: Predict epitope specificity.

  7. 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

FormatSourceFields
AIRR-seqStandardizedCDR3, V/J genes, count
MiXCRMiXCR pipelineClone info, counts
10x VDJSingle-cellCDR3, cell barcode
Custom TSVAny pipelineFlexible mapping

Output Components

OutputDescriptionFormat
Repertoire MetricsDiversity scores.json
Response PredictionImmunotherapy probability.json
Cancer ClassificationType/stage prediction.json
Tumor-Reactive TCRsRanked candidates.csv
TCR-pMHC PredictionsEpitope specificity.csv
Clonal TrackingDynamics over time.csv
VisualizationsRepertoire plots.png, .pdf

Response Prediction Features

Feature CategoryFeaturesImportance
DiversityShannon, Gini, richnessHigh
ClonalityTop clones, expansionHigh
ConvergencePublic TCRs, sharingModerate
Sequence FeaturesCDR3 length, motifsModerate
TIL CharacteristicsTIL fraction, phenotypeHigh

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

ApplicationTCR BiomarkerClinical Utility
DiagnosisCancer-specific TCRsEarly detection
StagingClonality patternsDisease extent
PrognosisIntratumoral diversitySurvival prediction
ResponseBaseline clonalityIO response
MonitoringClone dynamicsTreatment tracking
TherapyTumor-reactive TCRsTCR-T development

Performance Benchmarks

TaskDatasetPerformance
Cancer vs NormalDigestive cancersAUC 0.91
Metastasis DetectionCRCAUC 0.85
IO ResponseMelanomaAUC 0.78
TCR-pMHC PredictionIEDB benchmarkAUC 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 FeatureAnalysisMeaning
Length DistributionHistogramV(D)J usage
Amino Acid UsagePositional frequencyBinding properties
HydrophobicityCDR3 profileMHC interaction
ChargeNet chargePeptide binding
Motif Enrichmentk-mer analysisEpitope specificity

Therapeutic TCR Selection Criteria

CriterionThresholdRationale
Tumor Enrichment>10-fold vs bloodTumor specificity
Clone SizeTop 1% in tumorFunctional expansion
Neoantigen BindingPredicted positiveTarget specificity
Safety (Cross-react)No self-peptide hitsSafety
HLA RestrictionCommon allelesBroad applicability

Special Considerations

  1. Sample Quality: Fresh samples preferred for TIL analysis
  2. Sequencing Depth: Sufficient depth for rare clones
  3. Batch Effects: Normalize across sequencing runs
  4. HLA Context: TCR analysis requires HLA typing
  5. Paired Chains: Single-cell for alpha-beta pairing

Cancer-Specific TCR Signatures

Cancer TypeKey TCR FeaturesPublic TCRs
MelanomaHigh clonality, MAA-reactiveYes
NSCLCModerate diversityLimited
CRC-MSINeoantigen-reactiveVariable
HPV+ HNSCCHPV-E6/E7 reactiveYes

Author

AI Group - Biomedical AI Platform

Install

Download ZIP
Requires askill CLI v1.0+

AI Quality Score

92/100Analyzed 2/19/2026

Highly comprehensive TCR repertoire analysis skill with excellent structure, clear when-to-use guidance, detailed metrics tables, concrete example commands, and technical depth. Provides complete workflow from TCR-seq input through ML analysis to therapeutic candidate output. Tags are mismatched (CI/CD for a bioinformatics skill) which hurts discoverability, but content quality is strong. Falls just short of perfect score due to tag issues and minor completeness gaps.

95
95
88
92
90

Metadata

Licenseunknown
Version-
Updated2/26/2026
Publishermdbabumiamssm

Tags

ci-cdgithub-actionsobservability