psamm.fastgapfill – FastGapFill algorithm

Implementation of fastGapFill.

Described in [Thiele14].

psamm.fastgapfill.create_extended_model(model, db_penalty=None, ex_penalty=None, tp_penalty=None, penalties=None)

Create an extended model for FastGapFill algorithm.

Create a psamm.metabolicmodel.MetabolicModel with all reactions added (the reaction database in the model is taken to be the universal database) and also with artificial exchange and transport reactions added. Return the extended psamm.metabolicmodel.MetabolicModel and a weight dictionary for added reactions in that model.

Parameters:
  • modelpsamm.datasource.native.NativeModel.
  • db_penalty – penalty score for database reactions, default is None.
  • ex_penalty – penalty score for exchange reactions, default is None.
  • tb_penalty – penalty score for transport reactions, default is None.
  • penalties – a dictionary of penalty scores for database reactions.
psamm.fastgapfill.fastgapfill(model_extended, core, solver, weights={}, epsilon=1e-05)

Run FastGapFill gap-filling algorithm by calling psamm.fastcore.fastcore().

FastGapFill will try to find a minimum subset of reactions that includes the core reactions and it also has no blocked reactions. Return the set of reactions in the minimum subset. An extended model that includes artificial transport and exchange reactions can be generated by calling create_extended_model().

Parameters:
  • modelpsamm.metabolicmodel.MetabolicModel.
  • core – reactions in the original metabolic model.
  • weights – a weight dictionary for reactions in the model.
  • solver – linear programming library to use.
  • epsilon – float number, threshold for Fastcore algorithm.