plot_metabolic_network_fpa: Plot the Dysregulated Metabolic Network from FPA Results

plot_metabolic_network_fpaR Documentation

Plot the Dysregulated Metabolic Network from FPA Results

Description

This function visualizes the dysregulated metabolic network obtained from Functional Pathway Analysis (FPA), highlighting interactions between metabolites and features in the network.

Usage

plot_metabolic_network_fpa(
  fpa_result,
  feature_table_marker,
  include_feature = FALSE,
  node_color_by_module = FALSE,
  include_hidden_metabolites = FALSE,
  add_compound_name = TRUE,
  layout = "fr"
)

Arguments

fpa_result

List. The output of the Functional Pathway Analysis (FPA), containing 'dysregulated_metabolic_module', 'dysregulated_metabolic_network', and 'annotation_table'.

feature_table_marker

Data frame. The feature table containing metabolic markers.

include_feature

Logical. Whether to include detected metabolic features in the plot. Default is 'FALSE'.

node_color_by_module

Logical. When doesn't include features (include_feature = FALSE), whether set the colors of the nodes by metabolics modules.

include_hidden_metabolites

Logical. Whether to include hidden metabolites in the plot. Default is 'FALSE'.

add_compound_name

Logical. Whether to add compound names as labels in the visualization. Default is 'TRUE'.

layout

The layout of the network, such as 'kk' or 'fr'.

Details

The function processes the metabolic network by filtering and selecting relevant nodes and edges. It allows the inclusion of metabolic features and hidden metabolites based on user preference. The network is visualized using the Fruchterman-Reingold force-directed algorithm ('layout = "fr"') to clearly illustrate metabolic interactions.

Value

A 'ggplot2' object representing the metabolic network.

Examples

## Not run: 
  # Assume `fpa_result` is a precomputed list from an FPA analysis
  plot_metabolic_network_fpa(
    fpa_result = fpa_result,
    feature_table_marker = feature_table_marker,
    include_feature = TRUE,
    include_hidden_metabolites = FALSE,
    add_compound_name = TRUE
  )

## End(Not run)

tidymass/metpath documentation built on June 1, 2025, 10:05 p.m.