mac_decode()
is a thin wrapper around the ard.expand_mac()
method of the
py-ard
Python package.
See the NMDP website for more on MACs.
Arguments
- ard
The Python database connection object created by
db_initialize()
- allele
A string or character vector with (an) HLA allele(s).
Details
Uses the IPD-IMGT/HLA database as
initialized with db_initialize()
. This function will throw an error if any
of the alleles in the input do not exist in the database. Use
is_in_ipd_db()
to safely check if the allele(s) exist(s).
See also
mac_lookup()
for the reverse operation
Examples
if (FALSE) { # \dontrun{
ard <- db_initialize(data_dir = path.expand("~/ipd_db"))
mac_decode(ard, "A*01:AB")
#> "A*01:01/A*01:02"
mac_decode(ard, "HLA-A*25:BYHR")
#> "HLA-A*25:01/HLA-A*26:01"
# Also works for vectors:
mac_decode(ard, c("A*01:AB", "A*25:BYHR"))
#> "A*01:01/A*01:02" "A*25:01/A*26:01"
} # }