getHlaKirInteractions: Get HLA - KIR interactions

View source: R/transformationFunctions.R

getHlaKirInteractionsR Documentation

Get HLA - KIR interactions

Description

getHlaKirInteractions calculate presence-absence matrix of HLA - KIR interactions.

Usage

getHlaKirInteractions(
  hla_calls,
  kir_calls,
  interactions_dict = system.file("extdata", "Match_counts_hla_kir_interactions.txt",
    package = "midasHLA")
)

Arguments

hla_calls

HLA calls data frame, as returned by readHlaCalls function.

kir_calls

KIR calls data frame, as returned by readKirCalls function.

interactions_dict

Path to HLA - KIR interactions dictionary.

Details

hla_calls are first reduced to all possible resolutions and converted to additional variables, such as G groups, using dictionaries shipped with the package.

interactions_dict file should be a tsv format with header and two columns. First column should be named "Name" and hold interactions names, second should be named "Expression" and hold expression used to identify interaction (eg. "C2 & KIR2DL1" will match all samples with C2 and KIR2DL1). The package is shipped with an interactions file based on Pende et al., 2019.

Value

Data frame with variable number of columns. First column named "ID" corresponds to "ID" column in counts, further columns hold indicators for HLA - KIR interactions. 1 and 0 code presence and absence of a variable respectively.

Examples

getHlaKirInteractions(
  hla_calls = MiDAS_tut_HLA, 
  kir_calls = MiDAS_tut_KIR, 
  interactions_dict = system.file(
    "extdata", "Match_counts_hla_kir_interactions.txt", 
    package = "midasHLA")
)


Genentech/MiDAS documentation built on Feb. 5, 2024, 11:52 a.m.