Description Usage Arguments Details Value See Also Examples
View source: R/HLA_classification.R
Takes two HLA-C alleles, classifies them individually into C1 or C2 using HLA_Classification
and HLA_C_class_data
,
and returns the joint C1/C1, C1/C2 or C2/C2 class. If either allel classification is unknown or missing, returns NA.
1 | HLA_C_classification(allele_c1, allele_c2, fields = 2, HLA_C_class = NULL)
|
fields |
Number of fields from allele string reference document to use, should be same as number of fields in |
HLA_C_class |
deprecated, used to pre-load classification data before this function was vectorized |
allel_c1 |
Allele column, as string |
allel_c2 |
Allele column, as string |
There are only three outcome classes, C1/C1, C1/C2 and C2/C2. The location of each C-class before or after the "/" does not
match the input allele_c1
and _c2
- in other words if allele_c1 = "C2"
and allele_c2 = "C1"
the result is still C1/C2
The input alleles should be shortened to match the number of fields in the reference data.
String vector with "C1/C1", "C1/C2", "C2/C2", or NA_character_
HLA_Classification
, HLA_C_class_data
1 2 3 4 5 6 7 8 | HLA_C_classification("01:02", "01:AWFCH")
dat <- data.frame(C1 = c("01:02", "02:03", "04:10"), C2 = c("01:AWFCH", "07:59", "05:50"))
HLA_C_classification(dat$C1, dat$C2)
# If either allele cannot be mapped to the reference data, NA is returned
dat_odd <- data.frame(C1 = c("01:02", "01:02", "01:02"), C2 = c(NA, "", "07:02:01"))
HLA_C_classification(dat_odd$C1, dat_odd$C2)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.