matchms

Compute cosine-based spectral similarity scores for LC-MS/MS metabolomics library matching.

4|Updated Mar 2, 2026
One-click install
npx skills add https://github.com/shushuzn/Rairos --skill matchms-shushuzn
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: matchms
Source: https://github.com/shushuzn/Rairos/tree/main/skills/matchms
Command: npx skills add https://github.com/shushuzn/Rairos --skill matchms-shushuzn

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Matchms helps you compare mass spectra to find the most likely compounds by scoring spectral similarity, cleaning and harmonizing metadata, and searching against reference spectral libraries.

Core Features & Use Cases

  • Spectral import/export: Load spectra from mzML/mzXML, MGF, MSP, JSON (GNPS), and more, then save processed results back to shareable formats.
  • Peak and metadata preprocessing: Apply default harmonization, normalize intensities, filter peaks, and enforce quality thresholds before scoring.
  • Spectral similarity and identification: Compute cosine-based and precursor-aware similarities to rank candidate matches for unknown compounds.
  • Library search workflows: Run end-to-end pipelines for library matching, quality control, and large-scale comparisons.

Quick Start

Use the matchms skill to identify unknown compounds by matching spectra from a query file against a reference library using cosine similarity after applying default filters and normalization.

Frequently Asked Questions about matchms

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I match unknown mass spectra against a reference library to identify metabolites?

To identify metabolites through mass spectra matching, load your unknown query spectra and a reference library, then compute cosine or modified-cosine similarity scores to rank candidate compounds. The workflow requires importing spectral data, harmonizing metadata, and normalizing intensities before calculating precursor-aware similarity scores for downstream reporting.

What mass spectrometry file formats can I import for metabolomics spectral matching?

For metabolomics spectral matching, you can import spectra from mzML, mzXML, MGF, MSP, and JSON (GNPS) formats. After processing and matching, you can export the results back into shareable formats for downstream analysis and reporting.

How do I calculate cosine similarity scores for LC-MS/MS spectral matching?

To calculate cosine similarity scores for LC-MS/MS spectral matching, load your spectra, run metadata harmonization and intensity normalization, and ensure valid precursor metadata for precursor-aware scoring. The process computes cosine, modified-cosine, and neutral-loss similarity scores to rank the best candidate matches.

What peak preprocessing steps are required before searching mass spectral libraries?

Before searching mass spectral libraries, required peak preprocessing steps include applying default metadata harmonization, normalizing intensities, filtering peaks, and enforcing quality thresholds. These steps ensure valid precursor metadata required for accurate precursor-aware similarity scoring.

Can I run large-scale library search workflows for mass spectrometry data?

Yes, you can run end-to-end large-scale library search workflows for mass spectrometry data. The process handles importing common spectral formats, applying preprocessing filters, and computing similarity scores to rank candidate matches across extensive reference libraries.

What's the best way to clean and harmonize metadata for mass spectra before compound identification?

The best way to clean and harmonize metadata for mass spectra before compound identification is applying default harmonization filters, normalizing intensities, and enforcing quality thresholds. This ensures valid precursor metadata required for accurate precursor-aware similarity scoring during spectral matching.