\033[1;38;2;0;206;209mINTERACTIVE_NETWORK\033[0m

Usage :
    metafun -module INTERACTIVE_NETWORK -i <phyloseq.RDS>

\033[1;38;2;0;206;209mINTERACTIVE_NETWORK\033[0m : Interactive microbiome network analysis and visualization
=========================================================
\033[1m1. Network Construction\033[0m
   - Correlation Networks: Build networks based on abundance correlations
   - Multiple Methods: SpiecEasi, SparCC, Pearson, Spearman correlation
   - Threshold Customization: Set correlation and significance thresholds
   - Edge Filtering: Remove weak or non-significant edges

\033[1m2. Network Visualization\033[0m
   - Interactive Display: Explore networks with zoom, pan, and selection
   - Layout Options: Force-directed, circular, hierarchical layouts
   - Node Coloring: Color nodes by taxonomy or metadata
   - Node Sizing: Size nodes by abundance or network metrics

\033[1m3. Network Statistics\033[0m
   - Centrality Metrics: Degree, betweenness, closeness centrality
   - Modularity Analysis: Detect community structure
   - Hub Detection: Identify keystone taxa
   - Network Properties: Density, clustering coefficient, path lengths

\033[1m4. Comparative Network Analysis\033[0m
   - Group Comparison: Compare networks between sample groups
   - Differential Network: Identify edges unique to each group
   - Network Robustness: Assess stability of network connections

\033[1m5. Export Options\033[0m
   - Download Networks: Export in multiple formats (GraphML, GML, CSV)
   - Publication Figures: Generate high-quality network visualizations
   - Data Tables: Export node and edge statistics

This module provides a comprehensive web interface to construct, analyze, and visualize
microbial co-occurrence networks from phyloseq objects generated by WMS_TAXONOMY.

\033[1mWe recommend you to use Visual Studio Code with Remote - SSH to run this module.\033[0m
 https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-ssh


\033[1;31mRequired Parameters:\033[0m
------------------
\033[31m-i, --input\033[0m          : Phyloseq RDS file from WMS_TAXONOMY
                     (e.g., results/metagenome/WMS_TAXONOMY/phyloseq/phyloseq_species.RDS)


\033[1;33mOptional Parameters:\033[0m
------------------
\033[33m-o, --output\033[0m         : Output directory for exported files
                     (default: results/interactive_network)


\033[1;38;2;0;255;255mCommand Example:\033[0m
-----------------
    metafun -module INTERACTIVE_NETWORK -i results/metagenome/WMS_TAXONOMY/phyloseq/phyloseq_species.RDS


\033[1;38;2;0;255;255mUsage Instructions:\033[0m
-----------------
1. Data Loading
   - Load phyloseq object from WMS_TAXONOMY results
   - Select taxonomic level for analysis
   - Apply prevalence and abundance filters

2. Network Construction
   - Choose correlation method (SpiecEasi, SparCC, etc.)
   - Set correlation threshold
   - Set significance threshold (p-value)
   - Build network

3. Network Visualization
   - Select layout algorithm
   - Color nodes by taxonomy (phylum, family, genus)
   - Size nodes by abundance or centrality
   - Explore interactive network

4. Network Analysis
   - Calculate network statistics
   - Identify hub taxa (high connectivity)
   - Detect communities/modules
   - Compare between groups (if metadata provided)

5. Export Results
   - Download network in various formats
   - Export network statistics table
   - Save publication-ready figures


\033[1;38;2;0;255;255mSupported Input:\033[0m
-----------------
- Phyloseq object (.RDS) from WMS_TAXONOMY module
- Recommended: Use species-level phyloseq for detailed analysis
- Minimum samples: 10+ for reliable network construction


\033[38;2;180;180;180mNote:\033[0m This module requires phyloseq object from \033[1;38;2;8;70;250mWMS_TAXONOMY\033[0m module.
All visualizations can be exported as publication-ready figures.

