MS2 spectral similarity scoring for ion-pair confirmation
Summary
Compute cosine similarity or related spectral matching scores between MS2 fragment ion profiles to confirm that candidate ion-species pairs originate from the same analyte compound. This is the final refinement step in a three-stage DBDIpy identification pipeline following temporal correlation and exact mass difference analysis.
When to use
After temporal intensity profile correlation and exact mass difference refinement have identified candidate ion-species pairs in direct-injection plasma ionization MS data (e.g., DBDI-MS, DBDI-FT-ICR-MS). Use this skill when MS2 fragment spectra are available for the candidate pairs and you need to confirm shared analyte origin rather than false positives from mass or temporal coincidence alone.
When NOT to use
- MS2 fragmentation data are not available or unreliable (e.g., low signal-to-noise ratio, insufficient fragment peaks)
- Candidate pairs come from methods that already enforce orthogonal confirmation (e.g., paired chromatography or isotope labeling)
- Input data are already curated feature tables without raw MS spectra or fragment ion information
Inputs
- MS2 spectral data (fragment m/z-intensity pairs for each precursor ion)
- Candidate ion-species pair list (output from mass difference refinement step)
- Preprocessed feature table with imputed intensities
- Mass spectrometric parameters (e.g., resolution, fragmentation method)
Outputs
- Annotated candidate pair table with MS2 spectral similarity scores
- Confirmation status (binary: confirmed/unconfirmed) per pair
- Filtered list of confirmed shared-analyte ion pairs
- Summary metrics of similarity score distribution
How to apply
Extract and preprocess MS2 fragment spectra for each candidate ion-species pair (normalize intensity, remove noise). Calculate MS2 spectral similarity score using cosine similarity or equivalent spectral matching algorithm between the normalized fragment profiles of the pair. Annotate each pair with its similarity score and apply an acceptance threshold (e.g., cosine similarity > 0.7 or equivalent) to flag pairs as confirmed shared-analyte relationships. Generate an output table mapping candidate pairs to their spectral similarity scores and confirmation status. This third step is critical because direct-injection data lacks chromatographic separation, making temporal and mass information alone insufficient to distinguish true adducts/fragments from unrelated features.
Related tools
- DBDIpy (Core library implementing the three-step identification procedure; wraps MS2 spectral similarity scoring step after temporal correlation and mass difference analysis) — https://github.com/leopold-weidner/DBDIpy
- matchms (Ecosystem library integrated into DBDIpy for MS data handling, spectral alignment, and spectral matching algorithms)
- Python (Programming language; required runtime for DBDIpy and spectral similarity calculations)
Evaluation signals
- All candidate pairs from the input list are assigned a numeric similarity score (no missing values)
- Similarity scores fall within the expected range for the algorithm used (0–1 for cosine similarity)
- Output table row count matches input candidate pair count
- Confirmed pairs exhibit visually or statistically coherent fragment patterns when compared side-by-side
- Threshold acceptance rate is within expected range given the precision of prior correlation and mass difference steps (e.g., >50% confirmation typical for high-confidence candidates)
Limitations
- MS2 spectral similarity scoring depends on quality and completeness of fragment ion data; low signal-to-noise spectra or sparse fragmentation may yield unreliable scores
- Cosine similarity and related metrics assume that similar fragments indicate shared analyte origin, but can fail if two different compounds produce accidentally similar fragmentation patterns
- Threshold selection is user-defined; no universally optimal cutoff is provided; performance is sensitive to choice of acceptance threshold
- Direct-injection data inherently lack chromatographic separation, so multiple analytes can co-ionize and generate spurious fragment overlaps despite temporal correlation steps
Evidence
- [other] DBDIpy implements a three-step identification procedure in which MS2 spectral similarity scoring is the final step: "DBDIpy implements a three-step identification procedure in which MS2 spectral similarity scoring is the final step, following pointwise correlation analysis of temporal intensity profiles and exact"
- [other] Extract, preprocess, calculate cosine similarity, annotate and flag pairs, generate output table: "For each candidate pair, extract and preprocess the corresponding MS2 fragment spectra (normalize intensity, remove noise). 3. Calculate MS2 spectral similarity score using cosine similarity or"
- [readme] Identifies multiple ion species from one analyte compound in time-resolved plasma ionization datasets: "in-silico approach to putatively identify multiple ion species arising from one analyte compound specially tailored for time-resolved datasets from plasma ionization techniques"
- [readme] Three-step procedure refines two-step search algorithm with MS2 spectral similarity scoring: "modification of the former two-step search algorithm towards refinement by MS2 spectral similarity scoring"
- [readme] Direct-injection MS data lack chromatographic separation, complicating identification of fragments and adducts: "Mass spectrometric data from direct injection analysis is hard to interpret as missing chromatographic separation complicates identification of fragments and adducts"
1---2name: ms2-spectral-similarity-scoring3description: Use when after temporal intensity profile correlation and exact mass difference refinement have identified candidate ion-species pairs in direct-injection plasma ionization MS data (e.g., DBDI-MS, DBDI-FT-ICR-MS).4license: CC-BY-4.05---67# MS2 spectral similarity scoring for ion-pair confirmation89## Summary1011Compute cosine similarity or related spectral matching scores between MS2 fragment ion profiles to confirm that candidate ion-species pairs originate from the same analyte compound. This is the final refinement step in a three-stage DBDIpy identification pipeline following temporal correlation and exact mass difference analysis.1213## When to use1415After temporal intensity profile correlation and exact mass difference refinement have identified candidate ion-species pairs in direct-injection plasma ionization MS data (e.g., DBDI-MS, DBDI-FT-ICR-MS). Use this skill when MS2 fragment spectra are available for the candidate pairs and you need to confirm shared analyte origin rather than false positives from mass or temporal coincidence alone.1617## When NOT to use1819- MS2 fragmentation data are not available or unreliable (e.g., low signal-to-noise ratio, insufficient fragment peaks)20- Candidate pairs come from methods that already enforce orthogonal confirmation (e.g., paired chromatography or isotope labeling)21- Input data are already curated feature tables without raw MS spectra or fragment ion information2223## Inputs2425- MS2 spectral data (fragment m/z-intensity pairs for each precursor ion)26- Candidate ion-species pair list (output from mass difference refinement step)27- Preprocessed feature table with imputed intensities28- Mass spectrometric parameters (e.g., resolution, fragmentation method)2930## Outputs3132- Annotated candidate pair table with MS2 spectral similarity scores33- Confirmation status (binary: confirmed/unconfirmed) per pair34- Filtered list of confirmed shared-analyte ion pairs35- Summary metrics of similarity score distribution3637## How to apply3839Extract and preprocess MS2 fragment spectra for each candidate ion-species pair (normalize intensity, remove noise). Calculate MS2 spectral similarity score using cosine similarity or equivalent spectral matching algorithm between the normalized fragment profiles of the pair. Annotate each pair with its similarity score and apply an acceptance threshold (e.g., cosine similarity > 0.7 or equivalent) to flag pairs as confirmed shared-analyte relationships. Generate an output table mapping candidate pairs to their spectral similarity scores and confirmation status. This third step is critical because direct-injection data lacks chromatographic separation, making temporal and mass information alone insufficient to distinguish true adducts/fragments from unrelated features.4041## Related tools4243- **DBDIpy** (Core library implementing the three-step identification procedure; wraps MS2 spectral similarity scoring step after temporal correlation and mass difference analysis) — https://github.com/leopold-weidner/DBDIpy44- **matchms** (Ecosystem library integrated into DBDIpy for MS data handling, spectral alignment, and spectral matching algorithms)45- **Python** (Programming language; required runtime for DBDIpy and spectral similarity calculations)4647## Evaluation signals4849- All candidate pairs from the input list are assigned a numeric similarity score (no missing values)50- Similarity scores fall within the expected range for the algorithm used (0–1 for cosine similarity)51- Output table row count matches input candidate pair count52- Confirmed pairs exhibit visually or statistically coherent fragment patterns when compared side-by-side53- Threshold acceptance rate is within expected range given the precision of prior correlation and mass difference steps (e.g., >50% confirmation typical for high-confidence candidates)5455## Limitations5657- MS2 spectral similarity scoring depends on quality and completeness of fragment ion data; low signal-to-noise spectra or sparse fragmentation may yield unreliable scores58- Cosine similarity and related metrics assume that similar fragments indicate shared analyte origin, but can fail if two different compounds produce accidentally similar fragmentation patterns59- Threshold selection is user-defined; no universally optimal cutoff is provided; performance is sensitive to choice of acceptance threshold60- Direct-injection data inherently lack chromatographic separation, so multiple analytes can co-ionize and generate spurious fragment overlaps despite temporal correlation steps6162## Evidence6364- [other] DBDIpy implements a three-step identification procedure in which MS2 spectral similarity scoring is the final step: "DBDIpy implements a three-step identification procedure in which MS2 spectral similarity scoring is the final step, following pointwise correlation analysis of temporal intensity profiles and exact"65- [other] Extract, preprocess, calculate cosine similarity, annotate and flag pairs, generate output table: "For each candidate pair, extract and preprocess the corresponding MS2 fragment spectra (normalize intensity, remove noise). 3. Calculate MS2 spectral similarity score using cosine similarity or"66- [readme] Identifies multiple ion species from one analyte compound in time-resolved plasma ionization datasets: "in-silico approach to putatively identify multiple ion species arising from one analyte compound specially tailored for time-resolved datasets from plasma ionization techniques"67- [readme] Three-step procedure refines two-step search algorithm with MS2 spectral similarity scoring: "modification of the former two-step search algorithm towards refinement by MS2 spectral similarity scoring"68- [readme] Direct-injection MS data lack chromatographic separation, complicating identification of fragments and adducts: "Mass spectrometric data from direct injection analysis is hard to interpret as missing chromatographic separation complicates identification of fragments and adducts"