libSBML C++ API  5.20.2
ExpressionAnalyser Class Reference

Detailed Description

Converter that sorts SBML rules and assignments.

This class of objects is defined by libSBML only and has no direct equivalent in terms of SBML components. It is a class used in the implementation of extra functionality provided by libSBML.

ADD DESCRIPTION

Configuration and use of ExpressionAnalyser

ExpressionAnalyser is enabled by creating a ConversionProperties object with the option "inferReactions", and passing this properties object to SBMLDocument::convert(). This converter offers no other options.

Implementation is based on the algorithm described in Fages et al, Theoretical Computer Science, 2015.

General information about the use of SBML converters

The use of all the converters follows a similar approach. First, one creates a ConversionProperties object and calls ConversionProperties::addOption() on this object with one argument: a text string that identifies the desired converter. (The text string is specific to each converter; consult the documentation for a given converter to find out how it should be enabled.)

Next, for some converters, the caller can optionally set some converter-specific properties using additional calls to ConversionProperties::addOption(). Many converters provide the ability to configure their behavior to some extent; this is realized through the use of properties that offer different options. The default property values for each converter can be interrogated using the method SBMLConverter::getDefaultProperties() on the converter class in question .

Finally, the caller should invoke the method SBMLDocument::convert() with the ConversionProperties object as an argument.

Example of invoking an SBML converter

The following code fragment illustrates an example using SBMLReactionConverter, which is invoked using the option string "replaceReactions":

props.addOption("replaceReactions");
Definition: ConversionProperties.h:84
virtual void addOption(const ConversionOption &option)
Adds a copy of the given option to this properties object.
Definition: ConversionProperties.cpp:232

In the case of SBMLReactionConverter, there are no options to affect its behavior, so the next step is simply to invoke the converter on an SBMLDocument object. Continuing the example code:

// Assume that the variable "document" has been set to an SBMLDocument object.
int status = document->convert(props);
{
cerr << "Unable to perform conversion due to the following:" << endl;
document->printErrors(cerr);
}
@ LIBSBML_OPERATION_SUCCESS
Definition: operationReturnValues.h:61

Here is an example of using a converter that offers an option. The following code invokes SBMLStripPackageConverter to remove the SBML Level 3 Layout package from a model. It sets the name of the package to be removed by adding a value for the option named "package" defined by that converter:

props.addOption("stripPackage");
props.addOption("package", "layout");
int status = document->convert(props);
{
cerr << "Unable to strip the Layout package from the model";
cerr << "Error returned: " << status;
}

Available SBML converters in libSBML

LibSBML provides a number of built-in converters; by convention, their names end in Converter. The following are the built-in converters provided by libSBML 5.20.2 :

Public Member Functions

virtual ExpressionAnalyserclone () const
 Creates and returns a deep copy of this ExpressionAnalyser object. More...
 
void detectHiddenSpecies (List *hiddenSpecies)
 
 ExpressionAnalyser ()
 Creates a new ExpressionAnalyser object. More...
 
 ExpressionAnalyser (const ExpressionAnalyser &obj)
 Copy constructor; creates a copy of an ExpressionAnalyser object. More...
 
 ExpressionAnalyser (Model *m, pairODEs ode)
 Creates a new ExpressionAnalyser object with Model and ODEs. More...
 
ExpressionAnalyseroperator= (const ExpressionAnalyser &rhs)
 Assignment operator for SBMLInferUnitsConverter. More...
 
int setModel (Model *m)
 
int setODEPairs (std::vector< std::pair< std::string, ASTNode * > > odes)
 
virtual ~ExpressionAnalyser ()
 Destroy this ExpressionAnalyser object. More...
 

Constructor & Destructor Documentation

◆ ExpressionAnalyser() [1/3]

ExpressionAnalyser::ExpressionAnalyser ( )

Creates a new ExpressionAnalyser object.

◆ ExpressionAnalyser() [2/3]

ExpressionAnalyser::ExpressionAnalyser ( Model m,
pairODEs  ode 
)

Creates a new ExpressionAnalyser object with Model and ODEs.

◆ ExpressionAnalyser() [3/3]

ExpressionAnalyser::ExpressionAnalyser ( const ExpressionAnalyser obj)

Copy constructor; creates a copy of an ExpressionAnalyser object.

Parameters
objthe ExpressionAnalyser object to copy.

◆ ~ExpressionAnalyser()

ExpressionAnalyser::~ExpressionAnalyser ( )
virtual

Destroy this ExpressionAnalyser object.

Member Function Documentation

◆ clone()

ExpressionAnalyser * ExpressionAnalyser::clone ( ) const
virtual

Creates and returns a deep copy of this ExpressionAnalyser object.

Returns
a (deep) copy of this converter.

◆ detectHiddenSpecies()

void ExpressionAnalyser::detectHiddenSpecies ( List hiddenSpecies)

◆ operator=()

ExpressionAnalyser & ExpressionAnalyser::operator= ( const ExpressionAnalyser rhs)

Assignment operator for SBMLInferUnitsConverter.

Parameters
rhsthe object whose values are used as the basis of the assignment.

◆ setModel()

int ExpressionAnalyser::setModel ( Model m)

◆ setODEPairs()

int ExpressionAnalyser::setODEPairs ( std::vector< std::pair< std::string, ASTNode * > >  odes)