Skip to contents

Normalize metabolite annotation column names so downstream cross-omics functions can rely on a stable schema.

Usage

standardize_metabolite_annotation(annotation_table, variable_info = NULL)

Arguments

annotation_table

A metabolite annotation table.

variable_info

Optional metabolite variable_info used to keep output rows aligned with feature ids.

Value

A standardized annotation table.

Examples

annotation_table <- data.frame(
  variable_id = c("M1", "M2"),
  Compound = c("acetate", "lactate"),
  Pathway = c("organic_acid", "organic_acid")
)
standardize_metabolite_annotation(annotation_table)
#>   variable_id compound_name   pathway_id pathway_name annotation_level
#> 1          M1       acetate organic_acid         <NA>             <NA>
#> 2          M2       lactate organic_acid         <NA>             <NA>