A Machine Learning Framework for Predicting Antimicrobial Resistance Genes from Bacterial Whole-Genome Sequencing Data: A Comparative Bioinformatics Analysis
Abstract
Background:Antimicrobial resistance (AMR) poses an important challenge to public health on a global scale, with traditional methods of susceptibility testing not sufficiently fast to allow empirical treatment or surveillance. Whole-genome sequencing (WGS) coupled with machine learning (ML) offers a promising, genome-scale method to predict resistance phenotype directly from the sequence information. Methods:We have created and evaluated a computational pipeline which extracts k-mer, gene presence-absence, and single nucleotide polymorphism (SNP) features from assembled bacterial genomes and then uses four supervised classifiers (logistic regression, support vector machine [SVM], random forest [RF], and gradient boosted trees [XGBoost]) to predict resistance to six clinically important antibiotic groups in Escherichia coli, Klebsiella pneumoniae, and Staphylococcus aureus strains. Performance of the models was assessed using nested cross-validation and measured with accuracy, sensitivity, specificity, F1 score, and area under the receiver operating characteristic curve (AUC-ROC). The most important features were identified using permutation tests. Results:Tree ensemble models performed significantly better than linear models, with random forest showing the best mean AUC-ROC of 0.93, and XGBoost the next best with 0.91; logistic regression and SVM peaked at 0.84 and 0.86, respectively. Beta-lactamase and efflux pump genes proved to be the most consistent high-ranking predictors of resistance across different antibiotic classes and bacteria. Predictive power of the models was highest for beta-lactams and fluoroquinolones and poorest for genotyping-poorly defined resistance mechanisms. Conclusion:Supervised machine learning models based on WGS-derived genomic features provide high-quality predictions of AMR phenotypes and uncover biological predictors of resistance. Independent prospective testing is necessary prior to clinical and surveillance application of these tools.