Determining the Stoichiometry Matrix for a Model
What Is a Stoichiometry Matrix?
A stoichiometry matrix provides stoichiometric information about reactants and products in model reactions. It lets you easily determine:
The reactants and products in a specific reaction in a model, including the stoichiometric value of the reactants and products
The reactions that a specific species is part of, and whether the species is a reactant or product in that reaction
A stoichiometry matrix is an M-by-R matrix, where M equals the total number of species in a model, and R equals the total number of reactions in a model. Each row corresponds to a species, and each column corresponds to a reaction.
The matrix indicates which species and reactions are involved as reactants and products:
Reactants are represented in the matrix with their stoichiometric value at the appropriate location (row of species, column of reaction). Reactants appear as negative values.
Products are represented in the matrix with their stoichiometric value at the appropriate location (row of species, column of reaction). Products appear as positive values.
All other locations in the matrix contain a
For example, consider a
model object containing
two reactions. One reaction (named
R1) is equal
2 A + B -> 3 C, and the other reaction (named
is equal to
B + 3 D -> 4 A. The stoichiometry
R1 R2 A -2 4 B -1 -1 C 3 0 D 0 -3
Retrieving a Stoichiometry Matrix for a Model
Retrieve a stoichiometry matrix for a model by passing the
object as an input argument to the
m1, a model object, using
m1 = sbmlimport('lotka.xml');
Get the stoichiometry matrix for
[M,objSpecies,objReactions] = getstoichmatrix(m1) M = (2,1) 1 (2,2) -1 (3,2) 1 (3,3) -1 (4,3) 1 objSpecies = 'x' 'y1' 'y2' 'z' objReactions = 'Reaction1' 'Reaction2' 'Reaction3'
Convert the stoichiometry matrix from a sparse matrix to a
fullmatrix to more easily see the relationships between species and reactions:
M_full = full(M)
M_full = 0 0 0 1 -1 0 0 1 -1 0 0 1