libSBML C API  5.18.0
GeneProductAssociation_t Class Reference

Detailed Description

fbc Association_t between gene products and reactions

In Version 2 of the SBML Level 3 Flux Balance Constraints (“fbc”) package specification, GeneProductAssociation_t is a class derived from SBase_t used to associate one more genes or gene products with reactions. GeneProductAssociation_t objects are essentially containers, with one such container optionally attached as a subelement to a Reaction_t object in a model. The container can contain one of three kinds of objects, all of which are subclasses of the libSBML parent class FbcAssociation_t. (Note that this class is named Association in the “fbc” Version 2 specification, but in libSBML is named FbcAssociation_t to avoid a name conflict with an existing class.)

One of the kinds of FbcAssociation_t subclasses that can appear in a GeneProductAssociation_t is GeneProductRef_t. This class of objects references a GeneProduct_t declared in a ListOfGeneProducts_t attached to the enclosing Model_t object. In the “fbc” approach, when more than one gene (or gene product) is present in an association, they are written as logical expressions using Boolean logical operators and and or through the classes (in libSBML) FbcAnd_t and FbcOr_t. (In the “fbc” Version 2 specification, these are simply named And and Or, respectively.) The FbcAnd_t and FbcOr_t objects in turn can contain either GeneProductRef_t objects or other FbcAnd_t and/or FbcOr_t objects.

Here is a concrete example of what the XML representation of a simple or relationship might look like:

<reaction id = "R_ABTA" ... rest of Reaction_t declaration elided for this example ...>
 <fbc:geneProductAssociation fbc:id="ga_16">
  <fbc:or>
   <fbc:geneProductRef fbc:geneProduct="g_b2662"/>
   <fbc:geneProductRef fbc:geneProduct="g_b1302"/>
  </fbc:or>
 </fbc:geneProductAssociation>
</reaction>
Note
This class of objects was introduced in Version 2 of the SBML Level 3 Flux Balance Constraints (“fbc”) specification. In Version 1 of “fbc”, the information encoded by this class can be stored instead using the Association_t and GeneAssociation_t annotation classes. Please see the Version 1 and Version 2 “fbc” specifications for more details.

Public Member Functions

GeneProductAssociation_tGeneProductAssociation_clone (GeneProductAssociation_t *gpa)
 Creates a deep copy of the given GeneProductAssociation_t structure. More...
 
GeneProductAssociation_tGeneProductAssociation_create (unsigned int level, unsigned int version, unsigned int pkgVersion)
 Creates a new GeneProductAssociation_t structure using the given SBML level and version, and the pkgVersion package version. More...
 
void GeneProductAssociation_free (GeneProductAssociation_t *gpa)
 Frees the given GeneProductAssociation_t structure. More...
 
const char * GeneProductAssociation_getId (const GeneProductAssociation_t *gpa)
 Returns the value of the "id" attribute of the given GeneProductAssociation_t structure. More...
 
const char * GeneProductAssociation_getName (const GeneProductAssociation_t *gpa)
 Returns the value of the "name" attribute of the given GeneProductAssociation_t structure. More...
 
int GeneProductAssociation_hasRequiredAttributes (const GeneProductAssociation_t *gpa)
 Predicate returning 1 (true) or 0 (false) depending on whether all the required attributes of the given GeneProductAssociation_t structure have been set. More...
 
int GeneProductAssociation_hasRequiredElements (const GeneProductAssociation_t *gpa)
 Predicate returning 1 (true) or 0 (false) depending on whether all the required sub-elements of the given GeneProductAssociation_t structure have been set. More...
 
int GeneProductAssociation_isSetAssociation (const GeneProductAssociation_t *gpa)
 Predicate returning 1 (true) if the given GeneProductAssociation_t structure's "association" is set. More...
 
int GeneProductAssociation_isSetId (const GeneProductAssociation_t *gpa)
 Predicate returning 1 (true) if the given GeneProductAssociation_t structure's "id" is set. More...
 
int GeneProductAssociation_isSetName (const GeneProductAssociation_t *gpa)
 Predicate returning 1 (true) if the given GeneProductAssociation_t structure's "name" is set. More...
 
int GeneProductAssociation_setId (GeneProductAssociation_t *gpa, const char *id)
 Sets the "id" attribute of the given GeneProductAssociation_t structure. More...
 
int GeneProductAssociation_setName (GeneProductAssociation_t *gpa, const char *name)
 Sets the "name" attribute of the given GeneProductAssociation_t structure. More...
 
int GeneProductAssociation_unsetId (GeneProductAssociation_t *gpa)
 Unsets the value of the "id" attribute of the given GeneProductAssociation_t structure. More...
 
int GeneProductAssociation_unsetName (GeneProductAssociation_t *gpa)
 Unsets the value of the "name" attribute of the given GeneProductAssociation_t structure. More...
 

Member Function Documentation

GeneProductAssociation_t * GeneProductAssociation_clone ( GeneProductAssociation_t gpa)

Creates a deep copy of the given GeneProductAssociation_t structure.

Parameters
gpathe GeneProductAssociation_t structure to be copied.
Returns
a (deep) copy of the given GeneProductAssociation_t structure, or a null pointer if a failure occurred.
GeneProductAssociation_t * GeneProductAssociation_create ( unsigned int  level,
unsigned int  version,
unsigned int  pkgVersion 
)

Creates a new GeneProductAssociation_t structure using the given SBML level and version, and the pkgVersion package version.

