agentsclimarketplace

Spectral similarity scoring ei simple

Skill HolobiomicsLab/asb-skill-collections/packs/metabolomics/gc-ms/skills/spectral-similarity-scoring-ei-simple

Use when you have a query electron ionization (EI) mass spectrum and need to search it against a library of known EI mass spectra to identify unknown compounds. Use it when exact identity matching (e.From its SKILL.md

Install
npx -y skills add HolobiomicsLab/asb-skill-collections --skill spectral-similarity-scoring-ei-simple

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • 15 stars15 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

What its file declares

Copied from the file, not written here

The file declares its own license as CC-BY-4.0. That is the author’s claim about this one file, and it is not the same thing as the license GitHub reports for the repository, which is listed with the other numbers below.

SKILL.md

6.4 KB, 977 tokens by cl100k_base, as published. Nobody here has run it

Spectral Similarity Scoring (EI Simple)

Summary

The Similarity (EI Simple) algorithm computes pairwise similarity scores between a query electron ionization mass spectrum and library entries to identify and rank matching compounds. It is a core method for unbiased library searching in mass spectrometry when the query spectrum is not an exact match to any library entry.

When to use

Apply this skill when you have a query electron ionization (EI) mass spectrum and need to search it against a library of known EI mass spectra to identify unknown compounds. Use it when exact identity matching (e.g., via the Identity/EI Normal algorithm) fails or when you want ranked similarity scores across all library entries rather than only perfect matches.

When NOT to use

  • When you need to identify a spectrum that matches a known library entry exactly — use the Identity (EI Normal) algorithm instead.
  • When your input spectra are not electron ionization (EI) spectra (e.g., ESI, APCI, or other ionization modes).
  • When the query spectrum is already preprocessed into a pre-computed feature or similarity vector — this skill operates on raw m/z and intensity data.

Inputs

  • Query electron ionization mass spectrum (m/z and intensity pairs)
  • MSP library file (mass spectrum database in msp format)

Outputs

  • Ranked list of library matches with similarity scores
  • Pairwise similarity score matrix (query vs. library entries)

How to apply

Load the query EI mass spectrum and an msp library file using mssearchr's msp file reading functionality. Parse both spectra to extract m/z and intensity pairs. Implement or invoke the Similarity (EI Simple) algorithm to compute pairwise similarity scores between the query spectrum and each library entry. The algorithm compares spectral peaks (m/z and intensity) according to the EI Simple scoring scheme; higher scores indicate greater spectral resemblance. Return a ranked list or table of library matches ordered by similarity score (descending). Evaluate the quality of matches by examining the top-ranked candidates and their similarity scores to determine confidence in the assignment.

Related tools

  • mssearchr (Provides custom implementation of the Similarity (EI Simple) algorithm and msp file parsing for library search workflows in R) — https://github.com/AndreySamokhin/mssearchr
  • R (Computational environment for executing mssearchr workflows and manipulating similarity score results)
  • NIST API (Alternative library search backend for electron ionization mass spectra accessible via mssearchr)

Evaluation signals

  • Similarity scores are returned for all library entries (no missing values for valid spectra pairs).
  • Scores are numeric and bounded in the expected range for the EI Simple metric (typically 0–1 or 0–999 depending on implementation); inspect raw output to confirm normalization.
  • Top-ranked library matches align with expected compound identification based on experimental context (e.g., retention time, sample history, known constituents).
  • The ranked list is ordered in descending order of similarity score with no ties or inversions that violate the ordering.
  • Query spectrum and at least one library entry produce non-zero similarity scores (confirming algorithm executed and scored matches).

Limitations

  • The Similarity (EI Simple) algorithm is specific to electron ionization mass spectra; it is not applicable to spectra from other ionization modes.
  • Similarity scores depend on the quality and completeness of the library database; missing or poorly annotated library entries can reduce match reliability.
  • The algorithm does not account for retention time, isotope patterns, or other orthogonal information; it scores only on m/z and intensity.
  • No changelog is available for the mssearchr package, limiting visibility into algorithm refinements or bug fixes across versions.

Evidence

  • [intro] custom implementation of the Similarity (EI Simple) algorithm: "The mssearchr package offers the following tools: - custom implementation of the Similarity (EI Simple) algorithm"
  • [intro] library searches against electron ionization mass spectral databases: "The primary goal of the mssearchr package is to enhance the capabilities of R users for conducting library searches against electron ionization mass spectral databases."
  • [other] Parse both spectra to extract m/z and intensity pairs; Implement the Similarity (EI Simple) algorithm to compute pairwise similarity scores: "Parse both spectra to extract m/z and intensity pairs. 3. Implement the Similarity (EI Simple) algorithm to compute pairwise similarity scores between the query spectrum and each library entry."
  • [other] Return a ranked list or table of library matches with their corresponding similarity scores: "Return a ranked list or table of library matches with their corresponding similarity scores."
  • [readme] reading/writing msp files: "- reading/writing msp files."

What ships with it

Read from the repository

Just SKILL.md. No reference files, no scripts.

Keep looking

Skills are one crate of 325,949. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.