matchms

Rank unknown MS/MS spectra against reference libraries using cosine similarity.

Updated May 24, 2026
One-click install
npx skills add https://github.com/Estrella-231/Mathematical_modeling_tongmeng --skill matchms-estrella-231
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: matchms
Source: https://github.com/Estrella-231/Mathematical_modeling_tongmeng/tree/main/.agents/skills/matchms
Command: npx skills add https://github.com/Estrella-231/Mathematical_modeling_tongmeng --skill matchms-estrella-231

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Matchms streamlines metabolomics mass-spectrometry analysis by standardizing spectra, computing spectral similarity, and matching unknown compounds against reference libraries.

Core Features & Use Cases

  • Spectral import/export: Load spectra from common formats (MGF, mzML, MSP, JSON, pickle) and save processed results for reuse.
  • Preprocessing pipelines: Harmonize metadata, normalize peak intensities, filter peaks, and enforce quality thresholds.
  • Similarity scoring & identification: Compute cosine-based and precursor-aware similarity scores to rank candidate identifications from spectral libraries.
  • Structure/metadata augmentation: Derive InChI/InChIKey/SMILES, generate fingerprints, and enrich spectra for improved matching.

Quick Start

Use the matchms skill to match an unknown spectrum file against a reference spectral library by loading both datasets, applying default preprocessing, computing cosine similarity with an m/z tolerance, and returning the top-scoring candidate compounds.

Frequently Asked Questions about matchms

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

FAQPage Schema
How do I identify unknown compounds from mass spectrometry spectra?

To identify unknown compounds from mass spectrometry spectra, you match them against reference libraries using spectral similarity scoring. This involves loading LC-MS/MS data, applying preprocessing to normalize peaks, and ranking candidates by tolerance-aware cosine similarity.

What is spectral similarity scoring in metabolomics library search?

Spectral similarity scoring in metabolomics library search is the process of ranking unknown MS/MS spectra by comparing them to reference spectra. It uses tolerance-aware matching algorithms like cosine and modified cosine to calculate similarity scores for compound identification.

How do I preprocess and standardize MS/MS data for spectral matching?

You preprocess MS/MS data for spectral matching by harmonizing metadata, normalizing peak intensities, filtering peaks, and enforcing quality thresholds. Standardization ensures consistent format handling when importing files like MGF, mzML, or MSP for analysis.

Can I import mzML and MGF files for metabolomics compound identification?

Yes, you can import mzML and MGF files for metabolomics compound identification. The process supports loading spectra from common formats including MGF, mzML, MSP, JSON, and pickle, allowing you to match unknowns against reference spectral libraries.

What is the best way to cluster metabolomics spectra after library searching?

The best way to cluster metabolomics spectra after library searching is to apply standardization pipelines that harmonize metadata and normalize peaks. This allows you to compute precursor-aware similarity scores for spectral clustering across large datasets.

Does spectral matching require precursor m/z tolerance for compound identification?

Spectral matching for compound identification requires precursor m/z tolerance to accurately compute precursor-aware similarity scores. Configurable peak filtering and tolerance-aware matching algorithms ensure accurate cosine-based ranking against reference libraries.