tooluniverse-immune-repertoire-analysis

mims-harvard/tooluniverse

Анализ репертуаров TCR/BCR: сегменты V(D)J, разнообразие CDR3, клональность, специфичность к антигенам IEDB.

Звёзды1 795
Авторmims-harvard

Установка

SKILL.md

ToolUniverse Immune Repertoire Analysis

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.

Domain Reasoning

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.

LOOK UP DON'T GUESS

  • Clonotype frequency thresholds, CDR3 length ranges, and convergence ratios: query IEDB or VDJdb; do not assume values from memory.
  • Epitope specificities for expanded clones: search iedb_search_tcell_assays and BVBRC_search_epitopes; never infer antigen identity from CDR3 alone.
  • V gene family usage biases in healthy donors: retrieve published reference data or query ImmPort; do not assume baseline distributions are uniform.
  • Sequencing depth adequacy: compute rarefaction curves from the actual data; do not guess whether depth is sufficient.

Overview

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:

  • Clonotype identification and tracking
  • Diversity and clonality assessment
  • V(D)J gene usage analysis
  • CDR3 sequence characterization
  • Clonal expansion and convergence detection
  • Epitope specificity prediction
  • Integration with single-cell phenotyping
  • Longitudinal repertoire tracking

Core Workflow

Phase 1: Data Import & Clonotype Definition

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:

  • cdr3aa: Amino acid CDR3 sequence only
  • cdr3nt: Nucleotide CDR3 sequence
  • vj_cdr3: V gene + J gene + CDR3aa (most common, recommended)

Aggregate by clonotype, sort by count, assign ranks.

Phase 2: Diversity & Clonality Analysis

Calculate diversity metrics for the repertoire:

  • Shannon entropy: Overall diversity (higher = more diverse)
  • Simpson index: Probability two random clones are same
  • Inverse Simpson: Effective number of clonotypes
  • Gini coefficient: Inequality in clonotype distribution
  • Clonality: 1 - Pielou's evenness (higher = more clonal)
  • Richness: Number of unique clonotypes

Generate rarefaction curves to assess whether sequencing depth is sufficient.

Phase 3: V(D)J Gene Usage Analysis

Analyze V and J gene usage patterns weighted by clonotype count:

  • V gene family usage frequencies
  • J gene family usage frequencies
  • V-J pairing frequencies
  • Statistical testing for biased usage (chi-square test vs. uniform expectation)

Phase 4: CDR3 Sequence Analysis

Characterize CDR3 sequences:

  • Length distribution: Typical TCR CDR3 = 12-18 aa; BCR CDR3 = 10-20 aa
  • Amino acid composition: Weighted by clonotype frequency
  • Flag unusual length distributions (may indicate PCR bias)

Phase 5: Clonal Expansion Detection

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.

Phase 6: Convergence & Public Clonotypes

  • Convergent recombination: Same CDR3 amino acid from different nucleotide sequences (evidence of antigen-driven selection)
  • Public clonotypes: Shared across multiple samples/individuals (may indicate common antigen responses)

Phase 7: Epitope Prediction & Specificity

Query epitope databases for known TCR-epitope associations:

  • IEDB (iedb_search_tcell_assays): Search T-cell assay records by sequence or MHC class; use iedb_search_epitopes with sequence_contains for motif search
  • BVBRC (BVBRC_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 counts
  • VDJdb (manual): https://vdjdb.cdr3.net/search
  • PubMed literature (PubMed_search_articles): Search for CDR3 + epitope/antigen/specificity
  • IEDB detail tools: iedb_get_epitope_antigens (link epitope→antigen), iedb_get_epitope_mhc (MHC restriction)

Phase 8: Integration with Single-Cell Data

Link TCR/BCR clonotypes to cell phenotypes from paired single-cell RNA-seq:

  • Map clonotypes to cell barcodes
  • Identify expanded clonotype phenotypes on UMAP
  • Analyze clonotype-cluster associations (cross-tabulation)
  • Find cluster-specific clonotypes (>80% cells in one cluster)
  • Differential gene expression: expanded vs. non-expanded cells

ToolUniverse Tool Integration

Key Tools Used:

  • iedb_search_tcell_assays - T-cell assay records (sequence, MHC class filters)
  • iedb_search_bcell - B-cell assay records
  • iedb_search_epitopes - Epitope motif search via sequence_contains
  • BVBRC_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 specificity
  • UniProt_get_entry_by_accession - Antigen protein information

Integration with Other Skills:

  • tooluniverse-single-cell - Single-cell transcriptomics
  • tooluniverse-rnaseq-deseq2 - Bulk RNA-seq analysis
  • tooluniverse-variant-analysis - Somatic hypermutation analysis (BCR)

Quick Start

from 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)

