Spectrum chromatogram mobilogram rendering
Use when you have mass spectrometry data in a Pandas DataFrame with columns for m/z and intensity (spectrum), retention time and intensity (chromatogram), or drift time and intensity (mobilogram), and need to render 1D traces as static or interactive plots for exploratory analysis, quality control.From its SKILL.md
npx -y skills add HolobiomicsLab/asb-skill-collections --skill spectrum-chromatogram-mobilogram-renderingAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 15 stars15 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
What its file declares
Copied from the file, not written here
The file declares its own license as CC-BY-4.0. That is the author’s claim about this one file, and it is not the same thing as the license GitHub reports for the repository, which is listed with the other numbers below.
SKILL.md
6.7 KB, ~1.2k tokens by cl100k_base, as published. Nobody here has run it
spectrum-chromatogram-mobilogram-rendering
Summary
Render 1D mass spectrometry data (spectra, chromatograms, mobilograms) as static or interactive visualizations by plotting Pandas DataFrames with pyOpenMS-viz against x, y column dimensions. This skill bridges raw MS tabular data to publication-ready plots across matplotlib, bokeh, and plotly backends.
When to use
You have mass spectrometry data in a Pandas DataFrame with columns for m/z and intensity (spectrum), retention time and intensity (chromatogram), or drift time and intensity (mobilogram), and need to render 1D traces as static or interactive plots for exploratory analysis, quality control, or publication.
When NOT to use
- Input data is 2D or 3D (x, y, z required for peakmap); use peakmap plot type instead.
- You need to overlay multiple traces or perform complex layering; use low-level backend API directly.
- Input is not a Pandas DataFrame or columns are non-numeric or contain missing values without prior imputation.
Inputs
- Pandas DataFrame with numeric x column (m/z, retention_time, or drift_time) and numeric y column (intensity)
- string specifying plot kind: 'spectrum', 'chromatogram', or 'mobilogram'
- string specifying column names for x and y axes
Outputs
- matplotlib Figure object or bokeh/plotly interactive plot widget
- rendered visualization displayable in Jupyter, web app, or saved to static file (PNG, SVG, HTML)
How to apply
Load your mass spectrometry data into a Pandas DataFrame with appropriate x (m/z, rt, or drift time) and y (intensity) columns. Call the .plot() method on the DataFrame with kind='spectrum' (for m/z vs. intensity), 'chromatogram' (for rt vs. intensity), or 'mobilogram' (for drift time vs. intensity), specifying the x and y column names. pyOpenMS-viz automatically dispatches to the configured backend (matplotlib for static output, bokeh or plotly for interactive). Choose your backend based on output context: matplotlib for static publication figures, bokeh or plotly for interactive Jupyter notebooks or web dashboards. Verify that all x and y values are numeric and contain no NaN across the target columns before plotting.
Related tools
- pyOpenMS-viz (core plotting library; provides .plot() method on Pandas DataFrames for rendering spectrum, chromatogram, and mobilogram traces) — https://github.com/OpenMS/pyopenms_viz
- matplotlib (static rendering backend; produces publication-quality static PNG/SVG/PDF figures)
- bokeh (interactive rendering backend; produces interactive HTML widgets with pan, zoom, hover tools)
- plotly (interactive rendering backend; produces interactive HTML traces with zoom, selection, and export controls)
- Pandas (DataFrame container and column selection; holds x and y data and provides .plot() API)
Examples
ms_data.plot(x="m/z", y="intensity", kind="spectrum")
Evaluation signals
- Plot renders without error and displays on screen or in Jupyter output cell.
- x-axis and y-axis labels match the specified column names and data range.
- All data points from the input DataFrame are visible in the trace (no silent truncation or filtering).
- Backend-specific interactivity works as expected (matplotlib: no interactivity; bokeh/plotly: zoom, pan, hover tooltips functional).
- Output file size and format match expected backend (matplotlib: small PNG/SVG; bokeh/plotly: larger HTML with embedded JS).
Limitations
- 1D only; does not handle 2D peakmap or 3D peakmap data types (require z dimension).
- Requires well-formed Pandas DataFrame with no NaN in x or y columns; pre-filtering or imputation needed for sparse or incomplete data.
- Interactive backends (bokeh, plotly) produce larger output files and require browser or Jupyter kernel; matplotlib static output is lightweight but non-interactive.
- Column naming must be exact; no fuzzy matching or automatic detection of m/z, rt, intensity columns.
Evidence
- [readme] Visualization of various mass spectrometry data types, including 1D chromatograms, spectra, and 2D peak maps: "Visualization of various mass spectrometry data types, including 1D chromatograms, spectra, and 2D peak maps"
- [readme] Support for multiple plotting backends: matplotlib (static), bokeh and plotly (interactive): "Support for multiple plotting backends: matplotlib (static), bokeh and plotly (interactive)"
- [readme] Flexible plotting API that interfaces directly with Pandas DataFrames: "Flexible plotting API that interfaces directly with Pandas DataFrames"
- [readme] Consistent API across different plotting backends for easy switching between static and interactive plots: "Consistent API across different plotting backends for easy switching between static and interactive plots"
- [readme] Chromatogram, Mobilogram, Spectrum with x, y required dimensions supported across Matplotlib, Bokeh, and Plotly: "| Plot Type | Required Dimensions | pyopenms_viz Name | Matplotlib | Bokeh | Plotly | |-----------------|-------------------------|-------"
What ships with it
Read from the repository
Just SKILL.md. No reference files, no scripts.