Skip to contents

get_broad() takes in a string or character vector of HLA alleles. The corresponding broad-level allele is looked up in etrl_hla and returned. If no such allele exists, NA is returned instead.

Usage

get_broad(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 corresponding broad if it exists, 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_split: for looking up the serological split-level equivalent of an allele

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

  • get_public: for looking up the public epitope of an allele

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

Examples

get_broad("A24") # returns corresponding broad ("A9")
#> [1] "A9"
get_broad("A9") # is already a broad, returns itself ("A9")
#> [1] "A9"

# these alleles in modern nomenclature also all return "A9"
get_broad("A*24")
#> [1] "A9"
get_broad("A*24:XX")
#> [1] "A9"
get_broad("A*24:02:01:102")
#> [1] "A9"

# Vectors also work:
get_broad(c("A24", "A23", "A1"))
#> [1] "A9" "A9" "A1"