fastGapFill

fastGapFill(consistMatricesSUX, epsilon, weights, weightsPerReaction)

This function requires the fastCORE algorithm (Vlassis et al., 2013, http://arxiv.org/abs/1304.7992) as well as the output from prepareFastGapFill.

USAGE:

[AddedRxns] = fastGapFill(consistMatricesSUX, epsilon, weights, weightsPerReaction)

INPUTS:

consistMatricesSUX: To be obtained from prepareFastGapFill epsilon: Parameter for fastCore (optional input, default: getCobraSolverParams(‘LP’, ‘feasTol’)*100).

Please refer to Vlassis et al. to get more details on this parameter.

weights: Weight structure that permits to add weights to

non-core reactions (it is recommended to use values other than 0 and 1, with lower weight corresponding to higher priority. Format:

  • weights.MetabolicRxns = 10; % Universal database metabolic reactions

  • weights.ExchangeRxns = 10; % Exchange reactions

  • weights.TransportRxns = 10; % Transport reactions

Optional input. Default: weigth of 10 for all non-core reactions.

weightsPerReaction: Weights per reaction

OUTPUT:

AddedRxns: Reactions that have been added from UX matrix to S

generateSUXMatrix(model, dictionary, KEGGFilename, KEGGBlackList, compartment, addModel)

Creates the matrices for matlab smiley – > combines S, U, (KEGG), X (transport)

USAGE:

MatricesSUX = generateSUXMatrix(model, dictionary, KEGGFilename, KEGGBlackList, compartment, addModel)

INPUTS:

model: model structure dictionary: disctionary used to transform KEGG model

OPTIONAL INPUTS:

KEGGID: List of KEGGIDs for compounds KEGGFilename: File name containing KEGG database KEGGBlackList: Contains black list, default = {} compartment: [c] –> transport from cytoplasm [c] to extracellulat space

[e] (default), [p] creates transport from [c] to [p] and from [p] to [c], if ‘’ - no exchange reactions/transport will be added to the matrix.

addModel: model structure, containing an additional matrix or model

that should be combined with SUX matrix.% Note that the naming of metabolites in this matrix has to be identical to model naming. Also, the list should be unique.

identifyBlockedRxns(model, epsilon)

This function computes all blocked reactions using the approach described in The FASTCORE algorithm for context-specific metabolic network reconstructions, Vlassis et al., 2013, PLoS Comp Biol.`

USAGE:

[consistModel, BlockedRxns] = identifyBlockedRxns(model, epsilon)

INPUTS:

model: Model structure epsilon: Parameter (default: getCobraSolverParams(‘LP’, ‘feasTol’)*100; see Vlassis et al for more details)

OUTPUT:
consistModel: Flux consistent model that does not contain any blocked

reactions anymore

BlockedRxns: Structure containing all blocked reactions and their reaction formula that were in model

postProcessGapFillSolutions(AddedRxns, model, BlockedRxns, IdentifyPW)

This function uses the output from fastGapFill and signs generalized function to the identified solutions from the universal database (e.g., ‘Metabolic reaction’, ‘Transport reaction’, ‘Exchange reaction’). It also provides basic statistics for the solution. One can use the option ‘IdentifyPW’ to compute for each solved blocked reaction a flux vector, such that the flux through this reaction is maximized while the sum of all fluxes is minimized. This analysis can be helpful to put the solution reactions into the network context.

USAGE:

[AddedRxnsExtended] = postProcessGapFillSolutions(AddedRxns, model, BlockedRxns, IdentifyPW)

INPUTS:

AddedRxns: Output from fastGapFill.m model: Model structure. Original model given as input into prepareFastGapFill IdentifyPW: Optional: identifies reactions that are need from

consistent model and added reactions to have flux through previously blocked reaction, default: false

OUTPUT:
AddedRxnsExtended: Structure containing the information present in

AddedRxns along with the statistics and if desired pathways containing the flux vectors.

prepareFastGapFill(model, listCompartments, epsilon, filename, dictionary_file, blackList)

This function generate the input file (consistMatricesSUX) for fastGapFill.m. Please refer to Thiele et al, 2013 for more details. This function is based on the fastCORE algorithm (Vlassis et al., 2013).

USAGE:

[consistModel, consistMatricesSUX, BlockedRxns] = prepareFastGapFill(model, listCompartments, epsilon, filename, dictionary_file, blackList)

INPUTS:

model: Model structure listCompartments: List of intracellular compartments in the model

(optional input, default compartments to be considered: ‘[c]’,’[m]’,’[l]’,’[g]’,’[r]’,’[x]’,’[n]’)

epsilon: Parameter for fastCore (optional input, default:

1e-4). Please refer to Vlassis et al. to get more details on this parameter.

filename: File name containing universal database (e.g., KEGG; optional input, default: reaction.lst) dictionary_file: List of universal database IDs and their counterpart in the model

(optional input, default: KEGG_dictionary.xls)

blackList: List of excluded reactions from the universal database

(e.g., KEGG) (optional input, default: no blacklist)

OUTPUT:

consistModel: Flux consistent subnetwork of the input model consistMatricesSUX: Flux consistent SUX matrix, which contains the flux

consistent S matrix (model), the universal database placed in all cellular compartments along with transport reactions for each metabolite from cytosol to compartment and exchange reactions for all extracellular metabolites.

BlockedRxns: Blocked reactions in mode%

submitGapFill(swift, modelFile, dbFile, dictionaryFile, prepareFGFResults, weightsPerRxnFile, forceRerun, epsilon, blackList, listCompartments)

A test function for prepareFastGapFill, swiftGapFill, and fastGapFill, allowing all files to be optionally specified and not requiring prepareFastGapFill to be rerun (if relevant variables are saved in a specified workspace file) if it has already been run.

This function performs three runs of fastGapFill or swiftGapFill on the same prepared model, with weights as specified in the ‘Define Runs’ section of the code. The ‘runs’ variable can be appended to or changed to enable the running of `fastGapFill or swiftGapFill for different combinations of weights (and different weightsPerRxnFile files).

This function draws inspiration heavily from the example already available for fastGapFill, i.e. runGapFill_example.m

N.B. The defaults are set for testing all of the functionality of the algorithm, including setting a (toy) weight file, which is not necessary in running fastGapFill or swiftGapFill so should be specified as empty if running without a weight file.

All inputs are optional, defaults to E. coli model iAF1260 and example files)

USAGE:

[AddedRxns] = submitGapFill(swift, modelFile, dbFile, dictionaryFile, prepareFGFResults, weightsPerRxnFile, forceRerun, epsilon, blackList, listCompartments)

OPTIONAL INPUTS:
swift: Boolean specifying whether to run swiftGapFill or

fastGapFill (default: false)

modelFileIn: File containing model, either .mat or .xml

(default: ‘examples/iAF1260.mat’)

dbFileIn: File containing universal database

(default: ‘AuxillaryFiles/reaction.lst’)

dictionaryFileIn: File containing db metabolite IDs and model

counterparts, either .xls or .tsv (default: ‘AuxillaryFiles/KEGG_dictionary.xls’)

workspaceFileIn: File for storing prepareFastGapFill results

(default: ‘examples/defaultWorkspace.mat’)

weightsPerRxnFile: File containing individual weights for reactions

(default: ‘examples/sampleWeights.tsv’)

forceRerun: Boolean specifying whether to rerun

prepareFastGapFill even if it has already been run. N.B. If this is set to ‘true’ it will overwrite the precalculated default results files, unless prepareFGFResults is specified outside the examples directory (default: false)

epsilon: Float, a fastCore parameter (default: getCobraSolverParams(‘LP’, ‘feasTol’)*100) blackList: List of excluded universal DB reactions

(default: none)

listCompartments: List of compartments in the model to be gapFilled N.B.

the default is set within prepareGapFill (default: all compartments specified in the model)

OUTPUT:

AddedRxns: Reactions that have been added from UX matrix to S

swiftGapFill(consistMatricesSUX, tol, weights, weightsPerReaction)

This function requires the swiftcore algorithm as well as the output from prepareFastGapFill.

USAGE:

[reconstruction, AddedRxns] = swiftGapFill(consistMatricesSUX, tol, weights, weightsPerReaction)

INPUT:

consistMatricesSUX: To be obtained from prepareFastGapFill

OPTIONAL INPUTS:

tol: Parameter for swiftcore (default: 1e-10). weights: Weight structure that permits to add weights to non-core reactions

It is recommended to use values other than 0 and 1, with lower weight corresponding to higher priority. Format:

  • weights.MetabolicRxns = 10; % Universal database metabolic reactions

  • weights.ExchangeRxns = 10; % Exchange reactions

  • weights.TransportRxns = 10; % Transport reactions

Default: weigth of 10 for all non-core reactions.

weightsPerReaction: Weights per reaction

OUTPUT:

AddedRxns: Reactions that have been added from UX matrix to S