agentsclimarketplace

Pandas dataframe plotting interface

Skill HolobiomicsLab/asb-skill-collections/packs/metabolomics/ms-generic/skills/pandas-dataframe-plotting-interface

Curated, evidence-grounded skill and software-tool collections for scientific AI agents, generated by the AgenticScienceBuilder

Install
npx -y skills add HolobiomicsLab/asb-skill-collections --skill pandas-dataframe-plotting-interface

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • 14 stars14 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 author says it does

Copied from the file, not written here

Use when you have mass spectrometry data (retention time, m/z, intensity, or mobility dimensions) already loaded into a Pandas DataFrame and need to produce publication-ready or exploratory visualizations. Use this when you want to leverage Pandas' native .

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

7.7 KB, as published. Nobody here has run it

pandas-dataframe-plotting-interface

Summary

Use pyOpenMS-viz's Pandas plotting backend to generate static or interactive mass spectrometry visualizations (chromatograms, spectra, peak maps) directly from DataFrame objects with flexible backend selection (matplotlib, bokeh, plotly). This skill encapsulates the procedural interface for extending Pandas' native plotting API to handle multi-dimensional MS data without manual matplotlib figure construction.

When to use

You have mass spectrometry data (retention time, m/z, intensity, or mobility dimensions) already loaded into a Pandas DataFrame and need to produce publication-ready or exploratory visualizations. Use this when you want to leverage Pandas' native .plot() method syntax rather than calling visualization libraries directly, or when you need to switch between static (matplotlib) and interactive (bokeh/plotly) outputs without rewriting plotting code.

When NOT to use

  • Your input is not tabular or not yet in a Pandas DataFrame (use a data loader or parser first).
  • You need custom visual annotations or plot aesthetics beyond pyOpenMS-viz's standard templates (consider calling matplotlib/bokeh/plotly directly instead).
  • Your DataFrame columns do not align with required dimensions (e.g., missing intensity column, or non-standard column naming); you must reshape or rename columns before calling .plot().

Inputs

  • Pandas DataFrame with mass spectrometry data (columns: retention time, m/z, intensity, or mobility)
  • DataFrame column names matching visualization dimensions (e.g., 'rt', 'intensity', 'm/z')
  • Optional: backend selection parameter (matplotlib, bokeh, or plotly)

Outputs

  • Static plot image (PNG, PDF, SVG) via matplotlib savefig()
  • Interactive HTML widget (bokeh or plotly)
  • matplotlib Figure object or bokeh/plotly figure object ready for further annotation or display

How to apply

Install pyOpenMS-viz (e.g. pip install pyopenms_viz --upgrade) in a dedicated conda environment. Load your mass spectrometry data into a Pandas DataFrame with columns matching your visualization intent (e.g., 'rt' and 'intensity' for chromatograms, 'm/z' and 'intensity' for spectra, or 'rt', 'm/z', and 'intensity' for 2D peak maps). Call the .plot() method on the DataFrame, specifying the x and y columns and the kind parameter ('chromatogram', 'spectrum', 'mobilogram', or 'peakmap'), optionally with plot3d=True for 3D peak maps. The matplotlib backend is the default for static output; switch backends by configuring your Pandas environment or passing backend-specific parameters. Verify correct rendering by checking axis labels, data range alignment, and visual continuity of the trace.

Related tools

  • pyOpenMS-viz (Provides the Pandas plotting backend and plotting API for mass spectrometry data visualization with support for matplotlib, bokeh, and plotly backends) — https://github.com/OpenMS/pyopenms_viz
  • Pandas (DataFrame container and native .plot() method interface for tabular data)
  • matplotlib (Default static rendering backend for pyOpenMS-viz plots)
  • bokeh (Interactive visualization backend for pyOpenMS-viz plots)
  • plotly (Interactive visualization backend supporting 3D peak maps and alternative interactivity model)

Examples

import pandas as pd; ms_data = pd.read_csv('chromatogram.csv'); ms_data.plot(x='rt', y='intensity', kind='chromatogram'); plt.savefig('chromatogram.png')

Evaluation signals

  • Plot renders without errors and displays correct data range (x and y axes span expected retention time/m/z/intensity ranges).
  • Axis labels match the specified column names and are human-readable (e.g., 'Retention Time (min)', 'Intensity').
  • Visual continuity of mass trace: no gaps, jumps, or unexplained discontinuities in the plotted line or peaks.
  • Output file is created and is valid (file size > 0, can be opened in target application or viewer).
  • Backend switch (e.g., from matplotlib to bokeh) produces semantically identical data visualization with appropriate interactivity (zooming, panning, hover tooltips for interactive backends).

Limitations

  • pyOpenMS-viz is designed for mass spectrometry data; column names and semantics must align with MS conventions (e.g., 'rt', 'm/z', 'intensity') or the .plot() call will fail or produce incorrect results.
  • 3D peak map rendering (plot3d=True) is only supported by matplotlib and plotly backends, not bokeh.
  • The library requires data to be already in a Pandas DataFrame; conversion from proprietary MS file formats (e.g., .raw, .d) requires upstream loader tools not included in pyOpenMS-viz.
  • No built-in support for statistical overlays (e.g., confidence intervals, smoothing splines) or custom color palettes; users must post-process the returned figure object with matplotlib/bokeh/plotly APIs for advanced customization.

Evidence

  • [readme] pyOpenMS-Viz provides a simple interface for extending the plotting capabilities of Pandas DataFrames for creating static or interactive visualizations of mass spectrometry data: "pyOpenMS-Viz provides a simple interface for extending the plotting capabilities of Pandas DataFrames for creating static or interactive visualizations of mass spectrometry data"
  • [readme] integrates seamlessly with various plotting library backends (matpotlib, bokeh and plotly): "integrates seamlessly with various plotting library backends (matpotlib, bokeh and plotly)"
  • [readme] Support for multiple plotting backends: matplotlib (static), bokeh and plotly (interactive): "Support for multiple plotting backends: matplotlib (static), bokeh and plotly (interactive)"
  • [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] Flexible plotting API that interfaces directly with Pandas DataFrames: "Flexible plotting API that interfaces directly with Pandas DataFrames"
  • [other] ms_data.plot(x="rt", y="intensity", kind="chromatogram"): "ms_data.plot(x="rt", y="intensity", kind="chromatogram")"
  • [readme] PeakMap 3D | x, y, z | peakmap (plot3d=True) | ✓ | | ✓: "PeakMap 3D | x, y, z | peakmap (plot3d=True)"

Keep looking

Skills are one crate of 328,083. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.