HLA & Immunogenomics Analysis
Pipeline for exploring HLA gene families, MHC-peptide binding, epitope associations, and their clinical implications in transplantation, vaccine development, and cancer immunotherapy. Bridges immunogenetic databases (IMGT, IEDB) with functional annotation (UniProt) and druggability data (DGIdb).
Reasoning Strategy
HLA analysis is fundamentally about peptide presentation: the polymorphism of HLA molecules determines which peptides are displayed to T cells, which in turn governs disease susceptibility, transplant rejection, drug hypersensitivity, and vaccine immunogenicity. HLA type affects disease susceptibility for autoimmune conditions (HLA-B27 and ankylosing spondylitis), transplant rejection (HLA mismatch drives alloresponse), drug hypersensitivity (abacavir causes severe hypersensitivity reactions only in HLA-B*57:01 carriers), and vaccine design (epitopes must be presented by the recipient's HLA alleles to elicit a T-cell response). Class I and Class II HLA molecules have fundamentally different binding grooves, peptide lengths, and T-cell partners — never conflate them. The absence of an epitope from IEDB means it has not been tested, not that it cannot bind.
LOOK UP DON'T GUESS: Never assume an allele's binding properties or population frequency — query IEDB for experimental binding data and IMGT for allele annotation. Do not guess which HLA alleles are common in a population; look up published frequency data via PubMed.
Guiding principles:
- HLA nomenclature precision -- HLA allele names follow strict conventions (e.g., HLA-A*02:01); get the resolution level right
- MHC class awareness -- Class I (A, B, C) and Class II (DR, DQ, DP) have different binding properties and clinical roles
- Species context -- most queries target human HLA, but MHC exists across vertebrates; confirm species early
- Evidence layering -- combine binding data (IEDB) with gene annotation (IMGT) and structural context (UniProt)
- Clinical translation -- connect molecular findings to transplant matching, vaccine targets, or immunotherapy response
- English-first queries -- use English terms in all tool calls; respond in the user's language
COMPUTE, DON'T DESCRIBE
When analysis requires computation (statistics, data processing, scoring, enrichment), write and run Python code via Bash. Don't describe what you would do — execute it and report actual results. Use ToolUniverse tools to retrieve data, then Python (pandas, scipy, statsmodels, matplotlib) to analyze it.
When to Use
Typical triggers:
- "Look up HLA-A*02:01 binding peptides"
- "What epitopes are presented by MHC class I for [pathogen]?"
- "Find HLA gene information for [allele]"
- "What MHC molecules bind [peptide/antigen]?"
- "Assess HLA associations for [disease]"
- "Find immunogenic epitopes for [virus/protein]"
- "What drugs target HLA-related pathways?"
Not this skill: For full neoantigen prediction pipelines, use tooluniverse-immunotherapy-response-prediction. For general gene function lookup, use tooluniverse-drug-target-validation.
Core Databases
| Database |
Scope |
Best For |
| IMGT |
International ImMunoGeneTics; HLA/MHC gene nomenclature and sequences |
Authoritative HLA gene info, allele nomenclature, sequence data |
| IEDB |
Immune Epitope Database; experimentally validated epitope-MHC data |
Epitope binding, MHC restriction, T-cell assay results |
| BVBRC |
BV-BRC (formerly PATRIC/IRD); pathogen epitopes |
Pathogen-derived epitopes with host MHC context |
| UniProt |
Protein function and structure annotations |
HLA protein features, domains, variants |
| DGIdb |
Drug-Gene Interaction Database |
Druggability of HLA-pathway genes |
| PubMed |
Biomedical literature |
Clinical HLA studies, transplant outcomes |
Workflow Overview
Phase 0: Query Parsing & HLA Disambiguation
Resolve allele names, identify MHC class, confirm species
|
Phase 1: HLA Gene Lookup
IMGT gene info, allele details, sequence data
|
Phase 2: MHC Binding & Restriction
IEDB MHC binding data, allele-specific peptide repertoire
|
Phase 3: Epitope-MHC Associations
IEDB/BVBRC epitope search, pathogen-specific epitopes
|
Phase 4: Functional Annotation
UniProt protein features, structural domains
|
Phase 5: Clinical & Therapeutic Context
DGIdb druggability, PubMed clinical evidence
|
Phase 6: Report Synthesis
Integrated immunogenomics report
Phase Details
Phase 0: Query Parsing & HLA Disambiguation
Parse the user's input to identify:
- HLA allele (e.g., HLA-A02:01, HLA-DRB104:01) -- note resolution level (2-digit vs 4-digit)
- MHC class (I or II) -- determines binding groove structure and peptide length
- Pathogen or antigen (e.g., SARS-CoV-2 spike, influenza HA)
- Clinical context (transplant, vaccine, autoimmunity, cancer)
HLA nomenclature quick reference:
HLA-A*02:01 = gene A, allele group 02, specific protein 01
- Class I: HLA-A, HLA-B, HLA-C (present to CD8+ T cells, peptides 8-11 aa)
- Class II: HLA-DR, HLA-DQ, HLA-DP (present to CD4+ T cells, peptides 13-25 aa)
Phase 1: HLA Gene Lookup
Objective: Get authoritative gene and allele information from IMGT.
Tools:
IMGT_search_genes -- search for HLA/MHC genes
- Input:
query (gene name or keyword), optional species, locus
- Output: gene list with nomenclature, locus, species
IMGT_get_gene_info -- get detailed gene/allele information
- Input:
gene_name (IMGT gene name)
- Output: allele sequences, functional status, reference sequences
Workflow:
- Search IMGT for the target HLA gene or allele
- Retrieve full gene details including functional status and sequence
- Note the number of known alleles (HLA-A has >7,000; HLA-B has >8,000)
- Identify whether the allele is commonly studied or rare
If allele not found: Check nomenclature -- older names may have been reassigned. Try searching by the gene name alone (e.g., "HLA-A") and filtering results.
Phase 2: MHC Binding & Restriction
Objective: Find what peptides bind to a specific MHC molecule, or what MHC molecules present a given peptide.
Tools:
iedb_search_mhc -- search for MHC molecules in IEDB
- Input:
mhc_restriction (allele name), optional mhc_class
- Output: MHC molecules with binding data counts
iedb_get_epitope_mhc -- get MHC binding details for an epitope
- Input:
epitope_id (IEDB epitope ID)
- Output: MHC restriction data, binding assay results, IC50 values
Workflow:
- Search IEDB for the target MHC allele to see available binding data
- For specific epitope-MHC pairs, retrieve binding assay details
- Note binding affinity (IC50 < 500 nM is typically considered a binder for class I)
- Distinguish between binding assays (in vitro) and T-cell assays (functional)
Binding affinity interpretation (Class I):
- Strong binder: IC50 < 50 nM
- Moderate binder: IC50 50-500 nM
- Weak binder: IC50 500-5000 nM
- Non-binder: IC50 > 5000 nM
Phase 3: Epitope-MHC Associations
Objective: Find epitopes from specific pathogens or antigens and their MHC restriction.
Tools:
iedb_search_epitopes -- search for experimentally validated epitopes
- Input:
organism_name (source organism), source_antigen_name (protein name)
- Output: epitope list with sequence, MHC restriction, assay results
BVBRC_search_epitopes -- search pathogen-derived epitopes
- Input:
query (pathogen or antigen keyword), optional host, limit
- Output: epitopes with host MHC context, assay type
Workflow:
- Search IEDB for epitopes from the target pathogen/antigen
- Supplement with BVBRC for additional pathogen-specific epitopes
- Filter by the MHC allele of interest if specified
- Categorize by assay type: binding assay, T-cell assay (IFN-gamma, cytotoxicity), MHC multimer
Important: IEDB epitopes are experimentally validated, not predicted. The absence of an epitope does not mean it won't bind -- it may simply be untested.
Population coverage for vaccine design: When selecting epitopes for a vaccine, check how common the restricting HLA allele is in the target population. An epitope restricted to HLA-A*02:01 covers ~50% of Europeans but <15% of some African populations. For broad population coverage, select epitopes across multiple HLA supertypes (A2, A3, B7, B44 cover >95% of most populations).
Phase 4: Functional Annotation
Objective: Get protein-level features for HLA molecules and related proteins.
Tools:
UniProt_search -- search for HLA protein entries
- Input:
query (protein/gene name), optional organism, limit
- Output: protein entries with accession, function, features
Workflow:
- Search UniProt for the HLA protein (e.g., "HLA-A human")
- Extract functional domains: signal peptide, alpha chains, transmembrane region
- Note polymorphic positions that define allele specificity
- Check for structural data (PDB cross-references)
Phase 5: Clinical & Therapeutic Context
Objective: Connect HLA findings to drug interactions and clinical evidence.
Tools:
DGIdb_get_drug_gene_interactions -- find drugs targeting HLA-pathway genes
- Input:
genes (list of gene names, e.g., ["HLA-A", "B2M"])
- Output: drug-gene interactions, interaction types, sources
PubMed_search_articles -- find clinical HLA studies
- Input:
query (search term), optional limit
- Output: articles with title, abstract, PMID
Workflow:
- Query DGIdb for drug interactions with relevant HLA genes
- Search PubMed for clinical studies (transplant outcomes, pharmacogenomics, disease associations)
- For transplant queries, look for HLA matching guidelines and outcomes data
- For pharmacogenomics, note HLA alleles linked to drug hypersensitivity (e.g., HLA-B*57:01 and abacavir)
Well-known HLA-drug associations (for context, always verify with current data):
- HLA-B*57:01: abacavir hypersensitivity
- HLA-B*15:02: carbamazepine SJS/TEN (Southeast Asian populations)
- HLA-B*58:01: allopurinol hypersensitivity
- HLA-A*31:01: carbamazepine drug reaction (European populations)
Phase 6: Report Synthesis
Structure the report as:
- HLA Context -- gene/allele identification, MHC class, population frequency if available
- Binding Profile -- peptide repertoire, binding affinity distribution
- Epitope Landscape -- pathogen-specific epitopes, assay evidence
- Protein Features -- structural domains, polymorphic sites
- Clinical Relevance -- transplant implications, drug associations, disease links
- Evidence Summary -- graded by source (IEDB experimental > computational prediction > literature mention)
Edge Cases & Fallbacks
- Ambiguous allele name: Ask user for resolution level. "HLA-A2" could mean HLA-A02:01 or the broader A02 group
- No IEDB data for allele: Common for rare alleles. Note the gap; suggest computational prediction tools
- Cross-species MHC: IMGT covers multiple species. Confirm species context for non-human queries (e.g., H-2 for mouse)
- BVBRC empty results: Try broader organism name or use IEDB as primary source
Limitations
- No binding prediction: This skill queries experimental databases, not prediction algorithms (NetMHCpan, MHCflurry). It tells you what has been measured, not what might bind
- Population frequency gaps: HLA allele frequencies vary dramatically by ethnicity; databases may not cover all populations equally
- Class II complexity: Class II molecules are heterodimers (alpha + beta chains); binding prediction and data are less mature than for Class I
- Epitope completeness: IEDB coverage is biased toward well-studied pathogens (HIV, influenza, SARS-CoV-2) and common HLA alleles
1---
2name: tooluniverse-hla-immunogenomics
3description: HLA gene-family analysis and MHC-peptide binding for transplant compatibility, vaccine epitope coverage, and cancer immunotherapy. Uses IMGT (HLA polymorphism), IEDB (epitope-MHC binding), UniProt (annotation), DGIdb (druggability). Use for HLA typing/imputation review, vaccine HLA coverage, and immunotherapy prediction biomarkers (HLA-LOH, neoantigen presentation).
4disable-model-invocation: true
5---
6
7# HLA & Immunogenomics Analysis
8
9Pipeline for exploring HLA gene families, MHC-peptide binding, epitope associations, and their clinical implications in transplantation, vaccine development, and cancer immunotherapy. Bridges immunogenetic databases (IMGT, IEDB) with functional annotation (UniProt) and druggability data (DGIdb).
10
11## Reasoning Strategy
12
13HLA analysis is fundamentally about peptide presentation: the polymorphism of HLA molecules determines which peptides are displayed to T cells, which in turn governs disease susceptibility, transplant rejection, drug hypersensitivity, and vaccine immunogenicity. HLA type affects disease susceptibility for autoimmune conditions (HLA-B27 and ankylosing spondylitis), transplant rejection (HLA mismatch drives alloresponse), drug hypersensitivity (abacavir causes severe hypersensitivity reactions only in HLA-B*57:01 carriers), and vaccine design (epitopes must be presented by the recipient's HLA alleles to elicit a T-cell response). Class I and Class II HLA molecules have fundamentally different binding grooves, peptide lengths, and T-cell partners — never conflate them. The absence of an epitope from IEDB means it has not been tested, not that it cannot bind.
14
15**LOOK UP DON'T GUESS**: Never assume an allele's binding properties or population frequency — query IEDB for experimental binding data and IMGT for allele annotation. Do not guess which HLA alleles are common in a population; look up published frequency data via PubMed.
16
17**Guiding principles**:
181. **HLA nomenclature precision** -- HLA allele names follow strict conventions (e.g., HLA-A*02:01); get the resolution level right
192. **MHC class awareness** -- Class I (A, B, C) and Class II (DR, DQ, DP) have different binding properties and clinical roles
203. **Species context** -- most queries target human HLA, but MHC exists across vertebrates; confirm species early
214. **Evidence layering** -- combine binding data (IEDB) with gene annotation (IMGT) and structural context (UniProt)
225. **Clinical translation** -- connect molecular findings to transplant matching, vaccine targets, or immunotherapy response
236. **English-first queries** -- use English terms in all tool calls; respond in the user's language
24
25---
26
27## COMPUTE, DON'T DESCRIBE
28When analysis requires computation (statistics, data processing, scoring, enrichment), write and run Python code via Bash. Don't describe what you would do — execute it and report actual results. Use ToolUniverse tools to retrieve data, then Python (pandas, scipy, statsmodels, matplotlib) to analyze it.
29
30## When to Use
31
32Typical triggers:
33- "Look up HLA-A*02:01 binding peptides"
34- "What epitopes are presented by MHC class I for [pathogen]?"
35- "Find HLA gene information for [allele]"
36- "What MHC molecules bind [peptide/antigen]?"
37- "Assess HLA associations for [disease]"
38- "Find immunogenic epitopes for [virus/protein]"
39- "What drugs target HLA-related pathways?"
40
41**Not this skill**: For full neoantigen prediction pipelines, use `tooluniverse-immunotherapy-response-prediction`. For general gene function lookup, use `tooluniverse-drug-target-validation`.
42
43---
44
45## Core Databases
46
47| Database | Scope | Best For |
48|----------|-------|----------|
49| **IMGT** | International ImMunoGeneTics; HLA/MHC gene nomenclature and sequences | Authoritative HLA gene info, allele nomenclature, sequence data |
50| **IEDB** | Immune Epitope Database; experimentally validated epitope-MHC data | Epitope binding, MHC restriction, T-cell assay results |
51| **BVBRC** | BV-BRC (formerly PATRIC/IRD); pathogen epitopes | Pathogen-derived epitopes with host MHC context |
52| **UniProt** | Protein function and structure annotations | HLA protein features, domains, variants |
53| **DGIdb** | Drug-Gene Interaction Database | Druggability of HLA-pathway genes |
54| **PubMed** | Biomedical literature | Clinical HLA studies, transplant outcomes |
55
56---
57
58## Workflow Overview
59
60```
61Phase 0: Query Parsing & HLA Disambiguation
62 Resolve allele names, identify MHC class, confirm species
63 |
64Phase 1: HLA Gene Lookup
65 IMGT gene info, allele details, sequence data
66 |
67Phase 2: MHC Binding & Restriction
68 IEDB MHC binding data, allele-specific peptide repertoire
69 |
70Phase 3: Epitope-MHC Associations
71 IEDB/BVBRC epitope search, pathogen-specific epitopes
72 |
73Phase 4: Functional Annotation
74 UniProt protein features, structural domains
75 |
76Phase 5: Clinical & Therapeutic Context
77 DGIdb druggability, PubMed clinical evidence
78 |
79Phase 6: Report Synthesis
80 Integrated immunogenomics report
81```
82
83---
84
85## Phase Details
86
87### Phase 0: Query Parsing & HLA Disambiguation
88
89Parse the user's input to identify:
90- **HLA allele** (e.g., HLA-A*02:01, HLA-DRB1*04:01) -- note resolution level (2-digit vs 4-digit)
91- **MHC class** (I or II) -- determines binding groove structure and peptide length
92- **Pathogen or antigen** (e.g., SARS-CoV-2 spike, influenza HA)
93- **Clinical context** (transplant, vaccine, autoimmunity, cancer)
94
95HLA nomenclature quick reference:
96- `HLA-A*02:01` = gene A, allele group 02, specific protein 01
97- Class I: HLA-A, HLA-B, HLA-C (present to CD8+ T cells, peptides 8-11 aa)
98- Class II: HLA-DR, HLA-DQ, HLA-DP (present to CD4+ T cells, peptides 13-25 aa)
99
100### Phase 1: HLA Gene Lookup
101
102**Objective**: Get authoritative gene and allele information from IMGT.
103
104**Tools**:
105- `IMGT_search_genes` -- search for HLA/MHC genes
106 - Input: `query` (gene name or keyword), optional `species`, `locus`
107 - Output: gene list with nomenclature, locus, species
108- `IMGT_get_gene_info` -- get detailed gene/allele information
109 - Input: `gene_name` (IMGT gene name)
110 - Output: allele sequences, functional status, reference sequences
111
112**Workflow**:
1131. Search IMGT for the target HLA gene or allele
1142. Retrieve full gene details including functional status and sequence
1153. Note the number of known alleles (HLA-A has >7,000; HLA-B has >8,000)
1164. Identify whether the allele is commonly studied or rare
117
118**If allele not found**: Check nomenclature -- older names may have been reassigned. Try searching by the gene name alone (e.g., "HLA-A") and filtering results.
119
120### Phase 2: MHC Binding & Restriction
121
122**Objective**: Find what peptides bind to a specific MHC molecule, or what MHC molecules present a given peptide.
123
124**Tools**:
125- `iedb_search_mhc` -- search for MHC molecules in IEDB
126 - Input: `mhc_restriction` (allele name), optional `mhc_class`
127 - Output: MHC molecules with binding data counts
128- `iedb_get_epitope_mhc` -- get MHC binding details for an epitope
129 - Input: `epitope_id` (IEDB epitope ID)
130 - Output: MHC restriction data, binding assay results, IC50 values
131
132**Workflow**:
1331. Search IEDB for the target MHC allele to see available binding data
1342. For specific epitope-MHC pairs, retrieve binding assay details
1353. Note binding affinity (IC50 < 500 nM is typically considered a binder for class I)
1364. Distinguish between binding assays (in vitro) and T-cell assays (functional)
137
138**Binding affinity interpretation** (Class I):
139- Strong binder: IC50 < 50 nM
140- Moderate binder: IC50 50-500 nM
141- Weak binder: IC50 500-5000 nM
142- Non-binder: IC50 > 5000 nM
143
144### Phase 3: Epitope-MHC Associations
145
146**Objective**: Find epitopes from specific pathogens or antigens and their MHC restriction.
147
148**Tools**:
149- `iedb_search_epitopes` -- search for experimentally validated epitopes
150 - Input: `organism_name` (source organism), `source_antigen_name` (protein name)
151 - Output: epitope list with sequence, MHC restriction, assay results
152- `BVBRC_search_epitopes` -- search pathogen-derived epitopes
153 - Input: `query` (pathogen or antigen keyword), optional `host`, `limit`
154 - Output: epitopes with host MHC context, assay type
155
156**Workflow**:
1571. Search IEDB for epitopes from the target pathogen/antigen
1582. Supplement with BVBRC for additional pathogen-specific epitopes
1593. Filter by the MHC allele of interest if specified
1604. Categorize by assay type: binding assay, T-cell assay (IFN-gamma, cytotoxicity), MHC multimer
161
162**Important**: IEDB epitopes are experimentally validated, not predicted. The absence of an epitope does not mean it won't bind -- it may simply be untested.
163
164**Population coverage for vaccine design**: When selecting epitopes for a vaccine, check how common the restricting HLA allele is in the target population. An epitope restricted to HLA-A*02:01 covers ~50% of Europeans but <15% of some African populations. For broad population coverage, select epitopes across multiple HLA supertypes (A2, A3, B7, B44 cover >95% of most populations).
165
166### Phase 4: Functional Annotation
167
168**Objective**: Get protein-level features for HLA molecules and related proteins.
169
170**Tools**:
171- `UniProt_search` -- search for HLA protein entries
172 - Input: `query` (protein/gene name), optional `organism`, `limit`
173 - Output: protein entries with accession, function, features
174
175**Workflow**:
1761. Search UniProt for the HLA protein (e.g., "HLA-A human")
1772. Extract functional domains: signal peptide, alpha chains, transmembrane region
1783. Note polymorphic positions that define allele specificity
1794. Check for structural data (PDB cross-references)
180
181### Phase 5: Clinical & Therapeutic Context
182
183**Objective**: Connect HLA findings to drug interactions and clinical evidence.
184
185**Tools**:
186- `DGIdb_get_drug_gene_interactions` -- find drugs targeting HLA-pathway genes
187 - Input: `genes` (list of gene names, e.g., ["HLA-A", "B2M"])
188 - Output: drug-gene interactions, interaction types, sources
189- `PubMed_search_articles` -- find clinical HLA studies
190 - Input: `query` (search term), optional `limit`
191 - Output: articles with title, abstract, PMID
192
193**Workflow**:
1941. Query DGIdb for drug interactions with relevant HLA genes
1952. Search PubMed for clinical studies (transplant outcomes, pharmacogenomics, disease associations)
1963. For transplant queries, look for HLA matching guidelines and outcomes data
1974. For pharmacogenomics, note HLA alleles linked to drug hypersensitivity (e.g., HLA-B*57:01 and abacavir)
198
199**Well-known HLA-drug associations** (for context, always verify with current data):
200- HLA-B*57:01: abacavir hypersensitivity
201- HLA-B*15:02: carbamazepine SJS/TEN (Southeast Asian populations)
202- HLA-B*58:01: allopurinol hypersensitivity
203- HLA-A*31:01: carbamazepine drug reaction (European populations)
204
205### Phase 6: Report Synthesis
206
207Structure the report as:
208
2091. **HLA Context** -- gene/allele identification, MHC class, population frequency if available
2102. **Binding Profile** -- peptide repertoire, binding affinity distribution
2113. **Epitope Landscape** -- pathogen-specific epitopes, assay evidence
2124. **Protein Features** -- structural domains, polymorphic sites
2135. **Clinical Relevance** -- transplant implications, drug associations, disease links
2146. **Evidence Summary** -- graded by source (IEDB experimental > computational prediction > literature mention)
215
216---
217
218## Edge Cases & Fallbacks
219
220- **Ambiguous allele name**: Ask user for resolution level. "HLA-A2" could mean HLA-A*02:01 or the broader A*02 group
221- **No IEDB data for allele**: Common for rare alleles. Note the gap; suggest computational prediction tools
222- **Cross-species MHC**: IMGT covers multiple species. Confirm species context for non-human queries (e.g., H-2 for mouse)
223- **BVBRC empty results**: Try broader organism name or use IEDB as primary source
224
225---
226
227## Limitations
228
229- **No binding prediction**: This skill queries experimental databases, not prediction algorithms (NetMHCpan, MHCflurry). It tells you what has been measured, not what might bind
230- **Population frequency gaps**: HLA allele frequencies vary dramatically by ethnicity; databases may not cover all populations equally
231- **Class II complexity**: Class II molecules are heterodimers (alpha + beta chains); binding prediction and data are less mature than for Class I
232- **Epitope completeness**: IEDB coverage is biased toward well-studied pathogens (HIV, influenza, SARS-CoV-2) and common HLA alleles