A platform for managing and executing complex proteomics data analysis and mass spectrometry pipelines.

Install

mkdir -p .claude/skills/pyopenms && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/2975" && unzip -o skill.zip -d .claude/skills/pyopenms && rm skill.zip

Installs to .claude/skills/pyopenms

Activation

This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.

Complete mass spectrometry analysis platform. Use for proteomics and metabolomics workflows—feature detection, peptide/protein identification, label-free and isobaric quantification, adduct/accurate-mass annotation, and complex LC-MS/MS pipelines. Supports extensive file formats and algorithms. For simple spectral comparison and small-molecule library matching use matchms.
375 chars✓ has a “when” triggerlonger than Claude Code's old 250-char listing cap (fine on current versions)
Advanced

Key capabilities

  • →Detect proteomics features
  • →Identify peptides and proteins
  • →Perform label-free quantification
  • →Process LC-MS/MS pipelines
  • →Calculate theoretical peptide masses

How it works

Provides Python bindings to the OpenMS library, offering high-level scripts for common mass spectrometry workflows like feature detection, alignment, and quantification.

Inputs & outputs

You give it
Raw MS data files (mzML/mzXML)
You get back
Processed features, quantification matrices, or identification results

When to use pyopenms

  • →Running proteomics feature detection
  • →Processing LC-MS/MS data
  • →Protein quantification pipelines
  • →Peptide identification analysis

About this skill

PyOpenMS

Overview

PyOpenMS provides Python bindings to the OpenMS library for computational mass spectrometry, enabling analysis of proteomics and metabolomics data. Use it to read/write MS file formats, process raw spectra, detect and quantify features, identify peptides and proteins, and run end-to-end LC-MS/MS pipelines.

This skill ships ready-to-run scripts in scripts/ covering the most common high-level workflows. Prefer running a script over writing new code—each is a parameterized CLI tool that handles loading, processing, and export. Drop into the Python API (and the references/) only when no script fits.

Installation

uv venv --python 3.13
uv pip install "pyopenms==3.6.0" pandas numpy matplotlib

Verify (note: __version__ works, but the bundled binary prints a one-line memory-status notice on import that is harmless):

import pyopenms as ms
print(ms.__version__)  # 3.6.0

Scripts (start here)

Run with python scripts/<name>.py --help for full options. Input formats differ by script; inspect its help. Commands below run from the skill directory with the environment activated. Native regression tests use tiny synthetic files; instrument-specific detection/search performance is not validated.

Inspect & convert

ScriptWhat it does
inspect_ms_data.pySummarize any mzML/mzXML/featureXML/consensusXML/idXML (counts, RT/m/z ranges, TIC, metadata); optional per-spectrum CSV.
convert_format.pyConvert between mzML/mzXML/MGF with optional MS-level, RT, and intensity filtering.
process_spectra.pyConfigurable signal-processing chain: smoothing (Gauss/SGolay), centroiding (PeakPickerHiRes), normalization, S/N and intensity thresholds.

Feature detection & quantification

ScriptWhat it does
detect_features_metabo.pyUntargeted metabolomics feature finding: MassTraceDetection → ElutionPeakDetection → FeatureFindingMetabo.
detect_features_centroided.pyPeptide/centroided feature detection via FeatureFinderAlgorithmPicked.
align_link_quantify.pyMulti-sample pipeline: detect (or load) features → RT alignment → consensus linking → quant matrix CSV.
consensus_to_matrix.pyconsensusXML → wide intensity matrix + metadata, with optional median/quantile normalization and long format.

Annotation

ScriptWhat it does
detect_adducts.pyGroup adducts/charge variants of the same neutral mass (MetaboliteFeatureDeconvolution).
accurate_mass_search.pyAnnotate features against local formula/structure TSVs by accurate mass (AccurateMassSearchEngine → mzTab/CSV).
export_gnps_sirius.pyExport GNPS FBMN inputs (MGF + quant table) or a SIRIUS .ms file.

Identification

ScriptWhat it does
process_identifications.pyRe-index against FASTA, estimate FDR/q-values, filter (FDR/length/best-per-spectrum), export idXML + CSV.

Chemistry

ScriptWhat it does
mass_calculator.pyMonoisotopic/average mass, charged m/z, formula, and isotope pattern for peptides or empirical formulas.
digest_protein.pyIn-silico protease digestion of FASTA/sequence → theoretical peptides with masses and m/z.
theoretical_spectrum.pyGenerate annotated theoretical fragment spectra (b/y/a/c/x/z, losses) for a peptide.

Targeted & visualization

ScriptWhat it does
extract_chromatograms.pyBuild TIC/BPC and XIC traces for target m/z (CSV + optional plot).
plot_ms_data.pyQuick plots: single spectrum, TIC, 2D feature map, MS1 signal map.

Common script recipes

# Inspect a file
python scripts/inspect_ms_data.py sample.mzML --spectra-csv spectra.csv

# Untargeted metabolomics: features for one sample
python scripts/detect_features_metabo.py sample.mzML --out-csv features.csv

