writeTSVmod: Write a model in TSV format for the 'sybil' R package

writeTSVmodR Documentation

Write a model in TSV format for the 'sybil' R package

Description

This function converts a data.frame or a modelOrg model to TSV format for the 'sybil' R package. TSV format require three '.TSV' output files ('_react.tsv', '_met.tsv', '_desc.tsv').

Usage

writeTSVmod(modelData, modelID = "model", outputFile, boundary = "b")

Arguments

modelData

A modelOrg or a data.frame object. If a data.frame is given, it must contain following mandatory colnames:

  • 'ID': A list of single character strings containing the reaction abbreviations, Entries in the field abbreviation are used as reaction ids, so they must be unique.

  • 'REACTION': A set of stoichiometric reaction with the following characteristics:

    • Arrows symbols must be given in the form '=>' or '<=>'

    • Inverse arrow symbols '<=' or other types as: '-->', '<==>', '->' will not be parsed and will lead to errors.

    • Arrow symbols and plus signs (+) must be surrounded by a space character

    • Stoichiometric coefficients must be surrounded by a space character and not by parentheses.

    • Each metabolite must have only one stoichiometric coefficient, substituents must be joined to metabolite name by a hyphen (-) symbol.

    • Exchange reactions must have only one metabolite before arrow symbol

    • Compartments must be given between square brackets ([compartment]) joined at the end of metabolite name

    Some examples of valid stoichiometric reactions are:

    • H2O[c] + Urea-1-Carboxylate[c] <=> 2 CO2[c] + 2 NH3[c]

    • ADP[c] + Phosphoenolpyruvate[c] => ATP[c] + Pyruvate[c]

    • CO2[c] <=>

  • 'GPR': A set of genes joined by boolean operators as AND or OR, rules may be nested by parenthesis. (optional: column can be empty),

  • 'LOWER.BOUND': A list of numeric values containing the lower bounds of the reaction rates. If not set, zero is used for an irreversible reaction and -1000 for a reversible reaction. (optional: column can be empty),

  • 'UPPER.BOUND': A list of numeric values containing the upper bounds of the reaction rates. If not set, 1000 is used by default. (optional: column can be empty),

  • 'OBJECTIVE': A list of numeric values containing objective values (-1, 0 or 1) for each reaction (optional: column can be empty).

modelID

A single character string giving the modelID

outputFile

A writable path for the three '.TSV' output files.

boundary

A single character string specifying the compartment to be used as boundary

Value

A set of three '.TSV' files in a valid format to the 'sybil' R package.

Author(s)

Daniel Camilo Osorio <dcosorioh@tamu.edu>

Examples

#' # Loading a metabolic model
glycolysis <- read.csv(system.file("extdata/glycolysisModel.csv",package = "minval"), sep='\t')

## Not run: 
# Writing a model in TSV format
writeTSVmod(modelData = glycolysis,modelID = "Glycolysis",outputFile = "glycolysis")

# Writing a modelOrg object in a SBML format
## Loading the sybil R package
library(sybil)

## Loading the data
data("Ec_core")

## Writing the modelOrg object in a SBML format
writeTSVmod(modelData = Ec_core,modelID = "E.coli",outputFile = "eColi")

## End(Not run)

minval documentation built on May 9, 2022, 5:07 p.m.