multi-class-network-annotation
Summary
Reconstruct and render disease-associated metabolite-protein bipartite network graphs from deep learning predictions, annotating nodes by metabolite-protein association strength and disease class with disease-type color coding and node-size scaling. This skill transforms raw correlation and association data into interpretable, publication-ready network visualizations that reveal disease-specific metabolic signatures.
When to use
Apply this skill when you have (1) metabolite-disease correlation matrices and protein association predictions generated by a deep learning module (e.g., DeepMSProfiler's feature extraction output), (2) disease class labels for the samples, (3) association strength values (weights) for metabolite-protein pairs, and (4) a need to communicate multiclass relationships in a single visual where node identity, size, color, and edge transparency all encode distinct dimensions of biological information.
When NOT to use
- Input data is already a pre-rendered static image or publication figure—re-rendering is unnecessary unless parameters (e.g., color palette, node size range) need adjustment.
- Metabolite-protein associations are binary (present/absent) with no association strength or confidence metric—network visualization requires weighted edges to encode quantitative relationships; binary networks may be better served by adjacency heatmaps or Sankey diagrams.
- The analysis goal is univariate (single disease class) or aims to compare pairwise differences—bipartite multi-class networks are optimized for simultaneous visualization of three or more disease groups; simpler layouts (e.g., single-class Venn diagrams, pairwise correlation heatmaps) are more appropriate for binary or single-class scenarios.
Inputs
- Metabolite-disease correlation matrices (dense array or sparse CSR format, shape: n_metabolites × n_disease_classes)
- Protein association predictions with confidence scores (edge list: [metabolite_id, protein_id, weight, p_value] or adjacency matrix)
- Disease class labels and grouping metadata (e.g., 'cancer', 'nodule', 'healthy')
- Association strength values (normalized weights, typically [0, 1] or log-odds)
Outputs
- Bipartite network graph object (NetworkX DiGraph or igraph object with node/edge metadata)
- 2D node layout coordinates (n_nodes × 2 array, typically from force-directed embedding)
- High-resolution network plot image (PNG, SVG, or PDF) with disease-type color scheme, scaled node sizes, and transparency-encoded edge confidence
How to apply
Load the metabolite-disease correlation data and protein association predictions as dense matrices or edge lists with association weights. Construct a bipartite graph with metabolites and proteins as distinct node sets, weighted edges, and metadata (disease class, association confidence) attached to each edge and node. Apply a force-directed or hierarchical layout algorithm to position nodes in 2D space to maximize readability and reduce edge crossings. Render the network with disease-type color coding applied to node borders or backgrounds, node size scaled proportionally to association strength (e.g., node_size = min_size + (weight − weight_min) / (weight_max − weight_min) × (max_size − min_size)), and edge transparency (alpha) reflecting prediction confidence or p-value. Export the final network as a high-resolution raster (PNG, SVG) or vector format suitable for peer-reviewed publication.
Related tools
- DeepMSProfiler (Generates metabolite-disease correlation data and protein association predictions via deep learning; provides the upstream feature extraction module that supplies edges and weights for network reconstruction) — https://github.com/yjdeng9/DeepMSProfiler
- NetworkX (Python library for constructing, manipulating, and analyzing bipartite graphs; used to build the metabolite-protein network graph structure with weighted edges and disease class metadata)
- Graphviz / igraph / Cytoscape (Network layout and rendering engines; apply force-directed or hierarchical layout algorithms to position nodes and render the final annotated visualization with color, size, and transparency encoding)
- Matplotlib / Plotly (Rendering and export library to generate publication-quality raster or vector output (PNG, SVG, PDF) with custom color palettes, node size scaling, and edge transparency)
Examples
python mainRun.py -data ../example/data/ -label ../example/label.txt -out ../jobs -run_feature
Evaluation signals
- Bipartite structure is preserved: all metabolites are in one node set, all proteins in the other; no edges connect nodes within the same set.
- Node size distribution matches the input association strength: larger nodes correspond to stronger metabolite-protein associations; verify by spot-checking node diameter against underlying weight values.
- Disease-type color coding is consistent and legible: each disease class (e.g., 'cancer', 'nodule', 'healthy') is assigned a distinct color; colors are distinguishable by standard color-blindness simulation (e.g., Deuteranopia, Protanopia).
- Edge transparency correlates with confidence: edges with high association scores or low p-values appear opaque; low-confidence associations fade to transparency; verify by overlaying edge list with rendered image.
- Layout algorithm converged: nodes are distributed across the plot area without clustering all near the origin; no node overlap except where unavoidable due to high density; edge crossings are minimized (particularly for force-directed layouts).
- Export format is publication-ready: output resolution is ≥300 dpi (raster) or vector-based (SVG/PDF); no artifacts, blurring, or text clipping visible at display/print size.
Limitations
- Large networks (>500 nodes) may suffer from visual clutter and reduced interpretability even with force-directed layout; consider filtering by association strength threshold or hierarchical clustering to reduce complexity.
- Network layout algorithms (e.g., force-directed) are stochastic; multiple runs may produce slightly different layouts; fix random seed and document layout parameters for reproducibility.
- Color encoding of disease classes assumes ≤5–7 distinct classes for legibility; more classes require additional visual channels (e.g., node shape, border pattern) or faceted subplots.
- Edge transparency and node size scaling are subjective and dataset-dependent; the mapping function (e.g., linear, log, quantile-based) must be documented and justified by the distribution of association strengths in the input data.
- DeepMSProfiler's pre-trained model is trained on serum metabolomics data (859 samples: 210 healthy, 323 lung nodules, 326 lung cancer); network annotations and association patterns are specific to this context and may not generalize to other tissue types, diseases, or LC-MS platforms.
Evidence
- [other] DeepMSProfiler produces disease-associated metabolite-protein network plots as its third main output, generated from raw metabolomics data input across different disease groups.: "DeepMSProfiler produces disease-associated metabolite-protein network plots as its third main output, generated from raw metabolomics data input across different disease groups."
- [other] Construct a bipartite network graph with metabolites and proteins as nodes, weighted by association strength and disease class. Apply network layout algorithm (force-directed or hierarchical) to position nodes for interpretability. Render the network plot with disease-type color coding, node size scaled by association strength, and edge transparency reflecting confidence.: "Construct a bipartite network graph with metabolites and proteins as nodes, weighted by association strength and disease class. Apply network layout algorithm (force-directed or hierarchical) to"
- [readme] It takes raw metabolomics data from different disease groups as input and provides three main outputs: 1. Sample disease type labels. 2. Heatmaps depicting the correlation of different metabolite: "It takes raw metabolomics data from different disease groups as input and provides three main outputs: 1. Sample disease type labels. 2. Heatmaps depicting the correlation of different metabolite"
- [other] Load the metabolite-disease correlation data and protein association predictions generated by DeepMSProfiler's deep learning module.: "Load the metabolite-disease correlation data and protein association predictions generated by DeepMSProfiler's deep learning module."
- [other] Export the finalized network plot as a high-resolution image file suitable for publication.: "Export the finalized network plot as a high-resolution image file suitable for publication."
1---2name: multi-class-network-annotation3description: Use when you have (1) metabolite-disease correlation matrices and protein association predictions generated by a deep learning module (e.4license: CC-BY-4.05---67# multi-class-network-annotation89## Summary1011Reconstruct and render disease-associated metabolite-protein bipartite network graphs from deep learning predictions, annotating nodes by metabolite-protein association strength and disease class with disease-type color coding and node-size scaling. This skill transforms raw correlation and association data into interpretable, publication-ready network visualizations that reveal disease-specific metabolic signatures.1213## When to use1415Apply this skill when you have (1) metabolite-disease correlation matrices and protein association predictions generated by a deep learning module (e.g., DeepMSProfiler's feature extraction output), (2) disease class labels for the samples, (3) association strength values (weights) for metabolite-protein pairs, and (4) a need to communicate multiclass relationships in a single visual where node identity, size, color, and edge transparency all encode distinct dimensions of biological information.1617## When NOT to use1819- Input data is already a pre-rendered static image or publication figure—re-rendering is unnecessary unless parameters (e.g., color palette, node size range) need adjustment.20- Metabolite-protein associations are binary (present/absent) with no association strength or confidence metric—network visualization requires weighted edges to encode quantitative relationships; binary networks may be better served by adjacency heatmaps or Sankey diagrams.21- The analysis goal is univariate (single disease class) or aims to compare pairwise differences—bipartite multi-class networks are optimized for simultaneous visualization of three or more disease groups; simpler layouts (e.g., single-class Venn diagrams, pairwise correlation heatmaps) are more appropriate for binary or single-class scenarios.2223## Inputs2425- Metabolite-disease correlation matrices (dense array or sparse CSR format, shape: n_metabolites × n_disease_classes)26- Protein association predictions with confidence scores (edge list: [metabolite_id, protein_id, weight, p_value] or adjacency matrix)27- Disease class labels and grouping metadata (e.g., 'cancer', 'nodule', 'healthy')28- Association strength values (normalized weights, typically [0, 1] or log-odds)2930## Outputs3132- Bipartite network graph object (NetworkX DiGraph or igraph object with node/edge metadata)33- 2D node layout coordinates (n_nodes × 2 array, typically from force-directed embedding)34- High-resolution network plot image (PNG, SVG, or PDF) with disease-type color scheme, scaled node sizes, and transparency-encoded edge confidence3536## How to apply3738Load the metabolite-disease correlation data and protein association predictions as dense matrices or edge lists with association weights. Construct a bipartite graph with metabolites and proteins as distinct node sets, weighted edges, and metadata (disease class, association confidence) attached to each edge and node. Apply a force-directed or hierarchical layout algorithm to position nodes in 2D space to maximize readability and reduce edge crossings. Render the network with disease-type color coding applied to node borders or backgrounds, node size scaled proportionally to association strength (e.g., node_size = min_size + (weight − weight_min) / (weight_max − weight_min) × (max_size − min_size)), and edge transparency (alpha) reflecting prediction confidence or p-value. Export the final network as a high-resolution raster (PNG, SVG) or vector format suitable for peer-reviewed publication.3940## Related tools4142- **DeepMSProfiler** (Generates metabolite-disease correlation data and protein association predictions via deep learning; provides the upstream feature extraction module that supplies edges and weights for network reconstruction) — https://github.com/yjdeng9/DeepMSProfiler43- **NetworkX** (Python library for constructing, manipulating, and analyzing bipartite graphs; used to build the metabolite-protein network graph structure with weighted edges and disease class metadata)44- **Graphviz / igraph / Cytoscape** (Network layout and rendering engines; apply force-directed or hierarchical layout algorithms to position nodes and render the final annotated visualization with color, size, and transparency encoding)45- **Matplotlib / Plotly** (Rendering and export library to generate publication-quality raster or vector output (PNG, SVG, PDF) with custom color palettes, node size scaling, and edge transparency)4647## Examples4849```50python mainRun.py -data ../example/data/ -label ../example/label.txt -out ../jobs -run_feature51```5253## Evaluation signals5455- Bipartite structure is preserved: all metabolites are in one node set, all proteins in the other; no edges connect nodes within the same set.56- Node size distribution matches the input association strength: larger nodes correspond to stronger metabolite-protein associations; verify by spot-checking node diameter against underlying weight values.57- Disease-type color coding is consistent and legible: each disease class (e.g., 'cancer', 'nodule', 'healthy') is assigned a distinct color; colors are distinguishable by standard color-blindness simulation (e.g., Deuteranopia, Protanopia).58- Edge transparency correlates with confidence: edges with high association scores or low p-values appear opaque; low-confidence associations fade to transparency; verify by overlaying edge list with rendered image.59- Layout algorithm converged: nodes are distributed across the plot area without clustering all near the origin; no node overlap except where unavoidable due to high density; edge crossings are minimized (particularly for force-directed layouts).60- Export format is publication-ready: output resolution is ≥300 dpi (raster) or vector-based (SVG/PDF); no artifacts, blurring, or text clipping visible at display/print size.6162## Limitations6364- Large networks (>500 nodes) may suffer from visual clutter and reduced interpretability even with force-directed layout; consider filtering by association strength threshold or hierarchical clustering to reduce complexity.65- Network layout algorithms (e.g., force-directed) are stochastic; multiple runs may produce slightly different layouts; fix random seed and document layout parameters for reproducibility.66- Color encoding of disease classes assumes ≤5–7 distinct classes for legibility; more classes require additional visual channels (e.g., node shape, border pattern) or faceted subplots.67- Edge transparency and node size scaling are subjective and dataset-dependent; the mapping function (e.g., linear, log, quantile-based) must be documented and justified by the distribution of association strengths in the input data.68- DeepMSProfiler's pre-trained model is trained on serum metabolomics data (859 samples: 210 healthy, 323 lung nodules, 326 lung cancer); network annotations and association patterns are specific to this context and may not generalize to other tissue types, diseases, or LC-MS platforms.6970## Evidence7172- [other] DeepMSProfiler produces disease-associated metabolite-protein network plots as its third main output, generated from raw metabolomics data input across different disease groups.: "DeepMSProfiler produces disease-associated metabolite-protein network plots as its third main output, generated from raw metabolomics data input across different disease groups."73- [other] Construct a bipartite network graph with metabolites and proteins as nodes, weighted by association strength and disease class. Apply network layout algorithm (force-directed or hierarchical) to position nodes for interpretability. Render the network plot with disease-type color coding, node size scaled by association strength, and edge transparency reflecting confidence.: "Construct a bipartite network graph with metabolites and proteins as nodes, weighted by association strength and disease class. Apply network layout algorithm (force-directed or hierarchical) to"74- [readme] It takes raw metabolomics data from different disease groups as input and provides three main outputs: 1. Sample disease type labels. 2. Heatmaps depicting the correlation of different metabolite: "It takes raw metabolomics data from different disease groups as input and provides three main outputs: 1. Sample disease type labels. 2. Heatmaps depicting the correlation of different metabolite"75- [other] Load the metabolite-disease correlation data and protein association predictions generated by DeepMSProfiler's deep learning module.: "Load the metabolite-disease correlation data and protein association predictions generated by DeepMSProfiler's deep learning module."76- [other] Export the finalized network plot as a high-resolution image file suitable for publication.: "Export the finalized network plot as a high-resolution image file suitable for publication."