screpertoire-analysis

Analyze TCR and BCR repertoires from single-cell data using scRepertoire and Seurat.

Updated May 28, 2026
One-click install
npx skills add https://github.com/cpanse/skills --skill screpertoire-analysis-cpanse
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: screpertoire-analysis
Source: https://github.com/cpanse/skills/tree/main/single-cell-spatial-general/skills/screpertoire-analysis
Command: npx skills add https://github.com/cpanse/skills --skill screpertoire-analysis-cpanse

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve? Single-cell immune profiling generates complex VDJ contig data that is difficult to combine, quantify, and compare across samples. This Skill provides standardized R workflows for clonal expansion analysis, diversity metrics, VDJ gene usage, antigen prediction, and cross-tissue clonal sharing on FGCZ infrastructure. ## Core Features & Use Cases - Clonotype Assembly and Seurat Integration: Load CellRanger VDJ outputs (10x, AIRR, BD, MiXCR, TRUST4, WAT3R), combine contigs into clonotypes, and merge with Seurat transcriptomic objects. - Repertoire Analysis: Compute clonal expansion, diversity metrics (Shannon, Simpson, Chao1), Morisita-Horn overlap, VDJ gene usage, and STARTRAC migration indices. - Antigen Annotation: Annotate TCR sequences against VDJdb using Trex for epitope specificity prediction. - Use Case: Compare TCR repertoires between matched PBMC and skin samples to identify dual-expanded clones shared across tissues, then visualize them on UMAPs and alluvial diagrams. ## Quick Start Ask the agent to load the CellRanger VDJ filtered_contig_annotations.csv files for your samples, combine them into clonotypes with scRepertoire, and integrate the results into your Seurat object.

Frequently Asked Questions about screpertoire-analysis

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I analyze TCR repertoires from 10x CellRanger VDJ output?

Load the filtered_contig_annotations.csv files from each CellRanger VDJ run, then use scRepertoire's combineTCR function to assemble clonotypes per sample. Integrate the results into a Seurat object with combineExpression to overlay clone sizes on UMAPs.

What input formats does scRepertoire support for VDJ data?

scRepertoire accepts 10x Genomics filtered_contig_annotations.csv, AIRR format, BD Rhapsody VDJ, MiXCR output, TRUST4 assembled contigs, and WAT3R pipeline output. Both TCR and BCR data are supported via combineTCR and combineBCR.

Which clonal overlap method should I use in scRepertoire?

The Morisita-Horn index is recommended because it accounts for clonal abundance, unlike raw counts or Jaccard. Use clonalOverlap with method set to morisita for comparing repertoires between samples, tissues, or cell types.

Can I integrate scRepertoire clonotypes with Seurat single-cell data?

Yes, combineExpression adds clonotype metadata directly to a Seurat object, matching cells by barcode. Ensure barcode formats match between VDJ and gene expression data, renaming cells if prefixes differ.

How do I predict antigen specificity from TCR sequences?

Use the Trex package's annotateDB function to match CDR3 sequences against the VDJdb database with exact matching (edit.distance = 0). Filter epitopes appearing in fewer than five cells to reduce annotation noise.

Why does combineExpression fail to match my Seurat barcodes?

Barcode mismatch occurs when VDJ and gene expression data use different prefixes or suffixes. Check cell barcode formats with Cells(seurat_obj) and use RenameCells to prepend sample identifiers so both datasets align.