Builds a Sankey diagram with three layers based on a hypeR-GEM object: metabolites → metabolite sets (MSETs) → gene sets (GSETs).

sankey_plot(
  hypeR_GEM_obj,
  msets_list,
  gsets_list,
  key = "refmet_name",
  font_size = 12,
  node_width = 30
)

Arguments

hypeR_GEM_obj

A list with components $mapped_metabolite_signatures (a list of data frames) and $gene_tables (a list of data frames).

msets_list

A list of metabolite-set collections. Each element should be a named list where names are set names and values are character vectors of metabolite identifiers matching key.

gsets_list

A list of gene-set collections. Each element should be a named list where names are set names and values are character vectors of genes.

key

Column name in your metabolite tables used as the metabolite identifier (e.g., "refmet_name", "HMDB"). Default: "refmet_name".

font_size

Numeric font size for node labels. Default: 12.

node_width

Numeric node width. Default: 30.

Value

A networkD3::sankeyNetwork htmlwidget.