msiFlow 2.0: Extending Mass Spectrometry Imaging Workflows with Mass Recalibration, Annotation, Batch Correction, and Visual Quality Control
Mass spectrometry imaging (MSI) enables label-free, spatially resolved molecular profiling of tissues and cells, providing insights into physiological and pathological processes. However, its large and complex datasets require specialised computational approaches. We recently introduced msiFlow, an open source, end-to-end solution for reproducible and scalable MSI data analysis. Here, we present msiFlow 2.0, a major extension that integrates pixel-wise post-acquisition mass recalibration, automated lipid annotation, batch correction, and visual quality control, together with improved alignment, spatially informed deisotoping, and computational scalability. The workflow was evaluated using four human and mouse MALDI-2 and t-MALDI-2 MSI lipidomic datasets encompassing different biological conditions, sample types, and spatial resolutions. The updated computational mass recalibration and alignment workflow significantly improved mass accuracy of reported m/z values by correcting systematic mass deviations, achieving a mean absolute mass error below 1.5 ppm for independent MS/MS-supported lipid features. The integrated lipid annotation module reduced the number of unsupported candidate lipid assignments, while ComBat correction reduced sample-associated variation and retained separation of tissue compartments. Computational optimisation reduced alignment runtime by approximately 80%. Together, these advances provide an accurate, transparent, and scalable open-source framework for MSI data processing and downstream analysis.