Description Usage Arguments Value See Also Examples
Assigns the Telomeric haplotype (A/A, A/B or B/B) given a set of KIRs
1 2 3 4 5 6 7 8 | KIR_haplotype_Tel(
df,
KIR_3DL1col,
KIR_2DS4col,
KIR_3DS1col,
KIR_2DS1col,
present_cols = FALSE
)
|
df |
data.frame with KIR alleles string as columns |
KIR_3DL1col |
string, name of 3DL1 column |
KIR_2DS4col |
string, name of 2DS4 column |
KIR_3DS1col |
string, name of 3DS1 column |
KIR_2DS1col |
string, name of 2DS1 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 12 13 | dat <- data.frame(kir_3DL1 = c("001", "NEG", NA, "001|002+003"),
kir_2DS4 = c("001", "001", "001", "001"),
kir_3DS1 = c("NEG", "001", "NEG", "NEG"),
kir_2DS1 = c("001", "001", "NEG", "NEG"),
stringsAsFactors = FALSE)
KIR_haplotype_Tel(dat, "kir_3DL1", "kir_2DS4", "kir_3DS1", "kir_2DS1")
dat_pres <- data.frame(kir_3DL1 = c(TRUE, FALSE, NA, TRUE),
kir_2DS4 = c(TRUE, TRUE, TRUE, TRUE),
kir_3DS1 = c(FALSE, TRUE, FALSE, FALSE),
kir_2DS1 = c(TRUE, TRUE, FALSE, FALSE),
stringsAsFactors = FALSE)
KIR_haplotype_Tel(dat_pres, "kir_3DL1", "kir_2DS4", "kir_3DS1", "kir_2DS1", present_cols = TRUE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.