MSclassifR: An R package for supervised classification of mass spectra with machine learning methods

Matrix-assisted laser desorption/ionization time-of-flight mass spectrometry (MALDI-TOF MS) has transformed microbiology by enabling rapid and cost-effective pathogen identification. However, differentiating between closely related species remains challenging. Current analytical approaches, such as database-driven approaches, still underutilize the information contained in mass spectra. In response to this challenge, we developed MSclassifR, an R package designed to facilitate the construction of data analysis pipelines for accurate mass spectra classification using machine learning (ML) techniques. MSclassifR provides end-to-end pipelines tailored for microbiological diagnostics, covering preprocessing, mass-to-charge ( m / z ) selection, and classification of mass spectra. One of the main strengths of the package is its m / z selection method based on random forest (RF) variable importance, which improves identification accuracy by focusing on the most informative spectral features. We assessed classification pipelines constructed using MSclassifR through rigorous experiments conducted on diverse datasets that included bacterial species or subspecies and virulent/avirulent phenotypes, illustrating the package’s versatility across diverse applications. Moreover, the pipelines achieved high accuracy when applied to SARS-CoV-2 nasal swab mass spectra acquired using various MALDI-TOF instruments. Comparisons of multiple pipelines revealed that RF-based pipelines achieved the best performances on various-sized datasets. The MSclassifR package offers microbiologists an open-source solution that leverages ML to enhance MALDI-TOF MS’s diagnostic capabilities. It is available for download from the Comprehensive R Archive Network ( https://cran.r-project.org/web/packages/MSclassifR/ ).

Authors

Institutions

Publication Details

Journal
Expert Systems with Applications
Published
2025-06-27
DOI
https://doi.org/10.1016/j.eswa.2025.128796
Primary Topic
Metabolomics and Mass Spectrometry Studies
Type
article
Field-Weighted Citation Impact
0.00
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

MSclassifR: An R package for supervised classification of mass spectra with machine learning methods

Emmanuelle Varon, Yahia Benzerara, Mariette Matondo, Karen Druart et al.
Expert Systems with Applications
Metabolomics and Mass Spectrometry Studies
article

MSclassifR: An R package for supervised classification of mass spectra with machine learning methods

Emmanuelle Varon, Yahia Benzerara, Mariette Matondo, Karen Druart, Nicolas Véziris, Quentin Giai Gianetto, Alexandre Godmer, Alexandra Aubry, Renaud Mozet
article en

Abstract

Matrix-assisted laser desorption/ionization time-of-flight mass spectrometry (MALDI-TOF MS) has transformed microbiology by enabling rapid and cost-effective pathogen identification. However, differentiating between closely related species remains challenging. Current analytical approaches, such as database-driven approaches, still underutilize the information contained in mass spectra. In response to this challenge, we developed MSclassifR, an R package designed to facilitate the construction of data analysis pipelines for accurate mass spectra classification using machine learning (ML) techniques. MSclassifR provides end-to-end pipelines tailored for microbiological diagnostics, covering preprocessing, mass-to-charge ( m / z ) selection, and classification of mass spectra. One of the main strengths of the package is its m / z selection method based on random forest (RF) variable importance, which improves identification accuracy by focusing on the most informative spectral features. We assessed classification pipelines constructed using MSclassifR through rigorous experiments conducted on diverse datasets that included bacterial species or subspecies and virulent/avirulent phenotypes, illustrating the package’s versatility across diverse applications. Moreover, the pipelines achieved high accuracy when applied to SARS-CoV-2 nasal swab mass spectra acquired using various MALDI-TOF instruments. Comparisons of multiple pipelines revealed that RF-based pipelines achieved the best performances on various-sized datasets. The MSclassifR package offers microbiologists an open-source solution that leverages ML to enhance MALDI-TOF MS’s diagnostic capabilities. It is available for download from the Comprehensive R Archive Network ( https://cran.r-project.org/web/packages/MSclassifR/ ).

Expert Systems with ApplicationsVol. 294
Centre National de la Recherche Scientifique (FR), Inserm (FR), Institut Pasteur (FR), Université Paris Cité (FR), Laboratoire de Mathématiques d'Orsay (FR), Sorbonne Université (FR), Assistance Publique – Hôpitaux de Paris (FR), Hôpital Saint-Antoine (FR), Laboratoire National de Référence (MA), Centre d'Immunologie et des Maladies Infectieuses (FR), Centre de Recherche Saint-Antoine (FR), Hôpital Intercommunal de Créteil (FR)
Openalex Percentile: Top 86%
Metabolomics and Mass Spectrometry Studies
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.