Abstract
Over the past decade, tremendous efforts have been made to develop powerful algorithms and excellent data analysis software for mass spectrometry (MS) and metabolomics data analysis. These include, among others, R packages from the RforMassSpectrometry initiative such as Spectra, MsCoreUtils, MetaboAnnotation and CompoundDb, as well as Python libraries like matchms, spectrum_utils, Pyteomics and pyOpenMS. Each of these softwares covers different and in part complementary aspects in the analysis of MS data, but their integration into a single workflow remains, in particular across programming languages, challenging.
Here we present SpectriPy*, an R package that efficiently translates MS data structures between R and Python. By leveraging R’s “reticulate” system, SpectriPy enables a seamless cross-language integration allowing R and Python MS data analysis algorithms to be combined within unified analysis workflows. A set of example use cases, implemented as Quarto documents, were developed during the EuBIC developers meeting 2025 to demonstrate the advantages and power of this approach.
To summarize, SpectriPy enables and simplifies the integration of R and Python data analysis, empowering data analysts to benefit from the full power of algorithms from both programming languages. Further, software developers can now reuse algorithms across languages rather than re-implementing them, enhancing efficiency and collaboration.