Install any skill in seconds. Free to start, no credit card required.
Get Started Free →TCR/BCR repertoire analysis — V(D)J segment usage, CDR3 sequence diversity, clonality scoring, antigen specificity matching to IEDB, public-clone identification. Use for adaptive immune response characterization, post-treatment immune monitoring, antigen-specific clone tracking, and clonal-expansion analysis in immunotherapy or vaccination studies.
.claude/skills/mims-harvard-tooluniverse-immune-repertoire-analysis/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-10 | ✗→✓ | ▲ Improved | 62% | 0% |
| case-14 | ✗→✓ | ▲ Improved | 41% | 0% |
| case-15 | ✗→✓ | ▲ Improved | 61% | 0% |
| case-17 | ✗→✓ | ▲ Improved | 69% | 0% |
| case-22 | ✗→✓ | ▲ Improved | 57% | 0% |
Comprehensive skill for analyzing T-cell receptor (TCR) and B-cell receptor (BCR) repertoire sequencing data to characterize adaptive immune responses, clonal expansion, and antigen specificity.
Repertoire diversity reflects immune history. High clonality — a few clones dominating — indicates antigen-driven expansion, as seen in active infection, tumor-infiltrating lymphocytes, or chronic stimulation. Low diversity points to immunodeficiency or treatment-induced lymphopenia. Always compare observed metrics against healthy donor reference distributions before drawing conclusions; a Shannon entropy of 7 is unremarkable in a healthy adult but alarming post-chemotherapy.
iedb_search_tcell_assays and BVBRC_search_epitopes; never infer antigen identity from CDR3 alone.Adaptive immune receptor repertoire sequencing (AIRR-seq) enables comprehensive profiling of T-cell and B-cell populations through high-throughput sequencing of TCR and BCR variable regions. This skill provides an 8-phase workflow for:
Load AIRR-seq data from common formats (MiXCR, ImmunoSEQ, AIRR standard, 10x Genomics VDJ). Standardize columns to: cloneId, count, frequency, cdr3aa, cdr3nt, v_gene, j_gene, chain. Define clonotypes using one of three methods:
Aggregate by clonotype, sort by count, assign ranks.
Calculate diversity metrics for the repertoire:
Generate rarefaction curves to assess whether sequencing depth is sufficient.
Analyze V and J gene usage patterns weighted by clonotype count:
Characterize CDR3 sequences:
Identify expanded clonotypes above a frequency threshold (default: 95th percentile). Track clonotypes longitudinally across multiple timepoints to measure persistence, mean/max frequency, and fold changes.
Query epitope databases for known TCR-epitope associations:
iedb_search_tcell_assays): Search T-cell assay records by sequence or MHC class; use iedb_search_epitopes with sequence_contains for motif searchBVBRC_search_epitopes): Best for organism-based epitope discovery (e.g., taxon_id="2697049" for SARS-CoV-2); returns epitope sequences with T-cell/B-cell assay countsPubMed_search_articles): Search for CDR3 + epitope/antigen/specificityiedb_get_epitope_antigens (link epitope→antigen), iedb_get_epitope_mhc (MHC restriction)Link TCR/BCR clonotypes to cell phenotypes from paired single-cell RNA-seq:
Key Tools Used:
iedb_search_tcell_assays - T-cell assay records (sequence, MHC class filters)iedb_search_bcell - B-cell assay recordsiedb_search_epitopes - Epitope motif search via sequence_containsBVBRC_search_epitopes - Organism-based epitope discovery (best for pathogen-specific queries)NCBI_SRA_search_runs - Find public TCR/BCR-seq datasets (use strategy="AMPLICON")ImmPort_search_studies - NIAID immunology studies (vaccine trials, flow cytometry)PubMed_search_articles - Literature on TCR/BCR specificityUniProt_get_entry_by_accession - Antigen protein informationIntegration with Other Skills:
tooluniverse-single-cell - Single-cell transcriptomicstooluniverse-rnaseq-deseq2 - Bulk RNA-seq analysistooluniverse-variant-analysis - Somatic hypermutation analysis (BCR)pythonfrom tooluniverse import ToolUniverse # 1. Load data tcr_data = load_airr_data("clonotypes.txt", format='mixcr') # 2. Define clonotypes clonotypes = define_clonotypes(tcr_data, method='vj_cdr3') # 3. Calculate diversity diversity = calculate_diversity(clonotypes['count']) print(f"Shannon entropy: {diversity['shannon_entropy']:.2f}") # 4. Detect expanded clones expansion = detect_expanded_clones(clonotypes) print(f"Expanded clonotypes: {expansion['n_expanded']}") # 5. Analyze V(D)J usage vdj_usage = analyze_vdj_usage(tcr_data) # 6. Query epitope databases top_clones = expansion['expanded_clonotypes']['clonotype'].head(10) epitopes = query_epitope_database(top_clones)
| Grade | Criteria | Example | |-------|----------|---------| | Strong | Clonal expansion > 1% frequency, convergent recombination confirmed, epitope match in IEDB/VDJdb | CDR3 at 5% frequency with 3 nucleotide variants encoding same amino acid, IEDB hit | | Moderate | Expanded clone (0.1-1%), V(D)J bias significant (chi-sq p < 0.01), partial epitope match | Clone at 0.5% with TRBV20-1 bias, similar CDR3 motif in VDJdb | | Weak | Low-frequency expansion (0.01-0.1%), single timepoint only, no epitope database match | Moderately expanded clone without convergence or known specificity | | Insufficient | Below detection threshold, sequencing depth < 10,000 clonotypes, no replication | Singleton clonotypes that may be PCR/sequencing artifacts |
ANALYSIS_DETAILS.md - Detailed code snippets for all 8 phasesUSE_CASES.md - Complete use cases (immunotherapy, vaccine, autoimmune, single-cell integration) and best practices| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-01 | fail→fail | 33,147 | 8,085 | -76% | 1 | 1 | 0% | 6,245 | 3,123 | -50% | 0 | 0 | — |
case-02 | fail→fail | 34,028 | 7,538 | -78% | 1 | 1 | 0% | 6,240 | 3,353 | -46% | 0 | 0 | — |
case-03 | fail→fail | 32,004 | 7,639 | -76% | 1 | 1 | 0% | 6,229 | 3,166 | -49% | 0 | 0 | — |
case-04 | pass→fail | 17,791 | 6,555 | -63% | 1 | 1 | 0% | 3,722 | 2,986 | -20% | 0 | 0 | — |
case-05 | pass→pass | 18,769 | 19,864 | +6% | 1 | 1 | 0% | 3,468 | 6,271 | +81% | 0 | 0 | — |
case-06 | fail→fail | 18,249 | 8,667 | -53% | 1 | 1 | 0% | 3,346 | 3,394 | +1% | 0 | 0 | — |
case-07 | pass→pass | 12,991 | 10,530 | -19% | 1 | 1 | 0% | 2,151 | 4,299 | +100% | 0 | 0 | — |
case-08 | pass→pass | 14,688 | 11,111 | -24% | 1 | 1 | 0% | 2,285 | 4,435 | +94% | 0 | 0 | — |
case-09 | pass→pass | 6,337 | 5,044 | -20% | 1 | 1 | 0% | 1,103 | 3,585 | +225% | 0 | 0 | — |
case-10 | fail→pass | 14,049 | 6,882 | -51% | 1 | 1 | 0% | 2,354 | 3,814 | +62% | 0 | 0 | — |
case-11 | pass→pass | 17,449 | 2,922 | -83% | 1 | 1 | 0% | 1,114 | 3,083 | +177% | 0 | 0 | — |
case-12 | pass→pass | 11,820 | 4,819 | -59% | 1 | 1 | 0% | 1,890 | 3,394 | +80% | 0 | 0 | — |
case-13 | pass→pass | 12,956 | 8,500 | -34% | 1 | 1 | 0% | 2,472 | 4,225 | +71% | 0 | 0 | — |
case-14 | fail→pass | 15,244 | 3,655 | -76% | 1 | 1 | 0% | 2,336 | 3,285 | +41% | 0 | 0 | — |
case-15 | fail→pass | 12,742 | 4,137 | -68% | 1 | 1 | 0% | 2,008 | 3,234 | +61% | 0 | 0 | — |
case-16 | fail→fail | 17,743 | 6,560 | -63% | 1 | 1 | 0% | 2,890 | 3,889 | +35% | 0 | 0 | — |
case-17 | fail→pass | 11,558 | 4,101 | -65% | 1 | 1 | 0% | 1,932 | 3,261 | +69% | 0 | 0 | — |
case-18 | pass→pass | 12,879 | 8,564 | -34% | 1 | 1 | 0% | 2,098 | 3,957 | +89% | 0 | 0 | — |
case-19 | pass→pass | 8,619 | 5,711 | -34% | 1 | 1 | 0% | 1,457 | 3,533 | +142% | 0 | 0 | — |
case-20 | pass→pass | 13,890 | 7,242 | -48% | 1 | 1 | 0% | 2,420 | 3,814 | +58% | 0 | 0 | — |
case-21 | fail→fail | 13,327 | 6,964 | -48% | 1 | 1 | 0% | 2,039 | 3,682 | +81% | 0 | 0 | — |
case-22 | fail→pass | 11,643 | 2,740 | -76% | 1 | 1 | 0% | 1,977 | 3,101 | +57% | 0 | 0 | — |
case-23 | fail→pass | 12,262 | 4,807 | -61% | 1 | 1 | 0% | 2,117 | 3,401 | +61% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 23 cases were attempted, and 18 counted toward the lift figure. The other 5 produced results that are not comparable between the two arms, so they are excluded from the headline rather than averaged into it. The headline lift of +22 percentage points is the difference between those two pass rates over the 18 comparable cases. 2 cases got worse with the skill loaded, and they are included in that figure.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.