vec_to_gl()
constructs a GL String from a character
vector of HLAs, as well as some metadata (namespace, version/data).
Arguments
- allele_list
a character vector of HLA alleles.
- namespace
Specification of the HLA nomenclature system. Defaults to
"hla"
.- version_or_date
Specification of the version of the
namespace
used, or the date the GL String was constructed. If not specified, uses today's date as the default.
See also
gl_to_vec()
for the opposite operationdf_to_gl()
for converting a dataframe with one column per locus/allele to a GL String
Examples
vec_to_gl(c("A*02:302", "A*23:26/A*23:39", "B*44:02:13", "B*49:08"))
#> [1] "hla#2024-12-22#HLA-A*02:302+HLA-A*23:26/A*23:39^HLA-B*44:02:13+HLA-B*49:08"
vec_to_gl(
allele_list = c("HLA-A*02:69", "HLA-A*23:30"),
namespace = "hla", version_or_date = "2018-06"
)
#> [1] "hla#2018-06#HLA-A*02:69+HLA-A*23:30"