#include <net.h>
Public Member Functions | |
Net () | |
default constructor | |
Net (NetStruct &str2) | |
new Net with existing NetStruct. | |
Net (int32 nr, int32 nc) | |
constructor with allocate. | |
Net (const Net &net2) | |
copy constructor. | |
Net (string &st) | |
Net (string &st, int32 &pos) | |
constructor with string | |
~Net () | |
destructor | |
void | initFromString (string &st, int32 &pos) |
void | resize (int32 nr, int32 nc) |
resize all vectors. | |
int32 | numR () |
number of reactions | |
int32 | numC () |
number of compounds | |
int32 | at (int32 reaidx, int32 comidx) |
value at position in stoichiometric matrix | |
int32 | addRea (array< int32 > *subs, array< int32 > *prds, int8 rev=0, array< int32 > *subsst=NULL, array< int32 > *prdsst=NULL, array< int32 > *cat=NULL, array< int32 > *inhs=NULL, array< int32 > *inhd=NULL, array< int32 > *prps=NULL) |
Add reaction to the end of reaction list. | |
int32 | replaceRea (int32 reaidx, array< int32 > *subs, array< int32 > *prds, int8 rev=0, array< int32 > *subsst=NULL, array< int32 > *prdsst=NULL, array< int32 > *cat=NULL, array< int32 > *inhs=NULL, array< int32 > *inhd=NULL, array< int32 > *prps=NULL) |
Replace reaction at a particular index. | |
void | delRea (int32 reaidx) |
Delete reaction at a particular index. | |
void | delRea (array< int8 > *mask) |
Delete reactions at positons determined by mask. | |
void | delRea (array< int32 > *idxs) |
Delete reactions at positons determined by index list. | |
int | hasRea (array< int32 > *subs, array< int32 > *prds, int8 rev=-10, array< int32 > *subsst=NULL, array< int32 > *prdsst=NULL) |
checks whether a particular reaction already exists | |
array< int32 > * | neighbors (int32 comidx) |
reaction in which compound comidx takes part | |
array< int32 > * | succs (int32 comidx) |
successor reactions of compound comidx | |
array< int32 > * | preds (int32 comidx) |
predecessors reactions of compound comidx | |
array< int32 > * | metabolites (int32 reaidx) |
substrates and products of reactions | |
array< int32 > * | substrates (int32 reaidx) |
substrates of reaction reaidx | |
array< int32 > * | products (int32 reaidx) |
products of reaction reaidx | |
array< int32 > * | inhibitors (int32 reaidx) |
inhibitors of reaction reaidx | |
array< int32 > * | inhibited (int32 reaidx) |
inhibited substrates of reaction reaidx | |
array< int32 > * | catalysts (int32 reaidx) |
catalysts of reaction reaidx | |
array< int32 > * | propagators (int32 reaidx) |
catalysts of reaction reaidx | |
array< int32 > * | subs_stoich (int32 reaidx) |
substrate stoichiometries of reaction reaidx | |
array< int32 > * | prod_stoich (int32 reaidx) |
product stoichiometries of reaction reaidx | |
int8 | rev (int32 reaidx) |
reversibility of the reaction; | |
int8 | enabled (int32 reaidx) |
is reaction enabled | |
string * | toString () |
copy network data into a string | |
void | appendToString (string &st) |
copy network data into a string | |
string * | printToString () |
print a summary of network to string | |
void | print () |
print a summary of network to stdout | |
Public Attributes | |
array< int8 > * | reaMask |
which reactions are enabled in the current network | |
Protected Attributes | |
NetStruct * | str |
the network topology |
Net::Net | ( | ) |
default constructor
Net::Net | ( | const Net & | net2 | ) |
copy constructor.
Net::Net | ( | string & | st | ) |
Net::Net | ( | string & | st, | |
int32 & | pos | |||
) |
constructor with string
Net::~Net | ( | ) |
destructor
int32 Net::addRea | ( | array< int32 > * | subs, | |
array< int32 > * | prds, | |||
int8 | rev = 0 , |
|||
array< int32 > * | subsst = NULL , |
|||
array< int32 > * | prdsst = NULL , |
|||
array< int32 > * | cats = NULL , |
|||
array< int32 > * | inhs = NULL , |
|||
array< int32 > * | inhd = NULL , |
|||
array< int32 > * | prps = NULL | |||
) |
Add reaction to the end of reaction list.
add a new reaction to the network.
subs | array of substrate indices | |
prds | array of product indices | |
rev | reversibility, 0=reversible, 1=irreversible, -1=irreversible but in prds->subs direction. | |
subsst | stoichiometries for the substrates (same order). Omit if all stoich. equal 1 | |
prdsst | stoichiometries for the products (same order). Omit if all stoich. equal 1 | |
cats | catalysts of reaction | |
inhs | inhibitors of the reaction | |
inhd | inhibited substrates of the reaction (competitive) | |
prps | depletion propagators of the reactions |
places a new reaction at the next position after the lastly added reaction. if a reaction with that index existed it is removed. Note: all inhd's must also be substrates and all prps must also be products. If prps is given, substrate inhibition only occurs if at least one of the propagators is depleted
The content of the arrays is copied. They can be deleted afterwards.
void Net::appendToString | ( | string & | st | ) |
copy network data into a string
value at position in stoichiometric matrix
reaidx | which reaction | |
comidx | which compound |
returns the corresponding entry of the stoichiometric matrix
catalysts of reaction reaidx
reaidx | which reaction |
Note: this returns the original array from the Net object. Do not delete!
void Net::delRea | ( | int32 | idx | ) |
Delete reaction at a particular index.
delete reaction at position idx
idx | index of reaction to delete |
int Net::hasRea | ( | array< int32 > * | subs, | |
array< int32 > * | prds, | |||
int8 | rev = -10 , |
|||
array< int32 > * | subsst = NULL , |
|||
array< int32 > * | prdsst = NULL | |||
) |
checks whether a particular reaction already exists
inhibited substrates of reaction reaidx
reaidx | which reaction |
Note: this returns the original array from the Net object. Do not delete!
inhibitors of reaction reaidx
reaidx | which reaction |
Note: this returns the original array from the Net object. Do not delete!
void Net::initFromString | ( | string & | st, | |
int32 & | pos | |||
) |
substrates and products of reactions
reaidx | which compound |
Note: this returns a newly generated array. Delete youself!
reaction in which compound comidx takes part
comidx | which compound |
Note: this returns a newly generated array. Delete youself!
int32 Net::numC | ( | ) | [inline] |
number of compounds
int32 Net::numR | ( | ) | [inline] |
number of reactions
predecessors reactions of compound comidx
comidx | which compound |
Note: this returns the original array from the Net object. Do not delete!
void Net::print | ( | ) |
print a summary of network to stdout
prints the array to stdout
Note: This only works for certain types T
string * Net::printToString | ( | ) |
print a summary of network to string
product stoichiometries of reaction reaidx
reaidx | which reaction |
Note: this returns the original array from the Net object. Do not delete!
products of reaction reaidx
reaidx | which reaction |
Note: this returns the original array from the Net object. Do not delete!
catalysts of reaction reaidx
reaidx | which reaction |
Note: this returns the original array from the Net object. Do not delete!
int32 Net::replaceRea | ( | int32 | reaidx, | |
array< int32 > * | subs, | |||
array< int32 > * | prds, | |||
int8 | rev = 0 , |
|||
array< int32 > * | subsst = NULL , |
|||
array< int32 > * | prdsst = NULL , |
|||
array< int32 > * | cats = NULL , |
|||
array< int32 > * | inhs = NULL , |
|||
array< int32 > * | inhd = NULL , |
|||
array< int32 > * | prps = NULL | |||
) |
Replace reaction at a particular index.
place a new reaction into the network
reaidx | position where to place | |
subs | array of substrate indices | |
prds | array of product indices | |
rev | reversibility, 0=reversible, 1=irreversible, -1=irreversible but in prds->subs direction. | |
subsst | stoichiometries for the substrates (same order). Omit if all stoich. equal 1 | |
prdsst | stoichiometries for the products (same order). Omit if all stoich. equal 1 | |
cats | catalysts of reaction | |
inhs | inhibitors of the reaction | |
inhd | inhibited substrates of the reaction (competitive) | |
prps | depletion propagators of the reactions |
places a new reaction at position reaidx. if a reaction with that index existed it is removed. Note: all inhd's must also be substrates and all prps must also be products. If prps is given, substrate inhibition only occurs if at least one of the propagators is depleted
The content of the arrays is copied. They can be deleted afterwards.
resize all vectors.
sets the network size.
nr | number of reactions | |
nc | number of compounds |
Resizes the underlying array accordingly, thus avoiding continious reallocation if the reactions are added one by one.
substrate stoichiometries of reaction reaidx
reaidx | which reaction |
Note: this returns the original array from the Net object. Do not delete!
substrates of reaction reaidx
reaidx | which reaction |
Note: this returns the original array from the Net object. Do not delete!
successor reactions of compound comidx
comidx | which compound |
Note: this returns the original array from the Net object. Do not delete!
string * Net::toString | ( | ) |
copy network data into a string
which reactions are enabled in the current network