Machine learning-based model for prediction of carbamazepine- and allopurinol-induced severe cutaneous adverse reactions in Vietnamese☆ Authors: Nguyen Thanh Nguyen, Mai Hoang Tran, Hien Quoc Vu, Vinh Chi Duong, Thi Minh Nguyet Nguyen, Oanh Thi Hoang, Vu Nguyen Anh Mai, Thu-Thuy Can, Nga Quynh Do, Huong Le Thi Minh, Nguyet Nhu Nguyen, Hang Vu Thi, Mai Thi Vu, Anh Quynh Nguyen, Yen Thi Hai Pham, Khiem Van Nguyen, Ly Le, Sheryl van Nunen, Timothy John Craig, Hieu Chi Chu, Nam Sy Vo, Dinh Van Nguyen Published: 2026 ABSTRACT BackgroundThe low positive predictive value of HLA-B∗15:02 and HLA-B∗58:01 for risk stratification of carbamazepine (CBZ) and allopurinol (ALLO) induced severe cutaneous adverse reactions (SCARs) suggests that we need a better model to prevent cases.ObjectiveThis study aims to comprehensively investigate the role of genomic factors in CBZ- and ALLO-induced SCARs using machine-learning.MethodsA total of 249 patients with SCARs and non-affected controls were genotyped using whole exome sequencing (WES), including 75 cases and 73 controls for ALLO, and 48 cases and 53 controls for CBZ, respectively. We then applied 8 risk prediction machine learning models.ResultsFor predicting ALLO-induced SCARs, the Random Forest and Extra Tree models demonstrated exceptional performance among the 8 prediction models, achieving an average accuracy of 99.67% across 10 independent tests. For CBZ-induced SCARs, the Linear SVC model performed best with an average AUC of 86% on the test dataset over the 10 independent tests.ConclusionThese findings are crucial for understanding the underlying mechanisms in SCARs and for developing an accurate model which will identify patients at high risk of CBZ and ALLO-induced SCARs.Clinical implicationsPatients who need a high-risk medication and who are also at high risk of SCARs, due to their inheritance of HLA-B∗15:02 and/or HLA-B∗58:01, can be further assessed using our model which enables better prediction of the risk of developing SCAR. Introduction Severe cutaneous adverse reactions (SCARs) induced by drugs are not uncommon, can significantly impact patient health and potentially result in mortality. Among the drugs associated with SCARs, carbamazepine (CBZ) and allopurinol (ALLO) are notable examples. CBZ, widely prescribed for epilepsy, trigeminal neuralgia, and bipolar disorder, is one of the most common causes of delayed hypersensitivity reactions. These reactions vary in prevalence and severity, affecting 3–5% of patients worldwide.1 ALLO is the first-line prescription medication for patients with gout or hyperuricemia. While most patients tolerate ALLO well, 2–5% of cases may develop side effects ranging from mild skin rashes to life-threatening toxicity, presenting as fever, hepatitis, and SCARs.2 The primary reason for these adverse reactions to CBZ and ALLO is their strong association with genomic predisposition factors that vary among different human populations. This genomic variability explains the observed differences in SCAR prevalence and severity across diverse ethnic groups. HLA genotypes play a crucial role in CBZ-induced SCARs, influencing both severity and protection. HLA-B∗15:02 and HLA-A∗31:01 are the primary genomic risk factors associated with CBZ-induced SCARs.3,4 The FDA and CPIC (Clinical Pharmacogenetics Implementation Consortium) guidelines recommend screening patients for HLA-B∗15:02 and HLA-A∗31:01 based on the associated risk of SCARs depending on the region and ethnic group, especially Oceanian, East Asian, and South/Central Asian populations, including Vietnamese, before initiating CBZ therapy.5,6 Additional genomic risk factors have been proposed for CBZ-induced SCARs. Previous studies showed that not only HLA alleles, but also other genetic variants such as SNP rs9263726 G>A (OR: 141.67; 95% CI: 43.61–460.22; p < 0.0001) followed by rs3099844 C>A (OR: 58.65; 95% CI: 21.05–163.42; p < 0.0001) and rs1634776 G>A(OR: 37.41; 95% CI: 13.82–101.29; p < 0.0001) that are common in Vietnamese are associated with ALLO induced hypersensitivity reactions.7 In the Han Chinese population, 2 SNPs, rs2844682 C>T and rs3903184 C>G are strongly correlated with CBZ-induced SJS/TEN; however, SNP rs3903184 C>G is not associated in the Vietnamese population (OR: 1.36; 95% CI: 0.22–8.52; p = 0.740).3 Beside HLA alleles, other genetic risk factors in different populations and ethnic groups can predispose to SCARS. Previous studies have primarily focused on identifying individual genomic markers, such as specific HLA alleles, associated with ALLO- or CBZ-induced SCARs. While these studies have provided valuable insights, they often fail to capture the complex interactions between multiple genomic and non-genomic factors that contribute to SCAR development. Traditional statistical methods, although useful, have limitations in handling high-dimensional data and identifying non-linear relationships among variables. Moreover, existing prediction models based on conventional approaches often lack robustness when applied to diverse populations, as they may not adequately account for the genomic heterogeneity across different ethnic groups. These limitations highlight the need for more sophisticated analytical techniques that can integrate multiple data types and capture complex patterns. Recent advances in machine learning techniques have led to the development of applications that show promise in predicting drug responses and adverse reactions. De Jong and colleagues8 developed a model integrating clinical and genomic data to predict response to the anti-epileptic drug brivaracetam, achieving a high predictive power (AUC 0.76) and demonstrating the potential to reduce clinical trial sample sizes. Similarly, Mohsen et al9 created a framework combining drug-induced gene expression profiles and adverse event data to predict a wide range of adverse drug reactions, achieving 89.4% mean validation accuracy across 14 models. While the above studies focus on broader applications, our work adapts such integrative approaches to the specific context of SCARs induced by CBZ and ALLO. Machine learning offers several advantages in this context. It can handle large-scale, multi-dimensional data, incorporating a wide range of genomic and clinical factors. Additionally, it can detect complex, non-linear relationships that may not be apparent when using traditional statistical methods. Machine learning also has the potential to improve prediction accuracy and generalizability across diverse populations. Furthermore, machine learning can adapt and improve performance as more data becomes available, making it a powerful tool for this type of predictive modeling. By leveraging these capabilities, we aim to create more comprehensive and robust risk prediction models that can enhance patient safety and guide personalized treatment decisions. In this work, we have developed various machine learning models to accurately predict if an individual is at high risk of CBZ- or ALLO-induced SCARs and to identify potential genomic variants associated with them. The models were trained and tested on whole exome sequencing data and clinical information from the comprehensive case-control study on Vietnamese patients. Methods Overall study design A case-control study was conducted. Fig. 1 depicts the entire process from DNA collection and analysis to deploying predictive machine learning models.Fig. 1Analysis pipeline for SCAR prediction using whole-exome sequencing data and machine learning Analysis pipeline for SCAR prediction using whole-exome sequencing data and machine learning Participant recruitment There were 249 participants in this study who are Vietnamese, all of whom have given their written informed consent, which was approved by the IRB (Vinmec- VinUni Ethics Research Committee- 79/2023/CN/HĐĐĐ VMEC). Cases and controls were matched by age, gender, and recruitment center with a ratio of approximately 1:1. The SCAR group included patients who had allergic reactions after treatment with CBZ or ALLO, meeting the clinical criteria for SJS/TEN, DRESS as defined by Roujeau et al,10 and RegiSCAR.11 The control group (CBZ/ALLO-tolerant group) included patients who were treated with CBZ/ALLO for at least 12 weeks without any skin reactions. Clinical characteristics Clinical characteristics were evaluated utilizing a survey form of a previous pilot study that included age, gender, onset of ARD, ARD diagnosed, index-day, and clinical history, which were collected from both groups.12 Sample processing and data analysis DNA extraction Three mL of blood were collected from patients in EDTA tubes. The patient's DNA was isolated from 200 μL of blood using the QIAamp DNA blood kit (QIAGEN, Amtsgericht, Dusseldorf, Germany) and handled according to the manufacturer's protocol. The remaining amount was aliquoted and stored at −20 °C until further experiments. The concentrated and purified genomic DNA was measured using a NanoDrop ND-1000 (Thermo Fisher Scientific, Waltham, MA, USA). Library preparation The genomic DNA was accessed using a sequencing library, Agilent SureSelect Human All Exon V6 (Santa Clara, CA, USA), according to the manufacturer's protocol. Briefly, the genomic DNA sample was randomly fragmented by sonication (Covaris, MA, USA) to the size of 180–280 bp fragments. The remaining overhangs were converted into blunt ends via exonuclease/polymerase activities and enzymes were removed. After adenylation of 3′ ends of DNA fragments, adapter oligonucleotides were ligated. DNA fragments with ligated adapter molecules on both ends were selectively enriched in a PCR reaction. After the PCR reaction, the libraries were hybridized in a buffer with biotin-labeled probes, then magnetics beads with streptomycin were used to capture the exons. After washing beads and digesting probes, the captured libraries were enriched in a PCR reaction to add index tags. Products were purified with the AMPure XP system (Beckman Coulter, Beverly, USA) and quantified by using the Agilent high-sensitivity DNA assay on the Agilent Bioanalyzed 2100 system (Agilent technologies. Inc, Waldbronn, Germany). Whole exome sequencing The DNA library was sequenced using the Novaseq 6000 system, a high-throughput sequencing platform developed by Illumina, Inc. (San Diego, CA, USA).12 This advanced sequencing technology employs synthesis-by-sequencing chemistry, which allows for rapid and accurate base-by-base sequencing of DNA fragments. For this whole exome sequencing (WES) project, the system was configured to generate paired-end reads. The sequencing run was designed to achieve a target average coverage of 120× across the exome. This depth of coverage indicates that, on average, each base in the targeted exonic regions was sequenced 120 times. Such high coverage ensures greater confidence in variant calling and helps to identify low-frequency alleles that might be missed at lower depths. This sequencing strategy balances throughput, read length, and coverage depth to provide comprehensive and high-quality data for subsequent bioinformatic analyses, including alignment, variant calling, and interpretation of genomic variations within the exome. Quality control and bioinformatics analyses Raw sequencing reads generated by the Illumina platform were demultiplexed using Illumina bcl2fastq (version 1.8.2) (Illumina, San Diego, CA, USA). This process separates the pooled sequencing data into individual samples based on their unique index sequences. Quality control and preprocessing of the raw reads were performed using FastP (version 0.23.0).13 This step involved several key processes: removal of adapter sequences, trimming of low-quality bases from read ends, filtering out reads with high proportions of low-quality bases or N bases and correction of mismatched base pairs in overlapped regions of paired-end reads. These preprocessing steps are crucial for ensuring high-quality data for downstream analysis. The trimmed and quality-filtered reads were aligned to the human reference genome GRCh38 using BWA-MEM (version 0.7.17), as implemented in the Parabricks-DeepVariant pipeline (version 3.8.0).14 Post-alignment processing comprised duplicate marking, base quality score recalibration, and local realignment around indels to minimize artifacts and improve variant calling accuracy. Variant calling was performed using the GPU-accelerated DeepVariant model which leverages a deep learning–based approach for the detection of single nucleotide polymorphisms (SNPs) and small insertions and deletions (indels). Briefly, the pipeline converts aligned reads into pileup images that are processed by a convolutional neural network to classify candidate variants, followed by post-processing to generate a high-confidence set of variant calls. The resulting variant calls were output in VCF (Variant Call Format) files for downstream analysis. Sample linkage disequilibrium structure was calculated using r2 metrics for a window of 250 kilobases. Variants are clumped using a graph-based computational method. The HLA alleles were determined using 3 different computational methods to ensure accuracy and reliability:•xHLA: A statistical approach that aligns reads to a reference panel of HLA alleles and iteratively refines results at the amino acid level. It achieves 99–100% accuracy for 4-digit typing of class I and II HLA genes, processing a 30× whole genome BAM file in about 3 min on a desktop computer.15•Kourami: A graph-guided assembly technique that constructs a hierarchical graph of known HLA alleles to guide assembly from sequencing reads, effectively capturing HLA polymorphisms.16•HISAT-genotype: Utilizes a graph-based genome alignment approach with a population reference graph, extending the HISAT2 aligner to handle complex HLA region variations.17 •xHLA: A statistical approach that aligns reads to a reference panel of HLA alleles and iteratively refines results at the amino acid level. It achieves 99–100% accuracy for 4-digit typing of class I and II HLA genes, processing a 30× whole genome BAM file in about 3 min on a desktop computer.15 xHLA: A statistical approach that aligns reads to a reference panel of HLA alleles and iteratively refines results at the amino acid level. It achieves 99–100% accuracy for 4-digit typing of class I and II HLA genes, processing a 30× whole genome BAM file in about 3 min on a desktop computer.15 •Kourami: A graph-guided assembly technique that constructs a hierarchical graph of known HLA alleles to guide assembly from sequencing reads, effectively capturing HLA polymorphisms.16 Kourami: A graph-guided assembly technique that constructs a hierarchical graph of known HLA alleles to guide assembly from sequencing reads, effectively capturing HLA polymorphisms.16 •HISAT-genotype: Utilizes a graph-based genome alignment approach with a population reference graph, extending the HISAT2 aligner to handle complex HLA region variations.17 HISAT-genotype: Utilizes a graph-based genome alignment approach with a population reference graph, extending the HISAT2 aligner to handle complex HLA region variations.17 To mitigate potential biases or errors from any single method, we implemented a majority voting system. In this approach, an HLA allele was considered called only if it was identified by at least 2 out of the 3 methods. This consensus approach enhances the reliability of our HLA typing results by reducing the impact of method-specific errors or biases. In cases where all 3 methods disagreed, or where 2 methods agreed but had low confidence scores, we flagged these results for manual review. This additional step ensured that only high-confidence HLA calls were used in our subsequent analyses, maintaining the integrity of our genomic data for the machine learning model development. HLA feature selection A graph-based technique was employed in this study to address the challenge posed by linkage disequilibrium (LD) effects when analyzing massive parallel genomic data. LD refers to the non-random association of alleles at different loci within a population, which can complicate the interpretation of genomic variants and potentially lead to false-positive or false-negative associations. Especially in GWAS for HLA-related complications, the complex LD of HLA regions can contribute to the noisy signals, hindering the discovery of other associations. By utilizing the graph-based technique, we aimed to overcome the confounding effects of LD and accurately identify genomic markers associated with SCARs. This technique involves constructing a graph representation of the genomic data, where each variant is represented as a node, and edges connect variants that are in LD, by a particular threshold. Using a depth-first search, we can identify LD blocks and separate variants that are in strong LD from those that are not. Compared with the classical LD clump, our method offers superior accuracy in downstream analysis. This step is crucial to ensure that the subsequent application of the machine learning model is based on accurate and reliable genomic information. We applied these techniques to hit 2 birds with 1 stone in our framework: reducing the number of dependent variables and removing the effect of the HLA allele. For HLA alleles, we performed genotyping with a 6-digit resolution. Modeling HLA alleles at this level of detail is important because it allows us to group them into different HLA categories. However, in our model, we treat HLA alleles as independent entities. Regardless of resolution, machine learning models will learn common properties among HLA groups that are associated with SCARS induced by ALLO and CBZ. Developing machine learning models to predict HLA variants influencing SCARs By design, we utilized 8 popular machine learning algorithms: Random Forest, Extra Trees, Nearest Centroid, Bernoulli Naive Bayes, Calibrated Classifier, Nu-Support Vector Classification (NuSVC), Linear Classifier, and Passive Aggressive Classifier. These algorithms have different approaches with their own set of advantages and disadvantages, which allow us to build a comprehensive prediction framework. Specificity, Sensitivity, and Area Under the ROC Curve (AUC) are used to evaluate the effectiveness of these algorithms. Quality control and bioinformatics analyses' section detailing the standard pre-GWAS QC steps that were performed (eg, filtering on MAF, HWE, and call rate).18 We established 2 separate machine learning models to predict adverse reactions to Allopurinol and Carbamazepine. For each model, we split the dataset into an 80% training set and a 20% testing set. The Allopurinol model was trained on 118 samples (58 controls, 60 cases) and tested on 30 samples (15 controls, 15 cases). The Carbamazepine model was trained on 80 samples (43 controls, 37 cases) and tested on 21 samples (10 controls, 11 cases). All models were built using default hyper-parameters of the library tensorflow-sklearn to ensure a fair comparison of the baseline performance of different model architectures. Detailed results, including feature importance and model performance metrics, are provided in the supplementary files. The overview pipeline for developing model is illustrated in Fig. 2. The dataset was first split into an 80% training set and a 20% testing set. To prevent data leakage for model evaluation, a ten-fold cross validation was applied to the training data with the feature selection performed on the 9 training folds and applied to the 1 validation fold. Finally, the cross-validated model was then evaluated on the hold-out testing data using standard metrics including sensitivity, specificity, accuracy, and AUC.Fig. 2The overview of developing machine learning model for using SNPs/HLA information to classification The overview of developing machine learning model for using SNPs/HLA information to classification Evaluation metrics To assess the association with HLA, we employed chi-square tests for larger sample sizes and Fisher's exact tests for smaller samples or when expected cell frequencies were low. Bayesian statistics were utilized to develop and refine prediction models. For the Genome-Wide Association Study (GWAS), we conducted statistical analyses comparing case and control groups using 3 models: allele frequency, dominant inheritance, and recessive inheritance. The GWAS investigated associations between variations in the HLA system and SCARs, with results visualized through Manhattan plots. We applied a linear mixed-effects model with an additive genomic component to account for pedigree data. Following standard practice, results were considered genome-wide significant at P ≤ 10−5. To evaluate the consistency of odds ratios (ORs) between the initial GWAS and the replication study, we employed the Breslow-Day test for homogeneity. We implemented ten-fold cross-validation with random stratified partitioning of the initial dataset to assess the efficacy of machine learning models. We utilized a range of prediction error evaluation metrics commonly found in the literature. Each developed model was evaluated on its performance in predicting SCARs caused by ALLO and CBZ. We used the following popular metrics: specificity, sensitivity, and measures such as the ROC curve and the Area Under the ROC Curve (AUC). Results Characteristics of patient information The detailed patient demographic data are provided in Table 1. The study included a total of 249 patients, divided into cases and controls for both Carbamazepine (CBZ) and Allopurinol (ALLO) treatments. For ALLO, there were 75 cases and 73 controls, whereas for CBZ, there were 48 cases and 53 controls.Table 1Demographic information of CBZ- and ALLO-induced SCAR cases included in the studyTable 1# of patients completing studyAlloCBZCasesControlsCasesControls75734853Age (years) Mean (SD)57.23 (14.35)57.82 (12.7)19.94 (21.02)13.94 (13.72) Min183011 Max81817860Gender (N/%) F20 (26.67%)11 (15.07%)19 (39.58%)27 (50.94%) M55 (73.33%)62 (84.93%)29 (60.42%)26 (49.06%)ADRRdiagnosed (# of patient) DRESS/HSS41–1– SJS/TEN31–46– SJS/DRESS/HSS3––– SJS/AGEP––1– Table 1Demographic information of CBZ- and ALLO-induced SCAR cases included in the studyTable 1# of patients completing studyAlloCBZCasesControlsCasesControls75734853Age (years) Mean (SD)57.23 (14.35)57.82 (12.7)19.94 (21.02)13.94 (13.72) Min183011 Max81817860Gender (N/%) F20 (26.67%)11 (15.07%)19 (39.58%)27 (50.94%) M55 (73.33%)62 (84.93%)29 (60.42%)26 (49.06%)ADRRdiagnosed (# of patient) DRESS/HSS41–1– SJS/TEN31–46– SJS/DRESS/HSS3––– SJS/AGEP––1– Demographic information of CBZ- and ALLO-induced SCAR cases included in the study The age of patients in the ALLO group ranged from 18 to 81 years, with a mean age of approximately 57 years in both cases and controls. In the CBZ group, patients’ ages ranged from 1 to 78 years, with cases having a mean age of 19.94 years and controls having a mean age of 13.94 years. Gender distribution among the patients was also noted. In the ALLO group, 26.67% of the cases were female, and 73.33% were male. Among the controls, 15.07% were female, and 84.93% were male. For the CBZ group, 39.58% of the cases were female, and 60.42% were male. Among the controls, 50.94% were female, and 49.06% were male. Additionally, the specific adverse reactions diagnosed in patients were recorded. In the ALLO group, the cases included patients diagnosed with DRESS/HSS (41 patients), SJS/TEN (31 patients), and SJS/DRESS/HSS (3 patients). In the CBZ group, there were patients diagnosed with DRESS/HSS (1 patient), SJS/TEN (46 patients), and SJS/AGEP (1 patient). Manhattan plots of GWAS p-values for genomic variants across chromosomes Manhattan plots were used to visualize the genome-wide association study (GWAS) results, displaying -log10(p-values) for genomic variants across all chromosomes. For ALLO-induced SCARs, 2 SNPs reached genome-wide significance (P < 10−6) (Fig. 3a). In the case of CBZ-induced SCARs, 1 SNP was identified at a suggestive significance level (P < 10−5) (Fig. 3b).Fig. 3Manhattan plots displaying each variant of GWAS p-values on chromosomes for ALLO and CBZ. The plots display red and blue horizontal dashed lines to represent the genome-wide suggestive threshold (P values < 1 × 10−5) and significant threshold (P values < 5 × 10−8), respectively Manhattan plots displaying each variant of GWAS p-values on chromosomes for ALLO and CBZ. The plots display red and blue horizontal dashed lines to represent the genome-wide suggestive threshold (P values < 1 × 10−5) and significant threshold (P values < 5 × 10−8), respectively Table 2, Table 3 present the results of association analyses between HLA alleles and the risk of SCARs for ALLO and CBZ, respectively. For ALLO-induced SCARs, HLA-C∗03:02 demonstrated the strongest association (Chi2_OR = 60.067, p = 3.37E-18; Fisher's OR = 60.067, p = 9.14E-01), with high sensitivity (0.85) and specificity (0.914). HLA-B∗58:01 showed a similarly strong association (Chi2_OR = 56.533, p = 2.12E-17; Fisher's OR = 56.533, p = 9.14E-01), with comparable sensitivity (0.842) and specificity (0.914). Other notable associations included HLA-DQB1∗06:09, HLA-DRB1∗13:02, HLA-DRB1∗03:01, and HLA-DQB1∗02:01, all with odds ratios above 23 and p-values below 1E-05. Interestingly, HLA-A∗33:03 showed a lower odds ratio (15.086) but had the third lowest p-value (2.42E-10) and relatively high sensitivity (0.759) and specificity (0.828). These findings suggest a strong genomic component in ALLO-induced SCAR risk, with multiple HLA alleles potentially contributing to susceptibility (Refer to the supplemental document for more detail).Table 2Association analysis of HLA alleles with SCAR risk for ALLOTable 2HLA AlleleChi2_ORChi2_pvalueFisher_ORFisher_pvalueSensSpecC-03-02-0260.0673.37E-1860.0679.14E-010.850.914B-58-01-0156.5332.12E-1756.5339.14E-010.8420.914DQB1-06-09-0128.53.83E-0628.59.83E-010.3330.983DRB1-13-02-0128.53.83E-0628.59.83E-010.3330.983DRB1-03-01-0125.292.06E-0825.299.66E-010.4750.966DQB1-02-01-0123.4844.96E-0823.4849.66E-010.4560.966A-33-03-0115.0862.42E-1015.0868.28E-010.7590.828DQA1-01-02-018.4654.80E-058.4659.30E-010.390.93DPB1-04-01-018.1061.83E-058.1069.14E-010.4330.914DQA1-05-01-016.5813.80E-056.5818.79E-010.4750.879Table 3Association analysis of HLA alleles with SCAR risk for CBZTable 3HLA AlleleChi2_ORChi2_pvalueFisher_ORFisher_pvalueSensSpecB-15-02-0121.4294.73E-0821.4298.37E-010.8060.837C-08-01-0116.53.79E-0716.57.67E-010.8330.767DQB1-03-01-017.5761.59E-037.5764.76E-010.8930.476DRB1-12-02-016.973.24E-036.974.76E-010.8850.476DPB1-02-026.5639.04E-026.5639.77E-010.1350.977DQA1-06-01-016.5632.05E-036.5635.12E-010.8620.512A-02-06-013.7063.31E-013.7069.77E-010.0810.977DPB1-21-013.3445.01E-023.3448.84E-010.3060.884DPB1-02-01-022.7087.32E-022.7088.33E-010.3510.833DPA1-01-03-012.5569.12E-022.5565.26E-010.6970.526 Table 2Association analysis of HLA alleles with SCAR risk for ALLOTable 2HLA AlleleChi2_ORChi2_pvalueFisher_ORFisher_pvalueSensSpecC-03-02-0260.0673.37E-1860.0679.14E-010.850.914B-58-01-0156.5332.12E-1756.5339.14E-010.8420.914DQB1-06-09-0128.53.83E-0628.59.83E-010.3330.983DRB1-13-02-0128.53.83E-0628.59.83E-010.3330.983DRB1-03-01-0125.292.06E-0825.299.66E-010.4750.966DQB1-02-01-0123.4844.96E-0823.4849.66E-010.4560.966A-33-03-0115.0862.42E-1015.0868.28E-010.7590.828DQA1-01-02-018.4654.80E-058.4659.30E-010.390.93DPB1-04-01-018.1061.83E-058.1069.14E-010.4330.914DQA1-05-01-016.5813.80E-056.5818.79E-010.4750.879 Association analysis of HLA alleles with SCAR risk for ALLO Table 3Association analysis of HLA alleles with SCAR risk for CBZTable 3HLA AlleleChi2_ORChi2_pvalueFisher_ORFisher_pvalueSensSpecB-15-02-0121.4294.73E-0821.4298.37E-010.8060.837C-08-01-0116.53.79E-0716.57.67E-010.8330.767DQB1-03-01-017.5761.59E-037.5764.76E-010.8930.476DRB1-12-02-016.973.24E-036.974.76E-010.8850.476DPB1-02-026.5639.04E-026.5639.77E-010.1350.977DQA1-06-01-016.5632.05E-036.5635.12E-010.8620.512A-02-06-013.7063.31E-013.7069.77E-010.0810.977DPB1-21-013.3445.01E-023.3448.84E-010.3060.884DPB1-02-01-022.7087.32E-022.7088.33E-010.3510.833DPA1-01-03-012.5569.12E-022.5565.26E-010.6970.526 Association analysis of HLA alleles with SCAR risk for CBZ For CBZ-induced SCARs, our GWAS identified less pronounced but still significant associations. The strongest association was observed with HLA-B∗15:02 (Chi2_OR = 27.841, p = 1.32E-07; Fisher's OR = 21.429, p = 4.73E-08), followed by HLA-C∗08:01 (Chi2_OR = 23.205, p = 1.46E-06; Fisher's OR = 16.5, p = 3.79E-07). Three additional alleles (HLA-DQA1∗06:01, HLA-DQB1∗03:01, and HLA-DRB1∗12:02) also showed significant associations, with odds ratios ranging from 7.797 to 8.797 (all p < 0.01). Several other HLA alleles showed weaker associations (OR < 5) that did not reach statistical significance at the conventional α = 0.05 level. While the associations for CBZ were generally weaker than those observed for ALLO, they nonetheless indicate a significant genomic component in CBZ-induced SCAR risk. The differences in associated alleles between the 2 drugs highlight the drug-specific nature of genomic risk factors for SCARs, underscoring the importance of drug-specific genomic screening in clinical practice. The effectiveness of machine learning in identifying HLA variants associated with SCARs Table 4 presents a comprehensive comparison of 8 machine learning models' performance in predicting SCARs induced by ALLO and CBZ. The models’ effectiveness was evaluated using the Area Under the ROC Curve (AUC) metric across 3 feature sets: Variants, HLA alleles, and a combination of both. For ALLO-induced SCARs, the Random Forest model consistently outperformed others, achieving a remarkable mean accuracy of 99.7% using either HLA alleles alone or the combined feature set. The ExtraTree model also exhibited strong performance, with mean accuracies of 99.3% (HLA alleles) and 98.3% (combined features). In predicting CBZ-induced SCARs, the Linear SVC model emerged as the top performer, reaching a mean accuracy of 85.7% with the combined feature set. This suggests Linear SVC model effectiveness in capturing complex data interactions for CBZ-related reactions. Notably, the BernoulliNB model showed high accuracy (96.7%) for ALLO-induced SCARs using HLA alleles but performed poorly with CBZ variants. This discrepancy underscores the varying predictive power of different models and feature sets across drug types. These findings highlight the superior performance of ensemble methods (Random Forest and ExtraTree) for ALLO predictions, while support vector machines (LinearSVC) for CBZ predictions. The results emphasize the importance of tailoring model selection and feature sets to specific drug-induced adverse reactions for optimal predictive accuracy.Table 4Highest achieved AUC statistics of the algorithms at the best p-value thresholdTable 4ModelVariantsHLA allelesVariants + HLAALLOCBZALLOCBZALLOCBZmeanstdmeanstdmeanstdmeanstdmeanstdmeanstdBernoulliNB0.8070.030.6950.020.96700.66700.9870.030.6190.04CalibratedCLF0.73300.6050.020.900.61900.8430.050.7140.05ExtraTree0.76700.60.120.9930.010.690.020.9830.030.6520.04LinearSVC0.73300.7190.040.800.57100.810.080.8570.06NearestCentroid0.8030.020.7270.020.96700.61900.9630.030.7620.04NuSVC0.7630.010.6950.020.900.61900.930.040.7140.04PasiveAggressive0.690.030.6950.050.760.050.5860.040.8430.060.7480.07RandomForest0.76700.6140.040.9970.010.71400.9970.010.6860.04Bold values indicate the highest AUC value obtained for two case group (ALL and CBZ) from each model across three feature sets. Table 4Highest achieved AUC statistics of the algorithms at the best p-value thresholdTable 4ModelVariantsHLA allelesVariants + HLAALLOCBZALLOCBZALLOCBZmeanstdmeanstdmeanstdmeanstdmeanstdmeanstdBernoulliNB0.8070.030.6950.020.96700.66700.9870.030.6190.04CalibratedCLF0.73300.6050.020.900.61900.8430.050.7140.05ExtraTree0.76700.60.120.9930.010.690.020.9830.030.6520.04LinearSVC0.73300.7190.040.800.57100.810.080.8570.06NearestCentroid0.8030.020.7270.020.96700.61900.9630.030.7620.04NuSVC0.7630.010.6950.020.900.61900.930.040.7140.04PasiveAggressive0.690.030.6950.050.760.050.5860.040.8430.060.7480.07RandomForest0.76700.6140.040.9970.010.71400.9970.010.6860.04Bold values indicate the highest AUC value obtained for two case group (ALL and CBZ) from each model across three feature sets. Highest achieved AUC statistics of the algorithms at the best p-value threshold Bold values indicate the highest AUC value obtained for two case group (ALL and CBZ) from each model across three feature sets. As noted on Fig. 4, with a cutoff threshold greater than or equal to 1e-07, the RandomForest model exhibits the highest performance with an accuracy of 0.997 on the test set using a combination of variants and HLA alleles for predicting ALLO-induced SCARs. At a p-value cutoff of 1e-09, other methods such as NearestCentroid and BernoulliNB also achieve high accuracy, especially with BernoulliNB reaching a mean accuracy of 0.967 using only HLA alleles. This shows the high sensitivity of genomic variants and HLA alleles in predicting ALLO-induced SCARs. Additionally, the accuracy of the models tends to decrease as the p-value cutoff threshold increases, indicating that higher cutoff thresholds introduce too much noise, or better called variants, making the model difficult to learn.Fig. 4Comparison of machine learning models using only genomic variants across different p-value cutoff thresholds Comparison of machine learning models using only genomic variants across different p-value cutoff thresholds For CBZ-induced SCARs, although the accuracy improved significantly when adding HLA alleles compared to using only variants, the models’ accuracy was still considerably lower than for ALLO in all test scenarios. Specifically, the LinearSVC model achieved a mean accuracy of 0.857 at a p-value cutoff of 5 × 10−2 (Fig. 4) when using the combination of variants and HLA alleles. The BernoulliNB model reached an accuracy of 0.667 using only HLA alleles, highlighting that while HLA alleles contribute to the prediction, the inclusion of variants is necessary to capture the complex interactions involved in CBZ-induced SCARs. This reflects the challenges and the need for comprehensive data integration to improve predictive accuracy for CBZ-induced SCARs. In addition, we evaluated the performance of the models when using only HLA allele information without including variants. In all test scenarios, we used the list of HLA alleles from groups A, B, and C. The Random Forest model demonstrated exceptional performance with a mean accuracy of 0.997, closely followed by the ExtraTree model with a mean accuracy of 0.993, indicating the strong predictive power of HLA alleles alone for ALLO-induced SCARs. The Bernoulli NB and Nearest Centroid models also performed well, both achieving a mean accuracy of 0.967. This consistency across models underscores the critical role of HLA alleles in predicting ALLO-induced SCARs. For CBZ-induced SCARs, the models showed lower accuracy using only HLA alleles. The highest accuracy was observed with the Random Forest model at 0.714, suggesting that while HLA alleles are important, they are insufficient alone for accurate CBZ-induced SCAR predictions. This disparity highlights the complex genomic interactions involved in CBZ-induced SCARs, necessitating additional genomic data to enhance predictive performance. The ability to identify HLA variants associated with ALLO- and CBZ-induced SCARs For ALLO-induced SCARs, the top 10 risk factors were investigated (Fig. 5a). We employed the Gini index from the Random Forest model to calculate the importance of HLA alleles for the variant importance. Gini Importance assesses the importance of a feature by evaluating the (normalized) overall reduction in the criterion resulting from that feature. This criterion, known as the Gini impurity, gauges the impurity of a node within a decision tree. It assigned greater significance to features that contribute more substantially to reducing impurity. Thus, Gini importance is synonymous with the total decrease in node impurity. For ALLO-induced SCARs, 2 HLA alleles have a profound influence on the likelihood of disease: HLA-B∗58:01:01 and HLA-C∗03:02:02, especially HLA-B∗58:01:01. This proves the high possibility of SCARs when the patient carries the HLA-B∗58:01:01, and correlates with the Vietnamese population statistics that demonstrate up to 85% of SCAR patients having HLA-B∗58:01:01. In addition, according to the calculation results (as shown in Fig. 5a and b), both variants, chr7:151086821:C > CG located on the AGAP3 gene and chr6:39080715: A > C located on the GLP1R gene, have a significant impact on SCARs. This indicates that the genomic influence on SCARs is related to not only HLA genes but also other genes outside the HLA region such as AGAP3 on chromosome 7, and GLP1R on chromosome 6 for ALLO.Fig. 5Identifies 10 risk factors for ALLO- and CBZ-induced SCARs: (A) for Allopurinol, (B) for Carbamazepine Identifies 10 risk factors for ALLO- and CBZ-induced SCARs: (A) for Allopurinol, (B) for Carbamazepine For allopurinol-associated SCARs, HLA-region variants demonstrated a substantially higher individual feature importance scores mean (MEAN = 5.26) compared to non-HLA variants (MEAN = 3.22). Similarly, carbamazepine-associated SCARs showed elevated HLA-region importance scores (MEAN = 9.9) relative to non-HLA variants (MEAN = 0.85). However, the number of variants in the non-HLA region were substantially greater than in others and contributed to improved model performance (Supplementary Table for ALLO-Model-Evaluations and CBZ-Model-Evaluations). We also identified the top 10 risk factors for CBZ-induced SCARs, with significant differences and high ORs between cases and control cases (Fig. 5b). Please refer to the networks of key genes in Supplementary Fig. 1. For the CBZ-intake group, the HLA-B∗15:02:01 allele is the most important and correlations with Vietnamese population statistics that demonstrate the increase possibility (83.78%) of SCARs when the patient carries the HLA-B∗15:02:01 allele. Two variants, chr9:18681697: T > G on the ADAMTSL1 gene on chromosome 9 and chr7:28410809:C > CAGG on the CREB5 gene on chromosome 7, also contribute to SCARs induced by CBZ, although not as significant as HLA-B∗15:02:01. Discussion SCARs are rare but extremely severe and life-threatening and are the most important hazard for patients on ALLO or CBZ treatment. Several studies have focused on the identification of susceptible factors to minimize the risk of SCARs,10,19,20 but there have been limited data for Vietnamese people. We hypothesize that HLA alleles other than HLA-B∗15:02, HLA-A∗31:01, and HLA-B∗58:01, and other genetic variants related to CBZ or ALLO metabolism, may be involved in medication-induced SCARs. In addition, certain HLA alleles may be protective and previous studies in Han Chinese positive for HLA-B∗40:01 have suggested that this may protect against bullous CBZ-induced SCARs.21,22 In 2016, 3 “heat-shock protein cluster” (HSP 70) genes located on Chromosome 6, MHC class III, were investigated for their potential protective ability against serious CBZ hypersensitivity reactions.23 However, the findings were inconclusive as to whether this gene group is directly responsible or if it reflects a linkage with other polymorphisms or genes. Patients who test negative for HLA-B∗58:01 may still be at risk of developing ALLO-induced SCARs since non-genomic risk factors associated with SCARs, such as renal impairment, and starting dose of ALLO have been reported.3 A previous study24 reported an association between a polymorphism in the TNF-α gene promoter region and CBZ-induced serious hypersensitivity in Caucasians [OR 2.4 (95% CI: 1.2–4.8)]. However, this association was not observed in a Genome-Wide Association Study conducted by Hung et al in the Taiwanese population.25 In Vietnam, alongside HLA-B∗15:02, HLA-B∗46:01 is common in the population. Interestingly, HLA-B∗46:01 appears more frequently in CBZ-tolerant individuals, while HLA-B∗15:02 is the leading predisposition of SJS/TEN/DRESS cases, with OR 0.27 (95% CI: 0.08–0.94).12 HLA-A∗24:02 remains a controversial genomic factor. The Grover et al 2014 review of patients classified by clinical phenotype found HLA-A∗24:02 to be a protective factor for SJS/TEN in Asians [OR 0.27 (95% CI: 0.11–0.64); p = 2.7 × 10−3];21 however, a 2017 study reported HLA-A∗24:02 as a risk factor for CBZ-induced SJS in Chinese populations, albeit with a weak association [OR 2.33 (95% CI: 1.16–4.69), p = 0.015].26 HLA-B∗58:01 is the allele that appears to play the most important role in ALLO-induced SCARs. Approximately 97% of reported clinical cases of ALLO-induced SCARs are HLA-B∗58:01 positive. Previous studies demonstrated that besides HLA-B∗58:01, HLA-A∗33:03 has been implicated in ALLO-induced SCARs in the Korean, Vietnamese, Japanese and Italian populations, and HLA-C∗03:02 in Korean, and Italian populations.3,20,27, 28, 29 However, HLA-B∗58:01appears to be the most important genomic risk factor for predicting ALLO-induced SCARs.3,28,29 As noted above, in addition to genetic predisposition, renal insufficiency caused by high-dose ALLO and concomitant diuretic therapy have been reported as increasing the risk of ALLO hypersensitivity in general and ALLO-induced SCARs in particular.30 Renal impairment occurs in up to 50% of gout sufferers31,32 and renal impairment increases the concentrations of ALLO and therefore oxypurinol, and the oxypurinol metabolite is associated with a higher risk of SCARs.33 The mechanism is secondary to oxypurinol binding to HLA-B∗58:01 via the p-i to activate drug-specific T cells.34 These results demonstrate that HLA alleles are important, but are not the only factors that contribute to the development of an ALLO – induced hypersensitivity reaction. Genetic variations located outside transcriptional regions also contribute significantly to the risk of hypersensitivity reactions to carbamazepine (CBZ) and allopurinol (ALLO). Previous studies have identified strong associations between non-coding variants on chromosome 6 and the risk of ALLO-induced hypersensitivity. Notably, a non-coding transcript variant SNP rs3099844 C>A in the MICB-DT gene (OR: 58.65; 95% CI: 21.05–163.42; p < 0.0001), and an intronic variant rs9263726 in PSORS1C2 (OR: 141.67; 95% CI: 43.61–460.22; p < 0.0001) have been implicated.3 Furthermore, non-coding RNAs involved in gene regulation play a role in modulating allergic responses. According to Nguyen et al, the expression level of miRNA146a could have a potential role in allopurinol tolerance in individuals carrying the HLA-B∗58:01 allele.7 Microarray analysis of patients with Stevens-Johnson syndrome/toxic epidermal necrolysis (SJS/TEN) triggered by ALLO-induced hypersensitivity revealed involvement of several signaling pathways, including cell surface interactions at the vascular wall, immunoregulatory interactions at the immunological synapse, and MyD88 signaling pathways. In this study, novel markers for ALLO- and CBZ-induced SCARs in the Vietnamese population using WES can be considered as a significant breakthrough for SCAR prevention in Vietnam. Through our rigorous analysis of genomic data from a case-control study, we not only built a model to identify high-risk patients, but also revealed novel protective genomic variants that were significantly associated with not developing SCARs. This discovery provides new insights into the genomic basis of SCARs induced by ALLO and CBZ, as these markers may lead to a better understanding of the underlying mechanisms of these reactions, which could lead to the development of new therapeutic strategies to prevent or treat SCARs. Previous studies have not been able to achieve this level of accuracy in predicting SCARs because they typically relied on a small number of genomic markers, which were not comprehensive enough to capture the complex genomic architecture of these reactions, or focused on small suboptimal sample sizes. Our study highlights the importance of not only using WES data, but also the need of appropriate machine learning algorithms to prioritize genomic markers for SCARs. These approaches provide a more comprehensive analysis of genomic factors and allow for the identification of novel markers that were not previously known to be associated with SCARs. Each of these methods has its strengths, and by combining them, we aim to leverage their complementary advantages. xHLA provides rapid and accurate typing, Kourami excels in handling novel alleles through its graph-guided assembly, and HISAT-genotype offers robust performance through its graph-based alignment approach. The consensus approach helps to mitigate individual method biases and provides a high-confidence set of HLA calls for our downstream analyses. As shown in the results section, HLA alleles significantly contribute to the phenotypic expression of SCARs induced by ALLO and CBZ, with a stronger association for ALLO-induced SCARs. Machine learning models incorporating both HLA allele information and variants significantly improve prediction accuracy compared to using only 1 of these factors. Some models achieved 99.97% accuracy in predicting ALLO-induced SCARs after multiple independent training sessions. This exceptional performance may be attributed to the strong association between specific HLA alleles and ALLO-induced SCARs, making them highly predictive biomarkers. Advanced machine learning models like Random Forest and ExtraTrees efficiently capture complex patterns and handle interactions between HLA alleles and variants, leading to superior predictive performance. Near perfect accuracy might also result from limited genomic diversity among positive samples, a high signal-to-noise ratio in the data, effective data preprocessing, and feature engineering. While these results demonstrate the potential of machine learning, the near perfect accuracy achieved may partly be due to an insufficient number of samples. Further research with larger and more diverse datasets is necessary to validate these findings and ensure the generalizability of the predictive models. The identification of significant variants in the AGAP3 and GLP1R genes provides valuable insights into the genomic basis of SCARs induced by ALLO and CBZ. AGAP3 plays a role in membrane trafficking and cytoskeleton regulation, suggesting its potential involvement in drug metabolism or immune responses. GLP1R, encoding the glucagon-like peptide-1 receptor, is primarily associated with glucose homeostasis and insulin secretion. Its implication in SCARs is intriguing and may point to unexpected connections between metabolic pathways and adverse drug reactions. These findings expand our understanding beyond HLA alleles, highlighting the complex genomic architecture underlying SCARs. The involvement of these genes could explain variations in drug response and susceptibility to adverse reactions among individuals with similar HLA profiles. Further functional studies are warranted to elucidate the precise mechanisms by which variants in AGAP3 and GLP1R contribute to SCAR development, potentially leading to more comprehensive predictive models and personalized approaches to medication safety. In this study, the sample size is quite modest. A more lenient “suggestive” threshold (P < 10−5) was used for variant discovery and machine learning (ML) was employed to establish the model and utilize other genetic factors rather than HLA genes themselves. As SCARs are rare and can be severe, this limits the sample size. Moreover, we acknowledged the problem of overfitting may occur, despite the use of k-fold cross-validation to mitigate this risk and note that this may be more pronounced when considering many genomic features. Our findings then must be considered as being exploratory and preliminary. Further validation in an independent cohort will be required to thoroughly evaluate the model's reliability and value in a clinical setting. The results, however, after acknowledging the limitations, do suggest the approach offers a more comprehensive screening method for ALLO- and CBZ-induced SCARs. The cost of the test is higher than screening of HLA risk alleles by PCR based methods,35 as it requires a special instrument for genotyping a number of markers such as a microarray genotyping machine and computational resources for applying machine learning algorithms to obtain a result. These limitations, however, are offset by the interest of research to develop screening tests for risk factors of diseases to improve quality of life, decrease expense of hospitalization, reduce disability and death. By including the characteristics of the small group of SNP markers, we hope to contribute to the construction of a pharmacogenomics screening microarray specifically for Vietnamese people, in which drug allergy risk factors are integrated into screening for common polygenic disease risks, similar to the population specific microarrays from the Korea Biobank Array or the UK Biobank Array. Incorporating the common disease risk markers for drug-induced adverse reactions in Vietnam will promote preventative medicine on a national scale. Interestingly, integration into a microarray with a high density of 200K–300K markers, the cost per sample will be significantly reduced; it is estimated at 50 USD/test for a comprehensive pharmacogenetic report, including drug allergy risk. In summary, the discovery of novel genomic markers for ALLO- and CBZ-induced SCARs in the Vietnamese population, as well as the development of an ensemble learning model to predict SCARs from genomic results, represents a significant advance in the field of allergy and immunology in Vietnam. These findings have important implications for the clinical management of patients who are at risk of developing SCARs in response to these drugs. In addition, the multiple risk factors inducing SCARs in Vietnamese patients identified in this study should further raise awareness about the risk of hypersensitivity and the need for careful evaluation before prescribing ALLO and CBZ.19 Abbreviations CBZ (Carbamazepine) – ALLO (Allopurinol) - SCARs (Severe Cutaneous Adverse Reactions) – WES (Whole Exome Sequencing), HLA (Human Leukocyte Antigen) – NuSVC (Nu-Support Vector Classification) – ROC (Receiver Operating Characteristic) - AUC (Area Under the ROC Curve) – SJS (Stevens-Johnson syndrome) –TEN (Toxic Epidermal Necrolysis)– LD (Linkage Disequilibrium). Author contributions Nguyen Thanh Nguyen and Hien Quoc Vu designed the study, performed data analysis, and wrote manuscript. Mai Hoang Tran, Thu Thuy Can, Oanh Thi Hoang, and Thi Minh Nguyet Nguyen extracted DNA and performed sequencing and analysis. Vinh Chi Duong and Vu Nguyen Anh Mai performed data analysis. Hien Quoc Vu and Thi Minh Nguyet Nguyen made the figures and tables. Mai Hoang Tran, Huong Le Thi Minh, Nguyet Nhu Nguyen, Hang Vu Thi, Mai Thi Vu, Yen Thi Hai Pham, Khiem Van Nguyen, and Nga Quynh Do collected samples and diagnosed patients. Ly Le, Sheryl van Nunen, Timothy John Craig, Hieu Chi Chu designed the study and revised the manuscript. Nam Sy Vo designed the study and wrote the manuscript. Dinh Van Nguyen designed the study, discussed the results, and reviewed the final version. Author's consent for publication We are the co-authors of this manuscript give our consent for information of ourselves and our results to be submitted to World Allergy Organization Journal with title “Machine learning-based model for prediction of carbamazepine- and allopurinol-induced severe cutaneous adverse reactions in Vietnamese”. Availability of data and materials The datasets used and/or analyzed during the current study are available from the corresponding author on reasonable request. Ethics approval This project was be approved by the Human Research and Ethics Committee of Vinmec healthcare system, No. 79/2023/CN/HĐĐĐ VMEC. Disclosure of the use of generative AI and AI-assisted technologies in the writing process During the preparation of this work the authors used ChatGPT 4 in order to correct some English expressions properly. After using this tool/service, the authors reviewed and edited the content as needed and takes full responsibility for the content of the publication. Funding This work was supported by internal funding from VinUni Big Data Research Institute, VinUniversity and Vinmec International Hospital under Grant Number VINBDI.2019.DA01. Competing interest Vinh Chi Duong BSc, and Nam S. Vo PhD are current employees of GeneStory JSC, Vietnam, a company that develops and markets products for genetic testing. The other authors declare no competing interests.