cameo.strain_design.pathway_prediction package

Submodules

cameo.strain_design.pathway_prediction.pathway_predictor module

class cameo.strain_design.pathway_prediction.pathway_predictor.PathwayPredictor(model, universal_model=None, mapping=None, compartment_regexp=None)[source]

Bases: cameo.core.strain_design.StrainDesignMethod

Pathway predictions from a universal set of reaction.

Parameters:
  • model (SolverBasedModel) – The model that represents the host organism.
  • universal_model (SolverBasedModel, optional) – The model that represents the universal set of reactions. A default model will be used if omitted.
  • mapping (dict, optional) – A dictionary that contains a mapping between metabolite identifiers in model and universal_model
  • compartment_regexp (str, optional) – A regular expression that matches host metabolites’ compartments that should be connected to the universal reaction model. If not provided, the compartment containing most metabolites will be chosen.
model

SolverBasedModel – The provided model + universal_model + adapter reactions

Examples

Determine production pathways for propane-1,3-diol (MNXM2861 in the metanetx namespace)

>>> from cameo.api import hosts
>>> pathway_predictor = PathwayPredictor(hosts.ecoli.iJO1366)
>>> pathway_predictor.run(product=pathway_predictor.model.metabolites.MNXM2861)

Methods

run(product=None, max_predictions=inf, min_production=0.1, timeout=None, callback=None, silent=False, allow_native_exchanges=False)[source]

Run pathway prediction for a desired product.

Parameters:
  • product (Metabolite, str) – Metabolite or id or name of metabolite to find production pathways for.
  • max_predictions (int, optional) – The maximum number of predictions to compute.
  • min_production (float) – The minimum acceptable production flux to product.
  • timeout (int) – The time limit [seconds] per attempted prediction.
  • callback (function) – A function that takes a successfully predicted pathway.
  • silent (bool) – If True will print the pathways and max flux values.
  • allow_native_exchanges (bool) – If True, exchange reactions for native metabolites will be allowed.
Returns:

The predicted pathways.

Return type:

PathwayPredictions

cameo.strain_design.pathway_prediction.util module

cameo.strain_design.pathway_prediction.util.create_adapter_reactions(original_metabolites, universal_model, mapping, compartment_regexp)[source]

Create adapter reactions that connect host and universal model.

Parameters:
  • original_metabolites (list) – List of host metababolites.
  • universal_model (cobra.Model) – The universal model.
  • mapping (dict) – A mapping between between host and universal model metabolite IDs.
  • compartment_regexp (regex) – A compile regex that matches metabolites that should be connected to the universal model.
Returns:

reactions – The list of adapter reactions.

Return type:

list

cameo.strain_design.pathway_prediction.util.display_pathway(pathway, i)[source]

Module contents