plot_metabolic_module_fpa | R Documentation |
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.
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
)
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'. |
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'. |
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.
A 'ggplot2' object representing the metabolic module network.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.