getAlleleResolution returns the resolution of input HLA allele numbers.

getAlleleResolution(allele)

Arguments

allele

Character vector with HLA allele numbers.

Value

Integer vector specifying allele resolutions.

Details

HLA allele resolution can take the following values: 2, 4, 6, 8. See http://hla.alleles.org/nomenclature/naming.html for more details.

NA values are accepted and returned as NA.

Examples

allele <- c("A*01:01", "A*01:02")
getAlleleResolution(allele)
#> [1] 4 4