Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Perform V(D)J alignment and clonotype assembly from TCR-seq or BCR-seq data using MiXCR. Use when processing raw immune repertoire sequencing data to identify clonotypes and their frequencies.
.claude/skills/bio-tcr-bcr-analysis-mixcr-analysis/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-02 | ✗→✓ | ▲ Improved | — | — |
| case-08 | ✗→✓ | ▲ Improved | — | — |
| case-09 | ✗→✓ | ▲ Improved | — | — |
| case-01 | ✗→✓ | ▲ Improved | — | — |
| case-16 | ✗→✓ | ▲ Improved | — | — |
Reference examples tested with: MiXCR 4.6+, pandas 2.2+
Before using code patterns, verify installed versions match. If versions differ:
pip show <package> then help(module.function) to check signatures<tool> --version then <tool> --help to confirm flagsIf code throws ImportError, AttributeError, or TypeError, introspect the installed package and adapt the example to match the actual API rather than retrying.
"Extract TCR/BCR clonotypes from my sequencing data" → Assemble immune receptor sequences from raw reads, identify V(D)J gene segments, and generate clonotype tables for repertoire analysis.
mixcr analyze for end-to-end TCR/BCR extraction and clonotype assemblyGoal: Run end-to-end V(D)J alignment and clonotype assembly from raw FASTQ files in a single command.
Approach: Use MiXCR's preset-based analyze command which chains alignment, assembly, and export steps automatically.
bashmixcr analyze generic-tcr-amplicon \ --species human \ --rna \ --rigid-left-alignment-boundary \ --floating-right-alignment-boundary C \ input_R1.fastq.gz input_R2.fastq.gz \ output_prefix mixcr analyze 10x-vdj-tcr \ input_R1.fastq.gz input_R2.fastq.gz \ output_prefix
Goal: Process immune repertoire data through individual alignment, refinement, assembly, and export stages for fine-grained control.
Approach: Chain MiXCR CLI steps sequentially: align reads to V(D)J references, refine UMIs and sort, assemble clonotypes, then export results.
bashmixcr align \ --species human \ --preset generic-tcr-amplicon-umi \ input_R1.fastq.gz input_R2.fastq.gz \ alignments.vdjca mixcr align \ --species human \ --rna \ -OallowPartialAlignments=true \ input_R1.fastq.gz input_R2.fastq.gz \ alignments.vdjca
bashmixcr refineTagsAndSort alignments.vdjca alignments_refined.vdjca mixcr assemble alignments_refined.vdjca clones.clns
bashmixcr exportClones \ --chains TRB \ --preset full \ clones.clns \ clones.tsv mixcr exportClones \ --chains TRB \ -cloneId -readCount -readFraction \ -nFeature CDR3 -aaFeature CDR3 \ -vGene -dGene -jGene \ clones.clns \ clones_custom.tsv
| Protocol | Use Case | |----------|----------| | generic-tcr-amplicon | TCR amplicon sequencing | | generic-bcr-amplicon | BCR amplicon sequencing | | generic-tcr-amplicon-umi | TCR amplicon with UMIs | | rnaseq-tcr | TCR extraction from bulk RNA-seq | | rnaseq-bcr | BCR extraction from bulk RNA-seq | | 10x-vdj-tcr | 10x Genomics TCR enrichment | | 10x-vdj-bcr | 10x Genomics BCR enrichment | | takara-human-tcr-v2 | Takara SMARTer kit |
bashmixcr align --species human ... mixcr align --species mmu ... # Available: human, mmu, rat, rhesus, dog, pig, rabbit, chicken
| Column | Description | |--------|-------------| | cloneId | Unique clone identifier | | readCount | Number of reads | | cloneFraction | Proportion of repertoire | | nSeqCDR3 | Nucleotide CDR3 sequence | | aaSeqCDR3 | Amino acid CDR3 sequence | | allVHitsWithScore | V gene assignments | | allDHitsWithScore | D gene assignments | | allJHitsWithScore | J gene assignments |
Goal: Assess alignment and assembly quality to identify problematic samples.
Approach: Export MiXCR alignment reports and check key success rate metrics.
bashmixcr exportReports alignments.vdjca # Key metrics: # - Successfully aligned reads (>80% is good) # - CDR3 found (>70% of aligned) # - Clonotype count (varies by sample type)
Goal: Load MiXCR clonotype tables into pandas for downstream analysis and integration.
Approach: Read tab-delimited export files and rename columns to standardized names.
pythonimport pandas as pd def load_mixcr_clones(filepath): df = pd.read_csv(filepath, sep='\t') df = df.rename(columns={ 'readCount': 'count', 'cloneFraction': 'frequency', 'aaSeqCDR3': 'cdr3_aa', 'nSeqCDR3': 'cdr3_nt' }) return df
| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-02 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-21 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-17 | pass→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-08 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-11 | pass→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-09 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-20 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-06 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-01 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-16 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-22 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-13 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-03 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-04 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-05 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-07 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-10 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-12 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-14 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-15 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-18 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-19 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
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. 22 cases were attempted. The headline lift of +55 percentage points is the difference between those two pass rates over the 22 comparable cases.
The per-case answers from this run were removed by the retention sweep, so the case table below shows the verdicts without the text either arm produced. The counts above were recorded at the time and are unaffected. Answers are now kept for 180 days.
Other measured skills in the registry, with their headline benchmark lift.