Rapid spectrum retrieval optimization
Curated, evidence-grounded skill and software-tool collections for scientific AI agents, generated by the AgenticScienceBuilder
npx -y skills add HolobiomicsLab/asb-skill-collections --skill rapid-spectrum-retrieval-optimizationAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 14 stars14 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 author says it does
Copied from the file, not written here
Use when you have a large collection of mass spectrometry spectra (m/z and intensity pairs) and need to rapidly retrieve similar or candidate spectra from the archive in response to queries.
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, ~1.1k tokens by cl100k_base, as published. Nobody here has run it
rapid-spectrum-retrieval-optimization
Summary
Apply locality-sensitive hashing (LSH) to mass spectrometry spectral data to organize m/z and intensity pairs into indexed buckets, enabling sub-linear query time for spectrum retrieval. This skill trades indexing overhead for dramatic speedup in matching or searching large spectral archives.
When to use
You have a large collection of mass spectrometry spectra (m/z and intensity pairs) and need to rapidly retrieve similar or candidate spectra from the archive in response to queries. LSH is the right choice when linear scan is too slow, exact matching is not required, and approximate nearest-neighbor retrieval is acceptable. Use this when spectral data volume or query throughput makes pre-computed distance matrices infeasible.
When NOT to use
- Spectra are already pre-filtered or subset to a small set where linear scan is acceptable (< 10⁴ spectra).
- Exact nearest-neighbor results are mandatory and approximate retrieval is not tolerable.
- Spectrum vectorization or normalization is not feasible or domain-appropriate.
Inputs
- mass spectrometry spectral data (m/z and intensity pairs)
- vectorized spectrum representation (binary or real-valued feature vector)
- LSH parameter specification (number of hash tables, hash functions per table, bucket width)
Outputs
- LSH index (serialized hash function parameters, bucket assignments, and spectrum-to-bucket mappings)
- query result set: candidate spectra retrieved from LSH buckets
- model file containing indexed LSH structure
How to apply
Load mass spectrometry spectral data as m/z and intensity pairs and normalize or vectorize each spectrum into a feature representation (e.g., binary or real-valued vector). Initialize LSH hash functions with tuned parameters: number of hash tables (controls recall vs. space trade-off), hash functions per table (affects bucket granularity), and bucket width (controls collision probability). Compute hash values for each spectrum across all hash tables and assign each to corresponding buckets in the LSH index. Serialize the LSH index (hash function parameters, bucket assignments, and spectrum-to-bucket mappings) to a model file. At query time, hash the query spectrum using the same functions and retrieve all candidate spectra from the corresponding buckets, avoiding full-distance computation against the entire archive.
Related tools
- mzBucket (LSH implementation for mass spectrometry spectral indexing and retrieval) — https://github.com/hildebrandtlab/mzBucket
- pyproteolizard-algorithm (Provides LSH algorithm component for spectrum hashing and bucketing) — https://github.com/theGreatHerrLebert/proteolizard-algorithm
- pyproteolizard-data (Data access and spectrum loading for LSH indexing pipeline) — https://github.com/theGreatHerrLebert/proteolizard-data
Evaluation signals
- LSH index is successfully serialized and loads without error; hash function parameters and bucket assignments are consistent with input specification.
- Query retrieval time (including hashing) is sub-linear in archive size; typical speedup of 10–100× relative to brute-force distance search.
- Recall (fraction of true nearest neighbors found in LSH candidates) meets or exceeds target threshold (typically 0.8–0.95), determined by parameter tuning against a ground-truth set.
- Bucket occupancy is approximately uniform across hash tables; severe skew (e.g., > 5:1 ratio) indicates poor parameter choice or inadequate data normalization.
- Spectrum-to-bucket mappings are deterministic: identical spectra always hash to identical buckets; re-indexing the same data produces identical index structure.
Limitations
- LSH quality depends critically on vectorization choice and parameter tuning; poor vector representation or suboptimal hash table/function counts degrade recall and retrieval speed.
- High-dimensional spectra may suffer from the curse of dimensionality; bucket width and collision rates must be empirically validated on representative data.
- Serialized index is specific to the hash function family and parameters; regeneration is required if parameters change or new spectra are added to the archive.
- No built-in mechanism for incremental index updates; batch reindexing is necessary when the spectral archive grows significantly.
Evidence
- [intro] Locality-sensitive hashing as a mechanism for organizing mass spectrometry data.: "mzBucket implements locality-sensitive hashing as a mechanism for organizing mass spectrometry data."
- [methods] Core LSH workflow for spectra: normalization, hash function setup, bucket assignment, and serialization.: "1. Load mass spectrometry spectral data (m/z and intensity pairs). 2. Normalize or vectorize each spectrum into a representation suitable for LSH (e.g., binary or real-valued feature vector). 3."
- [readme] LSH is applied to mass spectrometry data for efficient retrieval.: "Locality-sensitive hashing for mass spectrometry data."
- [readme] Implementation migration to proteolizard framework for LSH components.: "The implementation has been updated and shifted to the proteolizard framework, more precisely the components pyproteolizard-data for data-access and pyproteolizard-algorithm for the LSH."
What ships with it
Read from the repository
Just SKILL.md. No reference files, no scripts.