get_split()
takes in a string or character vector of HLA alleles. The
corresponding split-level allele is looked up in etrl_hla and returned.
If no such allele exists, NA
is returned instead.
Value
A string or character vector of the same length as allele
,
with the corresponding split 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.
See also
get_broad: for looking up the serological broad-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_split("A24") # is already a split, so returns itself ("A24")
#> [1] "A24"
get_split("A9") # is a broad, so returns `NA`
#> [1] NA
get_split("B*14:01") # returns corresponding split ("B64")
#> [1] "B64"
get_split("B*14:02") # returns corresponding split ("B65")
#> [1] "B65"
get_split("B*14:03") # no split is defined for this allele; returns `NA`
#> [1] NA
# Vectors also work:
get_split(c("A24", "B*14:01", "B*14:03"))
#> [1] "A24" "B64" NA