How vdhooftcompmet/mosaic-ms works
Mosaic-MS turns input mass spectra into molecular networks, discovers MS2LDA motifs, maps structural candidates with SNAP-MS, and integrates those annotations into Cytoscape CX graphs. The CLI dispatches each stage and offers an end-to-end workflow. The graph follows the documented stages and sampled call sites; implementation details for some subsystems are unsampled, so their internal wiring is shown only where README documentation supports it.
Main entry points: cx.py CX I/O · cli.py CLI and workflow · snapms/main.py SNAP-MS workflow · add_ms2lda/main.py Motif integration
Components 22
Pipeline entry
- CLI and workflow
src/cli.py
Molecular networking
- Network workflow
src/mn/main.py - Similarity bootstrap
src/mn/bootstrap.py - Graph construction
src/mn/network.py - CX I/O
src/utils/cx.py
Motif discovery
- MS2LDA workflow
src/ms2lda/main.py - Spectrum preprocessing
src/ms2lda/preprocessing.py - Motif model
src/ms2lda/lda.py - Model and motif storage
src/ms2lda/storage.py
Structural annotation
- SNAP-MS workflow
src/snapms/main.py - Mass matching
src/snapms/masses.py - Candidate families
src/snapms/network.py - Motif integration
src/add_ms2lda/main.py - SNAP-MS integration
src/add_snapms/main.py
Other components
- Researcher
- MGF spectra
- Molecular network
results - Model and motifs
results - Reference structures
- SNAP-MS graphs
results - Enriched CX graph
results - Cytoscape user
Connections 30
- Researcher → CLI and workflow: runs command
- MGF spectra → Network workflow: provides spectra
- MGF spectra → MS2LDA workflow: provides spectra
- CLI and workflow → Network workflow: dispatches
- CLI and workflow → MS2LDA workflow: dispatches
- CLI and workflow → SNAP-MS workflow: dispatches
- CLI and workflow → Motif integration: dispatches
- CLI and workflow → SNAP-MS integration: dispatches
- Network workflow → Similarity bootstrap: calculates similarities
- Network workflow → Graph construction: builds graph
- Network workflow → CX I/O: writes CX
- CX I/O → Molecular network: writes network
- MS2LDA workflow → Spectrum preprocessing: prepares spectra
- MS2LDA workflow → Motif model: trains and extracts
- MS2LDA workflow → Model and motif storage: stores outputs
- Model and motif storage → Model and motifs: writes model and motifs
- SNAP-MS workflow → CX I/O: reads network
- SNAP-MS workflow → Mass matching: matches candidates
- SNAP-MS workflow → Reference structures: loads structures
- SNAP-MS workflow → Candidate families: builds candidate families
- SNAP-MS workflow → CX I/O: writes CX
- CX I/O → SNAP-MS graphs: writes annotations
- Motif integration → CX I/O: reads and writes CX
- Motif integration → Model and motifs: loads model
- Motif integration → Spectrum preprocessing: converts spectra
- Motif integration → Enriched CX graph: adds motif metadata
- SNAP-MS integration → CX I/O: reads and writes CX
- SNAP-MS integration → SNAP-MS graphs: reads annotations
- SNAP-MS integration → Enriched CX graph: adds annotations
- Enriched CX graph → Cytoscape user: opens in