HLA_Classification: Classify one HLA allele

Description Usage Arguments Value See Also Examples

View source: R/HLA_classification.R

Description

Classifies an allele according to a reference dataframe. If an NMDP code is present, class is given if all possible alleles are the same class, otherwise returns NA

Usage

1
HLA_Classification(allele, HLA_x_class)

Arguments

allele

An HLA allele string vector, including ":" characers but not the initial "C*"

HLA_x_class

HLA classification reference data.frame (such as constructed by for example HLA_C_class_load()), must contain columns Allele (where the number of fields is the same as in allele) and Class.

Value

String vector with classification group from reference document, NA if unknown

See Also

HLA_C_classification, HLA_B_classification, HLA_C_class_load, HLA_B_class_load, NMDP

Examples

1
2
3
4
5
dat <- data.frame(HLA_C = c("01:02", "01:AWFCH"), HLA_B = c("07:02", NA),stringsAsFactors = FALSE)
HLA_C_class <- HLA_C_class_load()
HLA_Classification(dat$HLA_C, HLA_C_class)
HLA_B_class <- HLA_B_class_load()
HLA_Classification(dat$HLA_B, HLA_B_class)

bosefalk/CTUtools documentation built on Feb. 4, 2022, 4:10 p.m.