Abstract
BACKGROUND: Clostridioides difficile is a major cause of hospital-acquired diarrhea and a driver of nosocomial outbreaks, yet rapid, accurate ribotype identification remains challenging. We sought to develop a MALDI-TOF MS-based workflow coupled with machine learning to distinguish epidemic toxigenic ribotypes (RT027 and RT181) from other strains in real time. RESULTS: We analyzed MALDI-TOF spectra from 379 clinical isolates collected across ten Spanish hospitals and identified seven discriminant biomarker peaks. Two peaks (2463 and 4993 m/z) were uniquely associated with RT027, while combinations of five additional peaks reliably identified RT181. Our classifiers-implemented both in the commercial Clover MSDAS platform and the open-access AutoCdiff web tool-achieved up to 100% balanced accuracy in ribotype assignment and proved robust in real-time outbreak simulations. CONCLUSIONS: This study demonstrates that MALDI-TOF MS combined with tailored machine learning can deliver rapid, high-precision ribotype identification for C. difficile. The freely available AutoCdiff models ( https://bacteria.id ) offer an immediately deployable solution for clinical laboratories, with the potential to enhance outbreak surveillance and control.