Skip to contents

Reading a model

Everything except convertReactions() works in two phases: read the file once, then query the pointer that comes back.

getModel()
getModel Outputs an external pointer to the Model from SBML file

Querying components

These return R objects. Note that a query for a component the model does not have raises an error rather than returning an empty result.

getSpeciesTable()
getspeciesTable Outputs the Information Table for Species
getParameterTable()
getParameterTable Outputs the Information Table for Paremeters
getReactionTable()
getReactionTable Outputs the Information Table for Reactions
getSpeciesNames()
getSpeciesNames Names of the species in a model
getSpeciesIC()
getSpeciesIC Initial values of the species in a model
getNumSpecies()
getSpeciesNum Outputs the number of Species in the model
getCmtNames()
getCmtNames Names of the compartments in a model
getCmtSizes()
getCmtSizes Outputs the Sizes of Compartments

Printing the mathematics

These write to the console and return 0 invisibly, so capture them with capture.output() rather than assigning them.

getRuleMath()
getRuleMath Outputs Model which can be simulated
getReactionMath()
getReactionMath Outputs Model which can be simulated
getFunctionDefinition()
getFunctionDefinition Outputs Model which can be simulated
getEventMath()
getEventMath Outputs Model which can be simulated

Printing the document

The exception to the two-phase rule: these take a filename, not a model pointer.

printSBML()
printSBML
echoSBML()
echoSBML

Exporting mass balances

Writes ready-to-simulate code for one of six ODE targets. Reads the SBML file itself, so it takes no model pointer.

convertReactions()
convertReactions