cameo.strain_design.pathway_prediction package


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.

  • model (cobra.Model) – The model that represents the host organism.

  • universal_model (cobra.Model, 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.


The provided model + universal_model + adapter reactions




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

>>> from cameo.api import hosts
>>> pathway_predictor = PathwayPredictor(hosts.ecoli.iJO1366)


__call__(*args, **kwargs)

Call self as a function.

run([product, max_predictions, ...])

Run pathway prediction for a desired product.

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.

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


The predicted pathways.

Return type


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.

  • original_metabolites (list) – List of host metabolites.

  • universal_model (cobra.Model) – The universal model.

  • mapping (dict) – A mapping between between host and universal model metabolite IDs.

  • compartment_regexp (regex) – A compiled regex that matches metabolites that should be connected to the universal model.


The list of adapter reactions.

Return type


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

Module contents