7.1.2.5. pta.model_assessment
Methods for the thermodynamic assessment of a metabolic network.
7.1.2.5.1. Module Contents
- class pta.model_assessment.StructuralAssessment(model: cobra.Model, biomass_id: Optional[str] = None, atpm_id: str = 'ATPM')[source]
This class is used to find thermodynamic inconsistencies in the definition of the network that make the model infeasible. Inconsistencies arise when flux constraints (steady state and irreversibilities) prevent any thermodynamically feasible non-zero solution. These inconsistencies occur with any assignment of Gibbs free energies.
- Parameters:
- property forced_internal_cycles: List[List[str]][source]
Gets a list of all the forced internal cycles of the network, i.e. the internal cycles that must be active in any non-zero flux solution and thus make the model thermodynamically inconsistent.
- autoresolve(model: cobra.Model, default_bound: float = default_flux_bound)[source]
Attempt to automatically resolve thermodynamic inconsistencies. This method removes all reactions involved in dead-end cycles (internal cycles that exchange flux with the rest of the network through a single metabolite) and makes all the reactions in the remaining cycles reversible. While this method should always resolve all inconsistencies, it is still recommended to inspect the inconsistencies and the curated model manually to verify that the model behave as expected. The output of the curation can be seen by enabling logging level INFO.
- Parameters:
model (cobra.Model) – The model in which the curation actions must be applied. This can be the model on which the assessment was run or a similar model. This is useful for cases where assessment is run on a condition specific model but actions should be applied to a base model.
default_bound (float, optional) – Default bound to use for unconstrained reactions.
- class pta.model_assessment.QuantitativeAssessment(pmo_problem: pta.pmo.PmoProblem, z_score_threshold: float = default_theta_z, shadow_price_threshold: float = default_theta_s, max_extracellular_conc: pta.commons.Q = None)[source]
Quantitative thermodynamic assessment of a metabolic network. This process combines thermodynamic data and flux constraints to identify parts of the network where the mechanism in the model is possibly incorrect.
- Parameters:
pmo_problem (PmoProblem) – A solved PMO problem.
z_score_threshold (float, optional) – Threshold on the z-score to consider a predicted value an anomaly.
shadow_price_threshold (float, optional) – Threshold on the shadow price to consider a reaction a strong thermodynamic constrain.
max_extracellular_conc (Q, optional) – Threshold on the concentration to consider a predicted concentration an anomaly.
- property metabolites_df: pandas.DataFrame[source]
Gets a data frame with the metabolite-related quantities.
- property reactions_df: pandas.DataFrame[source]
Gets a data frame with the reaction-related quantities.
- property theta_z: float[source]
Gets the mimimum absolute z-score used to classify a metabolite concentration as anomaly.
- pta.model_assessment.prepare_for_pta(model: cobra.Model, biomass_id: Optional[str] = None, atpm_id: str = 'ATPM', default_bound: float = default_flux_bound, autoresolve_inconsistencies: bool = True, remove_blocked_reactions: bool = True, tighten_bounds: bool = True, prevent_loops: bool = False)[source]
Attempt to automatically prepare a model for use in PTA.
This method performs three actions:
Runs structural assessment on the model and attempts to autoresolve possible inconsistencies.
Removes all blocked reactions from the model.
Runs FVA to tighten the flux bounds of each reaction.
- Parameters:
model (cobra.Model) – The target model.
biomass_id (Optional[str], optional) – ID of the biomass reactions. If None, the method will try to find it automatically.
atpm_id (str, optional) – ID of the ATP maintenance reaction.
default_bound (float, optional) – Default bound to use for unconstrained reactions.
autoresolve_inconsistencies (bool, optional) – True if the method should attempt to automatically resolve inconsistencies, false otherwise. By default True.
remove_blocked_reactions (bool, optional) – True if the method should remove blocked reactions, false otherwise. By default True.
tighten_bounds (bool, optional) – True if the method should restrict the flux bounds with FVA, false otherwise. By default True.