# FR¶

bilinearDecomposition(S)[source]

Converts a stoichiometric matrix into a bilinear form.

Usage

[A, B, C] = bilinearDecomposition(S)

Input

• Sm x n stoichiometric matrix

Outputs

• Am 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.

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

• Fm x n
• Rm x n

Outputs

• connectedRowsFRBoolm x z boolean vector indicating z sets of connected rows
• connectedColsFRVBooln 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

• Fm x n
• Rm x n
• printLevel – verbose level

Outputs

• connectedRowsFRBoolm x 1 boolean vector indicating largests set of connected rows
• connectedColsFRVBooln 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
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