tooluniverse-immune-repertoire-analysis by mims-harvard/tooluniverse
npx skills add https://github.com/mims-harvard/tooluniverse --skill tooluniverse-immune-repertoire-analysis用于分析 T 细胞受体(TCR)和 B 细胞受体(BCR)组库测序数据的综合技能,以表征适应性免疫应答、克隆扩增和抗原特异性。
适应性免疫受体组库测序(AIRR-seq)通过对 TCR 和 BCR 可变区进行高通量测序,实现对 T 细胞和 B 细胞群体的全面分析。本技能提供了一个包含 8 个阶段的工作流程,用于:
从常见格式(MiXCR、ImmunoSEQ、AIRR 标准、10x Genomics VDJ)加载 AIRR-seq 数据。将列标准化为:cloneId、count、frequency、cdr3aa、cdr3nt、v_gene、j_gene、。使用以下三种方法之一定义克隆型:
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
chain按克隆型聚合,按计数排序,分配等级。
计算组库的多样性指标:
生成稀疏曲线以评估测序深度是否足够。
分析按克隆型计数加权的 V 和 J 基因使用模式:
表征 CDR3 序列:
识别频率超过阈值(默认:第 95 百分位数)的扩增克隆型。在多个时间点纵向追踪克隆型,以测量其持续性、平均/最大频率和倍数变化。
查询表位数据库以获取已知的 TCR-表位关联:
iedb_search_tcell_assays):通过序列或 MHC 类别搜索 T 细胞测定记录;使用 iedb_search_epitopes 并配合 sequence_contains 进行基序搜索BVBRC_search_epitopes):最适合基于生物体的表位发现(例如,SARS-CoV-2 使用 taxon_id="2697049");返回带有 T 细胞/B 细胞测定计数的表位序列PubMed_search_articles):搜索 CDR3 + 表位/抗原/特异性iedb_get_epitope_antigens(链接表位→抗原),iedb_get_epitope_mhc(MHC 限制性)将 TCR/BCR 克隆型与配对单细胞 RNA-seq 的细胞表型关联:
使用的关键工具:
iedb_search_tcell_assays - T 细胞测定记录(序列、MHC 类别过滤器)iedb_search_bcell - B 细胞测定记录iedb_search_epitopes - 通过 sequence_contains 进行表位基序搜索BVBRC_search_epitopes - 基于生物体的表位发现(最适合病原体特异性查询)NCBI_SRA_search_runs - 查找公共 TCR/BCR-seq 数据集(使用 strategy="AMPLICON")ImmPort_search_studies - NIAID 免疫学研究(疫苗试验、流式细胞术)PubMed_search_articles - 关于 TCR/BCR 特异性的文献UniProt_get_entry_by_accession - 抗原蛋白信息与其他技能的集成:
tooluniverse-single-cell - 单细胞转录组学tooluniverse-rnaseq-deseq2 - 批量 RNA-seq 分析tooluniverse-variant-analysis - 体细胞超突变分析(BCR)from tooluniverse import ToolUniverse
# 1. 加载数据
tcr_data = load_airr_data("clonotypes.txt", format='mixcr')
# 2. 定义克隆型
clonotypes = define_clonotypes(tcr_data, method='vj_cdr3')
# 3. 计算多样性
diversity = calculate_diversity(clonotypes['count'])
print(f"Shannon entropy: {diversity['shannon_entropy']:.2f}")
# 4. 检测扩增克隆
expansion = detect_expanded_clones(clonotypes)
print(f"Expanded clonotypes: {expansion['n_expanded']}")
# 5. 分析 V(D)J 使用情况
vdj_usage = analyze_vdj_usage(tcr_data)
# 6. 查询表位数据库
top_clones = expansion['expanded_clonotypes']['clonotype'].head(10)
epitopes = query_epitope_database(top_clones)
ANALYSIS_DETAILS.md - 所有 8 个阶段的详细代码片段USE_CASES.md - 完整用例(免疫治疗、疫苗、自身免疫、单细胞整合)和最佳实践每周安装次数
125
代码仓库
GitHub 星标数
1.2K
首次出现
2026 年 2 月 19 日
安全审计
安装于
codex122
gemini-cli121
opencode121
github-copilot120
cursor118
amp117
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.
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)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)
ANALYSIS_DETAILS.md - Detailed code snippets for all 8 phasesUSE_CASES.md - Complete use cases (immunotherapy, vaccine, autoimmune, single-cell integration) and best practicesWeekly Installs
125
Repository
GitHub Stars
1.2K
First Seen
Feb 19, 2026
Security Audits
Gen Agent Trust HubPassSocketPassSnykWarn
Installed on
codex122
gemini-cli121
opencode121
github-copilot120
cursor118
amp117
Excel财务建模规范与xlsx文件处理指南:专业格式、零错误公式与数据分析
46,700 周安装