The metatool script essentially implements the functionality of
the Metatool
4.x programs. The data structure that contains the network and
the results is referred to as sys.
In a first step, the stoichiometric matrix sys.st
is analyzed to determine if the reaction network is scale free. This
has no effect on the further calculations and can be omitted. After
that, the (right-hand) kernel sys.kn
and the conservation relations (left-hand kernel) sys.crel
of st are calculated. The former is the basis for identifying the
subsets, but the conservation relations are not used any further.
Then dead-end metabolites, which don't participate in distinct
producing and consuming reactions, are identified and the
result is printed to the screen. This information is useful for
debugging the network, but does not effect further steps.
One of
the important steps is the identification of the enzyme subsets
sys.sub, because during this
step blocked reactions and reactions that belong to enzyme subsets
with conflicting irreversibility constraints are removed and will not
appear in the reduced stoichiometric matrix sys.rd.
The vector sys.blocked_react
contains the indices of the blocked reactions and the matrix
sys.sub_irr_viol those subsets
as rows which have conflicting irreversibility constraints. To
identify all the reactions that belong to one of these removed
subsets use the command find(any(sys.sub_irr_viol))
which will list the indices of those reactions. Having determined the
enzyme subsets sys.sub, the
stoichiometric matrix sys.rd
which represents the reduced system together with the
irreversibilities sys.irrev_rd
are produced. Again for debugging the network, the reduced system is
analyzed for dead-end metabolites.
At this stage, the
preprocessing steps are finished and the elementary modes sys.rd_ems
of the reduced system are calculated. If the fields sys.rd
and sys.irrev_rd are already
defined when the data structure sys
is passed as first parameter to metatool, then the preprocessing
steps will be skipped.
Matlab and octave use incompatible methods to produce help texts from m-files. Therefore, no help texts are provided. In addition to this documentation, more comments will be intergrated into the m-files in the future. Parameters enclosed in <> are optional.
sys_out = metatool(sys_in, <out_fname>)
Computation of elementary modes including preprocessing and some additional analyses (cf. Usage). The parameter sys_in can either be the filename which contains the network in standard Metatool format (cf. Metatool 4.x) or a data structure that describes the network (cf. Usage). In the latter case, at least the fields st and irrev_react or the fields rd and irrev_rd have to be specified. As an optional second parameter specify the name of the output file out_fname for producing ASCII output. This can be convenient for small systems, but is not very useful for large systems and will then take up a lot of time and disk space. The return value sys_out is a data structure containing the input information and the results.
[K, subsys_cols, id_part] = kernel(A)
Calculates the kernel K of a matrix A in such a way that K(id_part, :) is an identity matrix. The subsys_cols is a vector of indices so that K(1:i, 1:subsys_cols(i)) is a kernel of A(:, 1:i); however, depending on the calculation procedure, the subsys_cols can sometimes not be determined in which case the value of this variable is the empty matrix.
[K, unused] = kernel_fp(A, prior_cols, <int_calc>)
Calculates the kernel K of a matrix A with row and column pivot search; when int_calc is true, the calculations are performed on an integer basis. The latter currently to main purpose of this function. When prior_cols are given, the column pivot search is at first limited to those columns. After all columns in prior_cols have been processed, the remaining columns are searched. When integer calculation is used, K(unused, :) is a diagonal matrix, otherwise it is an identity matrix.
[sub, irrev_sub, blocked_react, sub_irr_viol] = subsets(kn, irrev_react, all_int)
Uses the kernel kn of the stoichiometric matrix to determine the subsets sub and their reversibilities irrev_sub. Blocked reactions and subsets that have conflicting irreversibilitiy constraints are not included in sub. The indices of the blocked reactions are returned in the vector blocked_react, the subsets that violate constraints in the matrix sub_irr_viol. The reaction reversibilities are given in the vector irrev_react and if all_int is true then sub will contain integer values only.
[rd, rdind, irrev_rd] = reduce(st, sub, <irrev_rd>)
Calculates the reduced system rd from the stoichiometric matrix st and the subset matrix sub. The vector rdind contains the indices of those metabolites that remain in the reduced system. If the subset reversibilities irrev_rd are given, then zero columns from rd together with their corresponding reversibilities in irrev_rd are removed. In this case, the return value irrev_rd contains the reversibilities of the remaining subsets, otherwise it is [].
[rd_ems, rd_cb, err] = nsa_em(rd, irrev_rd, <req_reacts>, <with_cb>)
Computes elementary modes rd_ems from stoichiometric matrix rd and reversibilities irrev_rd using the null space algorithm. If req_reacts is specified, then only those elementary modes are calculated in which all the reactions given in req_reacts participate. If with_cb is true, the convex basis (generating set) and from this the elementary modes are calculated. In this case, rd_cb contains the convex basis, otherwise it is []. When an error occurs during the calculations, err is true, otherwise false.
sys = parse(filename, <strict>)
Parses the metatool input file specified by filename. The return value sys is a data structure with several fields that describe the network (cf. Usage). If strict is true the input file must conform to the standard format.Otherwise an extended format may be used in which it is allowed to use undeclared reactions and internal metabolites. The direction of an undeclared reaction is then derived from the separator between the sides of the reaction equation (= reversible, => irreversible forwards, <= irreversible backwards). In addition every line starting with a # is treated as a comment.
sys = sbmlModel2metatool(SBMLModel, <ext_comparts>)
Converts the SBMLModel (cf. Using a SBML model) into a data structure with several fields that describe the network (cf. Usage). ext_comparts is an optional cell array of strings that lists those compartments of the SBMLModel whose metabolites should be considered as external. If such a list is not provided the user is queried for every compartment whether or not its metabolites should be consideres as external. Note that the stoichiometryMath attribute of SBML is not supported by this function.
[rd_ems, err] = elmo(wkr, irrev_wrd, binary, mode, ersatz_rd, subsys_rows, req_reacts, screen_output)
The central routine for calculating elementary modes rd_ems given the kernel wkr and reversibilities irrev_wrd. If binary is true, only the bit pattern represantations of the modes are calculated; this option makes sense only if all reactions are irreversible and mode is 0. When mode is 0, the elementary modes are calcuated, if it is < 0, the convex basis (generating set) is calculated. When mode is > 0, wkr is assumed to be the convex basis and the value of mode itself specifies the number of columns in the kernel from which this convex basis was calculated; given this input, the elementary modes are computed. The parameters ersatz_rd and subsys_rows are necessary for the rank test; req_reacts has the same function as in the nsa_em script and is only meaningful if mode is 0. Most intermediary screen output can be suppressed by setting screen_output to false. The return value err is true when an error occurs during calculation.
Last updated: 28.5.2008