Fr¶
- bilinearDecomposition(S)[source]¶
Converts a stoichiometric matrix into a bilinear form.
- USAGE
[A, B, C] = bilinearDecomposition (S)
- INPUT
S – m x n stoichiometric matrix
- OUTPUTS
A – m x (m + k) matrix selecting rows such that \(S = A B C\)
B – (m + k) x (n + k) bilinear stoichiometric matrix
C – (n + k) x n matrix adding columns to form net reaction stoichiometry such that \(S = A B C\)
An example “bilinearisation” of the reaction
\[\begin{split}~&~ A + B + C \leftrightarrow D + E\\\end{split}\]is
\[\begin{split}~&~ A + B \leftrightarrow P \\ ~&~ P + C \leftrightarrow Q \\ ~&~ Q \leftrightarrow D + E\end{split}\]where P and Q are faux molecular species.
- checkFullRowRankFRK[source]¶
Check for positive left nullspace basis when kinetic parameters are variables. If the sum of each column of If equals that of the corresponding column of Ir, then there exists a vector of ones in the left nullspace.
- checkRankFR(model, printLevel)[source]¶
Calculates the rank of [F R] and [F; R], when restricted to certain rows and columns
- USAGE
[rankFR, rankFRV, rankFRvanilla, rankFRVvanilla, model] = checkRankFR (model, printLevel)
- INPUTS
model – model structure
printLevel – verbose level
- OUTPUTS
rankFR – rank of [F R], when using only FRrows
rankFRV – rank of [F; R], when using only FRVcols
rankFRvanilla – rank of [F R], when using all rows
rankFRVvanilla – rank of [F; R], when using all cols
model – structure with fields:
.FRrows - m x 1 boolean of rows of [F R] that are nonzero, unique upto positive scaling and part of the maximal conservation vector
.FRVcols - n x 1 boolean of cols of [F; R] that are nonzero, unique upto positive scaling and part of the maximal conservation vector
.FRirows - m x 1 boolean of rows of [F R] that are independent
.FRdrows - m x 1 boolean of rows of [F R] that are dependent
.FRwrows - m x 1 boolean of independent rows of [F R] that have dependent rows amongst model.FRdrows
.FRVdcols - n x 1 boolean of cols of [F; R] that are dependent
model.SConsistentMetBool - m x 1 boolean vector indicating metabolites involved in the maximal consistent vector
.SConsistentRxnBool - n x 1 boolean vector indicating metabolites involved in the maximal consistent vector
.FRnonZeroBool - m x 1 boolean vector indicating metabolites involved in at least one internal reaction
.FRuniqueBool - m x 1 boolean vector indicating metabolites with reaction stoichiometry unique upto scalar multiplication
.SIntRxnBool - n x 1 boolean vector indicating the non exchange reactions
.FRVnonZeroBool - n x 1 boolean vector indicating non exchange reactions with at least one metabolite involved
.FRVuniqueBool - n x 1 boolean vector indicating non exchange reactions with stoichiometry unique upto scalar multiplication
.connectedRowsFRBool - m x 1 boolean vector indicating metabolites in connected rows of [F R]
.connectedRowsFRVBool - n x 1 boolean vector indicating complexes in connected columns of [F; R]
.V - \(S V = 0\); \(1^T |V| > 1\) for all flux consistent reactions
- connectedFR(F, R)[source]¶
Computes the connected sets of rows of [F, R] and the largest connected set of columns of [F; R] using gamic
- USAGE
[connectedRowsFRBool, connectedColsFRVBool] = connectedFR (F, R)
- INPUTS
F – m x n
R – m x n
- OUTPUTS
connectedRowsFRBool – m x z boolean vector indicating z sets of connected rows
connectedColsFRVBool – n x z boolean vector indicating z sets of connected cols
- largestConnectedFR(F, R, printLevel)[source]¶
Computes the largest connected set of rows of [F, R] and the largest connected set of columns of [F; R] using gamic
- USAGE
[connectedRowsFRBool, connectedColsFRVBool] = largestConnectedFR (F, R, printLevel)
- INPUTS
F – m x n
R – m x n
printLevel – verbose level
- OUTPUTS
connectedRowsFRBool – m x 1 boolean vector indicating largests set of connected rows
connectedColsFRVBool – n x 1 boolean vector indicating largests set of connected cols
- makeFRresultsTable(FRresults, resultsDirectory, resultsFileName, modelMetaData, tableFilename)[source]¶
Makes a table of FR results
- USAGE
[FRresultsTable, FRresults] = makeFRresultsTable (FRresults, resultsDirectory, resultsFileName, modelMetaData, tableFilename)
- INPUT
FRresults – output of checkRankFRdriver
- OPTIONAL INPUTS
resultsDirectory – directory where output of checkRankFRdriver has been saved
resultsFileName – filename where output of checkRankFRdriver has been saved
modelMetaData – Cell array, where each row is metadata for one model with five columns: species, version, fileName, PMID, doi. See function modelMetaData = modelCitations()
tableFilename – If provided, a the table of results is written out to a csv file, with specified filename
- OUTPUTS
FRresultsTable – table displaying the results of checkRankFRdriver
FRresults – output of checkRankFRdriver
- plotFRresults(FRresults, nRows, nCols, resultsDirectory, resultsFileName, schematicFlag, modelMetaData)[source]¶
Plots FR results in the same order as the FRresultsTable using FRresults structure or by loading the FRresults structure
- USAGE
plotFRresults (FRresults, nRows, nCols, resultsDirectory, resultsFileName, schematicFlag, modelMetaData)
- INPUTS
FRresults – output of checkRankFRdriver
nRows – number of rows in the subplot
nCols – number of rows in the subplot (\(nRows*nCols \geq length(FRresults)\))
- OPTIONAL INPUTS
resultsDirectory – directory where output of checkRankFRdriver has been saved
resultsFileName – filename where output of checkRankFRdriver has been saved
schematicFlag – default = 1
modelMetaData – metadata of model
- printFRdependencies(model, filePathName)[source]¶
Reports on the dependencies between rows of [F, R], either to the command line (default) or to a specified text file
- USAGE
printFRdependencies (model, filePathName)
- INPUT
model – model output from checkRankFR
- OPTIONAL INPUT
filePathName – full file name for printing dependencies to file