Command Palette

Search for a command to run...

UnylyUnyly
Back to skills

bio-proteomics-spectral-libraries

FreeRuns bundled scriptsNot checked

Builds and manages DIA spectral libraries as peptide query parameters (precursor m/z, a few fragment m/z plus relative intensities, normalized RT, optional…

lilinjiby lilinji★ 18 GitHub stars

About this skill

Version Compatibility

Reference examples tested with: koinapy 0.0.5+, ms2pip 4.0+, deeplc 3.0+, pandas 2.2+

Before using code patterns, verify installed versions match. If versions differ:

  • Python: pip show <package> then help(module.function) to check signatures
  • CLI: <tool> --version then <tool> --help to confirm flags

If code throws ImportError, AttributeError, or TypeError, introspect the installed package and adapt the example to match the actual API rather than retrying.

DIA Spectral Libraries -- Query Parameters That Are Only as Good as Their Empirical Calibration

"Build a spectral library for my DIA search" -> Assemble a table of peptide query parameters (precursor m/z, top fragment m/z plus relative intensities, normalized RT, optional CCS), then calibrate the predicted RT/CCS to the actual gradient/instrument -- because a DIA library is not whole spectra and an uncalibrated prediction extracts every peak group at the wrong time.

  • Python: koinapy.Koina(...).predict(df) for Prosit/AlphaPeptDeep/MS2PIP/UniSpec fragment intensities and iRT served from Koina
  • Python: deeplc.DeepLC().calibrate_preds(); .make_preds() for RT prediction of any modification
  • Python: ms2pip.predict_batch(psms, model='HCD') for local fragment-intensity prediction
  • CLI: EncyclopeDIA for empirical chromatogram libraries; EasyPQP/FragPipe for DDA-based libraries

Scope: this skill owns library generation (experimental, chromatogram, predicted, empirically-corrected), RT/CCS/NCE calibration, format conversion, and library QC/merge. Running the DIA search against the library is dia-analysis. Generating the DDA peptide identifications a DDA library is built from depends on peptide-identification. Modified-peptide and PTM-resolved library design routes to ptm-analysis. Quantifying and rolling up the search output is quantification. OUT OF SCOPE: acquisition-window design (fixed/variable/staggered/diaPASEF) and demultiplexing -- those belong to dia-analysis.

The Single Most Important Modern Insight -- A Predicted Library Is Only as Good as Its Empirical Calibration

  1. A DIA library is peptide QUERY PARAMETERS, not spectra. Each entry is a precursor m/z, a handful of fragment m/z with RELATIVE intensities, a normalized RT, and optionally CCS -- the inputs to extract and score a co-eluting fragment-chromatogram peak group, not a lookup spectrum to match (Gillet 2012). The fragments and their relative intensities are the discriminating content; absolute intensity is irrelevant.

  2. Fragment-intensity prediction is robust; predicted RT and CCS are in ARBITRARY model units and MUST be calibrated. HCD fragmentation is reproducible at matched collision energy, so predicted relative intensities transfer across instruments. But predicted iRT is an arbitrary scale and real RT depends on the exact column, gradient, temperature, and mobile phase. The catastrophic error: drop a predicted library straight into a search without anchoring its RT to observed RT (via iRT/CiRT spike-in peptides or a GPF-DIA empirical pass). Every peak group is then extracted at the wrong time, selectivity collapses, and IDs silently disappear with no error. The same holds for AlphaPeptDeep CCS against the timsTOF's measured 1/K0.

  3. NCE (normalized collision energy) must match the predictor's training or intensities mismatch the real spectra. Intensity predictors are conditioned on NCE. Feed a value that differs from the instrument's effective NCE and predicted intensities diverge from reality, losing sensitivity with no error. Do not blindly use NCE=30 from a tutorial -- scan candidate NCE values, predict, and pick the one maximizing spectral contrast/correlation against a few real spectra.

Tool Taxonomy

Library type / tool Citation Mechanism / role When
Experimental DDA (EasyPQP, FragPipe) -- Consensus spectra from DDA runs of the same/pooled sample Deep DDA already in hand; gold-standard real intensities
Chromatogram library (EncyclopeDIA, GPF) Searle 2018 GPF-DIA of pooled sample, narrow staggered windows -> empirical RT + real fragments in the actual LC One project, maximum depth without fractionated DDA
In-silico predicted (Prosit, AlphaPeptDeep, MS2PIP+DeepLC) Gessulat 2019; Zeng 2022 Deep learning predicts fragment intensities + RT (+CCS) for the whole FASTA digest No wet-lab library; the default modern route
Empirically-corrected predicted (EncyclopeDIA) Searle 2020 Predict whole-proteome library, search one GPF-DIA pass, rewrite intensities + RT with observed values Non-model organisms, variant DBs; best of predicted + empirical
Prosit (intensity + iRT) Gessulat 2019 HCD/CID intensity conditioned on NCE; iRT model Served via Koina; broad default predictor
AlphaPeptDeep (intensity + RT + CCS) Zeng 2022 Modular, retrainable; b/y plus mod neutral losses; predicts CCS Full predict
Full SKILL.md on GitHub

Install bio-proteomics-spectral-libraries in Claude Code & Claude Desktop

Sign up to install this skill

Create a free account to reveal the install command and save the skill to your library.

  • Reveal the one-line install command
  • Save skills to your synced library
  • Get notified when skills update
Sign up freeI already have an account

Allowed tools

Tools this skill is permitted to call.

No restriction — this skill can use any tool.

Bundled files

examples/build_library.pyusage-guide.md

FAQ

What does the bio-proteomics-spectral-libraries skill do?

Builds and manages DIA spectral libraries as peptide query parameters (precursor m/z, a few fragment m/z plus relative intensities, normalized RT, optional CCS), covering experimental DDA, chromatogram, and in-silico predicted libraries via Koina-served Prosit, AlphaPeptDeep, MS2PIP, and DeepLC, with iRT/CiRT RT calibration, NCE tuning, format conversion (DIA-NN tsv/speclib/parquet, OpenSWATH pqp/TraML, Spectronaut, blib/dlib/elib), and library QC/merge. Use when generating, calibrating, converting, or merging a spectral library to drive a DIA search. Running the actual DIA search is dia-analysis; building from DDA identifications depends on peptide-identification; modified-peptide libraries route to ptm-analysis; quantifying the result is quantification.

How do I install the bio-proteomics-spectral-libraries skill?

Copy the skill folder into ~/.claude/skills (the Claude Code tab above does this in one command), or install it as a plugin.

Does the bio-proteomics-spectral-libraries skill run scripts?

Yes, this skill bundles executable scripts. Review the source before installing.

Related skills

Compare bio-proteomics-spectral-libraries with