library(readr) #> Warning: package 'readr' was built under R version 4.1.2 library(tidyverse) #> Warning: package 'tidyr' was built under R version 4.1.2 #> Warning: package 'dplyr' was built under R version 4.1.2 library(hlaR)
Analysis of historic hla typing data is limited by low to moderate
resolution. Use of high resolution typing is required to calculate eplet
mismatch between recipient and donor. The National Marrow Donor Program
provides a tool (haplostats.org) with which low resolution data can be
imputed to high resolution. The user enters the patient’s low resolution
hla typing information, and the website outputs the high resolution
haplotypes matching that patient’s information, ranked in order of
frequency within an ethnicity population. The function
ImputeHaplo allows imputation to be performed on many
A sample dataset derived from a cohort of 200 kidney transplant
recipients is provided to demonstrate the
function. The data consists of donor and recipient cleaned HLA typing
data for HLA Class I (A, B, C) and HLA Class II (DRB1, DRB3/4/5, DQB1).
This data has already been cleaned using the
<- read.csv(system.file("extdata/example", "Haplotype_test.csv", package = "hlaR"))tx_cohort_clean
ImputeHaplo Function to generate a list of high
resolution haplotypes that fit the patient’s low resolution data. The
haplotypes are sorted by a count measure, “cnt” that represents the
number of high resolution antigens that match the low resolution input
data. Haplotypes with the same count are arranged by descending
population frequency. The function then considers all possible pairs of
haplotypes. For each pair of haplotypes, the overall count of low
resolution input antigens matched by the imputed high resolution data is
calculated. Results are then arranged by descending count, and pairs
with the same count are arranged by descending population frequency.
<- ImputeHaplo(tx_cohort_clean) haplotbl#> Warning in ImputeHaplo(tx_cohort_clean): #> Please use this imputation function with caution; its accuracy is lower than the current publicly available gold standard (HaploStats) and may produce inaccurate results. #> Work is underway on a collaboration to improve the accuracy of this function.
The highest ranked pair of haplotypes is used to impute high resolution HLA alleles for the input data.
# imputehires <- slice (haplotbl) #write_csv(imputehires, "tx_cohort_imputed")