# Full multi-sample quantification study
python scripts/align_link_quantify.py s1.mzML s2.mzML s3.mzML --out-prefix study
python scripts/consensus_to_matrix.py study.consensusXML --out quant.csv --normalize median

# Peptide chemistry
python scripts/mass_calculator.py --peptide "PEPTIDEM(Oxidation)K" --charges 1 2 3 --isotopes 5
python scripts/digest_protein.py proteins.fasta --enzyme Trypsin --missed 2 --out peptides.csv

# Identification post-processing
python scripts/process_identifications.py search.idXML --fasta db.fasta --fdr 0.01 --out filtered.idXML --csv hits.csv

Identification confidence

--fdr estimates top-hit PSM q-values from one comparable search run and rejects missing labels, non-finite scores, mixed score types/directions, and absent target or decoy top hits. It does not recalibrate existing q-values. Before using it, verify target/decoy annotations, score direction, and the search database used to generate the hits. The script applies FalseDiscoveryRate to peptide identifications; its threshold does not establish protein-level FDR. Report the tested unit (PSM, unique peptide, or protein), pooling/search settings, decoy strategy, and threshold explicitly. Protein inference and protein-level error control need their own validated workflow; do not label all inferred proteins “1% FDR” from the peptide-hit filter alone. See the OpenMS FDR API.

Version 3.6.0 API and scientific checks

OpenMS 3.6.0 moved pyOpenMS to nanobind. The old documentation site's latest page still identifies itself as 3.5.0dev; use installed help() and release source when a signature disagrees. This skill's version 3.0 updates the binding calls and changes the peptide detector option from --mz-tol-ppm to --mz-tol-da: its native algorithm uses an absolute m/z tolerance, so conversion at an arbitrary m/z 400 was incorrect for the rest of the mass range.

  • MassTraceDetection.run(exp, 0) returns traces; ElutionPeakDetection.detectPeaks(traces) returns split traces; FeatureFindingMetabo.run(traces, features) fills the map and returns a tuple. It no longer accepts a third chromatogram output list.
  • Param.keys() returns strings. Use PeptideIdentificationList for mutable IDs; IdXMLFile.load(path) also supports returning (proteins, peptides) in 3.6.
  • Feature tables use rt/mz; consensus tables use get_intensity_df() and get_metadata_df(). RT and chromatogram time are seconds; m/z is Th; neutral mass is Da. An OpenMS option named Da on an m/z window is absolute m/z tolerance. Record whether a ppm tolerance is a half-window (the XIC script uses abs(observed-target) <= target*ppm/1e6).
  • Check spec.getType() against SpectrumSettings.SpectrumType; sorted m/z says nothing about centroid/profile status. Detectors require centroided MS1 and exclude MS2. Unknown type needs a justified --assume-centroided; smoothing or picking unknown type needs --assume-profile. Do not peak-pick centroid data.
  • process_spectra.py --ms-level scopes every operation to that level and keeps chromatograms unchanged. Within-spectrum normalization changes quantitative signal and is usually inappropriate before label-free intensity comparison.
  • Charge zero means unknown. The mass calculator's positive charge magnitudes assume protonation/deprotonation only; sodium, ammonium, multimers, isotope selection, and ion mobility need explicit treatment.
  • Accurate-mass search uses local TSV databases, not a live HMDB endpoint. The tested 3.6.0 macOS wheel bundles both HMDB mapping and structure tables; inspect your installation and record database versions/checksums. Formula/adduct candidates are putative annotations, not confirmed structures or controlled FDR.
  • Alignment failure stops linking unless explicitly overridden with --allow-unaligned. Assess residual RT errors, anchors and missingness. A consensus feature is not necessarily one compound; normalization and missing values require study-specific QC. Isobaric quantification is outside these CLIs.
  • GNPS export requires MS2-to-feature annotations with map_index and spectrum_index; a plain MS1 consensus from align_link_quantify.py is insufficient. Exports do not run GNPS/SIRIUS, authenticate, submit data, or validate identities.

Core data structures

  • MSExperiment – collection of spectra and chromatograms
  • MSSpectrum / MSChromatogram – a single spectrum / chromatographic trace
  • Feature / FeatureMap – a detected LC-MS peak / collection of features
  • ConsensusMap – features linked across samples (the quant table)
  • PeptideIdentification / ProteinIdentification – search results
  • AASequence / EmpiricalFormula – sequence and formula chemistry

For details: see references/data_structures.md.

Parameter management

Most algorithms expose an OpenMS Param object:

algo = ms.FeatureFindingMetabo()
p = algo.getDefaults()
for key in p.keys():
    print(key, "=", p.getValue(key), "|", p.getDescription(key))
p.setValue("charge_lower_bound", 1)
algo.setParameters(p)

Export to pandas

fm = ms.FeatureMap(); ms.FeatureXMLFile().load("features.featureXML", fm)
df = fm.get_df()             # columns include lowercase rt, mz, intensity, charge, quality

cm = ms.ConsensusMap(); ms.ConsensusXMLFile().load("study.consensusXML", cm)
intensities = cm.get_intensity_df()   # features x samples
metadata = cm.get_metadata_df()       # rt, mz, charge, quality, ...

