6.1. pytfa

Thermodynamic analysis for Flux-Based Analysis

6.1.1. Subpackages

6.1.2. Package Contents

6.1.2.1. Classes

ThermoModel

A class representing a cobra_model with thermodynamics information

class pytfa.ThermoModel(thermo_data=None, model=Model(), name=None, temperature=std.TEMPERATURE_0, min_ph=std.MIN_PH, max_ph=std.MAX_PH)[source]

Bases: pytfa.core.model.LCSBModel, cobra.Model

A class representing a cobra_model with thermodynamics information

_init_thermo(self)
normalize_reactions(self)

Find reactions with important stoichiometry and normalizes them :return:

_prepare_metabolite(self, met)
Parameters

met

Returns

_prepare_reaction(self, reaction, null_error_override=2)
Parameters
  • reaction

  • null_error_override – overrides DeltaG when it is 0 to allow flexibility. 2kcal/mol is standard in estimation frameworks like GCM.

Returns

prepare(self, null_error_override=2)

Prepares a COBRA toolbox cobra_model for TFBA analysis by doing the following:

  1. checks if a reaction is a transport reaction

  2. checks the ReactionDB for Gibbs energies of formation of metabolites

  3. computes the Gibbs energies of reactions

Parameters

null_error_override – overrides DeltaG when it is 0 to allow flexibility. 2kcal/mol is standard in estimation frameworks like GCM.

_convert_metabolite(self, met, add_potentials, verbose)

Given a enzyme, proceeds to create the necessary variables and constraints for thermodynamics-based modeling

Parameters

met

Returns

_convert_reaction(self, rxn, add_potentials, add_displacement, verbose)
Parameters
  • rxn

  • add_potentials

  • add_displacement

  • verbose

Returns

convert(self, add_potentials=False, add_displacement=False, verbose=True)

Converts a cobra_model into a tFBA ready cobra_model by adding the thermodynamic constraints required

Warning

This function requires you to have already called prepare(), otherwise it will raise an Exception !

print_info(self, specific=False)

Print information and counts for the cobra_model :return:

__deepcopy__(self, memo)
Parameters

memo

Returns

copy(self)

Needs to be reimplemented, as our objects have complicated hierarchy :return: