Learn R Programming

sybilSBML (version 3.1.2)

writeSBML: Exports a Metabolic Network in SBML Format

Description

The function exports a metabolic network from S4 object of the class modelorg in SBML format. The function returns TRUE if the SBML file is successfully built.

Usage

writeSBML(morg=NULL,level=2,version=4,fbcLevel=0,
             filename="export.xml",
             recoverExtMet=FALSE,
             printNotes=TRUE,
             printAnnos=TRUE,
             validation=FALSE)

Arguments

morg

An S4 object of the class modelorg.

level

A single integer value containing the SBML level for the exporting SBML file. Default: 2.

version

A single integer value containing the SBML version for the exporting SBML file. Default: 4.

fbcLevel

A single integer value containing the fbc package version for the exporting SBML file. Default: 2.

filename

SBML filename for exporting the model. Default: "export.xml".

recoverExtMet

Boolean: recover external metabolites and refer them to compartment "BOUNDARY". Default: FALSE.

printNotes

Boolean: print Notes from original SBML file . Default: TRUE.

printAnnos

Boolean: print Annotations from original SBML file . Default: TRUE.

validation

Boolean: print containing errors for xml file . Default: TRUE.

Value

A single boolean value for a successful export.

Details

The library libSBML is used to export a modelorg to a SBML file.

If sybilSBML was built with a libSBML version, that was not including the FBC plugin and the Groups plugin, the function is not writing an output file and returns FALSE. Please make sure that you build sybilSBML with the libSBML version containing the FBC and Group plugins (check out installation details).

References

The BiGG database http://bigg.ucsd.edu/.

Bornstein, B. J., Keating, S. M., Jouraku, A., and Hucka M. (2008) LibSBML: An API Library for SBML. Bioinformatics 24, 880--881.

Schellenberger, J., Park, J. O., Conrad, T. C., and Palsson, B. <U+00D8>., (2010) BiGG: a Biochemical Genetic and Genomic knowledgebase of large scale metabolic reconstructions. BMC Bioinformatics 11, 213.

Becker, S. A., Feist, A. M., Mo, M. L., Hannum, G., Palsson, B. <U+00D8>. and Herrgard, M. J. (2007) Quantitative prediction of cellular metabolism with constraint-based models: the COBRA Toolbox. Nat Protoc 2, 727--738.

Schellenberger, J., Que, R., Fleming, R. M. T., Thiele, I., Orth, J. D., Feist, A. M., Zielinski, D. C., Bordbar, A., Lewis, N. E., Rahmanian, S., Kang, J., Hyduke, D. R. and Palsson, B. <U+00D8>. (2011) Quantitative prediction of cellular metabolism with constraint-based models: the COBRA Toolbox v2.0. Nat Protoc 6, 1290--1307.

See Also

readSBMLmod

Examples

Run this code
# NOT RUN {
  dir  <- system.file(package = "sybilSBML", "extdata")
  file <- file.path(dir, "ecoli_core_model.xml")
  mod  <- readSBMLmod(file, bndCond = FALSE)
  # write SBML file to tempdir():
  writeSBML(mod,level=3,version=1,fbcLevel=2,filename=file.path(tempdir(), "export.xml"))
# }

Run the code above in your browser using DataLab