Parameters
levelan unsigned int, the SBML level to assign to this GeneProductAssociation_t structure.
versionan unsigned int, the SBML version to assign to this GeneProductAssociation_t structure.
pkgVersionan unsigned int, the version of the package to assign to this GeneProductAssociation_t structure.
Returns
the newly-created GeneProductAssociation_t structure, or a null pointer if an error occurred during construction.
Note
Attempting to add an object to an SBMLDocument_t having a different combination of SBML Level, Version and XML namespaces than the object itself will result in an error at the time a caller attempts to make the addition. A parent object must have compatible Level, Version and XML namespaces. (Strictly speaking, a parent may also have more XML namespaces than a child, but the reverse is not permitted.) The restriction is necessary to ensure that an SBML model has a consistent overall structure. This requires callers to manage their objects carefully, but the benefit is increased flexibility in how models can be created by permitting callers to create objects bottom-up if desired. In situations where objects are not yet attached to parents (e.g., SBMLDocument_t), knowledge of the intented SBML Level and Version help libSBML determine such things as whether it is valid to assign a particular value to an attribute.
void GeneProductAssociation_free ( GeneProductAssociation_t gpa)

Frees the given GeneProductAssociation_t structure.

Parameters
gpathe GeneProductAssociation_t structure to be freed.
const char * GeneProductAssociation_getId ( const GeneProductAssociation_t gpa)

Returns the value of the "id" attribute of the given GeneProductAssociation_t structure.

Parameters
gpathe GeneProductAssociation_t structure.
Returns
the id of this structure.
const char * GeneProductAssociation_getName ( const GeneProductAssociation_t gpa)

Returns the value of the "name" attribute of the given GeneProductAssociation_t structure.

Parameters
gpathe GeneProductAssociation_t structure.
Returns
the name of this structure.
int GeneProductAssociation_hasRequiredAttributes ( const GeneProductAssociation_t gpa)

Predicate returning 1 (true) or 0 (false) depending on whether all the required attributes of the given GeneProductAssociation_t structure have been set.

Parameters
gpathe GeneProductAssociation_t structure to check.
Returns
1 (true) if all the required attributes for this structure have been defined, 0 (false) otherwise.
int GeneProductAssociation_hasRequiredElements ( const GeneProductAssociation_t gpa)

Predicate returning 1 (true) or 0 (false) depending on whether all the required sub-elements of the given GeneProductAssociation_t structure have been set.

Parameters
gpathe GeneProductAssociation_t structure to check.
Returns
1 (true) if all the required sub-elements for this structure have been defined, 0 (false) otherwise.
int GeneProductAssociation_isSetAssociation ( const GeneProductAssociation_t gpa)

Predicate returning 1 (true) if the given GeneProductAssociation_t structure's "association" is set.

Parameters
gpathe GeneProductAssociation_t structure.
Returns
1 (true) if the "association" of this GeneProductAssociation_t structure is set, 0 (false) otherwise.
int GeneProductAssociation_isSetId ( const GeneProductAssociation_t gpa)

Predicate returning 1 (true) if the given GeneProductAssociation_t structure's "id" is set.

Parameters
gpathe GeneProductAssociation_t structure.
Returns
1 (true) if the "id" of this GeneProductAssociation_t structure is set, 0 (false) otherwise.
int GeneProductAssociation_isSetName ( const GeneProductAssociation_t gpa)

Predicate returning 1 (true) if the given GeneProductAssociation_t structure's "name" is set.

Parameters
gpathe GeneProductAssociation_t structure.
Returns
1 (true) if the "name" of this GeneProductAssociation_t structure is set, 0 (false) otherwise.
int GeneProductAssociation_setId ( GeneProductAssociation_t gpa,
const char *  id 
)

Sets the "id" attribute of the given GeneProductAssociation_t structure.

This function copies the string given in id. If the string is a null pointer, this function is equivalent to calling GeneProductAssociation_unsetId().

Parameters
gpathe GeneProductAssociation_t structure.
idthe string to which the structures "id" attribute should be set.
Returns
integer value indicating success/failure of the function. The value is drawn from the enumeration OperationReturnValues_t. The possible values returned by this function are:
Note
Using this function with a null pointer for id is equivalent to unsetting the value of the "id" attribute.
int GeneProductAssociation_setName ( GeneProductAssociation_t gpa,
const char *  name 
)

Sets the "name" attribute of the given GeneProductAssociation_t structure.

This function copies the string given in name. If the string is a null pointer, this function is equivalent to calling GeneProductAssociation_unsetName().

Parameters
gpathe GeneProductAssociation_t structure.
namethe string to which the structures "name" attribute should be set.
Returns
integer value indicating success/failure of the function. The value is drawn from the enumeration OperationReturnValues_t. The possible values returned by this function are:
Note
Using this function with a null pointer for name is equivalent to unsetting the value of the "name" attribute.
int GeneProductAssociation_unsetId ( GeneProductAssociation_t gpa)

Unsets the value of the "id" attribute of the given GeneProductAssociation_t structure.

Parameters
gpathe GeneProductAssociation_t structure.
Returns
integer value indicating success/failure of the function. The value is drawn from the enumeration OperationReturnValues_t. The possible values returned by this function are:
int GeneProductAssociation_unsetName ( GeneProductAssociation_t gpa)

Unsets the value of the "name" attribute of the given GeneProductAssociation_t structure.

Parameters
gpathe GeneProductAssociation_t structure.
Returns
integer value indicating success/failure of the function. The value is drawn from the enumeration OperationReturnValues_t. The possible values returned by this function are: