matchms
यह क्या करती है
Matchms मास स्पेक्ट्रोमेट्री डेटा को व्यवस्थित करने और उसकी तुलना करने में मदद करता है। यह मास स्पेक्ट्रोमेट्री फ़ाइलों को साफ़ करता है, प्रोसेस करता है और खोजता है, ताकि उनके बीच समानताएँ पता चल सकें।
कब इस्तेमाल करें
- ✓किसी अज्ञात स्पेक्ट्रम की तुलना ज्ञात स्पेक्ट्रा की लाइब्रेरी से करना।
- ✓अलग-अलग स्रोतों से आए मास स्पेक्ट्रोमेट्री डेटा को साफ़ और मानक रूप में लाना।
- ✓मास स्पेक्ट्रा के आधार पर मिलते-जुलते अणु खोजना।
Skill का लिंक
https://github.com/K-Dense-AI/scientific-agent-skills/blob/main/skills/matchms/SKILL.mdइसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।
कैसे इस्तेमाल करें
सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।
पेस्ट करने के लिए तैयार मैसेज
Claude Code, Codex या Cursor के लिए: प्रोजेक्ट फ़ोल्डर में चलाएँ और skill इंस्टॉल हो जाएगी।
SKILL.md डाउनलोड करें और अपने एजेंट के skills फ़ोल्डर में रखें।
AI से क्या माँगें: उदाहरण
“इस मास स्पेक्ट्रम की मेरी लाइब्रेरी से तुलना करो और बताओ कि कौन से यौगिक सबसे ज़्यादा मिलते-जुलते हैं।”
हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।
यह कैसे काम करती है
Matchms आपकी मास स्पेक्ट्रम फ़ाइलें पढ़ता है, नियमों के हिसाब से डेटा को साफ़ और मानक बनाता है, और फिर एल्गोरिदम से पता लगाता है कि स्पेक्ट्रा कितने मिलते-जुलते हैं।
तकनीकी सामग्री (मूल SKILL.md)
लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे GitHub से।
Matchms
Purpose and Scope
Matchms is a Python package for importing, cleaning, processing, and comparing tandem mass spectra. This skill targets matchms 0.33.1, released 2026-06-08, verified again on 2026-10-01. Older tutorials can use removed names; see the migration reference.
Use matchms for:
- MS/MS library search and query-versus-reference scoring
- Metadata harmonization, adduct/precursor handling, and peak filtering
- Cosine, modified-cosine, neutral-loss, approximate, and entropy scoring
- Structured score matrices, top-hit extraction, and spectral networks
- MGF, MSP, mzML, mzXML, JSON, mzSpecLib, and metabolomics-USI workflows
Do not use matchms as a replacement for:
- LC-MS feature detection, chromatographic alignment, peptide identification, or protein quantification — use pyopenms
- Vendor raw-file conversion — convert to mzML/mzXML first
- A validated compound-identification protocol — similarity is evidence, not proof of identity
Install the Verified Release
Create or activate an environment, then install the release used by this skill:
uv pip install "matchms==0.33.1"
Verify the runtime:
uv run python -c "import matchms; print(matchms.__version__)"
Matchms 0.33.1 supports Python 3.10-3.14 and installs RDKit as a regular
dependency. The old matchms[chemistry] extra is not part of the current
package metadata.
Operating Workflow
- Inspect the inputs. Record format, spectrum count, MS level, precursor coverage, ion mode, peak counts, and identifier fields.
- Load with metadata harmonization enabled by default. Retain original files: disabling the flag in 0.33.1 still harmonizes metadata keys.
- Apply the same peak-processing steps to query and reference spectra. Keep metadata enrichment separate when reference annotations are richer.
- Drop invalid spectra explicitly. Many
require_*filters returnNone. - Choose the score from the scientific question, not from convenience.
Modified and neutral-loss scores require valid
precursor_mz. - Estimate
len(references) * len(queries)before scoring. A sparse result container does not automatically avoid computing every requested pair. - Report score settings and evidence. Include tolerance and units, preprocessing,
score name, number of matched peaks when available, and candidate metadata.
The cosine-family
toleranceis an absolute m/z window in Da, not ppm; a precursor filter withtolerance_type="ppm"does not change fragment tolerance. - Validate top hits visually and chemically. Use mirror plots, precursor agreement, ion/adduct compatibility, and orthogonal evidence.
Current API Guardrails
These points prevent the most common failures from pre-0.33 examples:
- Use
ModifiedCosineGreedyorModifiedCosineHungarian;ModifiedCosinewas removed in 0.32.0. - Do not call
add_losses(). It was removed in 0.27.0; usespectrum.losses,spectrum.compute_losses(...), orNeutralLossesCosinedirectly. SpectrumProcessoris not callable. Useprocess_spectrum()orprocess_spectra(). The single-spectrum call mutates by default; pass a clone when preserving the original.process_spectra()returns(processed_spectra, processing_report).Scores.scoresis aStackedSparseArray, often with separate structured fields such asCosineGreedy_scoreandCosineGreedy_matches.scores_by_query()returns(reference_spectrum, score_record)pairs, not reference indices.- Prefer
spectrain parameter names. The legacy spellingspectrumsis deprecated. - Never load pickle files from an untrusted source; unpickling can execute code.
See references/migration.md for a complete old-to-current mapping.
Quick Start: Clean and Search a Library
from math import isfinite
from matchms import SpectrumProcessor, calculate_scores
from matchms.filtering import (
default_filters,
normalize_intensities,
require_minimum_number_of_peaks,
require_precursor_mz,
select_by_relative_intensity,
)
from matchms.importing import load_spectra
from matchms.similarity import ModifiedCosineGreedy
def load_and_process(path):
spectra = [default_filters(spectrum) for spectrum in load_spectra(path)]
processor = SpectrumProcessor(
[
(require_precursor_mz, {"minimum_accepted_mz": 10.0}),
normalize_intensities,
…
अक्सर पूछे जाने वाले सवाल
मास स्पेक्ट्रा क्या होते हैं?
मास स्पेक्ट्रा अणुओं के 'फिंगरप्रिंट' जैसे होते हैं। ये दिखाते हैं कि कोई अणु किन टुकड़ों में टूटता है और हर टुकड़े की इंटेंसिटी कितनी है।
'मेटाडेटा हार्मोनाइज़ेशन' का क्या मतलब है?
इसका मतलब है कि आपकी स्पेक्ट्रम फ़ाइलों में मौजूद अतिरिक्त जानकारी (जैसे यौगिक का नाम, फ़ॉर्मूला) एक जैसे और मानक तरीके से लिखी गई हो।
क्या मैं Matchms से अपने आप यौगिक की पहचान कर सकता हूँ?
Matchms मिलते-जुलते यौगिक खोजने में मदद करता है, लेकिन अंतिम पहचान के लिए दूसरे तरीकों से पुष्टि करनी होती है। यह सबूत देता है, पक्का प्रमाण नहीं।
जानकारी
लेखक का मूल विवरण
Processes, cleans, compares, and searches tandem mass spectra with matchms. Use for MS/MS file I/O, metadata harmonization, peak filtering, spectral similarity, library matching, score matrices, and molecular-similarity networks. Use pyopenms instead for LC-MS feature detection or proteomics pipelines.
लोकप्रियता
- GitHub स्टार
- 51k
- रैंकिंग में स्थान
- #3495
- लाइसेंस
- MIT
- अपडेट की गई
- 15/10/2026
कमेंट
- …
इस repository की और skills
13c-metabolic-flux
51kकार्बन-13 आइसोटोप ट्रेसिंग डेटा से मेटाबोलिक फ़्लक्स का अनुमान लगाता है। कोशिका के मेटाबॉलिज़्म और बायोकेमिकल मार्गों का विश्लेषण करने के लिए यह उपयोगी है।
adaptyv
51kAdaptyv API का उपयोग करके प्रोटीन कैरेक्टराइज़ेशन प्रयोग डिज़ाइन करता है। लागत का अनुमान लगाने, सीक्वेंस सबमिट करने और लैब के नतीजों पर नज़र रखने में मदद करता है।
aeon
51kटाइम सीरीज़ डेटा पर मशीन लर्निंग के काम करता है। क्रमबद्ध डेटा में वर्गीकरण, पूर्वानुमान, एनोमली डिटेक्शन और पैटर्न खोजने के लिए यह उपयोगी है।
alphagenome
51kजेनेटिक वेरिएंट्स के पहले से गणना किए गए जीनोमिक प्रभाव देखता है। वेरिएंट का जीनोम पर असर समझने के लिए स्कोर और स्पष्टीकरण देता है।
मिलती-जुलती skills
gitcrawl
394kयह आपके एजेंट को GitHub issues और pull requests के सेव आर्काइव में खोजने, मिलते-जुलते मामलों को समूह में रखने और लाइव स्थिति जांचने देती है।
slacrawl
394kयह आपके एजेंट को स्थानीय Slack आर्काइव में संदेश खोजने और गिनने, उसकी ताज़गी जांचने और ज़रूरत पड़ने पर उसे ताज़ा करने देती है।
goplaces
394kयह आपके एजेंट को Google Places से जगहें खोजने, उनका विवरण और समीक्षाएं पाने, और जगह के नाम हल करने में मदद करती है, स्क्रिप्ट के लिए JSON आउटपुट के साथ।