Reasoning Framework for Result Interpretation

Evidence Grading

GradeCriteriaExample
StrongClonal expansion > 1% frequency, convergent recombination confirmed, epitope match in IEDB/VDJdbCDR3 at 5% frequency with 3 nucleotide variants encoding same amino acid, IEDB hit
ModerateExpanded clone (0.1-1%), V(D)J bias significant (chi-sq p < 0.01), partial epitope matchClone at 0.5% with TRBV20-1 bias, similar CDR3 motif in VDJdb
WeakLow-frequency expansion (0.01-0.1%), single timepoint only, no epitope database matchModerately expanded clone without convergence or known specificity
InsufficientBelow detection threshold, sequencing depth < 10,000 clonotypes, no replicationSingleton clonotypes that may be PCR/sequencing artifacts

Interpretation Guidance

  • Clonality metrics: Shannon diversity measures overall repertoire complexity (higher = more diverse, typical range 5-12 for healthy blood). Gini coefficient ranges from 0 (perfectly even) to 1 (single dominant clone); values > 0.3 suggest clonal expansion. Clonality (1 - Pielou's evenness) > 0.2 indicates moderate clonal dominance; > 0.5 suggests strong oligoclonal expansion (common in active infection or tumor-infiltrating lymphocytes).
  • V(D)J usage significance: Biased V or J gene usage (chi-square p < 0.01 vs expected uniform distribution) may indicate antigen-driven selection. However, baseline V gene usage is not uniform even in healthy repertoires due to genomic proximity and recombination efficiency. Compare against healthy donor reference distributions rather than uniform expectation when possible.
  • CDR3 convergence meaning: Convergent recombination (same CDR3 amino acid from different nucleotide sequences) is strong evidence of antigen-driven selection because independent recombination events converged on the same receptor. Public clonotypes (shared across individuals) further strengthen this inference. A convergence ratio > 2 (nucleotide variants per amino acid sequence) for expanded clones is noteworthy.
  • Sequencing depth: Rarefaction curves that plateau indicate sufficient depth. If the curve is still rising, richness and diversity estimates are underestimates. Minimum recommended depth: 50,000-100,000 total reads for bulk TCR-seq.
  • Longitudinal tracking: Persistent clones across timepoints with stable or increasing frequency indicate antigen-driven maintenance. Transient expansions that disappear may reflect acute responses.

Synthesis Questions

  1. Does the observed clonal expansion pattern (Gini coefficient, top-clone frequency) match the expected immune context (e.g., post-vaccination expansion, tumor-infiltrating lymphocyte oligoclonality)?
  2. Are convergent CDR3 sequences found across multiple individuals in the cohort, suggesting a public response to a shared antigen?
  3. Do expanded clonotypes show biased V gene usage consistent with known antigen-specific repertoire features (e.g., TRBV20-1 enrichment in CMV-specific responses)?
  4. Is the sequencing depth sufficient (rarefaction plateau reached) to reliably estimate diversity metrics and detect low-frequency expanded clones?
  5. For longitudinal data, do clonal dynamics (expansion, contraction, persistence) correlate with clinical outcomes or treatment response?

References

  • Dash P, et al. (2017) Quantifiable predictive features define epitope-specific T cell receptor repertoires. Nature
  • Glanville J, et al. (2017) Identifying specificity groups in the T cell receptor repertoire. Nature
  • Stubbington MJT, et al. (2016) T cell fate and clonality inference from single-cell transcriptomes. Nature Methods
  • Vander Heiden JA, et al. (2014) pRESTO: a toolkit for processing high-throughput sequencing raw reads of lymphocyte receptor repertoires. Bioinformatics

See Also

  • ANALYSIS_DETAILS.md - Detailed code snippets for all 8 phases
  • USE_CASES.md - Complete use cases (immunotherapy, vaccine, autoimmune, single-cell integration) and best practices

Вставить в README

Ссылка на карточку для вашего README — без картинок и счётчиков.

[DarkPlay: tooluniverse-immune-repertoire-analysis](https://darkplay.ru/ai/skills/mims-harvard-tooluniverse-tooluniverse-immune-repertoire-analysis)

Из того же репозитория

tooluniverse-metabolomics-pathway Анализ метаболических путей: идентификация метаболитов, картирование путей, связи с болезн ★1,8K tooluniverse-population-genetics-1000genomes Популяционная генетика по данным 1000 Genomes: частоты вариантов и анализ происхождения. ★1,8K tooluniverse-model-organism-genetics Межвидовой генетический анализ через базы модельных организмов: MGI, ZFIN, FlyBase, SGD и ★1,8K tooluniverse-kegg-disease-drug Сеть болезнь–лекарство–вариант на основе баз KEGG для репозиционирования препаратов. ★1,8K tooluniverse-adverse-outcome-pathway Связь химических веществ с неблагоприятными исходами (AOP) через AOPWiki, GHS и IARC. ★1,8K tooluniverse-electron-microscopy Поиск и анализ данных электронной микроскопии: карты крио-ЭМ, модели PDB, EMPIAR, CryoET. ★1,8K tooluniverse-protein-modification-analysis Анализ посттрансляционных модификаций: фосфорилирование, убиквитинирование, ацетилирование ★1,8K tooluniverse-comparative-genomics Сравнение генов между видами и анализ ортологов через Ensembl, NCBI, UniProt и другие базы ★1,8K

Похожие скиллы и другие разделы каталога

Популярное в разделе «Скиллы»

Самые востребованные скиллов раздела по установкам и звёздам.

find-skillsvercel-labs · Помогает находить и устанавливать навыки агентов по запросам вроде «как сделать X»…
4 400 000 устан.
grill-memattpocock · Настойчивое интервью для доработки плана или дизайна.
1 600 000 устан.
hyperframesheygen-com · Обязательная точка входа для любых задач по видео, анимации и motion-графике в…
1 600 000 устан.
hyperframes-cliheygen-com · Цикл разработки HyperFrames CLI: init, add, render, preview, publish и другие команды.
1 600 000 устан.
agent-browservercel-labs · CLI для автоматизации браузера для ИИ-агентов: навигация по страницам, заполнение форм…
1 600 000 устан.
media-useheygen-com · Agent Media OS: единый навык для медиа в HyperFrames — BGM, SFX, изображения, голос, LUT.
1 500 000 устан.
hyperframes-registryheygen-com · Установка и подключение блоков реестра в композиции HyperFrames через add и catalog.
1 400 000 устан.
grill-with-docsmattpocock · Настойчивое интервью для доработки плана или дизайна, попутно создающее документацию (ADR…
1 300 000 устан.
improve-codebase-architecturemattpocock · Поиск в кодовой базе возможностей для углубления, визуальный HTML-отчёт о них и детальный…
1 300 000 устан.
tddmattpocock · Разработка через тестирование (TDD): red-green-refactor и интеграционные тесты.
1 300 000 устан.
Похожее в других разделах каталога

Соседние разделы каталога: возможно, нужный инструмент живёт там.

tooluniversemims-harvard · 1000+ научных инструментов, 120+ исследовательских навыков, MCP-сервер и слэш-команды
148 комп.
io.github.denial-web/agent-immunedenial-web · Безопасность ИИ-агентов: обнаружение промпт-инъекций, семантическая память, сканирование…
—
io.github.gsepcore/gsep-mcpgsepcore · Безопасность ИИ-агентов через MCP: файрвол, иммунная система, защита действий.
—
io.github.mims-harvard/tooluniversemims-harvard · Более 2700 научных инструментов для ИИ-учёных: биология, исследования, литература.
—
io.github.ooopak11/opuslogooopak11 · Архив репертуара и программ для классических вокалистов: подбор по афишам, сохранение…
—
io.github.phillipclapham/anneal-memoryphillipclapham · Двухуровневая память для ИИ-агентов с иммунной системой, без зависимостей.
—
io.github.sanjaysgk/can-immunesanjaysgk · Запросы к CAN-IMMUNE: неоантигенные мутации рака, пептиды, клеточные линии, связывание…
—
MCP Agent Health Reporteraos-standard · Проверка здоровья AOS-агента перед деплоем: манифест, сервисы, иммунный цикл…
—
Orphan Disease Opportunity Atlas MCPrare-disease-atlas · Плейбуки по миелофиброзу (JAK2+ и аутоиммунный МФ) и live-MCP по 7000 редких болезней.
—

Лучшие ИИ-инструменты для генерации видео

Генерация видео

Подборка нейросетей для генерации и монтажа видео. Инструменты, которые превращают текст в готовые ролики, экономят часы на съемках и постпродакшне. Подходит для SMM-специалистов,

VEED.IOVeed
По запросу
5.0
MootionMootion
По запросу
5.0
FlyviFlyvi
Есть бесплатный тариф
4.9
Google Veo 3.1Google
Платно
4.9
Sora (OpenAI)OpenAI
Платно
4.9
PikaPika
Платно
4.9
captions space
Есть бесплатный тариф
4.8
Клайп
Есть бесплатный тариф
4.8
viralpulse.appViralpulse
По запросу
4.8
Viral Maker AIViral-maker
Есть бесплатный тариф
4.8

Лучшие ИИ-инструменты для генерации текста и копирайтинга

Генерация текста и копирайтинг

Подборка нейросетей для генерации текстов и копирайтинга. Сервисы, которые помогают создавать статьи, посты и рекламные объявления с нуля или по черновику, экономя часы рутинной ра

NeuroscribeNeuroscribe
Есть бесплатный тариф
5.0
GoGPTGogpt
По запросу
5.0
ChatsonicChatsonic
По запросу
4.9
НейроТекстерNeuro-texter
По запросу
4.9
ChatGPTOpenAI
По подписке
4.9
Редактум
Есть бесплатный тариф
4.8
ChadGPTChadgpt
По запросу
4.8
Cosmo ScribeCosmoscribe
Есть бесплатный тариф
4.8
Memo HelperCopilot33
По запросу
4.8
LibraChatLibrachat
Есть бесплатный тариф
4.8

Лучшие ИИ-инструменты для генерации изображений

Генерация изображений

Подборка нейросетей для генерации изображений от фотореализма до концепт-арта. Сервисы, которые экономят часы ручной работы, создавая визуал для блогов, рекламы и дизайна за минуты

MagviMagvi
По запросу
5.0
DALL-E 3OpenAI
По подписке
5.0
SupaLabSupalab
По запросу
5.0
Freestyling.aiFreestyling
Есть бесплатный тариф
4.9
ArtGeneration.meArtgeneration
Есть бесплатный тариф
4.9
BigjpgBigjpg
По запросу
4.9
Художник от VKVK
Бесплатно
4.9
Wonderink — ИИ-книги
Есть бесплатный тариф
4.8
Avato AI12ai
По запросу
4.8
Virton AIVirton
По запросу
4.8