This workflow takes immune-repertoire sequencing from FASTQ to clonotypes and downstream metrics, but it is a router rather than a fixed line. A repertoire measurement is a depth- and chemistry-confounded sample of an unevenly-expanded clonal population, so the correct pipeline depends on two forks: bulk versus single-cell, and TCR versus BCR. Bulk libraries give deep but unpaired chains and route to MiXCR then depth-normalized mixcr postanalysis (or immunarch) diversity and overlap; single-cell 10x data gives native chain pairing and routes to scirpy for gene-expression integration. TCR uses exact CDR3-nucleotide + V + J clonotypes, but BCR undergoes somatic hypermutation, so exact clonotypes are wrong and BCR must route to Immcantation for data-derived clonal clustering, germline reconstruction, SHM, and lineage trees. Two rules gate every valid result: MiXCR 4.x needs an activated license and a chemistry-matched preset, and diversity or overlap must be compared only after downsampling samples to a common depth.
# MiXCR 4.x (requires an activated license; academic is free at platforma.bio/getlicense)
conda install -c milaboratory mixcr
mixcr activate-license # or export MI_LICENSE_FILE=/path/mi.license
# VDJtools (Java): optional, for pre-4.x MiXCR or non-MiXCR inputs; run RInstall once for plotting deps.
# It cannot parse raw MiXCR 4.x exportClones output -- prefer `mixcr postanalysis` there.
conda install -c bioconda vdjtools
# Immcantation (BCR clonal clustering, SHM, lineages) -- prefer the Docker suite image
# docker pull immcantation/suite:4.x
# or R: BiocManager / install.packages(c('shazam','scoper','alakazam','dowser','tigger'))
# scirpy (single-cell VDJ + gene expression)
pip install scirpy mudata scanpy
Tell your AI agent what you want to do: - "Run the bulk TCR pipeline from FASTQ to diversity" - "Analyze my BCR repertoire including somatic hypermutation and lineage trees" - "Process my 10x single-cell VDJ data and link clonotypes to cell state" - "Compare diversity across my samples at equal depth"
"Assemble clonotypes from my paired-end TCR amplicon FASTQ, then compare diversity across the cohort at equal depth"
"Compute repertoire overlap between my pre- and post-treatment TCR samples with a depth-robust metric"
"Analyze my IGH repertoire: cluster clones, quantify somatic hypermutation, and build lineage trees"
"My BCR diversity looks absurdly high with no lineages -- what am I doing wrong?"
"Run MiXCR on my 10x VDJ FASTQ, then integrate clonotypes with my scRNA-seq clusters in scirpy"
"Filter doublets and measure clonal expansion by cell state in my single-cell TCR data"
mixcr analyze <preset> to assemble clonotypes.postanalysis (VDJtools cannot parse raw MiXCR 4.x exportClones output).MI_LICENSE_FILE on HPC/Docker and whitelist the phone-home IPs on firewalled clusters.mixcr exportPreset.uniqueMoleculeCount for UMI libraries, cells for single-cell, reads only for non-UMI bulk.