agentsclimarketplace

Diffusion score normalization with graph topology

Skill HolobiomicsLab/asb-skill-collections/collections/metabolomics/v2/skills/diffusion-score-normalization-with-graph-topology

Use when after propagating diffusion scores through the FELLA metabolite network using set.diffusion, when raw diffusion scores would otherwise favor candidates in high-degree regions or penalize those in sparse regions. Use this normalization when building the final ranked annotation table (Ranked.From its SKILL.md

Install
npx -y skills add HolobiomicsLab/asb-skill-collections --skill diffusion-score-normalization-with-graph-topology

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

diffusion-score-normalization-with-graph-topology

License: restricted — no clear open-source license detected for the underlying tool; verify licensing before commercial use or redistribution. <!-- asb-license-banner -->

Summary

Apply z-score normalization to diffusion scores computed over a metabolite network (FELLA graph) to account for local and global network topology effects, ensuring fair ranking of candidates across regions of varying network density. This prevents bias toward highly connected metabolites or sparse subgraphs when prioritizing annotation candidates.

When to use

After propagating diffusion scores through the FELLA metabolite network using set.diffusion, when raw diffusion scores would otherwise favor candidates in high-degree regions or penalize those in sparse regions. Use this normalization when building the final ranked annotation table (Ranked.Tab) to ensure candidates are prioritized by biological relevance rather than network architecture artifacts.

When NOT to use

  • Input data lacks network topology or uses a flat candidate list without graph structure (raw scores may be appropriate).
  • The FELLA graph is already highly uniform in node degree or the analysis goal explicitly requires raw diffusion scores for interpretability.

Inputs

  • diffusion input scores (probability or binary; from diffusion.input function output)
  • sample.graph (FELLA igraph object representing metabolite network)
  • filtered candidate assignments (from cluster-based filtering stage)

Outputs

  • z-score normalized diffusion scores (per metabolite/compound)
  • diffusion-prioritized Ranked.Tab (final ranked annotation table)

How to apply

Execute set.diffusion on the sample.graph (FELLA R package igraph object) with the computed diffusion input scores (from diffusion.input function using probability or binary input.type). Apply z-score normalization by setting the scores parameter to 'z' rather than 'raw' — this normalizes each diffusion score by subtracting the mean and dividing by the standard deviation of scores across the graph, accounting for the topology. The z-score transformation corrects for systematic bias introduced by network structure (e.g., hub metabolites with higher baseline connectivity). Pass the normalized scores to the finalResults function to compile the diffusion-prioritized ranked table. This ensures that the final Ranked.Tab output reflects metabolite relevance conditioned on network structure, not raw connectivity.

Related tools

  • FELLA (Provides the metabolite network graph (sample.graph) and set.diffusion function for score propagation over igraph-compatible network structures)
  • igraph (Underlying graph data structure and topology representation used by FELLA; enables z-score calculation across network-wide score distributions)
  • mWISE (Orchestrates the full diffusion prioritization workflow, including diffusion.input computation, set.diffusion execution with normalization, and finalResults compilation) — https://dev.b2s.club/b2slab/mWISE

Examples

set.diffusion(diffusion.input(filtered_candidates, input.type='probability'), sample.graph, scores='z'); finalResults(diffusion_scores_normalized, recovered_peaks)

Evaluation signals

  • Z-score normalized diffusion scores should have mean ≈ 0 and standard deviation ≈ 1 across the graph (verify via summary statistics on the normalized score vector).
  • Candidates in sparse subgraphs should rank comparably to candidates in high-degree regions when corrected for biological signal (compare rank distributions before/after normalization).
  • Final Ranked.Tab should show no systematic bias toward hub metabolites; instead, ranking reflects convergent evidence from input probabilities and network diffusion.
  • Raw and z-normalized scores should have same rank order when corrected for scale; verify Spearman correlation ≈ 1.0 between raw and normalized scores.
  • Recovered peaks (from recoveringPeaks function) should be incorporated into the final ranked output, preserving candidates that were filtered in earlier stages but later recovered.

Limitations

  • Z-score normalization assumes approximate normality of score distribution; highly skewed or bimodal distributions may produce misleading normalized scores.
  • Network topology artifacts (e.g., disconnected components or star-like subgraphs in KEGG) are not eliminated, only scaled; biological interpretation still depends on KEGG graph quality.
  • The diffusion prioritization stage relies on accurate cluster-based filtering upstream; if true metabolite candidates were removed in clustering, normalization cannot recover them (only peaks removed entirely by filtering are recovered by recoveringPeaks).

Evidence

  • [intro] The z score normalizes the diffusion scores by taking into account the topology of the graph.: "The z score normalizes the diffusion scores by taking into account the topology of the graph. On the other hand, when scores = raw, no normalization is applied."
  • [intro] set.diffusion is applied with z-score normalization on FELLA graph to obtain diffusion scores as part of diffusion prioritization.: "applying set.diffusion with z-score normalization on the FELLA graph to obtain diffusion scores"
  • [intro] The diffusion prioritization stage builds final ranked results using the finalResults function with z-score normalization.: "building a final ranked table using finalResults function with z-score normalization."
  • [intro] Diffusion input scores are computed using the diffusion.input function with input.type set to probability or binary.: "The different diffusion inputs can be computed using the diffusion.input function. The input.type argument can be set to probability or binary."

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.