matchms

Compare mass spectra to reference libraries using multiple similarity metrics.

321|26|Updated Mar 10, 2026
One-click install
npx skills add https://github.com/mkurman/tamux --skill matchms-mkurman
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: matchms
Source: https://github.com/mkurman/tamux/tree/main/skills/scientific-skills/matchms
Command: npx skills add https://github.com/mkurman/tamux --skill matchms-mkurman

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Mass spectrometry data analysis requires reliable methods to compare spectra and identify compounds across libraries.

Core Features & Use Cases

  • Import spectra from standard formats, harmonize metadata, and compute multiple similarity scores (CosineGreedy, CosineHungarian, ModifiedCosine, NeutralLossesCosine).
  • Build reproducible pipelines that combine metadata processing, peak filtering, and annotation, enabling large-scale library searching and unknown-spectrum identification.
  • Use cases include metabolomics metabolite identification, spectral library matching, and cross-study comparisons.

Quick Start

Load a spectral library and a set of unknown spectra, then run a CosineGreedy comparison to obtain top matches.

Frequently Asked Questions about matchms

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

FAQPage Schema
How do I identify unknown metabolites using mass spectrometry spectral matching?

Spectral matching identifies unknown metabolites by comparing unknown mass spectrometry spectra against reference libraries using similarity scoring. Matchms supports this library-search workflow by importing spectra, harmonizing metadata, and computing similarity scores like CosineGreedy to return top compound matches.

What is the difference between CosineGreedy and ModifiedCosine for spectral similarity scoring?

Spectral similarity scoring in matchms offers multiple metrics for compound identification. CosineGreedy provides standard cosine similarity, while ModifiedCosine allows shifted peak matching to tolerate precursor ion differences. Additional options include CosineHungarian and NeutralLossesCosine for varied structural comparison.

Do I need rdkit and numpy to run compound identification pipelines?

Compound identification requires a Python environment with numpy. Optional chemistry tools like rdkit are needed to enable fingerprinting and structure-aware features, but basic spectral matching and similarity scoring can function without them.

How do I build reproducible metabolomics pipelines for large-scale spectral library searching?

Reproducible metabolomics pipelines are built by combining metadata processing, peak filtering, and annotation steps. Matchms enables large-scale spectral library searching by harmonizing metadata and applying similarity scoring across unknown spectra and reference libraries.

What's the best way to compare mass spectrometry spectra across different metabolomics studies?

Cross-study comparison of mass spectrometry spectra requires harmonizing metadata and applying consistent similarity metrics. Matchms enables this by importing standard spectral formats, normalizing metadata, and computing similarity scores like NeutralLossesCosine across datasets.

Can I use matchms for metabolomics metabolite identification without a reference library?

Metabolite identification relies on comparing unknown spectra to reference libraries to find matches. Without a reference library, matchms can still harmonize spectral data and compute similarity between unknown spectra, but compound identification requires known reference spectra.