score_boelen_inhib: Boelen inhibitory score

Description Usage Arguments Details Value Source Examples

View source: R/scores.R

Description

Calculates the Boelen inhibitory score for a set of KIR 2DL1, 2DL2, 2DL3, HLA-B and -C ligands and HLA-B alleles (optionally also KIR 3DL1). Several options for how the score is calculated - see Details and parameter inputs

Usage

1
2
3
4
5
6
score_boelen_inhib(
  df,
  include_3DL1 = FALSE,
  separate_2DL2_2DL3 = TRUE,
  score_or_count = "score"
)

Arguments

df

data frame with the following columns - if any of these columns are not present with these names, the function will stop:

  • kir_2DL1, kir_2DL2, kir_2DL3, kir_3DL1 all in standard KIR string format ("001+002", "NEG").

  • Columns C_class and B_class are HLA-C and -B ligands, in format "C1/C1" and "Bw6/Bw4-80I" - see HLA_C_classification and HLA_B_classification.

  • HLA-B alleles should be in two columns B1 and B2, standard format "07:02"

include_3DL1

default FALSE, if KIR 3DL1 score is included in calculation

separate_2DL2_2DL3

default TRUE, whether to add the scores from 2DL2 and 2DL3 separately to the total, or if the max of the two should be used

score_or_count

default "score", can be set to "count" - see details

Details

The score is calculated by: (1 if Functional 2DL1) + (1 if Strong Functional 2DL2 or 0.5 if weak Functional 2DL2) + (0.75 if Functional 2DL3) + (1 if Functional 3DL1)

If instead the count is given: Inhibitory count = 1 for each of Functional 2DL1, Functional 2DL2/L3, Functional 3DL1

What constitues a "Functional" KIR differs:

Value

Vector of scores for each row in the input dataset

Source

Boudreau et al. Science Immunology 09 Nov 2018: Vol. 3, Issue 29, eaao2892 DOI: 10.1126/sciimmunol.aao2892

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
dat <- data.frame(kir_2DL1 = "001",
                  kir_2DL2 = "001",
                  kir_2DL3 = c("NEG", "001", "001"),
                  kir_3DL1 = c("NEG", "NEG", "001"),
                  C_class = c("C1/C2", "C2/C2", "C2/C2"),
                  B_class = c("Bw6/Bw6", "Bw6/Bw6", "Bw6/Bw4-80T"),
                  B1 = "07:02",
                  B2 = c("07:02", "46:01", "46:01"),
                  stringsAsFactors = FALSE)
                  
score_boelen_inhib(dat)
score_boelen_inhib(dat, score_or_count = "count")
score_boelen_inhib(dat, include_3DL1 = TRUE)
score_boelen_inhib(dat, separate_2DL2_2DL3 = FALSE)

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