psamm.gapfill – GapFind/GapFill

Identify blocked metabolites and possible reconstructions.

This implements a variant of the algorithms described in [Kumar07].

exception psamm.gapfill.GapFillError

Indicates an error while running GapFind/GapFill

psamm.gapfill.gapfill(model, core, blocked, exclude, solver, epsilon=0.001, v_max=1000, weights={})

Find a set of reactions to add such that no compounds are blocked.

Returns two iterators: first an iterator of reactions not in core, that were added to resolve the model. Second, an iterator of reactions in core that had flux bounds expanded (i.e. irreversible reactions become reversible). Similarly to GapFind, this method assumes implicit sinks for all compounds in the model so the only factor that influences whether a compound can be produced is the presence of the compounds needed to produce it. This means that the resulting model will not necessarily be flux consistent.

Core indicates the core set of reactions in the model. GapFill will minimize the number of added reactions that are not in core. Blocked indicates the set of compounds to be resolved. Exclude is a set of reactions that cannot be changed used for gap-filling. Epsilon indicates the threshold amount of a compound produced for it to not be considered blocked. V_max indicates the maximum flux.

This method is implemented as a MILP-program. Therefore it may not be efficient for larger models.

psamm.gapfill.gapfind(model, solver, epsilon=0.001, v_max=1000)

Identify compounds in the model that cannot be produced.

Yields all compounds that cannot be produced. This method assumes implicit sinks for all compounds in the model so the only factor that influences whether a compound can be produced is the presence of the compounds needed to produce it.

Epsilon indicates the threshold amount of reaction flux for the products to be considered non-blocked. V_max indicates the maximum flux.

This method is implemented as a MILP-program. Therefore it may not be efficient for larger models.