MS2LDA is an advanced tool designed for unsupervised substructure discovery in mass spectrometry data, utilizing topic modeling and providing automated annotation of discovered motifs. This tool significantly enhances the capabilities described in the original MS2LDA paper (2016), offering users an integrated workflow with improved usability, detailed visualizations, and a searchable motif database (MotifDB).
Mass spectrometry fragmentation patterns hold abundant structural information vital for analytical chemistry, natural product research, and food safety assessments. However, interpreting this data remains challenging, and only a fraction of available information is traditionally utilized. MS2LDA addresses this by identifying recurring substructures (motifs) across spectral datasets without relying on prior compound identification, thus accelerating structure elucidation and analysis.
You can install MS2LDA using pip, Conda, or Poetry, depending on your preferences and requirements.
pip install ms2ldaGet started with MS2LDA in minutes! See the Quick Start Guide for step-by-step instructions using Conda, Poetry, or virtualenv.
For more detailed installation options and development setup:
- Conda Installation Guide - Uses Conda environment management.
- Poetry Installation Guide - Uses Poetry for dependency management (recommended for developers).
MS2LDA provides powerful command-line tools for batch processing and analysis of mass spectrometry data.
For detailed instructions on using the command-line interface, see the Command Line Tool Guide.
MS2LDA includes a web-based visualization application (MS2LDAViz) for exploring and analyzing results.
For instructions on starting and using the visualization application, see the MS2LDAViz Guide.
Our comprehensive documentation includes:
- Getting started guides
- API reference
- Tutorials and examples
- Parameter settings and advanced usage
Please cite our work if you use MS2LDA in your research:
Torres Ortega, L.R., Dietrich, J., Wandy, J., Mol, H., & van der Hooft, J.J.J. (2025). Large-scale discovery and annotation of hidden substructure patterns in mass spectrometry profiles. bioRxiv. doi: https://doi.org/10.1101/2025.06.19.659491


