Learn R Programming

fbar (version 0.6.0)

decompose_metabolites: Decompose a metabolite table into the metabolite stub itself and the compartment it is in

Description

Decompose a metabolite table into the metabolite stub itself and the compartment it is in

Usage

decompose_metabolites(
  met_table,
  compartment_regex = "(\\[[a-zA-Z0-9]+]$)|(_[a-zA-Z]$)"
)

Arguments

met_table

A metabolite table, with one column, met

compartment_regex

Regular expression to identify compartments in model

Value

a metabolite table with the columns chemical and compartment

Examples

Run this code
# NOT RUN {
data(ecoli_core)

mod <- reactiontbl_to_expanded(ecoli_core)

decompose_metabolites(mod$mets)

recompose_metabolites(decompose_metabolites(mod$mets))
# }

Run the code above in your browser using DataLab