marsi.cobra.flux_analysis package¶
Submodules¶
marsi.cobra.flux_analysis.analysis module¶
-
marsi.cobra.flux_analysis.analysis.
metabolite_knockout_fitness
(model, simulation_method=<function pfba>, compartments=None, elements=['C', 'N'], objective=None, ndecimals=6, progress=False, ncarbons=2, **simulation_kwargs)[source]¶ Calculate the landscape of fitness for each metabolite knockout in the model.
Parameters: - model (cameo.core.SolverBasedModel) – A constraint-based model.
- simulation_method (cameo.flux_analysis.simulation.fba) – A method to simulate the knockouts (e.g. cameo.flux_analysis.simulation.moma)
- compartments (list) – The compartments to consider (e.g. [“c”, “g”, “r”] for cytosol, golgi aparatus and endoplasmatic reticulum)
- elements (list) – Atomic elements to add to the result.
- objective (str, cameo.core.Reaction, other) – A valid objective for the model.
- ndecimals (int) – Number of decimals to use as precision.
- progress (bool) – Report progress.
- ncarbons (int) – Minimum number of carbons to consider.
- simulation_kwargs (dict) – Arguments for `simulation_method
Returns: The fitness landscape.
Return type: MetaboliteKnockoutFitness
marsi.cobra.flux_analysis.manipulation module¶
-
marsi.cobra.flux_analysis.manipulation.
compete_metabolite
(model, metabolite, reference_dist, fraction=0.5, allow_accumulation=True, constant=10000.0)[source]¶ Increases the usage of a metabolite based on a reference flux distributions.
Parameters: - model (Model) – A constraint-based model.
- metabolite (cobra.Metabolite) – A metabolite.
- reference_dist (dict or FluxDistributionResult) – The result of a FBA like simulation. Alternative can be dictionaries of reaction.id -> flux.
- fraction (float) – How much does it requires the reactions to go up.
- allow_accumulation (bool) – Allow to accumulate the metabolite (add a exchange reaction).
- constant (float) – A large number (like 10000).
Returns: If allow accumulation returns the exchange reaction associated with the metabolite.
Return type: cobra.core.Reaction
-
marsi.cobra.flux_analysis.manipulation.
inhibit_metabolite
(model, metabolite, reference_dist, fraction=0.5, allow_accumulation=True, constant=10000.0)[source]¶ Inhibits the usage of a metabolite based on a reference flux distributions.
Parameters: - model (Model) – A constraint-based model.
- metabolite (cobra.Metabolite) – A metabolite.
- reference_dist (dict, FluxDistributionResult) – The result of a FBA like simulation. Alternative can be dictionaries of reaction.id -> flux.
- fraction (float) – How much does it inhibits the reactions. A float applies the same amount of inhibition. A dictionary must contain an inhibition percentage to all reactions associated with the metabolite.
- allow_accumulation (bool) – Allow to accumulate the metabolite (add a exchange reaction).
- constant (float) – A large number (like 10000).
Returns: If allow accumulation returns the exchange reaction associated with the metabolite.
Return type: cameo.core.Reaction, None
-
marsi.cobra.flux_analysis.manipulation.
knockout_metabolite
(model, metabolite, ignore_transport=True, allow_accumulation=True)[source]¶ Inhibits the usage of a metabolite based on a reference flux distributions.
Parameters: Returns: If allow accumulation returns the exchange reaction associated with the metabolite.
Return type: cameo.core.Reaction, None
-
marsi.cobra.flux_analysis.manipulation.
apply_anti_metabolite
(model, metabolites, essential_metabolites, reference, inhibition_fraction=0.0, competition_fraction=0.0, allow_accumulation=True)[source]¶ Apply a metabolite in the context of a model without knowing if it is activating or inhibiting.
Parameters: - model (cameo.core.SolverBasedModel) – A constraint-based model.
- metabolites (list) – Metabolites of the same species.
- essential_metabolites (list) – A list of essential metabolites.
- reference (dict, cameo.core.FluxDistributionResult) – A flux distribution.
- inhibition_fraction (float) – How much a metabolite inhibits.
- competition_fraction (float) – How much a metabolite competes.
- allow_accumulation (bool) – Allow accumulation of the metabolite.
Returns: Exchange reactions added for accumulation.
Return type:
Module contents¶
-
marsi.cobra.flux_analysis.
metabolite_knockout_fitness
(model, simulation_method=<function pfba>, compartments=None, elements=['C', 'N'], objective=None, ndecimals=6, progress=False, ncarbons=2, **simulation_kwargs)[source]¶ Calculate the landscape of fitness for each metabolite knockout in the model.
Parameters: - model (cameo.core.SolverBasedModel) – A constraint-based model.
- simulation_method (cameo.flux_analysis.simulation.fba) – A method to simulate the knockouts (e.g. cameo.flux_analysis.simulation.moma)
- compartments (list) – The compartments to consider (e.g. [“c”, “g”, “r”] for cytosol, golgi aparatus and endoplasmatic reticulum)
- elements (list) – Atomic elements to add to the result.
- objective (str, cameo.core.Reaction, other) – A valid objective for the model.
- ndecimals (int) – Number of decimals to use as precision.
- progress (bool) – Report progress.
- ncarbons (int) – Minimum number of carbons to consider.
- simulation_kwargs (dict) – Arguments for `simulation_method
Returns: The fitness landscape.
Return type: MetaboliteKnockoutFitness