agentsclimarketplace

Mass spectrometry data preparation

Skill HolobiomicsLab/asb-skill-collections/packs/metabolomics/ion-mobility/skills/mass-spectrometry-data-preparation

Use when you have raw mass spectrometry data in CSV or mzML format and need to visualize it using pyOpenMS-viz, or you are working with MS data that contains retention time (rt), m/z, intensity, and optionally ion mobility dimensions that must be structured as a Pandas DataFrame before plotting.From its SKILL.md

Install
npx -y skills add HolobiomicsLab/asb-skill-collections --skill mass-spectrometry-data-preparation

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

  • 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.1k tokens by cl100k_base, as published. Nobody here has run it

mass-spectrometry-data-preparation

Summary

Load mass spectrometry data from CSV or mzML files into a Pandas DataFrame with properly named columns (m/z, retention time, intensity, ion mobility) to enable downstream visualization and analysis. This skill ensures data is in the standardized tabular format required by pyOpenMS-viz and other MS analysis libraries.

When to use

You have raw mass spectrometry data in CSV or mzML format and need to visualize it using pyOpenMS-viz, or you are working with MS data that contains retention time (rt), m/z, intensity, and optionally ion mobility dimensions that must be structured as a Pandas DataFrame before plotting.

When NOT to use

  • Input data is already a properly formatted and named Pandas DataFrame — skip directly to visualization.
  • You require preprocessing steps (e.g., peak picking, deisotoping, mass calibration) before visualization — use OpenMS algorithms upstream first.
  • Data must remain in native mzML/raw format for compliance or archival — prepare a copy for visualization without modifying originals.

Inputs

  • CSV file containing mass spectrometry data with columns for m/z, retention time (or ion mobility), and intensity
  • mzML file (mass spectrometry data file format)
  • Pandas DataFrame (when data is already partially prepared but requires column name standardization)

Outputs

  • Pandas DataFrame with standardized column names (m/z, rt or ion_mobility, intensity)
  • DataFrame ready for pyOpenMS-viz .plot() method calls

How to apply

Load the mass spectrometry file (CSV or mzML) into a Pandas DataFrame ensuring it contains required columns: m/z (mass-to-charge ratio), retention time (rt) or ion mobility, and intensity values. Verify column names match the expected schema for your chosen plot type (e.g., 'chromatogram' requires x and y dimensions; 'peakmap' requires x, y, and z). Use versatile column selection to adapt to different data formats if column names differ from defaults. The DataFrame becomes the input object for all downstream pyOpenMS-viz plotting operations via the .plot() method, which dispatches to the selected backend (matplotlib, bokeh, or plotly).

Related tools

Examples

import pandas as pd
ms_data = pd.read_csv('ms_data.csv')
ms_data.columns = ['m/z', 'rt', 'intensity']
ms_data.plot(x='m/z', y='intensity', kind='spectrum', backend='ms_matplotlib')

Evaluation signals

  • DataFrame contains all required columns (m/z, rt or ion_mobility, intensity) with no missing values in critical rows
  • Column names match expected schema for the target plot kind (e.g., 'chromatogram' has 'rt' and 'intensity' columns)
  • Data types are numeric (float or int) for all coordinate and intensity columns
  • DataFrame.plot() method executes without column-not-found errors when passed x, y, and optionally z parameters
  • Resulting plot renders correctly in the selected backend (matplotlib, bokeh, or plotly) with no data binding errors

Limitations

  • pyOpenMS-viz expects specific column naming conventions; if source data uses non-standard names (e.g., 'mz' instead of 'm/z'), manual column renaming is required.
  • The library supports versatile column selection but assumes rectangular (2D) or 3D tabular structure; ragged or hierarchical MS data formats may require flattening.
  • mzML file loading and MS-specific preprocessing (e.g., centroiding, smoothing) are outside the scope of this skill; use OpenMS algorithms or pyOpenMS for those steps.
  • Large MS datasets (millions of scans) may encounter memory constraints in Pandas; consider subsampling or chunked loading for very high-dimensional data.

Evidence

  • [other] Load mass spectrometry data into a Pandas DataFrame with columns for m/z, retention time (or ion mobility), and intensity.: "Load mass spectrometry data into a Pandas DataFrame with columns for m/z, retention time (or ion mobility), and intensity."
  • [other] Load mass spectrometry data into a pandas DataFrame from a deposited CSV or mzML file containing retention time (rt) and intensity columns.: "Load mass spectrometry data into a pandas DataFrame from a deposited CSV or mzML file containing retention time (rt) and intensity columns."
  • [readme] Versatile column selection for easy adaptation to different data formats: "Versatile column selection for easy adaptation to different data formats"
  • [other] Plot directly from a pandas dataframe object: "Plot directly from a pandas dataframe object"
  • [intro] provides a simple interface for extending the plotting capabilities of Pandas DataFrames for creating static or interactive visualizations of mass spectrometry data: "provides a simple interface for extending the plotting capabilities of Pandas DataFrames for creating static or interactive visualizations of mass spectrometry data"

What ships with it

Read from the repository

Just SKILL.md. No reference files, no scripts.

Keep looking

Skills are one crate of 325,949. 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.