Similarity score sorting
Skill HolobiomicsLab/asb-skill-collections/collections/metabolomics/v2/skills/similarity-score-sorting
Use when after a deep-learning model has predicted structural similarity scores between an unknown metabolite's MS/MS spectrum and all known metabolites in a reference database.From its SKILL.md
npx -y skills add HolobiomicsLab/asb-skill-collections --skill similarity-score-sortingAssembled 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.0 KB, 923 tokens by cl100k_base, as published. Nobody here has run it
similarity-score-sorting
Summary
Sort known metabolites by their predicted structural similarity scores to an unknown metabolite in descending order, then select top-ranked candidates above a similarity threshold. This is a critical downstream step in the DeepMASS workflow that converts continuous similarity predictions into an actionable ranked candidate list for metabolite identification.
When to use
Apply this skill after a deep-learning model has predicted structural similarity scores between an unknown metabolite's MS/MS spectrum and all known metabolites in a reference database. Use it when you have a vector of similarity predictions (one score per known metabolite) and need to surface the most likely structural matches for expert curation or downstream validation.
When NOT to use
- Unknown metabolite's MS/MS spectrum has not yet been processed by the deep-learning model; scores do not exist.
- Similarity scores are already provided in pre-ranked format (e.g., already sorted by curator).
- The reference database of known metabolites is empty or unavailable.
Inputs
- Vector of predicted structural similarity scores (one float per known metabolite in reference database)
- Mapping of score indices to known metabolite identifiers
- Optional: similarity threshold parameter (e.g., 0.5–0.9, domain-dependent)
Outputs
- Ranked candidate list with metabolite identifiers, similarity scores, and rank positions
- Optionally: filtered/thresholded subset meeting minimum similarity criterion
How to apply
Load the predicted structural similarity scores for the unknown metabolite against all known metabolites from the deep-learning model output. Sort the known metabolites in descending order by their similarity scores (highest scores first). Apply a similarity threshold to filter candidates (if specified by domain knowledge or cross-validation); retain only metabolites exceeding this cutoff. Assign rank positions to the filtered candidates (1st, 2nd, 3rd, etc.). Output the ranked candidate list with metabolite identifiers, their similarity scores, and rank positions in a structured format (e.g., TSV or JSON) for downstream review or automated matching.
Related tools
- DeepMASS (Deep-learning model that produces structural similarity score predictions; rank method is a downstream component of this workflow) — https://github.com/hcji/DeepMASS
Evaluation signals
- Ranked list is sorted in strictly descending order by similarity score (no inversions).
- All candidates above the similarity threshold are included; all below are excluded (binary filtering).
- Rank positions are consecutive integers starting from 1, with no gaps.
- Metabolite identifiers match the reference database and are not duplicated.
- Score and identifier correspondence is preserved (no misalignment between score and metabolite ID).
Limitations
- The quality of ranking depends entirely on the accuracy of the upstream deep-learning model's similarity predictions; poor model calibration will produce misleading rank orders.
- Threshold selection is not automated in the described workflow; domain expertise or cross-validation is needed to set an appropriate cutoff.
- The original DeepMASS package dataset (MetDNA) was removed from the repository; users must train models on in-house or public databases, limiting reproducibility.
- Ranking does not account for additional features (e.g., chemical prior, fragmentation plausibility) beyond learned similarity; tie-breaking or secondary ranking criteria are not described.
Evidence
- [other] Load the unknown metabolite's predicted similarity scores to all known metabolites from the deep-learning model output.: "Load the unknown metabolite's predicted similarity scores to all known metabolites from the deep-learning model output."
- [other] Sort the known metabolites by their predicted structural similarity scores in descending order.: "Sort the known metabolites by their predicted structural similarity scores in descending order."
- [other] Select the top-ranked candidates (filtering by a similarity threshold if applicable) and assign rank positions.: "Select the top-ranked candidates (filtering by a similarity threshold if applicable) and assign rank positions."
- [readme] a rank method for picking out the possible candidate structures of the unknowns: "a rank method for picking out the possible candidate structures of the unknowns"
- [readme] DeepMASS is a known-to-unknown metabolite identification workflow, which includes a deep-learning based model to predict structural similarity between the unknown metabolites and the known ones based on their MS/MS spectra: "DeepMASS is a known-to-unknown metabolite identification workflow, which includes a deep-learning based model to predict structural similarity between the unknown metabolites and the known ones based"
What ships with it
Read from the repository
Just SKILL.md. No reference files, no scripts.