plot_metabolic_module_fpa: Plot a Metabolic Module from FPA Results

plot_metabolic_module_fpaR Documentation

Plot a Metabolic Module from FPA Results

Description

This function visualizes a selected metabolic module from the results of a Functional Pathway Analysis (FPA), displaying interactions between metabolites and features in the metabolic network.

Usage

plot_metabolic_module_fpa(
  fpa_result,
  feature_table_marker = feature_table_marker,
  include_feature = FALSE,
  include_hidden_metabolites = FALSE,
  add_compound_name = TRUE,
  metabolic_module_index = 1,
  layout = "fr",
  add_pathways = FALSE
)

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. Default is 'feature_table_marker'.

include_feature

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

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'.

metabolic_module_index

Numeric. The index of the metabolic module to visualize. Default is '1'.

layout

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

add_pathways

Add pathways beside of the network or not. Default is 'FALSE'.

Details

The function extracts and filters a metabolic subnetwork based on the selected module index. It then uses 'ggraph' to visualize the metabolic interactions while allowing customization, such as including metabolic features or hidden metabolites.

The network layout follows the Fruchterman-Reingold force-directed algorithm ('layout = "fr"'). Nodes represent metabolites and features, while edges represent different types of metabolic interactions.

Value

A 'ggplot2' object representing the metabolic module network.


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