Met2EnzGraph: Met2EnzGraph

View source: R/Met2Graph.R

Met2EnzGraphR Documentation

Met2EnzGraph

Description

This function loads a metabolic model in SBML format and returns a metabolic graph having enzymes as nodes and edges connecting them if they catalyze two reactions which produce and consume a metabolite, respectively.

Usage

Met2EnzGraph(
  infile,
  rmMets,
  recMets_list,
  outDir,
  outFormat,
  directed,
  add_rev_rxn
)

Arguments

infile

Path to the input SBML file

rmMets

rmMets logical value indicating whether the recurring metabolites must be removed. Default TRUE.

recMets_list

a list of recurring metabolite names. The format must be the same of the model. If not provided and rmMets=TRUE the list used is the one provided by the package "system.file("extdata", "metNames.txt", package = "Met2Graph")".

outDir

path to output directory. If not provided outputs will be written in "system.file("extdata/output/", package = "Met2Graph")".

outFormat

character string indicating the format of the graph to export. Default "ncol". For other formats and details please see write.graph function of igraph package.

directed

Logical value, indicating if the graph must be created directed. Default TRUE.

add_rev_rxn

Logical value, whether or not reversible reactions must be considered and edges written in both directions. If FALSE it takes into account the direction as present in the stoichiometric matrix, for general models it is usually forced from left to right. In case of condition-specific models obtained through FBA this is not necessary. Default FALSE.

Details

The enzymes catalyzing reactions are connected by metabolites. Two enzymes are connected if they catalyze reactions which produce and consume a metabolite, respectively. The graphs are unweighted. Enzymes for each reaction are annotated according to GPR rules. Enzymes related by AND are complexes and the considered as a single node, while OR relationships are split as different nodes. The gene-protein-reaction (GPR) associations are needed. It can be provided by the user through the parameter "gpr". If not provided by the user, it is automatically extracted form the model, if not present in the model, the one from the human generic GEM is used. Recurring metabolites (e.g. ATP, CO2, NADP) can be removed to avoid unrealistic paths setting the parameter "rmMets"==TRUE and using the list of these compounds contained in the data of the package by default or one provided by the user through parameter "recMets". If the parameter add_rev_rxn is set to TRUE, the edges will be assigned considering both directions of reversible reactions. The resulting graph can be built directed or not. Given the rules behind the definition of connections it is naturally directed but the user can choose to not consider this aspect, setting the "directed" parameter to FALSE.

Value

A metabolic graph in tabular format ("from","to","Metabolite") and igraph format chosen.

Examples

## Not run: 
infile <- system.file("extdata", "kidney.xml", package = "Met2Graph")
outDir <- system.file("extdata/output/", package = "Met2Graph")
Met2EnzGraph(rmMets=TRUE, outDir=outDir, outFormat="graphml")
## End(Not run)

cds-group/Met2Graph documentation built on July 5, 2022, 2:15 p.m.