The function modelorg2tsv
writes the content of an instance of class
modelorg
to text files in a character-separated value format
adopted from the BiGG database output.
modelorg2tsv(model, prefix, suffix, extMetFlag = "b",
fielddelim = "\t", entrydelim = ", ",
makeClosedNetwork = FALSE,
onlyReactionList = FALSE,
minimalSet = FALSE,
fpath = SYBIL_SETTINGS("PATH_TO_MODEL"), ...)
An object of class modelorg
.
A single character string giving the prefix for three possible output files (see Details below).
A single character string giving the file name extension. If missing, the
value of suffix
depends on the argument fielddelim
, see
Details below.
Default: "tsv"
.
A single character string giving the identificator for metabolites which
are outside the system boundary. Only necessary, if the model is a closed
one.
Default: "b"
.
A single character string giving the value separator.
Default: "\t"
.
A single character string giving the a separator for values containing
more than one entry.
Default: ", "
.
Boolean. If set to TRUE
, external metabolites (which are outside the
system boundary) will be added to the model. These metabolites participate
in reactions, transporting metabolites across the system boundary.
The metabolite id will be the same as for the metabolite inside the system,
but the compartment type is set to the value of argument
extMetFlag
.
For example, most models contain a transport reaction for glucose:
glc[c] <==>
If makeClosedNetwork
is set to TRUE
, this reaction will be
written as
glc[c] <==> glc[b]
with the letter b
being the default value for extMetFlag
.
Default: FALSE
.
Boolean. If set to TRUE
, only one file containing all reaction
equations will be produced (output file has one column).
Default: FALSE
.
Boolean. If set to TRUE
, only one file containing the fields
"abbreviation"
, "equation"
, "lowbnd"
, "uppbnd"
and "obj_coef"
will be produced (output file has five columns).
Default: FALSE
.
A single character string giving the path to a certain directory in which
the output files will be stored.
Default: SYBIL_SETTINGS("PATH_TO_MODEL")
.
Further arguments passed to write.table
, e.g. the Boolean
argument quote
can be used here.
Returns TRUE
on success.
The function modelorg2tsv
produces three output files: a reactions
list, a metabolites list and a model description file.
The reactions list has the following columns:
"abbreviation" |
react_id(model) |
"name" |
react_name(model) |
"equation" |
the reaction equations |
"reversible" |
react_rev(model) |
"compartment" |
reaction compartment(s) |
"lowbnd" |
lowbnd(model) |
"uppbnd" |
uppbnd(model) |
"obj_coef" |
obj_coef(model) |
"rule" |
gpr(model) |
"subsystem" |
subSys(model) |
The metabolites list has the following columns:
"abbreviation" |
met_id(model) |
"name" |
met_name(model) |
"compartment" |
met_comp(model) |
The model description file has the following columns:
"name" |
mod_name(model) |
"id" |
mod_id(model) |
"description" |
mod_desc(model) |
"compartment" |
mod_compart(model) |
"abbreviation" |
unique compartment abbreviations |
"Nmetabolites" |
number of metabolites |
"Nreactions" |
number of reactions |
"Ngenes" |
number of independend genes |
"Nnnz" |
number of non-zero elements in the stoichiometric matrix |
If onlyReactionList
is set to TRUE
, only the reactions list
containing the column "equation"
is produced.
Please read the package vignette for detailed information about file formats and examples.
All fields in the output files are in double quotes. In order to read them in
with readTSVmod
, set argument quoteChar
to "\""
.
The BiGG database http://bigg.ucsd.edu/.