Ejemplo n.º 1
0
def iBsu1103_compound(model):
    set_objective_function(model, 'EX_cpd00029_e')

    for exchange in model.exchanges:
        exchange.lower_bound = -10.0

    get_reaction(model, 'rxn00152').bounds = (0.0, 0.0)
    get_reaction(model, 'rxn00173').bounds = (0.0, 0.0)

    acetate_rate = model.optimize().objective_value

    reactions = len(model.reactions)
    metabolites = len(model.metabolites)

    return ('EX_cpd00029_e', acetate_rate), model, reactions, metabolites
Ejemplo n.º 2
0
def iOD907_compound(model):
    set_objective_function(model, 'EX_C00158_extr')

    get_reaction(model, 'EX_C00267_extr').lower_bound = -10.0

    get_reaction(model, 'R00355_C3_cyto').bounds = (0.0, 0.0)
    get_reaction(model, 'R00344_C3_cyto').bounds = (0.0, 0.0)
    get_reaction(model, 'T01268_C4_mito').bounds = (0.0, 0.0)
    get_reaction(model, 'R01731_C3_cyto').bounds = (0.0, 0.0)

    citrate_rate = model.optimize().objective_value

    reactions = len(model.reactions)
    metabolites = len(model.metabolites)

    return ('EX_C00158_extr', citrate_rate), model, reactions, metabolites
Ejemplo n.º 3
0
def iJO1366_compound(model):
    set_objective_function(model, 'EX_ac_LPAREN_e_RPAREN_')

    get_reaction(model, 'EX_o2_LPAREN_e_RPAREN_').bounds = (0.0, 0.0)

    acetate_rate = model.optimize().objective_value

    reactions = len(model.reactions)
    metabolites = len(model.metabolites)

    return ('EX_ac_LPAREN_e_RPAREN_', acetate_rate), model, reactions, metabolites
Ejemplo n.º 4
0
def iOD907(model):
    set_objective_function(model, 'Biomass_cyto')

    get_reaction(model, 'EX_C00267_extr').lower_bound = -10.0

    growth = model.optimize().objective_value

    reactions = len(model.reactions)
    metabolites = len(model.metabolites)

    return ('Biomass_cyto', growth), model, reactions, metabolites
Ejemplo n.º 5
0
def iTO977(model):
    set_objective_function(model, 'CBIOMASS')

    get_reaction(model, 'GLCxtI').bounds = (-10.0, 10.0)

    growth = model.optimize().objective_value

    reactions = len(model.reactions)
    metabolites = len(model.metabolites)

    return ('CBIOMASS', growth), model, reactions, metabolites
Ejemplo n.º 6
0
def iJO1366(model):
    set_objective_function(model, 'Ec_biomass_iJO1366_core_53p95M')

    get_reaction(model, 'EX_o2_LPAREN_e_RPAREN_').bounds = (0.0, 0.0)

    growth = model.optimize().objective_value

    reactions = len(model.reactions)
    metabolites = len(model.metabolites)

    return ('Ec_biomass_iJO1366_core_53p95M', growth), model, reactions, metabolites
Ejemplo n.º 7
0
def iTO977_compound(model):
    set_objective_function(model, 'CO2xtO')

    get_reaction(model, 'GLCxtI').bounds = (-10.0, 10.0)

    co2_rate = model.optimize().objective_value

    reactions = len(model.reactions)
    metabolites = len(model.metabolites)

    return ('CO2xtO', co2_rate), model, reactions, metabolites
Ejemplo n.º 8
0
    def set_root(self):

        """Setting the root, namely the product metabolite in the reaction provided
        If the model doesn't have a single product,
        a fictitious metabolite is set as root.
        It does not add this fictitious metabolite to the model though

        This is controlled in the __verify_reaction_principles__ method"""

        if not self.__principles_verified:
            self.__verify_reaction_principles()

        # setting the root
        self.root = Node(identifier=self.__metabolite_id,
                         name=self.__metabolite_name,
                         compartment=self.__metabolite_name,
                         is_reactant=self.__metabolite_is_reactant)

        reaction = get_reaction(self.model, self.reaction_id)

        # testing first the root reaction
        if self.objective_direction == 'maximize':

            reaction_flux = simulate_reaction(self.__id, self.model, reaction, True)

            self.root.reactions_list = [(reaction, reaction.id, reaction_flux,
                                         list_reactants_ids(self.model, reaction.id),
                                         list_products_ids(self.model, reaction.id),
                                         get_reactants(self.model, reaction.id),
                                         get_products(self.model, reaction.id))]

        else:

            reaction_flux = simulate_reaction(self.__id, self.model, reaction, False)

            self.root.reactions_list = [(reaction, reaction.id, reaction_flux,
                                         list_products_ids(self.model, reaction.id),
                                         list_reactants_ids(self.model, reaction.id),
                                         get_products(self.model, reaction.id),
                                         get_reactants(self.model, reaction.id))]

        self.root.analysis = reaction_flux