agentsclimarketplace

Spatio molecular matrix processing

Skill HolobiomicsLab/asb-skill-collections/collections/metabolomics/v2/skills/spatio-molecular-matrix-processing

Use when you have deposited SpaceM spatio-molecular matrices (MORPHnMOL.From its SKILL.md

Install
npx -y skills add HolobiomicsLab/asb-skill-collections --skill spatio-molecular-matrix-processing

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

7.9 KB, ~1.4k tokens by cl100k_base, as published. Nobody here has run it

spatio-molecular-matrix-processing

Summary

Downstream processing and analysis of spatio-molecular matrices produced by SpaceM (single-cell metabolomics integrated with MALDI-imaging mass spectrometry) to extract metabolic features, perform dimensionality reduction, and generate publication-ready visualizations. This skill transforms the raw spatio-molecular matrix (MORPHnMOL.csv) into interpretable figures and processed data tables.

When to use

You have deposited SpaceM spatio-molecular matrices (MORPHnMOL.csv) from single-cell metabolomics experiments and need to replicate or extend the downstream analysis pipeline to generate main figures, perform feature extraction, apply data transformation, and produce comparative visualizations across cell populations or experimental conditions.

When NOT to use

  • Raw MALDI-imaging mass spectrometry files (.RAW, .imzML, .ibd) that have not yet been processed to produce spatio-molecular matrices—use the full SpaceM pipeline (CellProfiler segmentation, METASPACE annotation, matrix assembly) instead.
  • Pre-stitched microscopy images without cell segmentation or ablation mark detection—the downstream processing assumes cell-level assignments and spatial coordinates are already resolved.
  • If your input lacks both morphological (cell segmentation) and molecular (metabolite intensity) annotations—the spatio-molecular matrix must contain both dimensions.

Inputs

  • SpaceM spatio-molecular matrix (CSV file: MORPHnMOL.csv)
  • Cell morphology and molecular annotation metadata
  • Spatial coordinate information (x, y pixel or um coordinates per cell)

Outputs

  • Processed and transformed spatio-molecular data table (CSV)
  • Publication-ready figures (scatter plots, heatmaps, clustering visualizations)
  • Feature-extracted matrices (reduced dimensionality representations)
  • Cell segmentation and metabolite assignment results

How to apply

Load the spatio-molecular matrix CSV file into Python 3 and execute the provided interactive Google Colab notebook sequentially, which implements data transformation (normalization, scaling), feature extraction (metabolite selection, dimensionality reduction), and visualization steps (clustering plots, heatmaps, scatter plots). The notebook accepts the downloaded matrices as input data structures and applies the documented processing logic to replicate all main manuscript figures. Execute all cells in order, verify that intermediate outputs match expected shapes and value ranges at each step, and save the resulting processed data tables and output figures. The pipeline is optimized for the SpaceM output format where rows are single cells and columns are metabolite intensities with spatial coordinates.

Related tools

Evaluation signals

  • All main figures from the manuscript are successfully regenerated with matching layout, data distributions, and statistical annotations.
  • The processed data table preserves the original number of cells (rows) and contains expected metabolite columns with numeric intensities (no NaN or Inf values outside specified missing regions).
  • Intermediate outputs at each pipeline step (after normalization, after feature selection, after dimensionality reduction) match the documented expected shapes and value ranges reported in the notebook.
  • Spatial coordinate metadata remain intact and correctly linked to metabolite intensities, allowing reproduction of spatial distribution plots.
  • Output CSV files are well-formed and can be re-loaded without parsing errors; figure files are generated in standard image formats and display without corruption.

Limitations

  • The downstream processing pipeline is tightly coupled to the SpaceM-specific matrix format (MORPHnMOL.csv); matrices from other single-cell metabolomics platforms or different preprocessing pipelines may require format adaptation.
  • The Google Colab notebook is designed for interactive exploration and figure replication; production-scale batch processing of large numbers of matrices may require conversion to a standalone script with explicit error handling.
  • The pipeline assumes that cell segmentation and metabolite-to-cell assignment have already been performed correctly upstream (via CellProfiler and METASPACE); poor segmentation or misalignment of ablation marks will propagate to and compromise downstream results.
  • No changelog was found in the documentation; version compatibility and reproducibility across different releases of Python, pandas, scikit-learn, and visualization dependencies are not explicitly tracked.

Evidence

  • [readme] the downstream processing of the spatio-molecular matrices provided by SpaceM and replicate all main figures of the manuscript: "we present interactively using Google Collab the downstream processing of the spatio-molecular matrices"
  • [other] Execute all notebook cells sequentially, running the downstream processing pipeline including data transformation, feature extraction, and visualization steps: "Execute all notebook cells sequentially, running the downstream processing pipeline including data transformation, feature extraction, and visualization steps."
  • [readme] The final spatio-molecular matrix will be stored as MORPHnMOL.csv and can be found inside the scAnalysis sub-folder: "The final spatio-molecular matrix will be stored as MORPHnMOL.csv and can be found inside the scAnalysis sub-folder."
  • [readme] We support python3. For the detailed requirements, see the file 'requirements.txt'. To install the dependencies, run: pip install -r requirements.txt: "We support python3. For the detailed requirements, see the file 'requirements.txt'. To install the dependencies, run: pip install -r requirements.txt"
  • [readme] The SpaceM datasets presented in the manuscript are available on MetaboLights: "The SpaceM datasets presented in the manuscript are available on MetaboLights."

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.