is_in_ipd_db()
checks whether an HLA allele has been entered into the
IPD-IMGT/HLA database as
initialized with db_initialize()
. This function is a thin wrapper around
the ard.validate()
method of the
py-ard
Python package.
Arguments
- ard
The Python database connection object created by
db_initialize()
- allele
A string or character vector with (an) HLA allele(s).
Value
A Boolean or logical vector with the same length as allele
, with
TRUE
(allele exists in database) or FALSE
for each element.
Examples
if (FALSE) { # \dontrun{
ard <- db_initialize(data_dir = path.expand("~/ipd_db"))
is_in_ipd_db(ard, "A*01:01")
#> TRUE
is_in_ipd_db(ard, "A1")
#> TRUE
is_in_ipd_db(ard, "A20")
#> FALSE
is_in_ipd_db(ard, "A*99:99")
#> FALSE
# Also works for vectors:
is_in_ipd_db(ard, c("A*01:AB", "XYZ*01:03"))
#> TRUE FALSE
} # }