matchms

Compare mass spectra using cosine and modified cosine similarity metrics.

1|Updated Jan 14, 2026
One-click install
npx skills add https://github.com/Sologa/codex-pipeline --skill matchms-sologa
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: matchms
Source: https://github.com/Sologa/codex-pipeline/tree/main/.codex/skills/matchms
Command: npx skills add https://github.com/Sologa/codex-pipeline --skill matchms-sologa

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill streamlines the complex process of analyzing mass spectrometry data, enabling faster and more accurate compound identification and spectral comparison.

Core Features & Use Cases

  • Spectral Similarity: Compare mass spectra using various algorithms (cosine, modified cosine) to find matches in libraries.
  • Compound Identification: Identify unknown compounds by matching their spectra against curated databases.
  • Data Processing: Import, filter, and standardize mass spectrometry data from multiple formats.
  • Use Case: A researcher has a list of unknown mass spectra from an experiment and wants to identify the compounds present by comparing them against a known spectral library.

Quick Start

Use the matchms skill to compare the spectrum in 'unknown.mgf' against the library in 'library.mgf' and list the top 5 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 compounds from mass spectrometry data?

You can identify unknown compounds from mass spectrometry data by importing your experimental spectra and comparing them against a known spectral library using similarity metrics like cosine or modified cosine algorithms.

What mass spectrometry file formats can I import for spectral analysis?

You can import mass spectrometry data for spectral analysis from MGF, mzML, and MSP formats, allowing you to standardize and filter spectra from various experimental sources before processing.

What is the difference between cosine and modified cosine similarity for spectral matching?

Cosine similarity measures direct peak overlap between spectra, while modified cosine similarity accounts for precursor mass shifts, enabling accurate library matching even when analyzing derivatives or modified metabolites.

Can I filter and standardize mass spectrometry spectra before library searching?

Yes, you can filter and standardize mass spectrometry spectra before library searching by processing imported data to remove noise, normalize peak intensities, and ensure consistent format across samples.

Does fingerprint-based spectral comparison improve metabolite identification?

Fingerprint-based spectral comparison improves metabolite identification by analyzing structural fingerprints alongside mass peaks, providing an advanced similarity metric that complements traditional cosine scoring for complex compound matching.

What is the best way to compare an unknown spectrum against a spectral library?

The best way to compare an unknown spectrum against a spectral library is to import both datasets, apply similarity metrics such as cosine or modified cosine algorithms, and rank the top matching compounds by score.