libSBML C API
5.18.0
|
The FbcAssociation_t class is the abstract base class for the classes that can be used as children of the GeneProductAssociation_t child of a Reaction_t. The FbcAnd_t class is used when all of its children are definitely associated with the Reaction_t; the FbcOr_t class is used when at least one of its children are associated with the Reaction_t; and the GeneProductRef_t class is used to denote a particular GeneProduct_t.
Public Member Functions | |
FbcAssociation_t * | FbcAssociation_clone (FbcAssociation_t *fa) |
Creates a deep copy of the given FbcAssociation_t structure. More... | |
FbcAssociation_t * | FbcAssociation_create (unsigned int level, unsigned int version, unsigned int pkgVersion) |
Creates a new FbcAssociation_t structure using the given SBML level and version , and the pkgVersion package version. More... | |
void | FbcAssociation_free (FbcAssociation_t *fa) |
Frees the given FbcAssociation_t structure. More... | |
int | FbcAssociation_hasRequiredAttributes (const FbcAssociation_t *fa) |
Predicate returning 1 (true) or 0 (false) depending on whether all the required attributes of the given FbcAssociation_t structure have been set. More... | |
FbcAssociation_t * | FbcAssociation_parseFbcInfixAssociation (const char *infix, SBasePlugin_t *plugin) |
Parses a gene association in infix format and returns a corresponding Association_t object. More... | |
char * | FbcAssociation_toInfix (const FbcAssociation_t *fa) |
Converts this FbcAssociation_t into an infix string representation. More... | |
FbcAssociation_t * FbcAssociation_clone | ( | FbcAssociation_t * | fa | ) |
Creates a deep copy of the given FbcAssociation_t structure.
fa | the FbcAssociation_t structure to be copied. |
FbcAssociation_t * FbcAssociation_create | ( | unsigned int | level, |
unsigned int | version, | ||
unsigned int | pkgVersion | ||
) |
Creates a new FbcAssociation_t structure using the given SBML level
and version
, and the pkgVersion
package version.
level | an unsigned int, the SBML level to assign to this FbcAssociation_t structure. |
version | an unsigned int, the SBML version to assign to this FbcAssociation_t structure. |
pkgVersion | an unsigned int, the version of the package to assign to this FbcAssociation_t structure. |
void FbcAssociation_free | ( | FbcAssociation_t * | fa | ) |
Frees the given FbcAssociation_t structure.
fa | the FbcAssociation_t structure to be freed. |
int FbcAssociation_hasRequiredAttributes | ( | const FbcAssociation_t * | fa | ) |
Predicate returning 1
(true) or 0
(false) depending on whether all the required attributes of the given FbcAssociation_t structure have been set.
fa | the FbcAssociation_t structure to check. |
1
(true) if all the required attributes for this structure have been defined, 0
(false) otherwise. FbcAssociation_t * FbcAssociation_parseFbcInfixAssociation | ( | const char * | infix, |
SBasePlugin_t * | plugin | ||
) |
Parses a gene association in infix format and returns a corresponding Association_t object.
This parses a string that has a list of gene names and conjunctions or disjunctions. For example:
(b2422) and (b2425) and (b2423) and (b2424) or (b2422) and (b2423) and (b2424) and (b2413) and (b3917)
The 'and' operator takes precedence over the 'or' operator, meaning that the above input string would turn into two groups of gene names: either "b2422, b2425, b2423, and b2424" or "b2422, b2423, b2424, b2413, and b3917". Parentheses may be added to make things more clear, and to encode alternative schemes.
This method also creates missing GeneProduct_t objects, in case the unique reference does not yet exist.
Note that the function assumes that the infix contains identifiers and not labels, and that any missing geneProducts are to be added.
infix | the string to parse. |
plugin | the FbcModelPlugin_t on which to add the geneProduct elements. |
NULL
in case of an error.char * FbcAssociation_toInfix | ( | const FbcAssociation_t * | fa | ) |
Converts this FbcAssociation_t into an infix string representation.
fa | the FbcAssociation_t structure to convert. |