DOI: 10.3390/analytica7040087 ISSN: 2673-4532

COSine: An Open, GUI-Based Tool for Robust Cosine-Similarity Scoring and Mirror Plotting of High-Resolution Mass Spectra Matching

Rajneesh Kumar Gautam, Javad Mottaghipisheh, Lutz Ahrens

Accurate and reproducible comparison of high-resolution tandem mass spectra is essential for suspect and non-target screening workflows. Although cosine similarity scoring and its variants are widely used for spectral library searches, practical comparability is often limited by non-transparent preprocessing decisions, proprietary text formats, parsing challenges, and inconsistent peak-matching criteria. This study presents COSine, a Java-based desktop application that makes parsing, normalization, tolerance selection, peak matching, and scoring inspectable. COSine v1.7.3 reads experimental MS2 fragmentation spectra from CSV/TXT and predicted MS2 fragmentation spectra from CSV or CFM-ID TXT files directly, retains source-precision m/z values, supports explicit Da or ppm tolerances and collision-energy handling, and reports standard, square-root, weighted, binary, and reverse cosine scores with matched-peak tables and mirror plots. Eight compounds are retained as illustrative case studies. A retrospective, nonblind closed-set analysis across all 23 available identity-matched pairs and 246 same-polarity nonmatching pairs yielded 19/23 top-1 and 20/23 top-5 retrieval, with a pair-level square-root-cosine ROC AUC of 0.931. By making spectral-matching decisions explicit and inspectable, COSine supports reproducible interpretation of LC-HRMS/MS spectra while its scores remain descriptive evidence rather than standalone identification thresholds.

More from our Archive