matchms
Spectral similarity and compound identification for metabolomics. Use for comparing mass spectra, computing similarity scores (cosine, modified cosine), and identifying unknown compounds from spectral libraries. Best for metabolite identification, spectral matching, library searching. For full LC-MS/MS proteomics pipelines use pyopenms.
Author
Category
Development ToolsInstall
Hot:21
Download and extract to your skills directory
Copy command and send to AI Agent for auto-install:
Download and install this skill https://openskills.cc/api/download?slug=k-dense-ai-skills-matchms&locale=en&source=copy
Matchms - Python Mass Spectrometry Similarity Computation and Compound Identification Tool
Skill Overview
Matchms is an open-source Python mass spectrometry data analysis library dedicated to metabolomics. It focuses on spectral similarity calculations and compound identification. It supports importing multiple file formats, spectrum preprocessing, and provides an end-to-end analysis workflow for building similarity scoring.
Use Cases
1. Metabolomics Compound Identification
When you need to identify unknown compounds from mass spectrometry data, matchms can help you match your experimental spectra against a reference spectral library. Using similarity algorithms such as CosineGreedy and ModifiedCosine, it quickly finds the best-matching compounds. It is widely used for metabolite identification and biomarker discovery.
2. Mass Spectral Library Search and Spectrum Matching
It supports importing and exporting common mass spectrometry formats such as MGF, mzML, MSP, and JSON. It is compatible with the GNPS spectral library, enabling large-scale spectral library searching and matching. This is suitable for laboratories and researchers that need to process large volumes of mass spectrometry data.
3. Mass Spectrometry Data Preprocessing and Quality Control
It offers 40+ spectrum filters, including peak intensity normalization, relative intensity selection, precursor peak removal, and metadata standardization. These help you build reproducible data processing pipelines, ensuring the accuracy and consistency of your analysis results.
Core Features
1. Import and Export Mass Spectrometry Data in Multiple Formats
Supports reading and writing multiple mass spectrometry formats including mzML, mzXML, MGF, MSP, and JSON. It is compatible with GNPS and metabolomics-USI standards, making it easy to exchange data across different analysis platforms. Batch processing can be done through simple API calls.
2. Spectral Similarity Calculation
Provides multiple similarity algorithms including CosineGreedy, ModifiedCosine, NeutralLossesCosine, and FingerprintSimilarity. It can compute similarity scores between spectra, supports batch processing, and allows customizable tolerance parameters, providing quantitative evidence for compound identification.
3. Reproducible Mass Spectrometry Processing Workflows
By using SpectrumProcessor, you can build multi-step data processing pipelines to chain together operations such as filtering, standardization, and similarity calculation. This ensures the reproducibility and extensibility of your analysis workflow, and is ideal for constructing standardized spectral data analysis pipelines.
Frequently Asked Questions
What is Matchms? What is it mainly used for?
Matchms is a Python library specifically for mass spectrometry data processing. Its main functions are calculating spectral similarity and performing compound identification. It is especially suitable for metabolomics researchers to match unknown spectra with reference libraries using similarity algorithms to find corresponding compounds. It also provides complete data preprocessing and quality control tools.
How do I use matchms to calculate spectral similarity?
Using matchms to compute similarity is straightforward. First, import your mass spectrometry data (supports formats such as MGF and mzML). Then choose a similarity algorithm such as CosineGreedy or ModifiedCosine, and call the calculate_scores function to obtain similarity scores. For example:
scores = calculate_scores(references=library_spectra, queries=query_spectra, similarity_function=CosineGreedy()). The results can be sorted by score to find the best match.How should I choose between Matchms and pyopenms?
Matchms focuses on spectral similarity calculation and compound identification in metabolomics, offering a rich set of similarity algorithms and spectrum filtering tools for spectral library searching and compound annotation. If you need a complete and complex LC-MS/MS proteomics analysis workflow, including peptide identification and quantification, it is recommended to use pyopenms. The two can be used complementarily: matchms handles the spectral matching portion, while pyopenms handles more complex proteomics analyses.