Skip to contents

get_public() takes in a string or character vector of HLA alleles. The corresponding public epitope (Bw4 or Bw6) is looked up in etrl_hla and returned. If the input allele does not have the public epitope, NA is returned instead.

Usage

get_public(allele)

Arguments

allele

A string or character vector with (an) HLA allele(s).

Value

A string or character vector of the same length as allele, with the public epitope if it has one, or NA if none exists.

Details

This function uses the EuroTransplant Reference Laboratory HLA (etrl_hla) tables to do the lookup. These tables define several alleles for each protein (e.g. HLA-A*01:01, HLA-A*01:02), and their serological equivalents. All others are grouped into an XX code (HLA-A*01:XX), which is also mapped to a serological equivalent.

Workings

All entered alleles will first be reduced to the two-field level (see reduce_to_nth_field()). If this reduced allele occurs in the lookup table, the corresponding rows are returned. If not, it will be converted into an XX code, and that row will be returned.

If the allele is already at the serological broad- or split-level, the lookup will be performed using those respective columns in etrl_hla.

Exceptions

If the allele has a suffix (e.g. HLA-C*01:37N), it has no serological equivalent, and hence will also return nothing.

See also

  • get_broad: for looking up the broad-level equivalent of a split allele

  • get_split: for looking up the serological split-level equivalent of an allele

  • get_serology: for looking up the split, or broad if none exists

  • etrl_hla: the lookup table that's used in this function

Examples

get_public("B14") # has the epitope ("Bw6")
#> [1] "Bw6"
get_public("B*15:12") # has "Bw6"
#> [1] "Bw6"
get_public("B*15:13") # but this alleles has "Bw4"
#> [1] "Bw4"
get_public("B*15:XX") # hence this is ambiguous (returns `NA`)
#> [1] NA

get_public("A1") # does not have the epitope; returns `NA`
#> [1] NA

# Vectors also work:
get_public(c("B14", "B63", "A1"))
#> [1] "Bw6" "Bw4" NA