Integration with other tools

Pandas (DataFrames), NumPy (peak arrays), scikit-learn (ML), Matplotlib/Seaborn (plots), and downstream tools via export: GNPS (FBMN), SIRIUS, and mzTab.

Resources


Content truncated.

When not to use it

  • →Simple spectral comparison
  • →Small-molecule library matching

Prerequisites

Python 3.9+uv

Limitations

  • →Requires specific Python version and environment setup
  • →Older tutorials and code may be incompatible with 3.5.0 API

How it compares

Offers a complete, scriptable platform for complex proteomics and metabolomics pipelines instead of simple spectral matching tools.

Compared to similar skills

pyopenms side by side with the closest alternatives in the catalog.

SkillInstallsUpdatedSafetyDifficulty
pyopenms (this skill)13moReviewAdvanced
literature-review5593moReviewAdvanced
openalex-database489moReviewIntermediate
scientific-critical-thinking189moReviewAdvanced

Try saying

Example prompts that trigger this skill in your AI assistant.

More by K-Dense-AI

View all by K-Dense-AI →

literature-review

K-Dense-AI

Conduct comprehensive, systematic literature reviews using multiple academic databases (PubMed, arXiv, bioRxiv, Semantic Scholar, etc.). This skill should be used when conducting systematic literature reviews, meta-analyses, research synthesis, or comprehensive literature searches across biomedical, scientific, and technical domains. Creates professionally formatted markdown documents and PDFs with verified citations in multiple citation styles (APA, Nature, Vancouver, etc.).

5591,298

markitdown

K-Dense-AI

Convert various file formats (PDF, Office documents, images, audio, web content, structured data) to Markdown optimized for LLM processing. Use when converting documents to markdown, extracting text from PDFs/Office files, transcribing audio, performing OCR on images, extracting YouTube transcripts, or processing batches of files. Supports 20+ formats including DOCX, XLSX, PPTX, PDF, HTML, EPUB, CSV, JSON, images with OCR, and audio with transcription.

177310

scientific-writing

K-Dense-AI

Write scientific manuscripts. IMRAD structure, citations (APA/AMA/Vancouver), figures/tables, reporting guidelines (CONSORT/STROBE/PRISMA), abstracts, for research papers and journal submissions.

94309

exploratory-data-analysis

K-Dense-AI

Perform comprehensive exploratory data analysis on scientific data files across 200+ file formats. This skill should be used when analyzing any scientific data file to understand its structure, content, quality, and characteristics. Automatically detects file type and generates detailed markdown reports with format-specific analysis, quality metrics, and downstream analysis recommendations. Covers chemistry, bioinformatics, microscopy, spectroscopy, proteomics, metabolomics, and general scientific data formats.

15114

infographics

K-Dense-AI

Create professional infographics using Nano Banana Pro AI with smart iterative refinement. Uses Gemini 3 Pro for quality review. Integrates research-lookup and web search for accurate data. Supports 10 infographic types, 8 industry styles, and colorblind-safe palettes.

1141

pptx-posters

K-Dense-AI

Create research posters using HTML/CSS that can be exported to PDF or PPTX. Use this skill ONLY when the user explicitly requests PowerPoint/PPTX poster format. For standard research posters, use latex-posters instead. This skill provides modern web-based poster design with responsive layouts and easy visual integration.

911

You might also like

literature-review

K-Dense-AI

Conduct comprehensive, systematic literature reviews using multiple academic databases (PubMed, arXiv, bioRxiv, Semantic Scholar, etc.). This skill should be used when conducting systematic literature reviews, meta-analyses, research synthesis, or comprehensive literature searches across biomedical, scientific, and technical domains. Creates professionally formatted markdown documents and PDFs with verified citations in multiple citation styles (APA, Nature, Vancouver, etc.).

5591,298

openalex-database

davila7

Query and analyze scholarly literature using the OpenAlex database. This skill should be used when searching for academic papers, analyzing research trends, finding works by authors or institutions, tracking citations, discovering open access publications, or conducting bibliometric analysis across 240M+ scholarly works. Use for literature searches, research output analysis, citation analysis, and academic database queries.

48202

scientific-critical-thinking

davila7

Evaluate research rigor. Assess methodology, experimental design, statistical validity, biases, confounding, evidence quality (GRADE, Cochrane ROB), for critical analysis of scientific claims.

1888

biorxiv-database

lifangda

Efficient database search tool for bioRxiv preprint server. Use this skill when searching for life sciences preprints by keywords, authors, date ranges, or categories, retrieving paper metadata, downloading PDFs, or conducting literature reviews.

780

physics-validator

omriwen

Validate optical physics parameters including Fresnel numbers, diffraction regimes, and resolution limits. This skill should be used when configuring Telescope, Microscope, or Camera instruments to ensure physically realistic parameters.

664

fda-database

davila7

Query openFDA API for drugs, devices, adverse events, recalls, regulatory submissions (510k, PMA), substance identification (UNII), for FDA regulatory data analysis and safety research.

539

Search skills

Search the agent skills registry