agentsclimarketplace

Similarity score computation

Skill HolobiomicsLab/asb-skill-collections/collections/metabolomics/v2/skills/similarity-score-computation

Use when when you have a query electron ionization mass spectrum (m/z and intensity pairs) and need to identify the most similar spectra from an MSP-formatted spectral library.From its SKILL.md

Install
npx -y skills add HolobiomicsLab/asb-skill-collections --skill similarity-score-computation

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

5.7 KB, 828 tokens by cl100k_base, as published. Nobody here has run it

Similarity-Score Computation for EI Mass Spectral Library Search

License: restricted — no clear open-source license detected for the underlying tool; verify licensing before commercial use or redistribution. <!-- asb-license-banner -->

Summary

Compute normalized similarity scores between a query electron ionization mass spectrum and library entries using the Identity (EI Normal) or Similarity (EI Simple) algorithm. This skill enables ranking of potential compound matches in spectral databases by their computed similarity to the query spectrum.

When to use

When you have a query electron ionization mass spectrum (m/z and intensity pairs) and need to identify the most similar spectra from an MSP-formatted spectral library. Apply this skill when your research goal is to find candidate compound identifications ranked by spectral similarity rather than exact matching.

When NOT to use

  • Input library is not in MSP format or is already in a pre-parsed internal representation
  • Query spectrum is from a different ionization method (e.g., ESI, APCI) — the Identity/Similarity algorithms are designed specifically for electron ionization
  • You require exact nominal mass matches without intensity-weighted similarity scoring

Inputs

  • Query electron ionization mass spectrum (m/z-intensity pairs)
  • MSP-formatted spectral library file

Outputs

  • Ranked table of library matches with computed similarity scores
  • Match metadata (library entry identifier, compound name, score)

How to apply

Load the query EI mass spectrum and parse the spectral library from an MSP file. Apply the Identity (EI Normal) algorithm or Similarity (EI Simple) algorithm to compute similarity scores between the query spectrum and each library entry. The algorithm normalizes peak intensities and matches m/z values according to its specification. Rank library entries by descending similarity score to produce a scored match table. Select the algorithm based on your matching stringency requirements: Identity (EI Normal) typically applies stricter criteria for peak matching than Similarity (EI Simple).

Related tools

  • mssearchr (Implements custom Identity (EI Normal) and Similarity (EI Simple) algorithms for spectral similarity scoring and MSP file I/O) — https://github.com/AndreySamokhin/mssearchr
  • R (Host language and runtime environment for mssearchr package execution)
  • NIST API (Alternative library search backend via external nistms$.exe integration)

Evaluation signals

  • Similarity scores are in a normalized range (typically 0–1 or 0–1000) with no missing or invalid values
  • All library entries produce a score; no entries are silently skipped
  • Ranked output is sorted in descending order by similarity score
  • Top-ranked match has been manually verified against known reference spectra or a ground-truth compound identifier
  • Score distributions and magnitude ranges match expected algorithm behavior (e.g., Identity scores are generally lower/stricter than Similarity scores for the same query-library pair)

Limitations

  • Algorithm is specific to electron ionization mass spectra; not applicable to other ionization techniques
  • Similarity score alone does not guarantee correct compound identification; additional validation against retention time, molecular weight, or orthogonal methods is recommended
  • Performance and accuracy depend on the quality and completeness of the MSP library; sparse or poorly-curated libraries will yield low-confidence matches
  • No changelog is publicly available, limiting traceability of algorithm revisions or bug fixes between package versions

Evidence

  • [other] Task workflow step describing the core algorithm application: "Apply the Identity (EI Normal) algorithm to compute similarity scores between the query spectrum and each library entry, normalizing peak intensities and matching m/z values according to the"
  • [readme] Tool capabilities statement from README: "custom implementation of the Identity (EI Normal) algorithm; custom implementation of the Similarity (EI Simple) algorithm; reading/writing msp files"
  • [intro] Article finding on mssearchr purpose and scope: "The mssearchr package provides tools for conducting library searches against electron ionization mass spectral databases"

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.