Directed edge weight encoding
Use when after computing a Jacobian matrix from covariance data and extracting directed edges representing metabolite interactions, use this skill when you need to communicate the magnitude and direction of metabolite-to-metabolite influences in a single integrated visualization.From its SKILL.md
npx -y skills add HolobiomicsLab/asb-skill-collections --skill directed-edge-weight-encodingAssembled 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.2k tokens by cl100k_base, as published. Nobody here has run it
directed-edge-weight-encoding
Summary
Encode metabolite-to-metabolite interaction strengths and directionality as edge weights and visual properties (color, thickness, arrow direction) in network graphs derived from Jacobian matrices. This enables publication-quality visualization of dynamic metabolomic network topology where edge magnitude and sign reflect the quantitative influence of one metabolite on another.
When to use
After computing a Jacobian matrix from covariance data and extracting directed edges representing metabolite interactions, use this skill when you need to communicate the magnitude and direction of metabolite-to-metabolite influences in a single integrated visualization. Specifically, when Jacobian coefficients vary substantially across the network (e.g., ranging from −2.5 to +1.8) and distinguishing strong vs. weak interactions visually is essential for biological interpretation.
When NOT to use
- Jacobian matrix contains only zero coefficients or all interactions are below significance threshold — no meaningful edges to visualize.
- Input is already a pre-rendered network image or adjacency list without original coefficient values — weight encoding cannot be applied retroactively.
- Analysis goal is hypothesis-free network topology only (e.g., community detection, clustering) without need to communicate interaction magnitude or direction.
Inputs
- Jacobian matrix (numerical matrix, rows/columns correspond to metabolites)
- Metabolite identifiers (KEGG IDs or chemical names corresponding to matrix dimensions)
- Network layout algorithm specification (optional; defaults to force-directed)
Outputs
- Network graph object (igraph or tidygraph R object)
- Publication-quality network visualization (rendered figure with labeled nodes, weighted/colored directed edges)
- Edge list or weight table (data frame mapping metabolite pairs to interaction strength and direction)
How to apply
Extract non-zero or statistically significant Jacobian coefficients as directed edges between metabolite nodes. Map edge weight magnitude to visual properties: assign line thickness or opacity proportional to the absolute value of the Jacobian coefficient, and use color (e.g., red for positive/activating, blue for negative/inhibitory interactions) to encode interaction direction. Apply a network layout algorithm (e.g., force-directed or hierarchical) to position nodes for clarity, then render the graph with labeled metabolites, weighted/colored edges, and a legend explaining the encoding scheme. Validate that the resulting visualization preserves the sign and rank order of coefficients from the original matrix.
Related tools
- MInfer (R package providing Jacobian matrix computation and network visualization functions; includes visualize_heatmap() and visualize_3d() for rendering weighted network structures.) — https://github.com/cellbiomaths/MInfer
- igraph (R graph library for constructing network objects and applying layout algorithms to position nodes in 2D space.)
- tidygraph (R graph manipulation library for managing network nodes and edges with associated metadata (weights, directions, interaction types).)
- R (Runtime environment for loading Jacobian matrices, extracting edges, constructing graph objects, and rendering visualizations.)
Examples
visualize_heatmap(jacobian_6C$J, title = "Jacobian Matrix - 6C")
Evaluation signals
- Edge weights (line thickness, color intensity, or numeric labels) monotonically correspond to absolute Jacobian coefficient magnitudes — verify by spot-checking 3–5 edges against the original matrix values.
- Edge direction (arrow orientation or color polarity) accurately reflects the sign of each Jacobian coefficient: positive coefficients are visually distinct from negative ones.
- Network layout preserves relative spatial relationships: strongly connected metabolites are positioned close together, and isolated nodes are peripheral.
- Legend or figure caption unambiguously explains the encoding scheme (e.g., 'Red = activating interaction; Blue = inhibitory; Line thickness ∝ |coefficient|').
- Visualization is publication-ready: fonts are readable, node labels do not overlap excessively, and edge crossings are minimized by layout algorithm.
Limitations
- Visualization quality degrades for large networks (>50 nodes) due to node/edge overlap; consider filtering to subnetworks of interest or using hierarchical or circular layouts.
- Color-based encoding of interaction direction may not be accessible to colorblind readers — use shape, texture, or supplementary numeric labels to encode direction redundantly.
- Jacobian matrix coefficients may reflect correlation structure rather than causal metabolite interactions; edge weights should not be interpreted as mechanistic reaction rates without additional biological validation.
- No changelog or version history available for MInfer, limiting reproducibility across future updates.
Evidence
- [other] Extract edge information from the Jacobian matrix by identifying non-zero or significant coefficients that represent metabolite-to-metabolite interactions.: "Extract edge information from the Jacobian matrix by identifying non-zero or significant coefficients that represent metabolite-to-metabolite interactions."
- [other] Render the network visualization with metabolite labels, edge weights or colors to encode interaction strength and direction, and save as a publication-quality figure.: "Render the network visualization with metabolite labels, edge weights or colors to encode interaction strength and direction, and save as a publication-quality figure."
- [other] Construct a network graph object representing metabolites as nodes and Jacobian coefficients as directed edges using an R graph library (e.g., igraph or tidygraph).: "Construct a network graph object representing metabolites as nodes and Jacobian coefficients as directed edges using an R graph library (e.g., igraph or tidygraph)."
- [intro] MInfer provides tools for data preparation, covariance matrix generation, Jacobian matrix computation, and visualization of metabolite interaction networks: "MInfer provides tools for data preparation, covariance matrix generation, Jacobian matrix computation, and visualization of metabolite interaction networks"
- [readme] Visualize the Jacobian matrices using a heatmap or 3D plot: "Visualize the Jacobian matrices using a heatmap or 3D plot"
What ships with it
Read from the repository
Just SKILL.md. No reference files, no scripts.