Learn R Programming

MSclassifR (version 0.5.0)

Automated Classification of Mass Spectra

Description

Functions to classify mass spectra in known categories and to determine discriminant mass-to-charge values (m/z). Includes easy-to-use preprocessing pipelines for Matrix Assisted Laser Desorption Ionisation - Time Of Flight Mass Spectrometry (MALDI-TOF) mass spectra, methods to select discriminant m/z from labelled libraries, and tools to predict categories (species, phenotypes, etc.) from selected features. Also provides utilities to build design matrices from peak intensities and labels. While this package was developed with the aim of identifying very similar species or phenotypes of bacteria from MALDI-TOF MS, the functions of this package can also be used to classify other categories associated to mass spectra; or from mass spectra obtained with other mass spectrometry techniques. Parallelized processing and optional C++-accelerated functions are available (notably to deal with large datasets) from version 0.5.0. If you use this package in your research, please cite the associated publication (). For a comprehensive guide, additional applications, and detailed examples, see .

Copy Link

Version

Install

install.packages('MSclassifR')

Monthly Downloads

246

Version

0.5.0

License

GPL (>= 3)

Issues

Pull Requests

Stars

Forks

Maintainer

Alexandre Godmer

Last Published

December 9th, 2025

Functions in MSclassifR (0.5.0)

calculate_distance

Function calculating the distance between two vectors.
.safe_n_workers

Internal: choose a safe number of workers
SignalProcessing

Signal processing for MALDI-TOF spectra (wrapper to SignalProcessingUltra)
build_XY_from_peaks

Build design matrix X and response Y from peak intensities
SignalProcessingUltra

Optimized signal processing for MALDI-TOF spectra (parallel + optional C++ alignment)
fast_cvpvi

Fast cross-validated permutation variable importance (ranger-based)
SelectionVarStat

Fast feature (m/z) selection using multiple hypothesis testing (LIMMA/ANOVA/Kruskal) with optional class balancing (no/up/down/SMOTE)
d_left_join

Function joining two tables based not on exact matches
SelectionVar

Variable selection using methods based on random forests and others.
build_X_from_peaks_fast

Build a sample-by-m/z intensity matrix from a list of peaks (fast, C++-backed)
smote_classif

SMOTE for classification datasets
msclassifr-internal

Internal helpers and C++ exports
fast_mda

Fast MDA-style variable selection using ranger permutation importance
fast_find_neighbors

Function finding k Nearest Neighbors for each row of a matrix
fast_generate_synthetic

Function generating synthetic examples using SMOTE
PredictFastClass

Fast class prediction from peak lists using linear regressions
PlotSpectra

Plot spectral data with optional peak markers
PeakDetection

Detection of peaks in MassSpectrum objects
MSclassifR-cpp-helpers

Internal C++ helpers (not user-facing)
LogReg

Fast supervised classifier with m/z subsetting and optional sampling
MSclassifR

Automated classification of mass spectra
PredictLogReg

Prediction of the category to which a mass spectrum belongs
LogReg_rf_fast

Fast random-forest classifier with stratified CV and in-fold sampling (ranger, caret-free)
CitrobacterRKImetadata

Metadata of mass spectra corresponding to the bacterial species Citrobacter sp. from The Robert Koch-Institute (RKI) database of microbial MALDI-TOF mass spectra
CitrobacterRKIspectra

Mass spectra corresponding to the bacterial species Citrobacter sp. from The Robert Koch-Institute (RKI) database of microbial MALDI-TOF mass spectra