library(hlaR)library(tidyverse)library(dplyr)In this vignette, we demonstrate single and overall eplet mismatchcalculations for both MHCI and MHCII.
Eplets corresponding to the donor and recipient alleles aredetermined using the reference table of choice. Overall Mismatch:Overall mismatch describes the most common eplet implementation - epletspresent in the donor alleles that are not in the correspondingrecipient’s alleles. From the output of this function, mm_cnt_tt is thetotal count of mismatched eplets between the recipient and the donor.Single Antigen: Single antigen mismatch assigns the eplet mismatch tothe specific donor antigen responsible for the mismatch. If one of theinput donor alleles is NA, it will be excluded from the finalreport.
To input retrospective data, submit paired recipient and donor with amatching pair_id. This function can also be used to examine mismatchbetween a single donor and multiple recipients. To achieve this result,repeat the donor information and match it in pairs with the differentpossible recipients. The same test can be performed with a singlerecipient and multiple donors.
In this example, the transplant team or researcher would like tocalculate the Class I and Class II eplet mismatch for a cohort oftransplant recipients using high resolution or imputed four digitrecipient and donor HLA typing data.
# use the testing data in the librarydat_mhc1<-read.csv(system.file("extdata/example","MHC_I_test.csv",package ="hlaR"),sep =",",header =TRUE)re_mhc1<-CalEpletMHCI(dat_mhc1)re_mhc1_single<- re_mhc1$single_detailre_mhc1_overall<- re_mhc1$overall_count# use the testing data in the librarydat_mhc2<-read.csv(system.file("extdata/example","MHC_II_test.csv",package ="hlaR"),sep =",",header =TRUE)re_mhc2<-CalEpletMHCII(dat_mhc2)#> Warning in CalEpletMHCII(dat_mhc2): DQB1*02:06 is not found in the refernce table. Please check!#> DPB1*67:01 is not found in the refernce table. Please check!#> DQB1*06:49 is not found in the refernce table. Please check!#> Warning in CalEpletMHCII(dat_mhc2): DRB1*01:05 is not found in the refernce table. Please check!#> DRB1*01:07 is not found in the refernce table. Please check!#> DQB1*02:04 is not found in the refernce table. Please check!#> DPB1*259:01 is not found in the refernce table. Please check!#> DPB1*259:01 is not found in the refernce table. Please check!#> DPB1*37:01 is not found in the refernce table. Please check!#> Warning in CalEpletMHCII(dat_mhc2): DPB1*08:01 is not found in the refernce table. Please check!#> DPB1*107:01 is not found in the refernce table. Please check!#> Warning in CalEpletMHCII(dat_mhc2): DQB1*03:30 is not found in the refernce table. Please check!#> Warning in CalEpletMHCII(dat_mhc2): DQB1*05:16 is not found in the refernce table. Please check!#> Warning in CalEpletMHCII(dat_mhc2): DPB1*08:01 is not found in the refernce table. Please check!#> DQB1*03:30 is not found in the refernce table. Please check!#> Warning in CalEpletMHCII(dat_mhc2): DQB1*05:16 is not found in the refernce table. Please check!#> DPB1*415:01 is not found in the refernce table. Please check!#> Warning in CalEpletMHCII(dat_mhc2): DPB1*08:01 is not found in the refernce table. Please check!#> Warning in CalEpletMHCII(dat_mhc2): DPB1*104:01 is not found in the refernce table. Please check!#> DPB1*08:01 is not found in the refernce table. Please check!#> Warning in CalEpletMHCII(dat_mhc2): DPB1*105:01 is not found in the refernce table. Please check!re_mhc2_single<- re_mhc2$single_detailre_mhc2_overall<- re_mhc2$overall_countre_mhc2_drdq_risk<- re_mhc2$dqdr_riskThe first two histograms examine the distribution of MHCI and MHCIIeplet mismatch in this population. The second histogram is avisualization of the most frequently mismatched MHC Class I eplets inour transplant cohort. DSA information can also be incorporated toexamine the presence of specific eplets in patients who develop DSA.
hist(re_mhc1_overall$mm_cnt_tt)hist(re_mhc2_overall$mm_cnt_tt)mm_eplets<-strsplit(re_mhc1_single$mm_eplets,split =",")mm_eplets<-as.data.frame(matrix(as.factor(unlist(mm_eplets))))colnames(mm_eplets)<-c("eplets")count<- mm_eplets%>%group_by(eplets)%>%summarize(count=n())count%>%arrange(desc(count))%>%top_n(10)%>%ggplot(aes(eplets, count))+geom_col()#> Selecting by countEplet reference tables are extracted from the HLAMatchMaker workbooksversion 2.1 and 3.1 (http://www.epitopes.net/index.html). We have verifiedthe results generated by hlaR in comparison to HLAMatchMaker. There area small number of typographical errors in the HLAMatchMaker excel filesthat result in eplets identified in the reference table not carryingover to the results. Because of these errors, the eplet mismatch on hlaRis occasionally one or two points higher than that output by the excelfiles. If an allele from the input data is not present in the referencetable, the result generated will be NA.
The MHC I function examines donor and recipient HLA A,B, and C. Eachdonor allele (A,B,C) is compared against ALL recipient alleles. The MHCII function compares donor and recipient HLA DR, DP, and DQ. Please notethat DRBw is an alternate naming of DRB3,4,5. Mismatch comparisons forMHCII are slightly more complicated (logic extracted fromHLAMatchMaker). For DRB+DRw, DQA,DQB, and DPA, the donor alleles arecompared to the corresponding recipient alleles only (i.e. DRB+DRwcompared to DRB+DRw, DQB compared to DQB). DPB is managed in two waysdepending on if the eplets are interloci. If interloci, they arecompared across ALL of the recipients B alleles (DQB, DRB+DRw, DPB). Ifnot, they are compared only to the recipients DPB alleles.