agentsclimarketplace

Latent feature interpretation

Skill HolobiomicsLab/asb-skill-collections/packs/metabolomics/ion-mobility/skills/latent-feature-interpretation

Use when you have imaging mass spectrometry (IMS) data preprocessed into an h5py-backed feature matrix, and a trained graph-attention autoencoder has already extracted latent low-dimensional peak features.From its SKILL.md

Install
npx -y skills add HolobiomicsLab/asb-skill-collections --skill latent-feature-interpretation

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

latent-feature-interpretation

Summary

Interpret and rank latent low-dimensional peak features extracted by a graph-attention autoencoder to identify and select marker ions in imaging mass spectrometry datasets. This skill bridges unsupervised feature learning and interpretable marker-ion discovery by using learned latent representations as a ranking criterion for iterative peak selection.

When to use

You have imaging mass spectrometry (IMS) data preprocessed into an h5py-backed feature matrix, and a trained graph-attention autoencoder has already extracted latent low-dimensional peak features. You need to transform these abstract latent representations into a ranked, actionable list of marker m/z peaks for downstream analysis, and your stopping criterion is either a target count of markers or plateau in selection informativeness.

When NOT to use

  • The latent features have not yet been extracted; use the graph-attention autoencoder feature-extraction workflow first.
  • Your IMS dataset is already a reduced feature table (not raw peak data); marker selection from pre-computed features may not benefit from latent reranking.
  • You require deterministic, domain-knowledge-driven marker selection (e.g., known metabolite m/z values); latent-feature ranking is data-driven and may conflict with prior knowledge.

Inputs

  • h5py-backed latent low-dimensional peak features (output from graph-attention autoencoder)
  • imaging mass spectrometry m/z dataset (referenced by feature index)
  • peak selection criterion specification (e.g., importance metric, variance threshold)
  • stopping criterion (target marker count or convergence threshold)

Outputs

  • ranked marker-ion m/z identifier list (CSV file)
  • iteration history (peak selection counts and scoring per iteration)
  • feature importance or variance rankings

How to apply

Load the latent low-dimensional peak features output by the graph-attention autoencoder (stored in h5py format). Initialize an empty candidate marker-ion list and set an iteration counter. In each iteration, rank all peaks not yet selected according to their feature importance or variance in latent space, then select the top m/z peaks meeting the criterion. Add newly selected peaks to the marker-ion list and update iteration state. Repeat until a stopping criterion is met (e.g., target number of markers reached, or diminishing returns observed in feature variance or importance). Export the final ranked list of marker-ion m/z identifiers to CSV using pandas. The rationale is that latent features capture nonlinear, graph-structured relationships in peak space that raw intensity alone misses, so sorting peaks by their latent-space informativeness yields more discriminative markers than intensity-only ranking.

Related tools

  • h5py (load and access latent low-dimensional peak features stored in HDF5 format)
  • pandas (rank peaks by latent-space criteria, manage marker-ion lists, and export final ranked m/z identifiers to CSV)
  • Graph-attention autoencoder (upstream feature extractor that produces latent low-dimensional peak features used as input to this skill) — https://github.com/zhanglabtools/SmartGate
  • scanpy (optional downstream tool for integration with single-cell or spatial transcriptomics workflows)
  • STAGATE (optional related spatial analysis framework)

Evaluation signals

  • The final marker-ion list has length equal to or approaching the target number of markers specified; iteration stopped at the intended stopping criterion.
  • Marker m/z values are non-redundant and distinct; no duplicate m/z identifiers appear in the ranked output.
  • Feature importance or variance scores are monotonically decreasing or plateau as iteration progresses, indicating that peaks selected earlier have higher latent-space informativeness.
  • The exported CSV file is valid pandas-readable format with columns for m/z identifier, selection rank, and feature importance/variance score.
  • Spot-check: manually verify that a subset of top-ranked marker ions correspond to known or biologically plausible metabolite m/z values in the given tissue or sample type.

Limitations

  • Latent-feature ranking is data-driven and hypothesis-free; selected markers may not align with prior domain knowledge or known metabolite m/z databases.
  • The quality of marker selection depends critically on the quality and representativeness of the latent features; poorly trained autoencoders will propagate bias into marker ranking.
  • No systematic method is provided in the documentation for choosing the stopping criterion (target marker count or convergence threshold); this remains a user choice that affects downstream analysis.
  • The iterative peak-picking process is greedy (peaks are selected independently without considering interactions); feature redundancy among selected markers is not explicitly controlled.

Evidence

  • [other] SmartGate obtains latent low-dimension peak features from a graph-attention autoencoder and applies these features in an iterative automatic peak-picking process to identify marker ions in imaging mass spectrometry datasets.: "SmartGate obtains latent low-dimension peak features from a graph-attention autoencoder and applies these features in an iterative automatic peak-picking process to identify marker ions in imaging"
  • [other] In each iteration, apply a peak-selection criterion (e.g., ranked by feature importance or variance in latent space) to identify the top-scoring m/z peaks not yet selected.: "In each iteration, apply a peak-selection criterion (e.g., ranked by feature importance or variance in latent space) to identify the top-scoring m/z peaks not yet selected."
  • [readme] 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.: "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."
  • [other] Load latent low-dimension peak features extracted by the Graph-attention autoencoder from the preceding feature-extraction step.: "Load latent low-dimension peak features extracted by the Graph-attention autoencoder from the preceding feature-extraction step."
  • [other] Repeat steps 3–4 until a stopping criterion is met (e.g., target number of markers reached, or diminishing returns observed).: "Repeat steps 3–4 until a stopping criterion is met (e.g., target number of markers reached, or diminishing returns observed)."

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.