How vdhooftcompmet/ms2lda works
MS2LDA discovers recurring substructures in mass-spectrometry spectra through preprocessing and topic modeling, then supports motif annotation and exploration. The repository includes both a command-line analysis route and the MS2LDAViz web application, plus a MassQL query engine for motif-oriented spectral searches. The README documents these capabilities, while the sampled source is partial; links among unsampled subsystems are therefore shown only where the tree and documented workflow support them.
Main entry points: app.py MS2LDAViz app · Mass2Motif.py Motif representation · run.py Analysis runner · callbacks UI callbacks
Components 26
Analysis
- CLI runner
scripts/ms2lda_runfull.py - Analysis runner
MS2LDA/run.py - Load and clean
MS2LDA/Preprocessing/load_and_clean.py - Corpus generation
MS2LDA/Preprocessing/generate_corpus.py - Topic modeling
MS2LDA/modeling.py - Motif representation
MS2LDA/Mass2Motif.py - Motif documents
MS2LDA/Mass2MotifDocument.py
Motif Annotation
- Motif screening
MS2LDA/Add_On/NTS/Screening.py - Spec2Vec annotation
MS2LDA/Add_On/Spec2Vec - Fingerprint annotation
MS2LDA/Add_On/Fingerprints - Motif MassQL
MS2LDA/Add_On/MassQL/MassQL4MotifDB.py
Exploration
- MS2LDAViz app
App/app.py - UI callbacks
App/callbacks - Run analysis tab
App/layout/run_analysis.py - Load results tab
App/layout/load_results.py - Motif rankings
App/layout/motif_rankings.py - Motif details
App/layout/motif_details.py - Network view
App/layout/network_view.py - Visualizations
MS2LDA/Visualisation/visualisation.py
Spectral Queries
- Spectra search tab
App/layout/spectra_search.py - MassQL parser
massql4motifs/msql_parser.py - Query engine
massql4motifs/msql_engine.py - Query filters
massql4motifs/msql_engine_filters.py - Spectra loader
massql4motifs/msql_fileloading.py
Other components
- Researcher
- Spectra data
Connections 24
- Researcher → CLI runner: runs analysis
- Researcher → MS2LDAViz app: explores results
- Spectra data → Analysis runner: input spectra
- CLI runner → Analysis runner: invokes
- Analysis runner → Load and clean: preprocesses
- Load and clean → Corpus generation: builds corpus
- Analysis runner → Topic modeling: runs model
- Topic modeling → Motif representation: produces motifs
- MS2LDAViz app → Run analysis tab: presents
- MS2LDAViz app → Load results tab: presents
- MS2LDAViz app → Motif rankings: presents
- MS2LDAViz app → Motif details: presents
- MS2LDAViz app → Network view: presents
- MS2LDAViz app → Spectra search tab: presents
- MS2LDAViz app → UI callbacks: registers callbacks
- UI callbacks → Motif screening: screens motifs
- UI callbacks → Visualizations: requests plots
- Motif representation → Spec2Vec annotation: annotated by
- Motif representation → Fingerprint annotation: annotated by
- Motif representation → Motif MassQL: searched by
- Spectra search tab → MassQL parser: submits query
- MassQL parser → Query engine: parses to
- Query engine → Query filters: applies filters
- Query engine → Spectra loader: loads spectra