KIR_det_GCN: Determine KIR Gene Copy Number

Description Usage Arguments Value Examples

View source: R/kir.R

Description

Determine KIR Gene Copy Number

Usage

1
KIR_det_GCN(kir_string, return_numeric = FALSE)

Arguments

kir_string

String with KIR info with the first field only (three characters), example "004+003|006+010", "NEG", "POS"

return_numeric

If set to TRUE, returns numeric GCN instead of character, sets "POS" to NA and 2|3 to 2.5 etc

Value

String vector with the gene copy number, with "x" if "POS", "0" if NEG, NA if NA or empty string. If return_numeric = TRUE instead returns a numeric vector, where POS results are NA and "2|3" are 2.5

Examples

1
2
3
4
5
6
7
8
str(KIR_det_GCN("004+003|006+010"))
str(KIR_det_GCN("004+003|006+010", return_numeric = TRUE))
KIR_det_GCN("POS")
KIR_det_GCN("POS", return_numeric = TRUE)

dat <- data.frame(kircol = c("004+003", "001", "008+008+008", "POS", "NEG", "", NA, "001|001+002"))
KIR_det_GCN(dat$kircol)
KIR_det_GCN(dat$kircol, return_numeric = TRUE)

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