GL String format: writing HLA genotypes and ambiguity
A GL String (Genotype List String) is a single line of text that records an HLA typing result without losing its ambiguity. It uses five delimiters, ^, |, +, ~ and /, each with a fixed meaning and a fixed order of precedence.
The format was published by Milius and colleagues in Tissue Antigens in 2013, as a way to report HLA and KIR genotypes in a standard text form. When data moves between a lab, a registry, a LIMS and an analysis pipeline, it keeps "which alleles, on which chromosome, with what uncertainty" together in one field.
The five delimiters
The paper defines each delimiter and the order in which they are applied. Precedence 1 is evaluated first, so it binds the loosest.
| Precedence | Delimiter | Meaning | Example |
|---|---|---|---|
| 1 | ^ | Separates genes (loci) | HLA-A*02:01+HLA-A*03:01^HLA-B*08:01+HLA-B*44:02 |
| 2 | | | Separates possible genotypes | HLA-A*02:02+HLA-A*03:01|HLA-A*02:07+HLA-A*03:06 |
| 3 | + | Separates gene copies not known to be on the same chromosome | HLA-A*02:01+HLA-A*03:01 |
| 4 | ~ | Separates alleles phased on the same chromosome | HLA-DRB3*01:01~HLA-DRB1*03:01 |
| 5 | / | Separates possible alleles | HLA-A*02:01/HLA-A*02:02 |
The examples in the table are the paper's own.
How to read one
Parse from the top of the hierarchy down. The paper describes the order as starting from the locus delimiter, then the genotype delimiter, then the chromosome delimiter, ending with the allele delimiter.
Take this string, which is valid against IPD-IMGT/HLA release 3.66.0:
HLA-A*01:01:01:01/HLA-A*01:02+HLA-A*24:02:01:01^HLA-B*08:01:01:01+HLA-B*44:02:01:01
- Split on
^. There are two loci: an HLA-A block and an HLA-B block. - Split each block on
|. Neither has more than one candidate genotype. - Split each genotype on
+. HLA-A has two gene copies; so does HLA-B. - Split each copy on
~. Nothing is phased here. - Split on
/. The first HLA-A copy is eitherA*01:01:01:01orA*01:02. Every other copy is a single allele.
Read aloud: HLA-A is A*01:01:01:01 or A*01:02, plus A*24:02:01:01; HLA-B is B*08:01:01:01 plus B*44:02:01:01.
Genotype ambiguity versus allele ambiguity
The difference between | and / is the reason GL String exists. Compare:
A*01:01+A*02:01|A*01:02+A*02:01
This says the genotype is one of two specific pairs. It does not say the first copy could be anything in A*01:01/A*01:02 independently of the second. When typing ambiguity comes in linked pairs, a slash list on each copy loses that link; a genotype list keeps it.
Phase with the tilde
~ puts alleles on the same chromosome. The paper's example, HLA-DRB3*01:01~HLA-DRB1*03:01, records that those two DRB alleles were identified on one chromosome. A full two-haplotype genotype looks like:
A*02:01~B*07:02+A*01:01~B*08:01
That is one chromosome carrying A*02:01 and B*07:02, and the other carrying A*01:01 and B*08:01. The same alleles joined with ^ and + instead would say nothing about which A goes with which B.
The paper defines ~ for alleles identified as being on the same chromosome (in cis), and + for alleles detected but not identified as being on the same chromosome. If phase was not established, + is the delimiter that says so.
Rules the paper sets out
- Only the five delimiters and allele names. White space and tabs must be excluded.
- Full names every time. The paper recommends names strictly consistent with the IMGT/HLA Database, always with the
HLA-prefix, the full locus and the asterisk. WriteHLA-A*01:01:01:01/HLA-A*02:01:01:02L, neverHLA-A*01:01:01:01/02:01:01:02L. - Order means nothing. The order of slash-separated alleles, pipe-separated genotypes or loci carries no likelihood and no chromosomal position.
- The release is not in the string. The paper says the creator of the string must convey the IMGT/HLA release version separately. A GL String without its release is a list of names whose meaning can drift.
The last rule matters because names are renamed, gain or lose suffixes and get deleted between releases. Store the release in a field next to the GL String, every time.
Common mistakes a validator should catch
These are the structural problems that POST /v1/glstring reports by name, as listed in the API reference:
| Flag | What it means |
|---|---|
mixed_locus_allele_list | A slash list mixes alleles of different loci |
genotype_loci_differ | The two sides of a + belong to different loci |
genotype_list_loci_differ | Genotypes in a | list are for different loci |
haplotype_repeats_locus | A ~ haplotype names the same locus twice |
more_than_two_haplotypes | More than two haplotypes for one block |
locus_repeated_across_blocks | The same locus appears in two ^ blocks |
empty_element | An empty slot, for example from a doubled separator |
whitespace_in_name | A space inside an allele name |
For example, checked against release 3.66.0, A*01:01/B*08:01+A*02:01 is reported invalid with both mixed_locus_allele_list and genotype_loci_differ.
Outdated names inside an otherwise valid string are a different problem. A*0101+A*02:01 is structurally fine, but the first name is a pre-2010 spelling. The validator returns it as valid with a renamed_allele warning and the normalised string A*01:01+A*02:01. See the guide to converting old HLA names for why some legacy names need more than a mechanical rewrite.
GL String and other reporting shorthands
The 2013 paper presents GL String as a replacement for NMDP multiple allele codes, which it says increase ambiguity in an era of rapid allele discovery. G and P group names are another shorthand. They are valid allele tokens inside a GL String, but a group name hides its member list, and that list changes by release. If a downstream user needs to know which alleles were possible, expand the group into a slash list against a stated release. The G and P groups guide explains what each group covers.
Frequently asked questions
What does the caret mean in a GL String?
^ separates loci. It has the highest precedence, so a GL String is first split into one block per gene, such as an HLA-A block and an HLA-B block.
What is the difference between plus and tilde?
+ joins gene copies whose chromosomal phase is not known, which at one locus usually means the two alleles of a genotype. ~ joins alleles known to be on the same chromosome, which is how a haplotype is written.
Should GL Strings include the HLA- prefix?
The 2013 paper recommends always prefixing names with HLA- and always writing the full locus name. HLA-Verify accepts names with or without the prefix, but writing it removes any doubt about which nomenclature the names come from.
Where does the IMGT/HLA release go?
Outside the string. The paper says the release is not part of a GL String and must be conveyed separately by whoever creates it.
Sources
- https://doi.org/10.1111/tan.12150
- https://pmc.ncbi.nlm.nih.gov/articles/PMC3715123/
- https://hla.alleles.org/pages/nomenclature/nomenclature_update_april_2010/
HLA-Verify is a research-and-evaluation tool for nomenclature and reference-release validation. It is not a medical device and this guide is not clinical advice. Send allele names, never patient identifiers.