matchms

Import mass spectrometry spectra from mzML, mgf, MSP, and GNPS JSON formats.

15|2|Updated Dec 17, 2025
One-click install
npx skills add https://github.com/rubensliv/k-dense-ai --skill matchms-rubensliv
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: matchms
Source: https://github.com/rubensliv/k-dense-ai/tree/main/scientific-skills/matchms
Command: npx skills add https://github.com/rubensliv/k-dense-ai --skill matchms-rubensliv

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Mass spectrometry data analysis requires robust tooling to import, harmonize metadata, compare samples, and identify compounds across large libraries.

Core Features & Use Cases

  • Import and standardize spectra from mzML, mgf, MSP, and GNPS-compatible JSON formats.
  • Compute multiple spectral similarity metrics (CosineGreedy, CosineHungarian, ModifiedCosine, NeutralLossesCosine) and drive reproducible workflows.
  • Support pipelines for large-scale library searches, metadata enrichment, and cross-platform data exchange.

Quick Start

Load spectra from supported formats (mzML, mgf, MSP, JSON) and run CosineGreedy to identify top matches against a reference library.

Frequently Asked Questions about matchms

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

FAQPage Schema
How do I compute cosine similarity for mass spectrometry data?

To compute cosine similarity for mass spectrometry data, load spectra from mzML, mgf, MSP, or GNPS JSON formats and apply metrics like CosineGreedy, CosineHungarian, or ModifiedCosine to identify top matches against a reference library.

What is spectral library matching and how does metadata harmonization work?

Spectral library matching compares query spectra against references using similarity metrics. Metadata harmonization standardizes cross-platform mass spectrometry data imports to ensure reproducible compound identification workflows.

Can I run large-scale library searches on mzML and MSP files?

Yes, you can run large-scale library searches on mzML and MSP files. The system supports scalable pipelines for spectral matching, metadata enrichment, and cross-platform data exchange across mass spectrometry datasets.

Does this approach support NeutralLossesCosine and other pluggable similarity functions?

Yes, it supports NeutralLossesCosine and other pluggable similarity functions. The modular design allows optional components directories for scripts and references, enabling custom similarity functions and reproducible workflows.

What is the best way to standardize spectra from GNPS JSON for cross-platform analysis?

The best way to standardize spectra from GNPS JSON is using the built-in import and filtering capabilities. This harmonizes metadata and enables cross-platform data exchange for downstream mass spectrometry analysis.

When should I use ModifiedCosine instead of CosineGreedy for spectral analysis?

Use ModifiedCosine instead of CosineGreedy when comparing spectra with expected chemical modifications. Both are available similarity metrics, alongside CosineHungarian, to drive reproducible workflows depending on your specific compound matching needs.