agentsclimarketplace

Spatial feature embedding

Skill HolobiomicsLab/asb-skill-collections/packs/metabolomics/ms-imaging/skills/spatial-feature-embedding

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 spatial-feature-embedding

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 when analyzing imaging mass spectrometry datasets where you need to reduce high-dimensional peak intensity features while preserving spatial structure, and when automatic peak picking and marker ion identification are required.

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.6 KB, as published. Nobody here has run it

Reconstruct the graph-attention autoencoder for latent peak-feature embedding on IMS data

Summary

A graph-attention autoencoder architecture that transforms imaging mass spectrometry (IMS) peak intensities into low-dimensional latent representations by encoding spatial adjacency and node features, enabling automatic peak picking and marker ion identification in spatial metabolomics.

When to use

When analyzing imaging mass spectrometry datasets where you need to reduce high-dimensional peak intensity features while preserving spatial structure, and when automatic peak picking and marker ion identification are required. Apply this skill when your IMS data is represented as a spatial graph (nodes = pixels/spectra, edges = spatial adjacency) and you aim to discover interpretable latent features for downstream analysis.

When NOT to use

  • Input IMS data lacks explicit spatial structure or adjacency information (use standard autoencoders instead)
  • Peak intensity data is already dimensionality-reduced or converted to a pre-computed feature table
  • Analysis goal is simple denoising without latent feature extraction (use conventional filtering)

Inputs

  • Imaging mass spectrometry (IMS) spatial graph with node features (peak intensity vectors per pixel/spectrum)
  • Edge adjacency matrix or list encoding spatial relationships between pixels
  • Peak intensity feature matrix (samples × m/z values or spectral features)

Outputs

  • Latent low-dimensional peak feature embeddings (samples × latent_dimension)
  • Reconstructed peak intensity features (same shape as input)
  • Autoencoder model weights and architecture
  • Identified marker ions from iterative peak picking on latent features

How to apply

Define a graph-attention autoencoder with graph-attention encoder layers that process node features (peak intensities) and edge information (spatial adjacency relationships) from the IMS spatial graph. The encoder progressively reduces peak intensity dimensionality through one or more graph-attention layers to a target latent dimension. Implement a corresponding decoder using transposed graph-attention or fully-connected layers that mirrors the encoder structure to reconstruct peak intensities from latent vectors. Assemble the complete autoencoder by chaining encoder and decoder components, then validate the forward pass accepts spatial graph tensors (node features and adjacency) and outputs both reconstructed peak intensities and latent representations. The latent features are then used iteratively to identify marker ions through automatic peak picking.

Related tools

  • scanpy (Single-cell analysis framework used for processing and manipulation of spatial omics data structures)
  • STAGATE (Spatial transcriptomics analysis method providing graph-attention mechanisms for spatial data)
  • pandas (Data manipulation and tabular representation of peak intensities and metadata)
  • h5py (HDF5 file I/O for storing and retrieving large imaging mass spectrometry datasets)

Evaluation signals

  • Forward pass on spatial graph tensor completes without shape mismatches; encoder output latent dimension matches specified target; decoder output shape matches input peak intensity shape
  • Reconstruction error (e.g., MSE between input and reconstructed peak intensities) decreases monotonically during training
  • Latent representations capture meaningful variance: dimensionality reduction from high-dimensional peak space to low-dimensional embedding is verified (e.g., variance explained, reconstruction fidelity)
  • Marker ions identified through iterative peak picking on latent features show biological or chemical consistency (co-localization with known metabolite distributions in spatial context)
  • Graph-attention weights reflect expected spatial locality: higher attention scores between adjacent pixels/spectra, lower scores for distant nodes

Limitations

  • Requires explicit spatial adjacency definition; performance depends on correct graph construction and edge weighting
  • Computational cost scales with graph size; may be prohibitive for very large IMS datasets or dense adjacency matrices
  • No changelog found; version stability and API compatibility across releases are not documented
  • Latent feature interpretability depends on architecture choices (number of layers, hidden dimensions); no guidance provided for hyperparameter selection

Evidence

  • [other] SmartGate employs a graph-attention autoencoder architecture that generates latent low-dimensional peak features from imaging mass spectrometry datasets to enable automatic peak picking and marker ion identification.: "SmartGate employs a graph-attention autoencoder architecture that generates latent low-dimensional peak features from imaging mass spectrometry datasets to enable automatic peak picking and marker"
  • [other] Define the graph-attention autoencoder architecture with graph-attention encoder layers that process node features (peak intensities) and edge information (spatial adjacency) from IMS data.: "Define the graph-attention autoencoder architecture with graph-attention encoder layers that process node features (peak intensities) and edge information (spatial adjacency) from IMS data"
  • [other] Implement the encoder to map input peak intensity features through one or more graph-attention layers, reducing dimensionality progressively to the target latent dimension.: "Implement the encoder to map input peak intensity features through one or more graph-attention layers, reducing dimensionality progressively to the target latent dimension"
  • [readme] For imageing mass specturm(IMS) datasets, SmartGate could get latent low dimension peak features by Graph-attention autoencoder which help us achieve automic peak picking iteratively to find the marker ions.: "For imageing mass specturm(IMS) datasets, SmartGate could get latent low dimension peak features by Graph-attention autoencoder which help us achieve automic peak picking iteratively to find the"
  • [other] Assemble the complete autoencoder module by chaining encoder and decoder components and validate that forward pass accepts spatial graph tensors and outputs both reconstructed peak intensities and latent representations.: "Assemble the complete autoencoder module by chaining encoder and decoder components and validate that forward pass accepts spatial graph tensors and outputs both reconstructed peak intensities and"

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.