Description Usage Arguments Value See Also Examples
Assigns the Centrometic haplotype (A/A, A/B or B/B) given a set of KIRs
1 2 3 4 5 6 7 | KIR_haplotype_Cen(
df,
KIR_2DL3col,
KIR_2DS2col,
KIR_2DL2col,
present_cols = FALSE
)
|
df |
data.frame with KIR alleles string as columns |
KIR_2DL3col |
string, name of 2DL3 column |
KIR_2DS2col |
string, name of 2DS2 column |
KIR_2DL2col |
string, name of 2DL2 column |
present_cols |
Default is FALSE which assumes the KIR columns contains the allele string ("001", "NEG" etc), and the presence / absence is calculated inside the function using |
string vector with haplotype ("A/A", "A/B", "B/B"), NA if any input KIR is missing, and "unknown" otherwise.
1 2 3 4 5 6 7 8 9 10 11 | dat <- data.frame(kir_2DL3 = c("001", "NEG", NA, "001|002+003"),
kir_2DS2 = c("001", "001", "001", "001"),
kir_2DL2 = c("NEG", "001", "NEG", "NEG"),
stringsAsFactors = FALSE)
KIR_haplotype_Cen(dat, "kir_2DL3", "kir_2DS2", "kir_2DL2")
dat_pres <- data.frame(kir_2DL3 = c(TRUE, FALSE, NA, TRUE),
kir_2DS2 = c(TRUE, TRUE, TRUE, TRUE),
kir_2DL2 = c(FALSE, TRUE, FALSE, FALSE),
stringsAsFactors = FALSE)
KIR_haplotype_Cen(dat_pres, "kir_2DL3", "kir_2DS2", "kir_2DL2", present_cols = TRUE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.