Free API key, instantly: 1,000 calls a day. Get a free key, or use it with no key at 100 a day.
HLA-Verify

Guides › Donor matching

HLA match counting: per chromosome, not per locus

Updated 2026-10-30 · allele examples checked against IPD-IMGT/HLA 3.66.0 on 2026-10-30

An HLA match grade counts matched alleles, one per chromosome, not matched loci. Each locus contributes two alleles, so an 8/8 grade is eight alleles over four loci, and a locus where one allele matches and the other does not contributes 1 of 2, not 0 of 1.

Counting loci instead of alleles is an easy arithmetic error to make. It loses information, it produces numbers that cannot be compared with published grades, and it is the mistake the HLA-Bench dataset card reports language models making on its matching tasks. This guide is about the arithmetic only; donor selection is a clinical decision for the transplant centre.

Why the count is per allele

Every person has two copies of each HLA locus, one on each chromosome of the pair. A grade such as 8/8 or 10/10 is built from those copies: the 8/8 definition used by Lee and colleagues in their 2007 Blood study is high-resolution matching for HLA-A, -B, -C and -DRB1, which is eight alleles. The denominators of the usual grades (6, 8, 10, 12) only make sense as twice the number of loci.

So a grade is a statement about alleles, and a locus is never simply "matched" or "mismatched" for counting purposes. It has zero, one or two mismatched alleles.

Two donors, one grade, different loci

The difference shows up when you compare two donors that a per-locus count would separate and a per-allele count would not. Both examples below were computed with HLA-Verify's matching engine at IPD-IMGT/HLA release 3.66.0, against the same recipient:

LocusRecipientDonor 1Donor 2
AA*02:01, A*24:02A*02:01, A*24:02A*01:01, A*03:01
BB*07:02, B*44:02B*07:02, B*44:03B*07:02, B*44:02
CC*07:02, C*05:01C*07:02, C*04:01C*07:02, C*05:01
DRB1DRB1*15:01, DRB1*04:01DRB1*15:01, DRB1*04:01DRB1*15:01, DRB1*04:01
8/8 grade6/86/8
Loci with any mismatch2 (B, C)1 (A)

Both donors score 6/8: two mismatched alleles each. A per-locus count would report Donor 1 as "2 of 4 loci matched" and Donor 2 as "3 of 4 loci matched", and rank them differently, although each has the same number of mismatched alleles. Neither per-locus figure can be turned back into a grade, because it does not record whether a mismatched locus had one mismatch or two.

If you need both views, report both: the grade, and the per-locus verdicts that make it up.

Homozygous loci

Per-allele counting needs one rule for a locus where a person has the same allele twice. HLA-Verify's published matching rules count a locus as the size of the multiset intersection of the two pairs: each allele on one side can match at most one allele on the other. The number of mismatches at the locus is then 2 minus that number.

Two results at release 3.66.0 show how this works:

  • Recipient homozygous B*07:02, B*07:02; donor B*07:02, B*44:02, other loci identical: 7/8. The donor's single B*07:02 can pair with only one of the recipient's two copies, so one allele on each side is left unmatched.
  • Both sides homozygous B*07:02, B*07:02: 8/8. Each copy pairs with a copy.

When one side is homozygous, the mismatch can point in only one direction, which a single grade does not show. The GvH and HvG guide covers direction.

How to count a match grade

  1. Choose the framework and its loci: for example 8/8 is HLA-A, -B, -C and -DRB1 at allele level.
  2. Normalise every name against one IPD-IMGT/HLA release: convert legacy spellings, follow deleted names to their successors, and reduce each name to two fields while keeping an expression suffix such as the N in A*24:09N.
  3. For each locus, pair the recipient's two names with the donor's two names, matching each name at most once. The matched count is 0, 1 or 2.
  4. Add the matched counts across loci. The total over twice the number of loci is the grade.
  5. If a locus cannot be resolved to two fields on either side, do not count it as a match or a mismatch. Report it as unresolved and leave it out of the denominator.
  6. Report the grade together with the per-locus result and the release used.

Step 5 is where many counts quietly go wrong. In HLA-Verify, a locus typed only to the first field, such as A*02, is reported as potential with the flag resolution_insufficient and excluded from the denominator, so the result reads, for example, 6/6 with one locus potential rather than 8/8.

The mistakes that come from counting loci

  • Undercounting partial matches. A locus with one of two alleles matched is half matched. A locus count rounds it to zero.
  • Losing the difference between one and two mismatches. B*44:02 versus B*44:03 at one allele, and two completely different A alleles, both become "one mismatched locus".
  • Wrong denominators. "3/4" and "6/8" are not interchangeable, and a reader cannot recover one from the other.
  • Comparing with published grades. Published grades such as the 8/8 in the Lee study count alleles. A per-locus figure placed next to them looks comparable and is not.

The HLA-Bench dataset card reports that on its donor-recipient matching tasks, "naive string manipulation collapses to 0% and open models reach 0–14% — they count matched loci instead of chromosomes". That is a measured failure on a specific benchmark, not a general claim about every model, but it is the error to test any match-counting code or AI output for.

Names have to agree first

A count over inconsistent names is wrong even when the arithmetic is right. Checked at release 3.66.0, a donor written A*0201 and Cw*0702 against a recipient written A*02:01 and C*07:02 scores 8/8, because both pairs normalise to the same two-field names before comparison. Counting those as string mismatches would report two false mismatches. The 8/8 and 10/10 guide covers which loci each grade includes and the null-allele trap.

Frequently asked questions

Is an HLA match counted per locus or per allele?

Per allele, one per chromosome. Each locus contributes two alleles, which is why the usual grades have even denominators.

What does 6/8 mean?

Six of the eight alleles at HLA-A, -B, -C and -DRB1 match. The two mismatches may be at one locus or at two different loci; the grade alone does not say which.

How is a homozygous locus counted?

Each allele on one side can match at most one allele on the other. A recipient homozygous for B*07:02 against a donor with B*07:02 and B*44:02 has one match and one mismatch at B.

What if one locus is only typed to the first field?

It cannot be counted at allele level. Report it as unresolved and exclude it from the denominator rather than counting it as a match or a mismatch.

Sources

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.