From a0c22c9aaf08e3425a0ba11479dc516d9d666d26 Mon Sep 17 00:00:00 2001 From: Andrew Freiburger Date: Fri, 1 Jul 2022 16:36:05 -0400 Subject: [PATCH 1/8] initial commit --- modelseedpy/core/msatpcorrection.py | 198 ++++++++++------------------ 1 file changed, 72 insertions(+), 126 deletions(-) diff --git a/modelseedpy/core/msatpcorrection.py b/modelseedpy/core/msatpcorrection.py index a16d5e93..676858e0 100755 --- a/modelseedpy/core/msatpcorrection.py +++ b/modelseedpy/core/msatpcorrection.py @@ -1,29 +1,16 @@ import logging -import itertools -import cobra -from optlang.symbolics import Zero, add -from modelseedpy.core.rast_client import RastClient -from modelseedpy.core.msgenome import normalize_role -from modelseedpy.core.msmodel import get_gpr_string, get_reaction_constraints_from_direction -from cobra.core import Gene, Metabolite, Model, Reaction -from modelseedpy.core import FBAHelper, MSGapfill +logger = logging.getLogger(__name__) + +from modelseedpy.core.msgapfill import MSGapfill +from modelseedpy.core.fbahelper import FBAHelper from modelseedpy.fbapkg.mspackagemanager import MSPackageManager -logger = logging.getLogger(__name__) class MSATPCorrection: - - def __init__(self, model, core_template, atp_medias,compartment="c0", + def __init__(self, model, core_template, atp_medias, compartment="c0", max_gapfilling=None, gapfilling_delta=0, atp_hydrolysis_id=None): """ - - :param model: - :param core_template: - :param atp_medias: - :param atp_objective: - :param max_gapfilling: - :param gapfilling_delta: :param atp_hydrolysis_id: ATP Hydrolysis reaction ID, if None it will perform a SEED reaction search """ self.model = model @@ -38,85 +25,64 @@ def __init__(self, model, core_template, atp_medias,compartment="c0", self.gapfilling_delta = gapfilling_delta self.coretemplate = core_template self.msgapfill = MSGapfill(model, default_gapfill_templates=core_template) - self.original_bounds = {} - self.noncore_reactions = [] - self.other_compartments = [] - self.media_gapfill_stats = {} - self.gapfilling_tests = [] - self.selected_media = [] - self.filtered_noncore = [] + + self.original_bounds, self.media_gapfill_stats = {}, {} + self.noncore_reactions, self.other_compartments, self.gapfilling_tests = [], [], [] + self.selected_media, self.filtered_noncore = [], [] self.lp_filename = None def disable_noncore_reactions(self): - """ - Disables all noncore reactions in the model - :return: - """ #Must restore reactions before disabling to ensure bounds are not overwritten if len(self.noncore_reactions) > 0: self.restor_noncore_reactions(noncore = True,othercompartment = True) #Now clearing the existing noncore datastructures self.original_bounds = {} - self.noncore_reactions = [] - self.other_compartments = [] + self.noncore_reactions, self.other_compartments = [], [] #Iterating through reactions and disabling for reaction in self.model.reactions: - if reaction.id == self.atp_hydrolysis.id: - continue - if FBAHelper.is_ex(reaction): - continue - if FBAHelper.is_biomass(reaction): - continue - msid = FBAHelper.modelseed_id_from_cobra_reaction(reaction) - if msid != None: - msid += "_"+self.compartment[0:1] - if FBAHelper.rxn_compartment(reaction) != self.compartment: - logger.debug(reaction.id+" noncore") - self.original_bounds[reaction.id] = (reaction.lower_bound, reaction.upper_bound) - if reaction.lower_bound < 0: - self.other_compartments.append([reaction, "<"]) - if reaction.upper_bound > 0: - self.other_compartments.append([reaction, ">"]) - reaction.lower_bound = 0 - reaction.upper_bound = 0 - elif msid in self.coretemplate.reactions: - self.original_bounds[reaction.id] = (reaction.lower_bound, reaction.upper_bound) - logger.debug(reaction.id+" core") - if reaction.lower_bound < 0 and self.coretemplate.reactions.get_by_id(reaction.id[0:-1]).lower_bound >= 0: - logger.debug(reaction.id+" core but reversible") - self.noncore_reactions.append([reaction, "<"]) - reaction.lower_bound = 0 - if reaction.upper_bound > 0 and self.coretemplate.reactions.get_by_id(reaction.id[0:-1]).upper_bound <= 0: - logger.debug(reaction.id+" core but reversible") - self.noncore_reactions.append([reaction, ">"]) - reaction.upper_bound = 0 - else: - logger.debug(reaction.id+" noncore") - self.original_bounds[reaction.id] = (reaction.lower_bound, reaction.upper_bound) - if reaction.lower_bound < 0: - self.noncore_reactions.append([reaction, "<"]) - if reaction.upper_bound > 0: - self.noncore_reactions.append([reaction, ">"]) - reaction.lower_bound = 0 - reaction.upper_bound = 0 + if not any([reaction.id == self.atp_hydrolysis.id, FBAHelper.is_ex(reaction), FBAHelper.is_biomass(reaction)]): + msid = FBAHelper.modelseed_id_from_cobra_reaction(reaction) + if msid: + msid += "_"+self.compartment[0:1] + if msid in self.coretemplate.reactions: + self.original_bounds[reaction.id] = (reaction.lower_bound, reaction.upper_bound) + logger.debug(reaction.id+" core") + if reaction.lower_bound < 0 and self.coretemplate.reactions.get_by_id(reaction.id[0:-1]).lower_bound >= 0: + logger.debug(reaction.id+" core but reversible") + self.noncore_reactions.append([reaction, "<"]) + reaction.lower_bound = 0 + if reaction.upper_bound > 0 and self.coretemplate.reactions.get_by_id(reaction.id[0:-1]).upper_bound <= 0: + logger.debug(reaction.id+" core but reversible") + self.noncore_reactions.append([reaction, ">"]) + reaction.upper_bound = 0 + else: + logger.debug(reaction.id+" noncore") + self.original_bounds[reaction.id] = (reaction.lower_bound, reaction.upper_bound) + if reaction.lower_bound < 0: + if FBAHelper.rxn_compartment(reaction) != self.compartment: + self.other_compartments.append([reaction, "<"]) + else: + self.noncore_reactions.append([reaction, "<"]) + if reaction.upper_bound > 0: + if FBAHelper.rxn_compartment(reaction) != self.compartment: + self.other_compartments.append([reaction, ">"]) + else: + self.noncore_reactions.append([reaction, ">"]) + reaction.lower_bound = reaction.upper_bound = 0 def evaluate_growth_media(self): - """ - Determines how much gap filling each input test media requires to make ATP - - :return: - """ + """Determines how much gap filling each input test media requires to make ATP""" self.disable_noncore_reactions() self.media_gapfill_stats = {} self.msgapfill.default_gapfill_templates = [self.coretemplate] if self.lp_filename: self.msgapfill.lp_filename = self.lp_filename - output = {} + results = {} with self.model: self.model.objective = self.atp_hydrolysis.id #self.model.objective = self.model.problem.Objective(Zero,direction="max") #self.atp_hydrolysis.update_variable_bounds() - logger.debug("ATP bounds:"+str(self.atp_hydrolysis.lower_bound)+":"+str(self.atp_hydrolysis.upper_bound)) + logger.debug(f"ATP bounds: {self.atp_hydrolysis.lower_bound} : {self.atp_hydrolysis.upper_bound}") #self.model.objective.set_linear_coefficients({self.atp_hydrolysis.forward_variable:1}) pkgmgr = MSPackageManager.get_pkg_mgr(self.model) for media in self.atp_medias: @@ -125,27 +91,24 @@ def evaluate_growth_media(self): solution = self.model.optimize() logger.debug('evaluate media %s - %f (%s)', media.id, solution.objective_value, solution.status) self.media_gapfill_stats[media] = None - output[media.id] = solution.objective_value + results[media.id] = solution.objective_value if solution.objective_value == 0 or solution.status != 'optimal': self.media_gapfill_stats[media] = self.msgapfill.run_gapfilling(media, self.atp_hydrolysis.id) #IF gapfilling fails - need to activate and penalize the noncore and try again elif solution.objective_value > 0 or solution.status == 'optimal': self.media_gapfill_stats[media] = {'reversed': {}, 'new': {}} - return output + return results def determine_growth_media(self): - """ - Decides which of the test media to use as growth conditions for this model - :return: - """ + """Decides which of the test media to use as growth conditions for this model""" + from math import inf + self.selected_media = [] - best_score = None + best_score = inf for media in self.media_gapfill_stats: - gfscore = 0 if self.media_gapfill_stats[media]: gfscore = len(self.media_gapfill_stats[media]["new"].keys()) + 0.5*len(self.media_gapfill_stats[media]["reversed"].keys()) - if best_score is None or gfscore < best_score: - best_score = gfscore + best_score = min(best_score, gfscore) if self.max_gapfilling is None: self.max_gapfilling = best_score for media in self.media_gapfill_stats: @@ -155,43 +118,31 @@ def determine_growth_media(self): if gfscore <= self.max_gapfilling and gfscore <= (best_score+self.gapfilling_delta): self.selected_media.append(media) - def determine_growth_media2(self, max_gapfilling=None): - """ - Decides which of the test media to use as growth conditions for this model - :return: - """ - def scoring_function(media): - return len(self.media_gapfill_stats[media]["new"].keys()) + 0.5 * \ - len(self.media_gapfill_stats[media]["reversed"].keys()) - - self.selected_media = [] - media_scores = dict( - (media, scoring_function(media)) for media in self.media_gapfill_stats if self.media_gapfill_stats[media]) - best_score = min(media_scores.values()) - if max_gapfilling is None: - max_gapfilling = best_score - for media in media_scores: - score = media_scores[media] - logger.debug(score, best_score, max_gapfilling) - if score <= max_gapfilling and score <= (best_score + self.gapfilling_delta): - self.selected_media.append(media) + # def determine_growth_media2(self, max_gapfilling=None): #!!! unused function + # """Decides which of the test media to use as growth conditions for this model""" + # def scoring_function(media): + # return len(self.media_gapfill_stats[media]["new"].keys()) + 0.5 * \ + # len(self.media_gapfill_stats[media]["reversed"].keys()) + + # self.selected_media = [] + # media_scores = {media:scoring_function(media) for media in self.media_gapfill_stats if self.media_gapfill_stats[media]} + # best_score = min(media_scores.values()) + # if max_gapfilling is None: + # max_gapfilling = best_score + # for media, score in media_scores.items(): + # logger.debug(score, best_score, max_gapfilling) + # if score <= max_gapfilling and score <= (best_score + self.gapfilling_delta): + # self.selected_media.append(media) def apply_growth_media_gapfilling(self): - """ - Applies the gapfilling to all selected growth media - :return: - """ + """Applies the gapfilling to all selected growth media""" for media in self.selected_media: if media in self.media_gapfill_stats and self.media_gapfill_stats[media]: self.model = self.msgapfill.integrate_gapfill_solution(self.model, self.media_gapfill_stats[media]) def expand_model_to_genome_scale(self): - """ - Expands the model to genome-scale while preventing ATP overproduction - :return: - """ - self.gapfilling_tests = [] - self.filtered_noncore = [] + """Expands the model to genome-scale while preventing ATP overproduction""" + self.gapfilling_tests, self.filtered_noncore = [], [] self.model.objective = self.atp_hydrolysis.id pkgmgr = MSPackageManager.get_pkg_mgr(self.model) for media in self.selected_media: @@ -217,10 +168,7 @@ def expand_model_to_genome_scale(self): self.restore_noncore_reactions(noncore = False,othercompartment = True) def restore_noncore_reactions(self,noncore = True,othercompartment = True): - """ - Restores the bounds on all noncore reactions - :return: - """ + """Restores the bounds on all noncore reactions""" # Restoring original reaction bounds if noncore: for item in self.noncore_reactions: @@ -236,10 +184,7 @@ def restore_noncore_reactions(self,noncore = True,othercompartment = True): reaction.upper_bound = self.original_bounds[reaction.id][1] def run_atp_correction(self): - """ - Runs the entire ATP method - :return: - """ + """Runs the entire ATP method""" #Ensure all specified media work self.evaluate_growth_media() self.determine_growth_media() @@ -247,7 +192,8 @@ def run_atp_correction(self): self.expand_model_to_genome_scale() @staticmethod - def atp_correction(model,coretemplate,atp_medias = None,atp_objective = "bio2",max_gapfilling = None,gapfilling_delta = 0): - msatpobj = MSATPCorrection(model,coretemplate,atp_medias,atp_objective,max_gapfilling,gapfilling_delta) + def atp_correction(model, coretemplate, atp_medias=None, atp_objective="bio2", max_gapfilling=None, gapfilling_delta=0): + msatpobj = MSATPCorrection(model, coretemplate, atp_medias, atp_objective, max_gapfilling, gapfilling_delta) msatpobj.run_atp_correction() return msatpobj + From 8190936b5281071ca3ab7459cc987b978c0b62b1 Mon Sep 17 00:00:00 2001 From: Andrew Freiburger Date: Fri, 1 Jul 2022 18:40:13 -0400 Subject: [PATCH 2/8] restored docstrings --- modelseedpy/core/msatpcorrection.py | 90 ++++++++++++++++++++--------- 1 file changed, 63 insertions(+), 27 deletions(-) diff --git a/modelseedpy/core/msatpcorrection.py b/modelseedpy/core/msatpcorrection.py index 676858e0..e8ae418a 100755 --- a/modelseedpy/core/msatpcorrection.py +++ b/modelseedpy/core/msatpcorrection.py @@ -1,16 +1,26 @@ import logging logger = logging.getLogger(__name__) - +import itertools # !!! import never used +import cobra # !!! import never used +from optlang.symbolics import Zero, add # !!! neither Zero nor Add are ever used +from modelseedpy.core.rast_client import RastClient # !!! import never used +from modelseedpy.core.msgenome import normalize_role # !!! import never used +from modelseedpy.core.msmodel import get_gpr_string, get_reaction_constraints_from_direction # !!! neither import is ever used +from cobra.core import Gene, Metabolite, Model, Reaction # !!! none of these imports used +from modelseedpy.fbapkg.mspackagemanager import MSPackageManager from modelseedpy.core.msgapfill import MSGapfill from modelseedpy.core.fbahelper import FBAHelper -from modelseedpy.fbapkg.mspackagemanager import MSPackageManager - - class MSATPCorrection: def __init__(self, model, core_template, atp_medias, compartment="c0", max_gapfilling=None, gapfilling_delta=0, atp_hydrolysis_id=None): """ + :param model: + :param core_template: + :param atp_medias: + :param atp_objective: + :param max_gapfilling: + :param gapfilling_delta: :param atp_hydrolysis_id: ATP Hydrolysis reaction ID, if None it will perform a SEED reaction search """ self.model = model @@ -32,6 +42,10 @@ def __init__(self, model, core_template, atp_medias, compartment="c0", self.lp_filename = None def disable_noncore_reactions(self): + """ + Disables all noncore reactions in the model + :return: + """ #Must restore reactions before disabling to ensure bounds are not overwritten if len(self.noncore_reactions) > 0: self.restor_noncore_reactions(noncore = True,othercompartment = True) @@ -71,13 +85,17 @@ def disable_noncore_reactions(self): reaction.lower_bound = reaction.upper_bound = 0 def evaluate_growth_media(self): - """Determines how much gap filling each input test media requires to make ATP""" + """ + Determines how much gap filling each input test media requires to make ATP + + :return: + """ self.disable_noncore_reactions() self.media_gapfill_stats = {} self.msgapfill.default_gapfill_templates = [self.coretemplate] if self.lp_filename: self.msgapfill.lp_filename = self.lp_filename - results = {} + output = {} with self.model: self.model.objective = self.atp_hydrolysis.id #self.model.objective = self.model.problem.Objective(Zero,direction="max") @@ -91,16 +109,19 @@ def evaluate_growth_media(self): solution = self.model.optimize() logger.debug('evaluate media %s - %f (%s)', media.id, solution.objective_value, solution.status) self.media_gapfill_stats[media] = None - results[media.id] = solution.objective_value + output[media.id] = solution.objective_value if solution.objective_value == 0 or solution.status != 'optimal': self.media_gapfill_stats[media] = self.msgapfill.run_gapfilling(media, self.atp_hydrolysis.id) #IF gapfilling fails - need to activate and penalize the noncore and try again elif solution.objective_value > 0 or solution.status == 'optimal': self.media_gapfill_stats[media] = {'reversed': {}, 'new': {}} - return results + return output def determine_growth_media(self): - """Decides which of the test media to use as growth conditions for this model""" + """ + Decides which of the test media to use as growth conditions for this model + :return: + """ from math import inf self.selected_media = [] @@ -118,30 +139,39 @@ def determine_growth_media(self): if gfscore <= self.max_gapfilling and gfscore <= (best_score+self.gapfilling_delta): self.selected_media.append(media) - # def determine_growth_media2(self, max_gapfilling=None): #!!! unused function - # """Decides which of the test media to use as growth conditions for this model""" - # def scoring_function(media): - # return len(self.media_gapfill_stats[media]["new"].keys()) + 0.5 * \ - # len(self.media_gapfill_stats[media]["reversed"].keys()) + def determine_growth_media2(self, max_gapfilling=None): #!!! unused function + """ + Decides which of the test media to use as growth conditions for this model + :return: + """ + def scoring_function(media): + return len(self.media_gapfill_stats[media]["new"].keys()) + 0.5 * \ + len(self.media_gapfill_stats[media]["reversed"].keys()) - # self.selected_media = [] - # media_scores = {media:scoring_function(media) for media in self.media_gapfill_stats if self.media_gapfill_stats[media]} - # best_score = min(media_scores.values()) - # if max_gapfilling is None: - # max_gapfilling = best_score - # for media, score in media_scores.items(): - # logger.debug(score, best_score, max_gapfilling) - # if score <= max_gapfilling and score <= (best_score + self.gapfilling_delta): - # self.selected_media.append(media) + self.selected_media = [] + media_scores = {media:scoring_function(media) for media in self.media_gapfill_stats if self.media_gapfill_stats[media]} + best_score = min(media_scores.values()) + if max_gapfilling is None: + max_gapfilling = best_score + for media, score in media_scores.items(): + logger.debug(score, best_score, max_gapfilling) + if score <= max_gapfilling and score <= (best_score + self.gapfilling_delta): + self.selected_media.append(media) def apply_growth_media_gapfilling(self): - """Applies the gapfilling to all selected growth media""" + """ + Applies the gapfilling to all selected growth media + :return: + """ for media in self.selected_media: if media in self.media_gapfill_stats and self.media_gapfill_stats[media]: self.model = self.msgapfill.integrate_gapfill_solution(self.model, self.media_gapfill_stats[media]) def expand_model_to_genome_scale(self): - """Expands the model to genome-scale while preventing ATP overproduction""" + """ + Expands the model to genome-scale while preventing ATP overproduction + :return: + """ self.gapfilling_tests, self.filtered_noncore = [], [] self.model.objective = self.atp_hydrolysis.id pkgmgr = MSPackageManager.get_pkg_mgr(self.model) @@ -168,7 +198,10 @@ def expand_model_to_genome_scale(self): self.restore_noncore_reactions(noncore = False,othercompartment = True) def restore_noncore_reactions(self,noncore = True,othercompartment = True): - """Restores the bounds on all noncore reactions""" + """ + Restores the bounds on all noncore reactions + :return: + """ # Restoring original reaction bounds if noncore: for item in self.noncore_reactions: @@ -184,7 +217,10 @@ def restore_noncore_reactions(self,noncore = True,othercompartment = True): reaction.upper_bound = self.original_bounds[reaction.id][1] def run_atp_correction(self): - """Runs the entire ATP method""" + """ + Runs the entire ATP method + :return: + """ #Ensure all specified media work self.evaluate_growth_media() self.determine_growth_media() From a82745b60ec1a492349068c6da3e6eeaa47db263 Mon Sep 17 00:00:00 2001 From: Andrew Freiburger Date: Fri, 1 Jul 2022 18:53:39 -0400 Subject: [PATCH 3/8] conditional prettification --- modelseedpy/core/msatpcorrection.py | 55 +++++++++++++++-------------- 1 file changed, 28 insertions(+), 27 deletions(-) diff --git a/modelseedpy/core/msatpcorrection.py b/modelseedpy/core/msatpcorrection.py index e8ae418a..a4922702 100755 --- a/modelseedpy/core/msatpcorrection.py +++ b/modelseedpy/core/msatpcorrection.py @@ -54,35 +54,36 @@ def disable_noncore_reactions(self): self.noncore_reactions, self.other_compartments = [], [] #Iterating through reactions and disabling for reaction in self.model.reactions: - if not any([reaction.id == self.atp_hydrolysis.id, FBAHelper.is_ex(reaction), FBAHelper.is_biomass(reaction)]): - msid = FBAHelper.modelseed_id_from_cobra_reaction(reaction) - if msid: - msid += "_"+self.compartment[0:1] - if msid in self.coretemplate.reactions: - self.original_bounds[reaction.id] = (reaction.lower_bound, reaction.upper_bound) - logger.debug(reaction.id+" core") - if reaction.lower_bound < 0 and self.coretemplate.reactions.get_by_id(reaction.id[0:-1]).lower_bound >= 0: - logger.debug(reaction.id+" core but reversible") + if any([reaction.id == self.atp_hydrolysis.id, FBAHelper.is_ex(reaction), FBAHelper.is_biomass(reaction)]): + continue + msid = FBAHelper.modelseed_id_from_cobra_reaction(reaction) + if msid: + msid += "_"+self.compartment[0:1] + if msid in self.coretemplate.reactions: + self.original_bounds[reaction.id] = (reaction.lower_bound, reaction.upper_bound) + logger.debug(reaction.id+" core") + if reaction.lower_bound < 0 and self.coretemplate.reactions.get_by_id(reaction.id[0:-1]).lower_bound >= 0: + logger.debug(reaction.id+" core but reversible") + self.noncore_reactions.append([reaction, "<"]) + reaction.lower_bound = 0 + if reaction.upper_bound > 0 and self.coretemplate.reactions.get_by_id(reaction.id[0:-1]).upper_bound <= 0: + logger.debug(reaction.id+" core but reversible") + self.noncore_reactions.append([reaction, ">"]) + reaction.upper_bound = 0 + else: + logger.debug(reaction.id+" noncore") + self.original_bounds[reaction.id] = (reaction.lower_bound, reaction.upper_bound) + if reaction.lower_bound < 0: + if FBAHelper.rxn_compartment(reaction) != self.compartment: + self.other_compartments.append([reaction, "<"]) + else: self.noncore_reactions.append([reaction, "<"]) - reaction.lower_bound = 0 - if reaction.upper_bound > 0 and self.coretemplate.reactions.get_by_id(reaction.id[0:-1]).upper_bound <= 0: - logger.debug(reaction.id+" core but reversible") + if reaction.upper_bound > 0: + if FBAHelper.rxn_compartment(reaction) != self.compartment: + self.other_compartments.append([reaction, ">"]) + else: self.noncore_reactions.append([reaction, ">"]) - reaction.upper_bound = 0 - else: - logger.debug(reaction.id+" noncore") - self.original_bounds[reaction.id] = (reaction.lower_bound, reaction.upper_bound) - if reaction.lower_bound < 0: - if FBAHelper.rxn_compartment(reaction) != self.compartment: - self.other_compartments.append([reaction, "<"]) - else: - self.noncore_reactions.append([reaction, "<"]) - if reaction.upper_bound > 0: - if FBAHelper.rxn_compartment(reaction) != self.compartment: - self.other_compartments.append([reaction, ">"]) - else: - self.noncore_reactions.append([reaction, ">"]) - reaction.lower_bound = reaction.upper_bound = 0 + reaction.lower_bound = reaction.upper_bound = 0 def evaluate_growth_media(self): """ From 7cba199f7353d1cbb3fd3f2038a81aa25937279d Mon Sep 17 00:00:00 2001 From: Andrew Freiburger Date: Fri, 1 Jul 2022 19:06:11 -0400 Subject: [PATCH 4/8] final edits --- modelseedpy/core/msatpcorrection.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modelseedpy/core/msatpcorrection.py b/modelseedpy/core/msatpcorrection.py index a4922702..b5e42658 100755 --- a/modelseedpy/core/msatpcorrection.py +++ b/modelseedpy/core/msatpcorrection.py @@ -88,7 +88,7 @@ def disable_noncore_reactions(self): def evaluate_growth_media(self): """ Determines how much gap filling each input test media requires to make ATP - + :return: """ self.disable_noncore_reactions() From e0196334540779f63220282a008a7947bb5eaeba Mon Sep 17 00:00:00 2001 From: Filipe Liu Date: Mon, 18 Jul 2022 07:40:31 -0500 Subject: [PATCH 5/8] msatpcorrection and tests --- modelseedpy/__init__.py | 2 +- modelseedpy/core/msatpcorrection.py | 141 ++++++++++++++++-------- modelseedpy/core/msgenome.py | 47 ++++++-- modelseedpy/core/msgenomeclassifier.py | 6 +- modelseedpy/core/msmedia.py | 7 +- modelseedpy/fbapkg/gapfillingpkg.py | 5 +- setup.py | 3 + tests/core/test_msatpcorreption.py | 92 ++++++++++++++++ tests/core/test_mseditorapi.py | 5 +- tests/core/test_msgapfill.py | 99 ++++++++++++++++- tests/test_data/mock_data.py | 1 + tests/test_data/template_core_bigg.json | 1 + 12 files changed, 343 insertions(+), 66 deletions(-) create mode 100644 tests/core/test_msatpcorreption.py create mode 100644 tests/test_data/template_core_bigg.json diff --git a/modelseedpy/__init__.py b/modelseedpy/__init__.py index 9458a4aa..78b0e892 100755 --- a/modelseedpy/__init__.py +++ b/modelseedpy/__init__.py @@ -27,7 +27,7 @@ c_handler.setFormatter(c_format) logger.addHandler(c_handler) if config.get("logging","log_file") == "yes": - f_handler = logging.FileHandler(config.get("logging","filename"),mode="w") + f_handler = logging.FileHandler(config.get("logging","filename"), mode="a") f_handler.setLevel(logging_hash[config.get("logging","file_level")]) f_format = logging.Formatter('%(asctime)s - %(name)s - %(levelname)s - %(message)s') f_handler.setFormatter(f_format) diff --git a/modelseedpy/core/msatpcorrection.py b/modelseedpy/core/msatpcorrection.py index 4dd63f7a..64b01f06 100755 --- a/modelseedpy/core/msatpcorrection.py +++ b/modelseedpy/core/msatpcorrection.py @@ -17,7 +17,9 @@ class MSATPCorrection: - def __init__(self, model, core_template, atp_medias,compartment="c0", + DEBUG = False + + def __init__(self, model, core_template, atp_medias, compartment="c0", max_gapfilling=None, gapfilling_delta=0, atp_hydrolysis_id=None): """ @@ -55,19 +57,53 @@ def __init__(self, model, core_template, atp_medias,compartment="c0", self.lp_filename = None self.multiplier = 1.2 + @staticmethod + def find_reaction_in_template(model_reaction, template, compartment): + template_reaction = None # we save lookup result here + if model_reaction.id in template.reactions: + template_reaction = template.reactions.get_by_id(model_reaction.id) + else: + msid = FBAHelper.modelseed_id_from_cobra_reaction(model_reaction) + if msid is not None: + msid += "_" + compartment + if msid in template.reactions: + template_reaction = template.reactions.get_by_id(model_reaction.id[0:-1]) + else: + # will leave this here for now + def split_id_from_index(s): + """ + Extracts the last digits of a string example: rxn12345, returns rxn 12345 + + @param s: any string + @return: string split into head (remaining) + tail (digits) + """ + str_pos = len(s) - 1 + while str_pos >= 0: + if not s[str_pos].isdigit(): + break + str_pos -= 1 + + return s[:str_pos + 1], s[str_pos + 1:] + + rxn_id, index = split_id_from_index(model_reaction.id) + if rxn_id in template.reactions: + template_reaction = template.reactions.get_by_id(rxn_id) + + return template_reaction + def disable_noncore_reactions(self): """ - Disables all noncore reactions in the model + Disables all non core reactions in the model :return: """ - #Must restore reactions before disabling to ensure bounds are not overwritten + # Must restore reactions before disabling to ensure bounds are not overwritten if len(self.noncore_reactions) > 0: - self.restore_noncore_reactions(noncore = True,othercompartment = True) - #Now clearing the existing noncore datastructures + self.restore_noncore_reactions(noncore=True, othercompartment=True) + # Now clearing the existing noncore data structures self.original_bounds = {} self.noncore_reactions = [] self.other_compartments = [] - #Iterating through reactions and disabling + # Iterating through reactions and disabling for reaction in self.model.reactions: if reaction.id == self.atp_hydrolysis.id: continue @@ -75,36 +111,35 @@ def disable_noncore_reactions(self): continue if FBAHelper.is_biomass(reaction): continue - msid = FBAHelper.modelseed_id_from_cobra_reaction(reaction) - if msid != None: - msid += "_"+self.compartment[0:1] - if FBAHelper.rxn_compartment(reaction) != self.compartment: - logger.debug(reaction.id+" noncore") - self.original_bounds[reaction.id] = (reaction.lower_bound, reaction.upper_bound) - if reaction.lower_bound < 0: - self.other_compartments.append([reaction, "<"]) - if reaction.upper_bound > 0: - self.other_compartments.append([reaction, ">"]) - reaction.lower_bound = 0 - reaction.upper_bound = 0 - elif msid in self.coretemplate.reactions: - self.original_bounds[reaction.id] = (reaction.lower_bound, reaction.upper_bound) - logger.debug(reaction.id+" core") - if reaction.lower_bound < 0 and self.coretemplate.reactions.get_by_id(reaction.id[0:-1]).lower_bound >= 0: - logger.debug(reaction.id+" core but reversible") + + self.original_bounds[reaction.id] = (reaction.lower_bound, reaction.upper_bound) + + # check if reaction is in core template + template_reaction = self.find_reaction_in_template(reaction, self.coretemplate, self.compartment[0:1]) + + # update bounds to reaction + if template_reaction is not None: + logger.debug(f"{reaction.id} core") + if reaction.lower_bound < 0 and template_reaction.lower_bound >= 0: + logger.debug(reaction.id + " core but reversible") self.noncore_reactions.append([reaction, "<"]) reaction.lower_bound = 0 - if reaction.upper_bound > 0 and self.coretemplate.reactions.get_by_id(reaction.id[0:-1]).upper_bound <= 0: - logger.debug(reaction.id+" core but reversible") + if reaction.upper_bound > 0 and template_reaction.upper_bound <= 0: + logger.debug(reaction.id + " core but reversible") self.noncore_reactions.append([reaction, ">"]) reaction.upper_bound = 0 else: - logger.debug(reaction.id+" noncore") - self.original_bounds[reaction.id] = (reaction.lower_bound, reaction.upper_bound) - if reaction.lower_bound < 0: - self.noncore_reactions.append([reaction, "<"]) - if reaction.upper_bound > 0: - self.noncore_reactions.append([reaction, ">"]) + logger.debug(f"{reaction.id} non core") + if FBAHelper.rxn_compartment(reaction) != self.compartment: + if reaction.lower_bound < 0: + self.other_compartments.append([reaction, "<"]) + if reaction.upper_bound > 0: + self.other_compartments.append([reaction, ">"]) + else: + if reaction.lower_bound < 0: + self.noncore_reactions.append([reaction, "<"]) + if reaction.upper_bound > 0: + self.noncore_reactions.append([reaction, ">"]) reaction.lower_bound = 0 reaction.upper_bound = 0 @@ -124,12 +159,13 @@ def evaluate_growth_media(self): self.model.objective = self.atp_hydrolysis.id #self.model.objective = self.model.problem.Objective(Zero,direction="max") #self.atp_hydrolysis.update_variable_bounds() - logger.debug("ATP bounds:"+str(self.atp_hydrolysis.lower_bound)+":"+str(self.atp_hydrolysis.upper_bound)) + logger.debug(f'ATP bounds: ({self.atp_hydrolysis.lower_bound}, {self.atp_hydrolysis.upper_bound})') #self.model.objective.set_linear_coefficients({self.atp_hydrolysis.forward_variable:1}) pkgmgr = MSPackageManager.get_pkg_mgr(self.model) for media in self.atp_medias: logger.debug('evaluate media %s', media) pkgmgr.getpkg("KBaseMediaPkg").build_package(media) + logger.debug('model.medium %s', self.model.medium) solution = self.model.optimize() logger.debug('evaluate media %s - %f (%s)', media.id, solution.objective_value, solution.status) self.media_gapfill_stats[media] = None @@ -139,8 +175,11 @@ def evaluate_growth_media(self): #IF gapfilling fails - need to activate and penalize the noncore and try again elif solution.objective_value > 0 or solution.status == 'optimal': self.media_gapfill_stats[media] = {'reversed': {}, 'new': {}} - with open('debug.json', 'w') as outfile: - json.dump(self.media_gapfill_stats[media], outfile) + + if MSATPCorrection.DEBUG: + with open('debug.json', 'w') as outfile: + json.dump(self.media_gapfill_stats[media], outfile) + return output def determine_growth_media(self): @@ -158,10 +197,15 @@ def determine_growth_media(self): best_score = gfscore if self.max_gapfilling is None: self.max_gapfilling = best_score + + logger.debug(f'max_gapfilling: {self.max_gapfilling}, best_score: {best_score}') + for media in self.media_gapfill_stats: gfscore = 0 if self.media_gapfill_stats[media]: gfscore = len(self.media_gapfill_stats[media]["new"].keys()) + 0.5*len(self.media_gapfill_stats[media]["reversed"].keys()) + + logger.debug(f'media gapfilling score: {media.id}: {gfscore}') if gfscore <= self.max_gapfilling and gfscore <= (best_score+self.gapfilling_delta): self.selected_media.append(media) @@ -206,9 +250,10 @@ def expand_model_to_genome_scale(self): """ self.filtered_noncore = [] tests = self.build_tests() - #Must restore noncore reactions and NOT other compartment reactions before running this function - it is not detrimental to run this twice - self.restore_noncore_reactions(noncore = True,othercompartment = False) - # Extending model with noncore reactions while retaining ATP accuracy + # Must restore non core reactions and NOT other compartment reactions before running this function + # it is not detrimental to run this twice + self.restore_noncore_reactions(noncore=True, othercompartment=False) + # Extending model with non core reactions while retaining ATP accuracy self.filtered_noncore = self.modelutl.reaction_expansion_test(self.noncore_reactions,tests) # Removing filtered reactions for item in self.filtered_noncore: @@ -220,8 +265,8 @@ def expand_model_to_genome_scale(self): # reaction.update_variable_bounds() if item[0].lower_bound == 0 and item[0].upper_bound == 0: self.model.remove_reactions([item[0]]) - #Restoring other compartment reactions but not the core because this would undo reaction filtering - self.restore_noncore_reactions(noncore = False,othercompartment = True) + # Restoring other compartment reactions but not the core because this would undo reaction filtering + self.restore_noncore_reactions(noncore=False, othercompartment=True) def restore_noncore_reactions(self,noncore = True,othercompartment = True): """ @@ -242,8 +287,7 @@ def restore_noncore_reactions(self,noncore = True,othercompartment = True): reaction.lower_bound = self.original_bounds[reaction.id][0] reaction.upper_bound = self.original_bounds[reaction.id][1] - - def build_tests(self,multiplier=None): + def build_tests(self, multiplier=None): """Build tests based on ATP media evaluations Parameters @@ -259,15 +303,20 @@ def build_tests(self,multiplier=None): Raises ------ """ - if multiplier == None: + if multiplier is None: multiplier = self.multiplier tests = [] self.model.objective = self.atp_hydrolysis.id for media in self.selected_media: self.modelutl.pkgmgr.getpkg("KBaseMediaPkg").build_package(media) - obj_value = model.slim_optimize() - logger.debug(media.name," = ",obj_value) - tests.append({"media":media,"is_max_threshold": True,"threshold":multiplier*obj_value,"objective":self.atp_hydrolysis.id}) + obj_value = self.model.slim_optimize() + logger.debug(f'{media.name} = {obj_value}') + tests.append({ + "media": media, + "is_max_threshold": True, + "threshold": multiplier*obj_value, + "objective": self.atp_hydrolysis.id + }) return tests def run_atp_correction(self): @@ -275,7 +324,7 @@ def run_atp_correction(self): Runs the entire ATP method :return: """ - #Ensure all specified media work + # Ensure all specified media work self.evaluate_growth_media() self.determine_growth_media() self.apply_growth_media_gapfilling() diff --git a/modelseedpy/core/msgenome.py b/modelseedpy/core/msgenome.py index f83bf572..f0c41be1 100755 --- a/modelseedpy/core/msgenome.py +++ b/modelseedpy/core/msgenome.py @@ -1,10 +1,9 @@ import logging -logger = logging.getLogger(__name__) - import re import copy # !!! the import is never used from cobra.core.dictlist import DictList +logger = logging.getLogger(__name__) def normalize_role(s): @@ -13,15 +12,12 @@ def normalize_role(s): s = re.sub('[\W_]+', '', s) return s -#Static factory functions: - -#def build_from_kbase_gto: - def read_fasta(f, split='|', h_func=None): with open(f, 'r') as fh: return parse_fasta_str(fh.read(), split, h_func) + def parse_fasta_str(faa_str, split='|', h_func=None): features = [] seq = None @@ -48,13 +44,28 @@ def parse_fasta_str(faa_str, split='|', h_func=None): class MSFeature: + def __init__(self, feature_id, sequence, description=None): - self.id = feature_id; self.seq = sequence + """ + + @param feature_id: identifier for the protein coding feature + @param sequence: protein sequence + @param description: description of the feature + """ + + self.id = feature_id + self.seq = sequence self.description = description # temporary replace with proper parsing self.ontology_terms = {} self.aliases = [] def add_ontology_term(self, ontology_term, value): + """ + Add functional term to the feature + + @param ontology_term: type of the ontology (e.g., RAST, EC) + @param value: value for the ontology (e.g., pyruvate kinase) + """ if ontology_term not in self.ontology_terms: self.ontology_terms[ontology_term] = [] if value not in self.ontology_terms[ontology_term]: @@ -62,9 +73,25 @@ def add_ontology_term(self, ontology_term, value): class MSGenome: + def __init__(self): self.features = DictList() + def add_features(self, feature_list: list): + """ + + :param feature_list: + :return: + """ + duplicates = list(filter(lambda o: o.id in self.features, feature_list)) + if len(duplicates) > 0: + raise ValueError(f"unable to add features {duplicates} already present in the genome") + + for f in feature_list: + f._genome = self + + self.features += feature_list + @staticmethod def from_fasta(filename, contigs=0, split='|', h_func=None): # !!! the contigs argument is never used genome = MSGenome() @@ -83,10 +110,10 @@ def from_protein_sequences_hash(sequences): return genome def alias_hash(self): - return {alias:gene for gene in self.features for alias in gene.aliases} + return {alias: gene for gene in self.features for alias in gene.aliases} - def search_for_gene(self,query): + def search_for_gene(self, query): if query in self.features: return self.features.get_by_id(query) aliases = self.alias_hash() - return aliases[query] if query in aliases else None \ No newline at end of file + return aliases[query] if query in aliases else None diff --git a/modelseedpy/core/msgenomeclassifier.py b/modelseedpy/core/msgenomeclassifier.py index 23d88924..9055c15a 100755 --- a/modelseedpy/core/msgenomeclassifier.py +++ b/modelseedpy/core/msgenomeclassifier.py @@ -1,4 +1,5 @@ from modelseedpy.ml.predict_phenotype import create_indicator_matrix +from modelseedpy.core.msgenome import MSGenome class MSGenomeClassifier: @@ -22,7 +23,10 @@ def extract_features_from_genome(genome, ontology_term): return {'genome': list(features)} def classify(self, genome_or_roles, ontology_term='RAST'): - if isinstance(genome_or_roles,"MSGenome"): + """ + param genome_or_roles: + """ + if isinstance(genome_or_roles, MSGenome): genome_or_roles = self.extract_features_from_genome(genome_or_roles, ontology_term) indicator_df, master_role_list = create_indicator_matrix(genome_or_roles, self.features) predictions_numerical = self.model.predict(indicator_df[master_role_list].values) diff --git a/modelseedpy/core/msmedia.py b/modelseedpy/core/msmedia.py index 13fe8e56..5f1a8400 100755 --- a/modelseedpy/core/msmedia.py +++ b/modelseedpy/core/msmedia.py @@ -3,6 +3,7 @@ logger = logging.getLogger(__name__) + class MediaCompound: def __init__(self, compound_id, lower_bound, upper_bound, concentration=None): @@ -23,8 +24,10 @@ def minFlux(self): class MSMedia: - def __init__(self, media_id): + + def __init__(self, media_id, name=""): self.id = media_id + self.name = name self.mediacompounds = DictList() @staticmethod @@ -32,7 +35,7 @@ def from_dict(media_dict): """ Either dict with exchange bounds (example: {'cpd00027': (-10, 1000)}) or just absolute value of uptake (example: {''cpd00027': 10}) - :param d: + :param media_dict: :return: """ media = MSMedia('media') diff --git a/modelseedpy/fbapkg/gapfillingpkg.py b/modelseedpy/fbapkg/gapfillingpkg.py index 5a9bd5f5..67885823 100755 --- a/modelseedpy/fbapkg/gapfillingpkg.py +++ b/modelseedpy/fbapkg/gapfillingpkg.py @@ -285,7 +285,8 @@ def extend_model_with_template_metabolites(self, template, index='0'): for template_compound in template.compcompounds: compartment = template_compound.compartment compartment_index = "0" if compartment == 'e' else index - cobra_metabolite = self.convert_template_compound(template_compound, compartment_index, template) # TODO: move function out + cobra_metabolite = template_compound.to_metabolite(compartment_index) + #cobra_metabolite = self.convert_template_compound(template_compound, compartment_index, template) # TODO: move function out if cobra_metabolite.id not in self.model.metabolites and cobra_metabolite.id not in new_metabolites: new_metabolites[cobra_metabolite.id] = cobra_metabolite #self.model.add_metabolites([cobra_metabolite]) @@ -302,6 +303,8 @@ def extend_model_with_template_metabolites(self, template, index='0'): # Possible new function to add to the KBaseFBAModelToCobraBuilder to extend a model with a template for gapfilling for a specific index def extend_model_with_template_for_gapfilling(self, template, index): + logger.debug(f'extend model with template: {template}, index: {index}') + new_reactions = {} new_penalties = dict() diff --git a/setup.py b/setup.py index a39e3db1..dd7af4f6 100755 --- a/setup.py +++ b/setup.py @@ -31,6 +31,9 @@ "matplotlib >= 3.0.0", "pyeda" ], + tests_require=[ + "pytest", + ], project_urls={ 'Documentation': 'https://modelseedpy.readthedocs.io/en/stable/', 'Issues': 'https://github.com/ModelSEED/ModelSEEDpy/issues', diff --git a/tests/core/test_msatpcorreption.py b/tests/core/test_msatpcorreption.py new file mode 100644 index 00000000..623c4cb6 --- /dev/null +++ b/tests/core/test_msatpcorreption.py @@ -0,0 +1,92 @@ +import pytest +import json +import cobra +from modelseedpy.core.mstemplate import MSTemplateBuilder +from modelseedpy import MSATPCorrection, MSMedia + + +@pytest.fixture +def template(): + with open('./tests/test_data/template_core_bigg.json', 'r') as fh: + return MSTemplateBuilder.from_dict(json.load(fh)).build() + + +@pytest.fixture +def get_model(): + + def _method(ko=None): + if ko is None: + ko = [] + with open('./tests/test_data/e_coli_core.json', 'r') as fh: + model_json = json.load(fh) + model_json['compartments'] = {k + '0': v for (k, v) in model_json['compartments'].items()} + metabolites = {} + for m in model_json['metabolites']: + m['id'] += '0' + m['compartment'] += '0' + metabolites[m['id']] = m + for r in model_json['reactions']: + r['metabolites'] = {i + '0': v for (i, v) in r['metabolites'].items()} + compartments = set([metabolites[k]['compartment'] for k in r['metabolites'].keys()]) + if r['id'].endswith('_e'): + r['id'] += '0' + elif len(compartments) == 1: + r['id'] += '_' + list(compartments)[0] + else: + r['id'] += '_' + 'c0' # hack cause there is only combo between e0 and c0 + + model_json['reactions'] = [x for x in model_json['reactions'] if x['id'] not in ko] + model = cobra.io.from_json(json.dumps(model_json)) + model.reactions.ATPM_c0.lower_bound = 0 + model.reactions.ATPM_c0.upper_bound = 1000 + return model + + return _method + + +@pytest.fixture +def media_glucose_aerobic(): + media = MSMedia.from_dict({ + 'glc__D': (-1, 1000), + 'o2': (-1000, 1000), + 'h': (-1000, 1000), + 'h2o': (-1000, 1000) + }) + media.id = 'glc/o2' + return media + + +@pytest.fixture +def media_acetate_aerobic(): + media = MSMedia.from_dict({ + 'ac': (-1, 1000), + 'o2': (-1000, 1000), + 'h': (-1000, 1000), + 'h2o': (-1000, 1000) + }) + media.id = 'glc/o2' + return media + + +@pytest.fixture +def media_all_aerobic(media_glucose_aerobic, media_acetate_aerobic): + return [media_glucose_aerobic, media_acetate_aerobic] + + +def test_ms_atp_correction1(get_model, template, media_all_aerobic): + model = get_model(["GLCpts_c0", "NADH16_c0", "GLCpts_c0", "O2t_c0"]) + atp_correction = MSATPCorrection(model, template, media_all_aerobic, atp_hydrolysis_id='ATPM_c0') + atp_correction.evaluate_growth_media() + print('non_core_reactions', len(atp_correction.noncore_reactions), + 'other_compartments', len(atp_correction.other_compartments), + 'original_bounds', len(atp_correction.original_bounds)) + for media in atp_correction.media_gapfill_stats: + print(media, atp_correction.media_gapfill_stats[media]) + atp_correction.determine_growth_media() + print(atp_correction.selected_media) + media_eval = atp_correction.evaluate_growth_media() + print(media_eval) + atp_correction.expand_model_to_genome_scale() + tests = atp_correction.build_tests() + print(tests) + assert True diff --git a/tests/core/test_mseditorapi.py b/tests/core/test_mseditorapi.py index fb940b53..d8578cdf 100755 --- a/tests/core/test_mseditorapi.py +++ b/tests/core/test_mseditorapi.py @@ -2,14 +2,17 @@ from tests.test_data.mock_data import mock_model_ecoli_core import pytest + @pytest.fixture def editor(): return MSEditorAPI() - + + @pytest.fixture def example_model(): return mock_model_ecoli_core() + @pytest.fixture def example_model2(): return mock_model_ecoli_core() diff --git a/tests/core/test_msgapfill.py b/tests/core/test_msgapfill.py index cd304bc5..7726f9e5 100644 --- a/tests/core/test_msgapfill.py +++ b/tests/core/test_msgapfill.py @@ -1,8 +1,99 @@ -# import the packages -import os +import pytest +import json import cobra -import numpy -# FIXME: COMMENTING ALL OF THIS will provide a model later +from modelseedpy.core.mstemplate import MSTemplateBuilder +from modelseedpy import MSGapfill, MSMedia + + +@pytest.fixture +def template(): + with open('./tests/test_data/template_core_bigg.json', 'r') as fh: + return MSTemplateBuilder.from_dict(json.load(fh)).build() + + +@pytest.fixture +def get_model(): + + def _method(ko=None): + if ko is None: + ko = [] + with open('./tests/test_data/e_coli_core.json', 'r') as fh: + model_json = json.load(fh) + model_json['compartments'] = {k + '0': v for (k, v) in model_json['compartments'].items()} + metabolites = {} + for m in model_json['metabolites']: + m['id'] += '0' + m['compartment'] += '0' + metabolites[m['id']] = m + for r in model_json['reactions']: + r['metabolites'] = {i + '0': v for (i, v) in r['metabolites'].items()} + compartments = set([metabolites[k]['compartment'] for k in r['metabolites'].keys()]) + if r['id'].endswith('_e'): + r['id'] += '0' + elif len(compartments) == 1: + r['id'] += '_' + list(compartments)[0] + else: + r['id'] += '_' + 'c0' # hack cause there is only combo between e0 and c0 + + model_json['reactions'] = [x for x in model_json['reactions'] if x['id'] not in ko] + return cobra.io.from_json(json.dumps(model_json)) + + return _method + + +@pytest.fixture +def media_glucose_aerobic(): + + return MSMedia.from_dict({ + 'glc__D': (-10, 1000), + 'o2': (-1000, 1000), + 'h': (-1000, 1000), + 'h2o': (-1000, 1000), + 'pi': (-1000, 1000), + 'co2': (-1000, 1000), + 'nh4': (-1000, 1000) + }) + + +def test_model_default(get_model): + solution = get_model([]).optimize() + assert solution.status == 'optimal' + assert solution.objective_value > 0.8 + + +def test_model_no_solution(get_model): + solution = get_model(['GLCpts_c0']).optimize() + assert solution.status == 'infeasible' + + +def test_ms_gap_fill1(template, get_model, media_glucose_aerobic): + """ + Test gap filling with glucose aerobic requesting minimal growth value + """ + model = get_model(["GLCpts_c0", "NADH16_c0", "GLCpts_c0", "O2t_c0"]) + gap_fill = MSGapfill(model, [template]) + result = gap_fill.run_gapfilling(media_glucose_aerobic, 'BIOMASS_Ecoli_core_w_GAM_c0', minimum_obj=0.1) + assert result + assert 'new' in result + assert 'GLCpts_c0' in result['new'] + assert result['new']['GLCpts_c0'] == '>' + + +def test_ms_gap_fill2(template, get_model, media_glucose_aerobic): + """ + Test gap filling with glucose aerobic requesting higher growth value + """ + model = get_model(["CYTBD_c0", "NADH16_c0", "GLCpts_c0", "O2t_c0"]) + gap_fill = MSGapfill(model, [template]) + result = gap_fill.run_gapfilling(media_glucose_aerobic, 'BIOMASS_Ecoli_core_w_GAM_c0', minimum_obj=0.8) + assert result + assert 'new' in result + assert 'GLCpts_c0' in result['new'] and result['new']['GLCpts_c0'] == '>' + assert 'CYTBD_c0' in result['new'] and result['new']['CYTBD_c0'] == '>' + assert 'NADH16_c0' in result['new'] and result['new']['NADH16_c0'] == '>' + assert 'O2t_c0' in result['new'] and result['new']['O2t_c0'] == '>' + + """ from glob import glob os.environ["HOME"] = 'C:\\Users\\Andrew Freiburger\\Dropbox\\My PC (DESKTOP-M302P50)\\Documents\\UVic Civil Engineering\\Internships\\Agronne\\cobrakbase' diff --git a/tests/test_data/mock_data.py b/tests/test_data/mock_data.py index b39ee8c8..4d501aee 100755 --- a/tests/test_data/mock_data.py +++ b/tests/test_data/mock_data.py @@ -28,6 +28,7 @@ def mock_atp_biomass(): 'type': 'energy' } + def mock_biomass(): return { 'cellwall': 0, diff --git a/tests/test_data/template_core_bigg.json b/tests/test_data/template_core_bigg.json new file mode 100644 index 00000000..f951e233 --- /dev/null +++ b/tests/test_data/template_core_bigg.json @@ -0,0 +1 @@ +{"__VERSION__": 1, "id": "core_template", "name": "", "domain": "", "biochemistry_ref": "", "type": "Test", "compartments": [], "compcompounds": [{"charge": 0, "id": "glc__D_e", "maxuptake": 0, "templatecompartment_ref": "~/compartments/id/", "templatecompound_ref": "~/compounds/id/glc__D"}, {"charge": 0, "id": "gln__L_c", "maxuptake": 0, "templatecompartment_ref": "~/compartments/id/", "templatecompound_ref": "~/compounds/id/gln__L"}, {"charge": 0, "id": "gln__L_e", "maxuptake": 0, "templatecompartment_ref": "~/compartments/id/", "templatecompound_ref": "~/compounds/id/gln__L"}, {"charge": -1, "id": "glu__L_c", "maxuptake": 0, "templatecompartment_ref": "~/compartments/id/", "templatecompound_ref": "~/compounds/id/glu__L"}, {"charge": -1, "id": "glu__L_e", "maxuptake": 0, "templatecompartment_ref": "~/compartments/id/", "templatecompound_ref": "~/compounds/id/glu__L"}, {"charge": -1, "id": "glx_c", "maxuptake": 0, "templatecompartment_ref": "~/compartments/id/", "templatecompound_ref": "~/compounds/id/glx"}, {"charge": 0, "id": "h2o_c", "maxuptake": 0, "templatecompartment_ref": "~/compartments/id/", "templatecompound_ref": "~/compounds/id/h2o"}, {"charge": 0, "id": "h2o_e", "maxuptake": 0, "templatecompartment_ref": "~/compartments/id/", "templatecompound_ref": "~/compounds/id/h2o"}, {"charge": 1, "id": "h_c", "maxuptake": 0, "templatecompartment_ref": "~/compartments/id/", "templatecompound_ref": "~/compounds/id/h"}, {"charge": 1, "id": "h_e", "maxuptake": 0, "templatecompartment_ref": "~/compartments/id/", "templatecompound_ref": "~/compounds/id/h"}, {"charge": -3, "id": "icit_c", "maxuptake": 0, "templatecompartment_ref": "~/compartments/id/", "templatecompound_ref": "~/compounds/id/icit"}, {"charge": -1, "id": "lac__D_c", "maxuptake": 0, "templatecompartment_ref": "~/compartments/id/", "templatecompound_ref": "~/compounds/id/lac__D"}, {"charge": -1, "id": "lac__D_e", "maxuptake": 0, "templatecompartment_ref": "~/compartments/id/", "templatecompound_ref": "~/compounds/id/lac__D"}, {"charge": -2, "id": "mal__L_c", "maxuptake": 0, "templatecompartment_ref": "~/compartments/id/", "templatecompound_ref": "~/compounds/id/mal__L"}, {"charge": -2, "id": "mal__L_e", "maxuptake": 0, "templatecompartment_ref": "~/compartments/id/", "templatecompound_ref": "~/compounds/id/mal__L"}, {"charge": -1, "id": "nad_c", "maxuptake": 0, "templatecompartment_ref": "~/compartments/id/", "templatecompound_ref": "~/compounds/id/nad"}, {"charge": -2, "id": "nadh_c", "maxuptake": 0, "templatecompartment_ref": "~/compartments/id/", "templatecompound_ref": "~/compounds/id/nadh"}, {"charge": -3, "id": "nadp_c", "maxuptake": 0, "templatecompartment_ref": "~/compartments/id/", "templatecompound_ref": "~/compounds/id/nadp"}, {"charge": -4, "id": "nadph_c", "maxuptake": 0, "templatecompartment_ref": "~/compartments/id/", "templatecompound_ref": "~/compounds/id/nadph"}, {"charge": 1, "id": "nh4_c", "maxuptake": 0, "templatecompartment_ref": "~/compartments/id/", "templatecompound_ref": "~/compounds/id/nh4"}, {"charge": 1, "id": "nh4_e", "maxuptake": 0, "templatecompartment_ref": "~/compartments/id/", "templatecompound_ref": "~/compounds/id/nh4"}, {"charge": -4, "id": "13dpg_c", "maxuptake": 0, "templatecompartment_ref": "~/compartments/id/", "templatecompound_ref": "~/compounds/id/13dpg"}, {"charge": 0, "id": "o2_c", "maxuptake": 0, "templatecompartment_ref": "~/compartments/id/", "templatecompound_ref": "~/compounds/id/o2"}, {"charge": 0, "id": "o2_e", "maxuptake": 0, "templatecompartment_ref": "~/compartments/id/", "templatecompound_ref": "~/compounds/id/o2"}, {"charge": -3, "id": "2pg_c", "maxuptake": 0, "templatecompartment_ref": "~/compartments/id/", "templatecompound_ref": "~/compounds/id/2pg"}, {"charge": -3, "id": "3pg_c", "maxuptake": 0, "templatecompartment_ref": "~/compartments/id/", "templatecompound_ref": "~/compounds/id/3pg"}, {"charge": -2, "id": "oaa_c", "maxuptake": 0, "templatecompartment_ref": "~/compartments/id/", "templatecompound_ref": "~/compounds/id/oaa"}, {"charge": -3, "id": "pep_c", "maxuptake": 0, "templatecompartment_ref": "~/compartments/id/", "templatecompound_ref": "~/compounds/id/pep"}, {"charge": -3, "id": "6pgc_c", "maxuptake": 0, "templatecompartment_ref": "~/compartments/id/", "templatecompound_ref": "~/compounds/id/6pgc"}, {"charge": -2, "id": "pi_c", "maxuptake": 0, "templatecompartment_ref": "~/compartments/id/", "templatecompound_ref": "~/compounds/id/pi"}, {"charge": -2, "id": "pi_e", "maxuptake": 0, "templatecompartment_ref": "~/compartments/id/", "templatecompound_ref": "~/compounds/id/pi"}, {"charge": -2, "id": "6pgl_c", "maxuptake": 0, "templatecompartment_ref": "~/compartments/id/", "templatecompound_ref": "~/compounds/id/6pgl"}, {"charge": -1, "id": "ac_c", "maxuptake": 0, "templatecompartment_ref": "~/compartments/id/", "templatecompound_ref": "~/compounds/id/ac"}, {"charge": -1, "id": "ac_e", "maxuptake": 0, "templatecompartment_ref": "~/compartments/id/", "templatecompound_ref": "~/compounds/id/ac"}, {"charge": -1, "id": "pyr_c", "maxuptake": 0, "templatecompartment_ref": "~/compartments/id/", "templatecompound_ref": "~/compounds/id/pyr"}, {"charge": -1, "id": "pyr_e", "maxuptake": 0, "templatecompartment_ref": "~/compartments/id/", "templatecompound_ref": "~/compounds/id/pyr"}, {"charge": 0, "id": "q8_c", "maxuptake": 0, "templatecompartment_ref": "~/compartments/id/", "templatecompound_ref": "~/compounds/id/q8"}, {"charge": 0, "id": "q8h2_c", "maxuptake": 0, "templatecompartment_ref": "~/compartments/id/", "templatecompound_ref": "~/compounds/id/q8h2"}, {"charge": -2, "id": "r5p_c", "maxuptake": 0, "templatecompartment_ref": "~/compartments/id/", "templatecompound_ref": "~/compounds/id/r5p"}, {"charge": -2, "id": "ru5p__D_c", "maxuptake": 0, "templatecompartment_ref": "~/compartments/id/", "templatecompound_ref": "~/compounds/id/ru5p__D"}, {"charge": 0, "id": "acald_c", "maxuptake": 0, "templatecompartment_ref": "~/compartments/id/", "templatecompound_ref": "~/compounds/id/acald"}, {"charge": 0, "id": "acald_e", "maxuptake": 0, "templatecompartment_ref": "~/compartments/id/", "templatecompound_ref": "~/compounds/id/acald"}, {"charge": -2, "id": "s7p_c", "maxuptake": 0, "templatecompartment_ref": "~/compartments/id/", "templatecompound_ref": "~/compounds/id/s7p"}, {"charge": -4, "id": "accoa_c", "maxuptake": 0, "templatecompartment_ref": "~/compartments/id/", "templatecompound_ref": "~/compounds/id/accoa"}, {"charge": -2, "id": "succ_c", "maxuptake": 0, "templatecompartment_ref": "~/compartments/id/", "templatecompound_ref": "~/compounds/id/succ"}, {"charge": -2, "id": "succ_e", "maxuptake": 0, "templatecompartment_ref": "~/compartments/id/", "templatecompound_ref": "~/compounds/id/succ"}, {"charge": -5, "id": "succoa_c", "maxuptake": 0, "templatecompartment_ref": "~/compartments/id/", "templatecompound_ref": "~/compounds/id/succoa"}, {"charge": -3, "id": "acon_C_c", "maxuptake": 0, "templatecompartment_ref": "~/compartments/id/", "templatecompound_ref": "~/compounds/id/acon_C"}, {"charge": -2, "id": "xu5p__D_c", "maxuptake": 0, "templatecompartment_ref": "~/compartments/id/", "templatecompound_ref": "~/compounds/id/xu5p__D"}, {"charge": -2, "id": "actp_c", "maxuptake": 0, "templatecompartment_ref": "~/compartments/id/", "templatecompound_ref": "~/compounds/id/actp"}, {"charge": -3, "id": "adp_c", "maxuptake": 0, "templatecompartment_ref": "~/compartments/id/", "templatecompound_ref": "~/compounds/id/adp"}, {"charge": -2, "id": "akg_c", "maxuptake": 0, "templatecompartment_ref": "~/compartments/id/", "templatecompound_ref": "~/compounds/id/akg"}, {"charge": -2, "id": "akg_e", "maxuptake": 0, "templatecompartment_ref": "~/compartments/id/", "templatecompound_ref": "~/compounds/id/akg"}, {"charge": -2, "id": "amp_c", "maxuptake": 0, "templatecompartment_ref": "~/compartments/id/", "templatecompound_ref": "~/compounds/id/amp"}, {"charge": -4, "id": "atp_c", "maxuptake": 0, "templatecompartment_ref": "~/compartments/id/", "templatecompound_ref": "~/compounds/id/atp"}, {"charge": -3, "id": "cit_c", "maxuptake": 0, "templatecompartment_ref": "~/compartments/id/", "templatecompound_ref": "~/compounds/id/cit"}, {"charge": 0, "id": "co2_c", "maxuptake": 0, "templatecompartment_ref": "~/compartments/id/", "templatecompound_ref": "~/compounds/id/co2"}, {"charge": 0, "id": "co2_e", "maxuptake": 0, "templatecompartment_ref": "~/compartments/id/", "templatecompound_ref": "~/compounds/id/co2"}, {"charge": -4, "id": "coa_c", "maxuptake": 0, "templatecompartment_ref": "~/compartments/id/", "templatecompound_ref": "~/compounds/id/coa"}, {"charge": -2, "id": "dhap_c", "maxuptake": 0, "templatecompartment_ref": "~/compartments/id/", "templatecompound_ref": "~/compounds/id/dhap"}, {"charge": -2, "id": "e4p_c", "maxuptake": 0, "templatecompartment_ref": "~/compartments/id/", "templatecompound_ref": "~/compounds/id/e4p"}, {"charge": 0, "id": "etoh_c", "maxuptake": 0, "templatecompartment_ref": "~/compartments/id/", "templatecompound_ref": "~/compounds/id/etoh"}, {"charge": 0, "id": "etoh_e", "maxuptake": 0, "templatecompartment_ref": "~/compartments/id/", "templatecompound_ref": "~/compounds/id/etoh"}, {"charge": -2, "id": "f6p_c", "maxuptake": 0, "templatecompartment_ref": "~/compartments/id/", "templatecompound_ref": "~/compounds/id/f6p"}, {"charge": -4, "id": "fdp_c", "maxuptake": 0, "templatecompartment_ref": "~/compartments/id/", "templatecompound_ref": "~/compounds/id/fdp"}, {"charge": -1, "id": "for_c", "maxuptake": 0, "templatecompartment_ref": "~/compartments/id/", "templatecompound_ref": "~/compounds/id/for"}, {"charge": -1, "id": "for_e", "maxuptake": 0, "templatecompartment_ref": "~/compartments/id/", "templatecompound_ref": "~/compounds/id/for"}, {"charge": 0, "id": "fru_e", "maxuptake": 0, "templatecompartment_ref": "~/compartments/id/", "templatecompound_ref": "~/compounds/id/fru"}, {"charge": -2, "id": "fum_c", "maxuptake": 0, "templatecompartment_ref": "~/compartments/id/", "templatecompound_ref": "~/compounds/id/fum"}, {"charge": -2, "id": "fum_e", "maxuptake": 0, "templatecompartment_ref": "~/compartments/id/", "templatecompound_ref": "~/compounds/id/fum"}, {"charge": -2, "id": "g3p_c", "maxuptake": 0, "templatecompartment_ref": "~/compartments/id/", "templatecompound_ref": "~/compounds/id/g3p"}, {"charge": -2, "id": "g6p_c", "maxuptake": 0, "templatecompartment_ref": "~/compartments/id/", "templatecompound_ref": "~/compounds/id/g6p"}], "compounds": [{"id": "glc__D", "name": "D-Glucose", "abbreviation": "", "aliases": [], "defaultCharge": 0, "deltaG": 10000000, "deltaGErr": 10000000, "formula": "C6H12O6", "isCofactor": 0, "mass": 0}, {"id": "gln__L", "name": "L-Glutamine", "abbreviation": "", "aliases": [], "defaultCharge": 0, "deltaG": 10000000, "deltaGErr": 10000000, "formula": "C5H10N2O3", "isCofactor": 0, "mass": 0}, {"id": "glu__L", "name": "L-Glutamate", "abbreviation": "", "aliases": [], "defaultCharge": 0, "deltaG": 10000000, "deltaGErr": 10000000, "formula": "C5H8NO4", "isCofactor": 0, "mass": 0}, {"id": "glx", "name": "Glyoxylate", "abbreviation": "", "aliases": [], "defaultCharge": 0, "deltaG": 10000000, "deltaGErr": 10000000, "formula": "C2H1O3", "isCofactor": 0, "mass": 0}, {"id": "h2o", "name": "H2O H2O", "abbreviation": "", "aliases": [], "defaultCharge": 0, "deltaG": 10000000, "deltaGErr": 10000000, "formula": "H2O", "isCofactor": 0, "mass": 0}, {"id": "h", "name": "H+", "abbreviation": "", "aliases": [], "defaultCharge": 0, "deltaG": 10000000, "deltaGErr": 10000000, "formula": "H", "isCofactor": 0, "mass": 0}, {"id": "icit", "name": "Isocitrate", "abbreviation": "", "aliases": [], "defaultCharge": 0, "deltaG": 10000000, "deltaGErr": 10000000, "formula": "C6H5O7", "isCofactor": 0, "mass": 0}, {"id": "lac__D", "name": "D-Lactate", "abbreviation": "", "aliases": [], "defaultCharge": 0, "deltaG": 10000000, "deltaGErr": 10000000, "formula": "C3H5O3", "isCofactor": 0, "mass": 0}, {"id": "mal__L", "name": "L-Malate", "abbreviation": "", "aliases": [], "defaultCharge": 0, "deltaG": 10000000, "deltaGErr": 10000000, "formula": "C4H4O5", "isCofactor": 0, "mass": 0}, {"id": "nad", "name": "Nicotinamide adenine dinucleotide", "abbreviation": "", "aliases": [], "defaultCharge": 0, "deltaG": 10000000, "deltaGErr": 10000000, "formula": "C21H26N7O14P2", "isCofactor": 0, "mass": 0}, {"id": "nadh", "name": "Nicotinamide adenine dinucleotide - reduced", "abbreviation": "", "aliases": [], "defaultCharge": 0, "deltaG": 10000000, "deltaGErr": 10000000, "formula": "C21H27N7O14P2", "isCofactor": 0, "mass": 0}, {"id": "nadp", "name": "Nicotinamide adenine dinucleotide phosphate", "abbreviation": "", "aliases": [], "defaultCharge": 0, "deltaG": 10000000, "deltaGErr": 10000000, "formula": "C21H25N7O17P3", "isCofactor": 0, "mass": 0}, {"id": "nadph", "name": "Nicotinamide adenine dinucleotide phosphate - reduced", "abbreviation": "", "aliases": [], "defaultCharge": 0, "deltaG": 10000000, "deltaGErr": 10000000, "formula": "C21H26N7O17P3", "isCofactor": 0, "mass": 0}, {"id": "nh4", "name": "Ammonium", "abbreviation": "", "aliases": [], "defaultCharge": 0, "deltaG": 10000000, "deltaGErr": 10000000, "formula": "H4N", "isCofactor": 0, "mass": 0}, {"id": "13dpg", "name": "3-Phospho-D-glyceroyl phosphate", "abbreviation": "", "aliases": [], "defaultCharge": 0, "deltaG": 10000000, "deltaGErr": 10000000, "formula": "C3H4O10P2", "isCofactor": 0, "mass": 0}, {"id": "o2", "name": "O2 O2", "abbreviation": "", "aliases": [], "defaultCharge": 0, "deltaG": 10000000, "deltaGErr": 10000000, "formula": "O2", "isCofactor": 0, "mass": 0}, {"id": "2pg", "name": "D-Glycerate 2-phosphate", "abbreviation": "", "aliases": [], "defaultCharge": 0, "deltaG": 10000000, "deltaGErr": 10000000, "formula": "C3H4O7P", "isCofactor": 0, "mass": 0}, {"id": "3pg", "name": "3-Phospho-D-glycerate", "abbreviation": "", "aliases": [], "defaultCharge": 0, "deltaG": 10000000, "deltaGErr": 10000000, "formula": "C3H4O7P", "isCofactor": 0, "mass": 0}, {"id": "oaa", "name": "Oxaloacetate", "abbreviation": "", "aliases": [], "defaultCharge": 0, "deltaG": 10000000, "deltaGErr": 10000000, "formula": "C4H2O5", "isCofactor": 0, "mass": 0}, {"id": "pep", "name": "Phosphoenolpyruvate", "abbreviation": "", "aliases": [], "defaultCharge": 0, "deltaG": 10000000, "deltaGErr": 10000000, "formula": "C3H2O6P", "isCofactor": 0, "mass": 0}, {"id": "6pgc", "name": "6-Phospho-D-gluconate", "abbreviation": "", "aliases": [], "defaultCharge": 0, "deltaG": 10000000, "deltaGErr": 10000000, "formula": "C6H10O10P", "isCofactor": 0, "mass": 0}, {"id": "pi", "name": "Phosphate", "abbreviation": "", "aliases": [], "defaultCharge": 0, "deltaG": 10000000, "deltaGErr": 10000000, "formula": "HO4P", "isCofactor": 0, "mass": 0}, {"id": "6pgl", "name": "6-phospho-D-glucono-1,5-lactone", "abbreviation": "", "aliases": [], "defaultCharge": 0, "deltaG": 10000000, "deltaGErr": 10000000, "formula": "C6H9O9P", "isCofactor": 0, "mass": 0}, {"id": "ac", "name": "Acetate", "abbreviation": "", "aliases": [], "defaultCharge": 0, "deltaG": 10000000, "deltaGErr": 10000000, "formula": "C2H3O2", "isCofactor": 0, "mass": 0}, {"id": "pyr", "name": "Pyruvate", "abbreviation": "", "aliases": [], "defaultCharge": 0, "deltaG": 10000000, "deltaGErr": 10000000, "formula": "C3H3O3", "isCofactor": 0, "mass": 0}, {"id": "q8", "name": "Ubiquinone-8", "abbreviation": "", "aliases": [], "defaultCharge": 0, "deltaG": 10000000, "deltaGErr": 10000000, "formula": "C49H74O4", "isCofactor": 0, "mass": 0}, {"id": "q8h2", "name": "Ubiquinol-8", "abbreviation": "", "aliases": [], "defaultCharge": 0, "deltaG": 10000000, "deltaGErr": 10000000, "formula": "C49H76O4", "isCofactor": 0, "mass": 0}, {"id": "r5p", "name": "Alpha-D-Ribose 5-phosphate", "abbreviation": "", "aliases": [], "defaultCharge": 0, "deltaG": 10000000, "deltaGErr": 10000000, "formula": "C5H9O8P", "isCofactor": 0, "mass": 0}, {"id": "ru5p__D", "name": "D-Ribulose 5-phosphate", "abbreviation": "", "aliases": [], "defaultCharge": 0, "deltaG": 10000000, "deltaGErr": 10000000, "formula": "C5H9O8P", "isCofactor": 0, "mass": 0}, {"id": "acald", "name": "Acetaldehyde", "abbreviation": "", "aliases": [], "defaultCharge": 0, "deltaG": 10000000, "deltaGErr": 10000000, "formula": "C2H4O", "isCofactor": 0, "mass": 0}, {"id": "s7p", "name": "Sedoheptulose 7-phosphate", "abbreviation": "", "aliases": [], "defaultCharge": 0, "deltaG": 10000000, "deltaGErr": 10000000, "formula": "C7H13O10P", "isCofactor": 0, "mass": 0}, {"id": "accoa", "name": "Acetyl-CoA", "abbreviation": "", "aliases": [], "defaultCharge": 0, "deltaG": 10000000, "deltaGErr": 10000000, "formula": "C23H34N7O17P3S", "isCofactor": 0, "mass": 0}, {"id": "succ", "name": "Succinate", "abbreviation": "", "aliases": [], "defaultCharge": 0, "deltaG": 10000000, "deltaGErr": 10000000, "formula": "C4H4O4", "isCofactor": 0, "mass": 0}, {"id": "succoa", "name": "Succinyl-CoA", "abbreviation": "", "aliases": [], "defaultCharge": 0, "deltaG": 10000000, "deltaGErr": 10000000, "formula": "C25H35N7O19P3S", "isCofactor": 0, "mass": 0}, {"id": "acon_C", "name": "Cis-Aconitate", "abbreviation": "", "aliases": [], "defaultCharge": 0, "deltaG": 10000000, "deltaGErr": 10000000, "formula": "C6H3O6", "isCofactor": 0, "mass": 0}, {"id": "xu5p__D", "name": "D-Xylulose 5-phosphate", "abbreviation": "", "aliases": [], "defaultCharge": 0, "deltaG": 10000000, "deltaGErr": 10000000, "formula": "C5H9O8P", "isCofactor": 0, "mass": 0}, {"id": "actp", "name": "Acetyl phosphate", "abbreviation": "", "aliases": [], "defaultCharge": 0, "deltaG": 10000000, "deltaGErr": 10000000, "formula": "C2H3O5P", "isCofactor": 0, "mass": 0}, {"id": "adp", "name": "ADP C10H12N5O10P2", "abbreviation": "", "aliases": [], "defaultCharge": 0, "deltaG": 10000000, "deltaGErr": 10000000, "formula": "C10H12N5O10P2", "isCofactor": 0, "mass": 0}, {"id": "akg", "name": "2-Oxoglutarate", "abbreviation": "", "aliases": [], "defaultCharge": 0, "deltaG": 10000000, "deltaGErr": 10000000, "formula": "C5H4O5", "isCofactor": 0, "mass": 0}, {"id": "amp", "name": "AMP C10H12N5O7P", "abbreviation": "", "aliases": [], "defaultCharge": 0, "deltaG": 10000000, "deltaGErr": 10000000, "formula": "C10H12N5O7P", "isCofactor": 0, "mass": 0}, {"id": "atp", "name": "ATP C10H12N5O13P3", "abbreviation": "", "aliases": [], "defaultCharge": 0, "deltaG": 10000000, "deltaGErr": 10000000, "formula": "C10H12N5O13P3", "isCofactor": 0, "mass": 0}, {"id": "cit", "name": "Citrate", "abbreviation": "", "aliases": [], "defaultCharge": 0, "deltaG": 10000000, "deltaGErr": 10000000, "formula": "C6H5O7", "isCofactor": 0, "mass": 0}, {"id": "co2", "name": "CO2 CO2", "abbreviation": "", "aliases": [], "defaultCharge": 0, "deltaG": 10000000, "deltaGErr": 10000000, "formula": "CO2", "isCofactor": 0, "mass": 0}, {"id": "coa", "name": "Coenzyme A", "abbreviation": "", "aliases": [], "defaultCharge": 0, "deltaG": 10000000, "deltaGErr": 10000000, "formula": "C21H32N7O16P3S", "isCofactor": 0, "mass": 0}, {"id": "dhap", "name": "Dihydroxyacetone phosphate", "abbreviation": "", "aliases": [], "defaultCharge": 0, "deltaG": 10000000, "deltaGErr": 10000000, "formula": "C3H5O6P", "isCofactor": 0, "mass": 0}, {"id": "e4p", "name": "D-Erythrose 4-phosphate", "abbreviation": "", "aliases": [], "defaultCharge": 0, "deltaG": 10000000, "deltaGErr": 10000000, "formula": "C4H7O7P", "isCofactor": 0, "mass": 0}, {"id": "etoh", "name": "Ethanol", "abbreviation": "", "aliases": [], "defaultCharge": 0, "deltaG": 10000000, "deltaGErr": 10000000, "formula": "C2H6O", "isCofactor": 0, "mass": 0}, {"id": "f6p", "name": "D-Fructose 6-phosphate", "abbreviation": "", "aliases": [], "defaultCharge": 0, "deltaG": 10000000, "deltaGErr": 10000000, "formula": "C6H11O9P", "isCofactor": 0, "mass": 0}, {"id": "fdp", "name": "D-Fructose 1,6-bisphosphate", "abbreviation": "", "aliases": [], "defaultCharge": 0, "deltaG": 10000000, "deltaGErr": 10000000, "formula": "C6H10O12P2", "isCofactor": 0, "mass": 0}, {"id": "for", "name": "Formate", "abbreviation": "", "aliases": [], "defaultCharge": 0, "deltaG": 10000000, "deltaGErr": 10000000, "formula": "CH1O2", "isCofactor": 0, "mass": 0}, {"id": "fru", "name": "D-Fructose", "abbreviation": "", "aliases": [], "defaultCharge": 0, "deltaG": 10000000, "deltaGErr": 10000000, "formula": "C6H12O6", "isCofactor": 0, "mass": 0}, {"id": "fum", "name": "Fumarate", "abbreviation": "", "aliases": [], "defaultCharge": 0, "deltaG": 10000000, "deltaGErr": 10000000, "formula": "C4H2O4", "isCofactor": 0, "mass": 0}, {"id": "g3p", "name": "Glyceraldehyde 3-phosphate", "abbreviation": "", "aliases": [], "defaultCharge": 0, "deltaG": 10000000, "deltaGErr": 10000000, "formula": "C3H5O6P", "isCofactor": 0, "mass": 0}, {"id": "g6p", "name": "D-Glucose 6-phosphate", "abbreviation": "", "aliases": [], "defaultCharge": 0, "deltaG": 10000000, "deltaGErr": 10000000, "formula": "C6H11O9P", "isCofactor": 0, "mass": 0}], "roles": [], "complexes": [], "reactions": [{"id": "PFK_c", "name": "Phosphofructokinase", "GapfillDirection": "=", "base_cost": 1000, "reverse_penalty": 1000, "forward_penalty": 1000, "upper_bound": 1000.0, "lower_bound": 0.0, "direction": ">", "maxforflux": 1000.0, "maxrevflux": 0.0, "reaction_ref": "kbase/default/reactions/id/rxn00000", "templateReactionReagents": [{"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/adp_c"}, {"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/atp_c"}, {"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/f6p_c"}, {"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/fdp_c"}, {"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/h_c"}], "templatecompartment_ref": "~/compartments/id/", "templatecomplex_refs": [], "type": "conditional"}, {"id": "PFL_c", "name": "Pyruvate formate lyase", "GapfillDirection": "=", "base_cost": 1000, "reverse_penalty": 1000, "forward_penalty": 1000, "upper_bound": 1000.0, "lower_bound": 0.0, "direction": ">", "maxforflux": 1000.0, "maxrevflux": 0.0, "reaction_ref": "kbase/default/reactions/id/rxn00000", "templateReactionReagents": [{"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/accoa_c"}, {"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/coa_c"}, {"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/for_c"}, {"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/pyr_c"}], "templatecompartment_ref": "~/compartments/id/", "templatecomplex_refs": [], "type": "conditional"}, {"id": "PGI_c", "name": "Glucose-6-phosphate isomerase", "GapfillDirection": "=", "base_cost": 1000, "reverse_penalty": 1000, "forward_penalty": 1000, "upper_bound": 1000.0, "lower_bound": -1000.0, "direction": "=", "maxforflux": 1000.0, "maxrevflux": 1000.0, "reaction_ref": "kbase/default/reactions/id/rxn00000", "templateReactionReagents": [{"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/f6p_c"}, {"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/g6p_c"}], "templatecompartment_ref": "~/compartments/id/", "templatecomplex_refs": [], "type": "conditional"}, {"id": "PGK_c", "name": "Phosphoglycerate kinase", "GapfillDirection": "=", "base_cost": 1000, "reverse_penalty": 1000, "forward_penalty": 1000, "upper_bound": 1000.0, "lower_bound": -1000.0, "direction": "=", "maxforflux": 1000.0, "maxrevflux": 1000.0, "reaction_ref": "kbase/default/reactions/id/rxn00000", "templateReactionReagents": [{"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/13dpg_c"}, {"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/3pg_c"}, {"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/adp_c"}, {"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/atp_c"}], "templatecompartment_ref": "~/compartments/id/", "templatecomplex_refs": [], "type": "conditional"}, {"id": "PGL_c", "name": "6-phosphogluconolactonase", "GapfillDirection": "=", "base_cost": 1000, "reverse_penalty": 1000, "forward_penalty": 1000, "upper_bound": 1000.0, "lower_bound": 0.0, "direction": ">", "maxforflux": 1000.0, "maxrevflux": 0.0, "reaction_ref": "kbase/default/reactions/id/rxn00000", "templateReactionReagents": [{"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/6pgc_c"}, {"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/6pgl_c"}, {"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/h2o_c"}, {"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/h_c"}], "templatecompartment_ref": "~/compartments/id/", "templatecomplex_refs": [], "type": "conditional"}, {"id": "ACALD_c", "name": "Acetaldehyde dehydrogenase (acetylating)", "GapfillDirection": "=", "base_cost": 1000, "reverse_penalty": 1000, "forward_penalty": 1000, "upper_bound": 1000.0, "lower_bound": -1000.0, "direction": "=", "maxforflux": 1000.0, "maxrevflux": 1000.0, "reaction_ref": "kbase/default/reactions/id/rxn00000", "templateReactionReagents": [{"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/acald_c"}, {"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/accoa_c"}, {"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/coa_c"}, {"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/h_c"}, {"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/nad_c"}, {"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/nadh_c"}], "templatecompartment_ref": "~/compartments/id/", "templatecomplex_refs": [], "type": "conditional"}, {"id": "AKGt2r_c", "name": "2 oxoglutarate reversible transport via symport", "GapfillDirection": "=", "base_cost": 1000, "reverse_penalty": 1000, "forward_penalty": 1000, "upper_bound": 1000.0, "lower_bound": -1000.0, "direction": "=", "maxforflux": 1000.0, "maxrevflux": 1000.0, "reaction_ref": "kbase/default/reactions/id/rxn00000", "templateReactionReagents": [{"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/akg_c"}, {"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/akg_e"}, {"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/h_c"}, {"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/h_e"}], "templatecompartment_ref": "~/compartments/id/", "templatecomplex_refs": [], "type": "conditional"}, {"id": "PGM_c", "name": "Phosphoglycerate mutase", "GapfillDirection": "=", "base_cost": 1000, "reverse_penalty": 1000, "forward_penalty": 1000, "upper_bound": 1000.0, "lower_bound": -1000.0, "direction": "=", "maxforflux": 1000.0, "maxrevflux": 1000.0, "reaction_ref": "kbase/default/reactions/id/rxn00000", "templateReactionReagents": [{"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/2pg_c"}, {"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/3pg_c"}], "templatecompartment_ref": "~/compartments/id/", "templatecomplex_refs": [], "type": "conditional"}, {"id": "PIt2r_c", "name": "Phosphate reversible transport via symport", "GapfillDirection": "=", "base_cost": 1000, "reverse_penalty": 1000, "forward_penalty": 1000, "upper_bound": 1000.0, "lower_bound": -1000.0, "direction": "=", "maxforflux": 1000.0, "maxrevflux": 1000.0, "reaction_ref": "kbase/default/reactions/id/rxn00000", "templateReactionReagents": [{"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/h_c"}, {"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/h_e"}, {"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/pi_c"}, {"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/pi_e"}], "templatecompartment_ref": "~/compartments/id/", "templatecomplex_refs": [], "type": "conditional"}, {"id": "ALCD2x_c", "name": "Alcohol dehydrogenase (ethanol)", "GapfillDirection": "=", "base_cost": 1000, "reverse_penalty": 1000, "forward_penalty": 1000, "upper_bound": 1000.0, "lower_bound": -1000.0, "direction": "=", "maxforflux": 1000.0, "maxrevflux": 1000.0, "reaction_ref": "kbase/default/reactions/id/rxn00000", "templateReactionReagents": [{"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/acald_c"}, {"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/etoh_c"}, {"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/h_c"}, {"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/nad_c"}, {"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/nadh_c"}], "templatecompartment_ref": "~/compartments/id/", "templatecomplex_refs": [], "type": "conditional"}, {"id": "ACALDt_c", "name": "Acetaldehyde reversible transport", "GapfillDirection": "=", "base_cost": 1000, "reverse_penalty": 1000, "forward_penalty": 1000, "upper_bound": 1000.0, "lower_bound": -1000.0, "direction": "=", "maxforflux": 1000.0, "maxrevflux": 1000.0, "reaction_ref": "kbase/default/reactions/id/rxn00000", "templateReactionReagents": [{"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/acald_c"}, {"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/acald_e"}], "templatecompartment_ref": "~/compartments/id/", "templatecomplex_refs": [], "type": "conditional"}, {"id": "ACKr_c", "name": "Acetate kinase", "GapfillDirection": "=", "base_cost": 1000, "reverse_penalty": 1000, "forward_penalty": 1000, "upper_bound": 1000.0, "lower_bound": -1000.0, "direction": "=", "maxforflux": 1000.0, "maxrevflux": 1000.0, "reaction_ref": "kbase/default/reactions/id/rxn00000", "templateReactionReagents": [{"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/ac_c"}, {"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/actp_c"}, {"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/adp_c"}, {"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/atp_c"}], "templatecompartment_ref": "~/compartments/id/", "templatecomplex_refs": [], "type": "conditional"}, {"id": "PPC_c", "name": "Phosphoenolpyruvate carboxylase", "GapfillDirection": "=", "base_cost": 1000, "reverse_penalty": 1000, "forward_penalty": 1000, "upper_bound": 1000.0, "lower_bound": 0.0, "direction": ">", "maxforflux": 1000.0, "maxrevflux": 0.0, "reaction_ref": "kbase/default/reactions/id/rxn00000", "templateReactionReagents": [{"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/co2_c"}, {"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/h2o_c"}, {"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/h_c"}, {"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/oaa_c"}, {"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/pep_c"}, {"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/pi_c"}], "templatecompartment_ref": "~/compartments/id/", "templatecomplex_refs": [], "type": "conditional"}, {"id": "ACONTa_c", "name": "Aconitase (half-reaction A, Citrate hydro-lyase)", "GapfillDirection": "=", "base_cost": 1000, "reverse_penalty": 1000, "forward_penalty": 1000, "upper_bound": 1000.0, "lower_bound": -1000.0, "direction": "=", "maxforflux": 1000.0, "maxrevflux": 1000.0, "reaction_ref": "kbase/default/reactions/id/rxn00000", "templateReactionReagents": [{"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/acon_C_c"}, {"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/cit_c"}, {"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/h2o_c"}], "templatecompartment_ref": "~/compartments/id/", "templatecomplex_refs": [], "type": "conditional"}, {"id": "ACONTb_c", "name": "Aconitase (half-reaction B, Isocitrate hydro-lyase)", "GapfillDirection": "=", "base_cost": 1000, "reverse_penalty": 1000, "forward_penalty": 1000, "upper_bound": 1000.0, "lower_bound": -1000.0, "direction": "=", "maxforflux": 1000.0, "maxrevflux": 1000.0, "reaction_ref": "kbase/default/reactions/id/rxn00000", "templateReactionReagents": [{"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/acon_C_c"}, {"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/h2o_c"}, {"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/icit_c"}], "templatecompartment_ref": "~/compartments/id/", "templatecomplex_refs": [], "type": "conditional"}, {"id": "PPCK_c", "name": "Phosphoenolpyruvate carboxykinase", "GapfillDirection": "=", "base_cost": 1000, "reverse_penalty": 1000, "forward_penalty": 1000, "upper_bound": 1000.0, "lower_bound": 0.0, "direction": ">", "maxforflux": 1000.0, "maxrevflux": 0.0, "reaction_ref": "kbase/default/reactions/id/rxn00000", "templateReactionReagents": [{"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/adp_c"}, {"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/atp_c"}, {"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/co2_c"}, {"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/oaa_c"}, {"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/pep_c"}], "templatecompartment_ref": "~/compartments/id/", "templatecomplex_refs": [], "type": "conditional"}, {"id": "ACt2r_c", "name": "Acetate reversible transport via proton symport", "GapfillDirection": "=", "base_cost": 1000, "reverse_penalty": 1000, "forward_penalty": 1000, "upper_bound": 1000.0, "lower_bound": -1000.0, "direction": "=", "maxforflux": 1000.0, "maxrevflux": 1000.0, "reaction_ref": "kbase/default/reactions/id/rxn00000", "templateReactionReagents": [{"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/ac_c"}, {"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/ac_e"}, {"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/h_c"}, {"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/h_e"}], "templatecompartment_ref": "~/compartments/id/", "templatecomplex_refs": [], "type": "conditional"}, {"id": "PPS_c", "name": "Phosphoenolpyruvate synthase", "GapfillDirection": "=", "base_cost": 1000, "reverse_penalty": 1000, "forward_penalty": 1000, "upper_bound": 1000.0, "lower_bound": 0.0, "direction": ">", "maxforflux": 1000.0, "maxrevflux": 0.0, "reaction_ref": "kbase/default/reactions/id/rxn00000", "templateReactionReagents": [{"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/amp_c"}, {"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/atp_c"}, {"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/h2o_c"}, {"coefficient": 2.0, "templatecompcompound_ref": "~/compcompounds/id/h_c"}, {"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/pep_c"}, {"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/pi_c"}, {"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/pyr_c"}], "templatecompartment_ref": "~/compartments/id/", "templatecomplex_refs": [], "type": "conditional"}, {"id": "ADK1_c", "name": "Adenylate kinase", "GapfillDirection": "=", "base_cost": 1000, "reverse_penalty": 1000, "forward_penalty": 1000, "upper_bound": 1000.0, "lower_bound": -1000.0, "direction": "=", "maxforflux": 1000.0, "maxrevflux": 1000.0, "reaction_ref": "kbase/default/reactions/id/rxn00000", "templateReactionReagents": [{"coefficient": 2.0, "templatecompcompound_ref": "~/compcompounds/id/adp_c"}, {"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/amp_c"}, {"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/atp_c"}], "templatecompartment_ref": "~/compartments/id/", "templatecomplex_refs": [], "type": "conditional"}, {"id": "AKGDH_c", "name": "2-Oxogluterate dehydrogenase", "GapfillDirection": "=", "base_cost": 1000, "reverse_penalty": 1000, "forward_penalty": 1000, "upper_bound": 1000.0, "lower_bound": 0.0, "direction": ">", "maxforflux": 1000.0, "maxrevflux": 0.0, "reaction_ref": "kbase/default/reactions/id/rxn00000", "templateReactionReagents": [{"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/akg_c"}, {"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/co2_c"}, {"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/coa_c"}, {"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/nad_c"}, {"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/nadh_c"}, {"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/succoa_c"}], "templatecompartment_ref": "~/compartments/id/", "templatecomplex_refs": [], "type": "conditional"}, {"id": "ATPS4r_c", "name": "ATP synthase (four protons for one ATP)", "GapfillDirection": "=", "base_cost": 1000, "reverse_penalty": 1000, "forward_penalty": 1000, "upper_bound": 1000.0, "lower_bound": -1000.0, "direction": "=", "maxforflux": 1000.0, "maxrevflux": 1000.0, "reaction_ref": "kbase/default/reactions/id/rxn00000", "templateReactionReagents": [{"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/adp_c"}, {"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/atp_c"}, {"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/h2o_c"}, {"coefficient": 3.0, "templatecompcompound_ref": "~/compcompounds/id/h_c"}, {"coefficient": -4.0, "templatecompcompound_ref": "~/compcompounds/id/h_e"}, {"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/pi_c"}], "templatecompartment_ref": "~/compartments/id/", "templatecomplex_refs": [], "type": "conditional"}, {"id": "PTAr_c", "name": "Phosphotransacetylase", "GapfillDirection": "=", "base_cost": 1000, "reverse_penalty": 1000, "forward_penalty": 1000, "upper_bound": 1000.0, "lower_bound": -1000.0, "direction": "=", "maxforflux": 1000.0, "maxrevflux": 1000.0, "reaction_ref": "kbase/default/reactions/id/rxn00000", "templateReactionReagents": [{"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/accoa_c"}, {"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/actp_c"}, {"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/coa_c"}, {"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/pi_c"}], "templatecompartment_ref": "~/compartments/id/", "templatecomplex_refs": [], "type": "conditional"}, {"id": "PYK_c", "name": "Pyruvate kinase", "GapfillDirection": "=", "base_cost": 1000, "reverse_penalty": 1000, "forward_penalty": 1000, "upper_bound": 1000.0, "lower_bound": 0.0, "direction": ">", "maxforflux": 1000.0, "maxrevflux": 0.0, "reaction_ref": "kbase/default/reactions/id/rxn00000", "templateReactionReagents": [{"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/adp_c"}, {"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/atp_c"}, {"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/h_c"}, {"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/pep_c"}, {"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/pyr_c"}], "templatecompartment_ref": "~/compartments/id/", "templatecomplex_refs": [], "type": "conditional"}, {"id": "PYRt2_c", "name": "Pyruvate transport in via proton symport", "GapfillDirection": "=", "base_cost": 1000, "reverse_penalty": 1000, "forward_penalty": 1000, "upper_bound": 1000.0, "lower_bound": -1000.0, "direction": "=", "maxforflux": 1000.0, "maxrevflux": 1000.0, "reaction_ref": "kbase/default/reactions/id/rxn00000", "templateReactionReagents": [{"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/h_c"}, {"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/h_e"}, {"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/pyr_c"}, {"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/pyr_e"}], "templatecompartment_ref": "~/compartments/id/", "templatecomplex_refs": [], "type": "conditional"}, {"id": "CO2t_c", "name": "CO2 transporter via diffusion", "GapfillDirection": "=", "base_cost": 1000, "reverse_penalty": 1000, "forward_penalty": 1000, "upper_bound": 1000.0, "lower_bound": -1000.0, "direction": "=", "maxforflux": 1000.0, "maxrevflux": 1000.0, "reaction_ref": "kbase/default/reactions/id/rxn00000", "templateReactionReagents": [{"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/co2_c"}, {"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/co2_e"}], "templatecompartment_ref": "~/compartments/id/", "templatecomplex_refs": [], "type": "conditional"}, {"id": "RPE_c", "name": "Ribulose 5-phosphate 3-epimerase", "GapfillDirection": "=", "base_cost": 1000, "reverse_penalty": 1000, "forward_penalty": 1000, "upper_bound": 1000.0, "lower_bound": -1000.0, "direction": "=", "maxforflux": 1000.0, "maxrevflux": 1000.0, "reaction_ref": "kbase/default/reactions/id/rxn00000", "templateReactionReagents": [{"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/ru5p__D_c"}, {"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/xu5p__D_c"}], "templatecompartment_ref": "~/compartments/id/", "templatecomplex_refs": [], "type": "conditional"}, {"id": "CS_c", "name": "Citrate synthase", "GapfillDirection": "=", "base_cost": 1000, "reverse_penalty": 1000, "forward_penalty": 1000, "upper_bound": 1000.0, "lower_bound": 0.0, "direction": ">", "maxforflux": 1000.0, "maxrevflux": 0.0, "reaction_ref": "kbase/default/reactions/id/rxn00000", "templateReactionReagents": [{"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/accoa_c"}, {"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/cit_c"}, {"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/coa_c"}, {"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/h2o_c"}, {"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/h_c"}, {"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/oaa_c"}], "templatecompartment_ref": "~/compartments/id/", "templatecomplex_refs": [], "type": "conditional"}, {"id": "RPI_c", "name": "Ribose-5-phosphate isomerase", "GapfillDirection": "=", "base_cost": 1000, "reverse_penalty": 1000, "forward_penalty": 1000, "upper_bound": 1000.0, "lower_bound": -1000.0, "direction": "=", "maxforflux": 1000.0, "maxrevflux": 1000.0, "reaction_ref": "kbase/default/reactions/id/rxn00000", "templateReactionReagents": [{"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/r5p_c"}, {"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/ru5p__D_c"}], "templatecompartment_ref": "~/compartments/id/", "templatecomplex_refs": [], "type": "conditional"}, {"id": "SUCCt2_2_c", "name": "Succinate transport via proton symport (2 H)", "GapfillDirection": "=", "base_cost": 1000, "reverse_penalty": 1000, "forward_penalty": 1000, "upper_bound": 1000.0, "lower_bound": 0.0, "direction": ">", "maxforflux": 1000.0, "maxrevflux": 0.0, "reaction_ref": "kbase/default/reactions/id/rxn00000", "templateReactionReagents": [{"coefficient": 2.0, "templatecompcompound_ref": "~/compcompounds/id/h_c"}, {"coefficient": -2.0, "templatecompcompound_ref": "~/compcompounds/id/h_e"}, {"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/succ_c"}, {"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/succ_e"}], "templatecompartment_ref": "~/compartments/id/", "templatecomplex_refs": [], "type": "conditional"}, {"id": "CYTBD_c", "name": "Cytochrome oxidase bd (ubiquinol-8: 2 protons)", "GapfillDirection": "=", "base_cost": 1000, "reverse_penalty": 1000, "forward_penalty": 1000, "upper_bound": 1000.0, "lower_bound": 0.0, "direction": ">", "maxforflux": 1000.0, "maxrevflux": 0.0, "reaction_ref": "kbase/default/reactions/id/rxn00000", "templateReactionReagents": [{"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/h2o_c"}, {"coefficient": -2.0, "templatecompcompound_ref": "~/compcompounds/id/h_c"}, {"coefficient": 2.0, "templatecompcompound_ref": "~/compcompounds/id/h_e"}, {"coefficient": -0.5, "templatecompcompound_ref": "~/compcompounds/id/o2_c"}, {"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/q8_c"}, {"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/q8h2_c"}], "templatecompartment_ref": "~/compartments/id/", "templatecomplex_refs": [], "type": "conditional"}, {"id": "D_LACt2_c", "name": "D lactate transport via proton symport", "GapfillDirection": "=", "base_cost": 1000, "reverse_penalty": 1000, "forward_penalty": 1000, "upper_bound": 1000.0, "lower_bound": -1000.0, "direction": "=", "maxforflux": 1000.0, "maxrevflux": 1000.0, "reaction_ref": "kbase/default/reactions/id/rxn00000", "templateReactionReagents": [{"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/h_c"}, {"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/h_e"}, {"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/lac__D_c"}, {"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/lac__D_e"}], "templatecompartment_ref": "~/compartments/id/", "templatecomplex_refs": [], "type": "conditional"}, {"id": "ENO_c", "name": "Enolase", "GapfillDirection": "=", "base_cost": 1000, "reverse_penalty": 1000, "forward_penalty": 1000, "upper_bound": 1000.0, "lower_bound": -1000.0, "direction": "=", "maxforflux": 1000.0, "maxrevflux": 1000.0, "reaction_ref": "kbase/default/reactions/id/rxn00000", "templateReactionReagents": [{"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/2pg_c"}, {"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/h2o_c"}, {"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/pep_c"}], "templatecompartment_ref": "~/compartments/id/", "templatecomplex_refs": [], "type": "conditional"}, {"id": "SUCCt3_c", "name": "Succinate transport out via proton antiport", "GapfillDirection": "=", "base_cost": 1000, "reverse_penalty": 1000, "forward_penalty": 1000, "upper_bound": 1000.0, "lower_bound": 0.0, "direction": ">", "maxforflux": 1000.0, "maxrevflux": 0.0, "reaction_ref": "kbase/default/reactions/id/rxn00000", "templateReactionReagents": [{"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/h_c"}, {"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/h_e"}, {"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/succ_c"}, {"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/succ_e"}], "templatecompartment_ref": "~/compartments/id/", "templatecomplex_refs": [], "type": "conditional"}, {"id": "ETOHt2r_c", "name": "Ethanol reversible transport via proton symport", "GapfillDirection": "=", "base_cost": 1000, "reverse_penalty": 1000, "forward_penalty": 1000, "upper_bound": 1000.0, "lower_bound": -1000.0, "direction": "=", "maxforflux": 1000.0, "maxrevflux": 1000.0, "reaction_ref": "kbase/default/reactions/id/rxn00000", "templateReactionReagents": [{"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/etoh_c"}, {"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/etoh_e"}, {"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/h_c"}, {"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/h_e"}], "templatecompartment_ref": "~/compartments/id/", "templatecomplex_refs": [], "type": "conditional"}, {"id": "SUCDi_c", "name": "Succinate dehydrogenase (irreversible)", "GapfillDirection": "=", "base_cost": 1000, "reverse_penalty": 1000, "forward_penalty": 1000, "upper_bound": 1000.0, "lower_bound": 0.0, "direction": ">", "maxforflux": 1000.0, "maxrevflux": 0.0, "reaction_ref": "kbase/default/reactions/id/rxn00000", "templateReactionReagents": [{"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/fum_c"}, {"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/q8_c"}, {"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/q8h2_c"}, {"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/succ_c"}], "templatecompartment_ref": "~/compartments/id/", "templatecomplex_refs": [], "type": "conditional"}, {"id": "SUCOAS_c", "name": "Succinyl-CoA synthetase (ADP-forming)", "GapfillDirection": "=", "base_cost": 1000, "reverse_penalty": 1000, "forward_penalty": 1000, "upper_bound": 1000.0, "lower_bound": -1000.0, "direction": "=", "maxforflux": 1000.0, "maxrevflux": 1000.0, "reaction_ref": "kbase/default/reactions/id/rxn00000", "templateReactionReagents": [{"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/adp_c"}, {"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/atp_c"}, {"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/coa_c"}, {"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/pi_c"}, {"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/succ_c"}, {"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/succoa_c"}], "templatecompartment_ref": "~/compartments/id/", "templatecomplex_refs": [], "type": "conditional"}, {"id": "TALA_c", "name": "Transaldolase", "GapfillDirection": "=", "base_cost": 1000, "reverse_penalty": 1000, "forward_penalty": 1000, "upper_bound": 1000.0, "lower_bound": -1000.0, "direction": "=", "maxforflux": 1000.0, "maxrevflux": 1000.0, "reaction_ref": "kbase/default/reactions/id/rxn00000", "templateReactionReagents": [{"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/e4p_c"}, {"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/f6p_c"}, {"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/g3p_c"}, {"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/s7p_c"}], "templatecompartment_ref": "~/compartments/id/", "templatecomplex_refs": [], "type": "conditional"}, {"id": "THD2_c", "name": "NAD(P) transhydrogenase", "GapfillDirection": "=", "base_cost": 1000, "reverse_penalty": 1000, "forward_penalty": 1000, "upper_bound": 1000.0, "lower_bound": 0.0, "direction": ">", "maxforflux": 1000.0, "maxrevflux": 0.0, "reaction_ref": "kbase/default/reactions/id/rxn00000", "templateReactionReagents": [{"coefficient": 2.0, "templatecompcompound_ref": "~/compcompounds/id/h_c"}, {"coefficient": -2.0, "templatecompcompound_ref": "~/compcompounds/id/h_e"}, {"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/nad_c"}, {"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/nadh_c"}, {"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/nadp_c"}, {"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/nadph_c"}], "templatecompartment_ref": "~/compartments/id/", "templatecomplex_refs": [], "type": "conditional"}, {"id": "TKT1_c", "name": "Transketolase", "GapfillDirection": "=", "base_cost": 1000, "reverse_penalty": 1000, "forward_penalty": 1000, "upper_bound": 1000.0, "lower_bound": -1000.0, "direction": "=", "maxforflux": 1000.0, "maxrevflux": 1000.0, "reaction_ref": "kbase/default/reactions/id/rxn00000", "templateReactionReagents": [{"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/g3p_c"}, {"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/r5p_c"}, {"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/s7p_c"}, {"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/xu5p__D_c"}], "templatecompartment_ref": "~/compartments/id/", "templatecomplex_refs": [], "type": "conditional"}, {"id": "TKT2_c", "name": "Transketolase", "GapfillDirection": "=", "base_cost": 1000, "reverse_penalty": 1000, "forward_penalty": 1000, "upper_bound": 1000.0, "lower_bound": -1000.0, "direction": "=", "maxforflux": 1000.0, "maxrevflux": 1000.0, "reaction_ref": "kbase/default/reactions/id/rxn00000", "templateReactionReagents": [{"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/e4p_c"}, {"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/f6p_c"}, {"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/g3p_c"}, {"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/xu5p__D_c"}], "templatecompartment_ref": "~/compartments/id/", "templatecomplex_refs": [], "type": "conditional"}, {"id": "TPI_c", "name": "Triose-phosphate isomerase", "GapfillDirection": "=", "base_cost": 1000, "reverse_penalty": 1000, "forward_penalty": 1000, "upper_bound": 1000.0, "lower_bound": -1000.0, "direction": "=", "maxforflux": 1000.0, "maxrevflux": 1000.0, "reaction_ref": "kbase/default/reactions/id/rxn00000", "templateReactionReagents": [{"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/dhap_c"}, {"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/g3p_c"}], "templatecompartment_ref": "~/compartments/id/", "templatecomplex_refs": [], "type": "conditional"}, {"id": "FBA_c", "name": "Fructose-bisphosphate aldolase", "GapfillDirection": "=", "base_cost": 1000, "reverse_penalty": 1000, "forward_penalty": 1000, "upper_bound": 1000.0, "lower_bound": -1000.0, "direction": "=", "maxforflux": 1000.0, "maxrevflux": 1000.0, "reaction_ref": "kbase/default/reactions/id/rxn00000", "templateReactionReagents": [{"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/dhap_c"}, {"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/fdp_c"}, {"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/g3p_c"}], "templatecompartment_ref": "~/compartments/id/", "templatecomplex_refs": [], "type": "conditional"}, {"id": "FBP_c", "name": "Fructose-bisphosphatase", "GapfillDirection": "=", "base_cost": 1000, "reverse_penalty": 1000, "forward_penalty": 1000, "upper_bound": 1000.0, "lower_bound": 0.0, "direction": ">", "maxforflux": 1000.0, "maxrevflux": 0.0, "reaction_ref": "kbase/default/reactions/id/rxn00000", "templateReactionReagents": [{"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/f6p_c"}, {"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/fdp_c"}, {"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/h2o_c"}, {"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/pi_c"}], "templatecompartment_ref": "~/compartments/id/", "templatecomplex_refs": [], "type": "conditional"}, {"id": "FORt2_c", "name": "Formate transport in via proton symport", "GapfillDirection": "=", "base_cost": 1000, "reverse_penalty": 1000, "forward_penalty": 1000, "upper_bound": 1000.0, "lower_bound": 0.0, "direction": ">", "maxforflux": 1000.0, "maxrevflux": 0.0, "reaction_ref": "kbase/default/reactions/id/rxn00000", "templateReactionReagents": [{"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/for_c"}, {"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/for_e"}, {"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/h_c"}, {"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/h_e"}], "templatecompartment_ref": "~/compartments/id/", "templatecomplex_refs": [], "type": "conditional"}, {"id": "FORt_c", "name": "Formate transport via diffusion", "GapfillDirection": "=", "base_cost": 1000, "reverse_penalty": 1000, "forward_penalty": 1000, "upper_bound": 0.0, "lower_bound": -1000.0, "direction": "<", "maxforflux": 0.0, "maxrevflux": 1000.0, "reaction_ref": "kbase/default/reactions/id/rxn00000", "templateReactionReagents": [{"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/for_c"}, {"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/for_e"}], "templatecompartment_ref": "~/compartments/id/", "templatecomplex_refs": [], "type": "conditional"}, {"id": "FRD7_c", "name": "Fumarate reductase", "GapfillDirection": "=", "base_cost": 1000, "reverse_penalty": 1000, "forward_penalty": 1000, "upper_bound": 1000.0, "lower_bound": 0.0, "direction": ">", "maxforflux": 1000.0, "maxrevflux": 0.0, "reaction_ref": "kbase/default/reactions/id/rxn00000", "templateReactionReagents": [{"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/fum_c"}, {"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/q8_c"}, {"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/q8h2_c"}, {"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/succ_c"}], "templatecompartment_ref": "~/compartments/id/", "templatecomplex_refs": [], "type": "conditional"}, {"id": "FRUpts2_c", "name": "Fructose transport via PEP:Pyr PTS (f6p generating)", "GapfillDirection": "=", "base_cost": 1000, "reverse_penalty": 1000, "forward_penalty": 1000, "upper_bound": 1000.0, "lower_bound": 0.0, "direction": ">", "maxforflux": 1000.0, "maxrevflux": 0.0, "reaction_ref": "kbase/default/reactions/id/rxn00000", "templateReactionReagents": [{"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/f6p_c"}, {"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/fru_e"}, {"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/pep_c"}, {"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/pyr_c"}], "templatecompartment_ref": "~/compartments/id/", "templatecomplex_refs": [], "type": "conditional"}, {"id": "FUM_c", "name": "Fumarase", "GapfillDirection": "=", "base_cost": 1000, "reverse_penalty": 1000, "forward_penalty": 1000, "upper_bound": 1000.0, "lower_bound": -1000.0, "direction": "=", "maxforflux": 1000.0, "maxrevflux": 1000.0, "reaction_ref": "kbase/default/reactions/id/rxn00000", "templateReactionReagents": [{"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/fum_c"}, {"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/h2o_c"}, {"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/mal__L_c"}], "templatecompartment_ref": "~/compartments/id/", "templatecomplex_refs": [], "type": "conditional"}, {"id": "FUMt2_2_c", "name": "Fumarate transport via proton symport (2 H)", "GapfillDirection": "=", "base_cost": 1000, "reverse_penalty": 1000, "forward_penalty": 1000, "upper_bound": 1000.0, "lower_bound": 0.0, "direction": ">", "maxforflux": 1000.0, "maxrevflux": 0.0, "reaction_ref": "kbase/default/reactions/id/rxn00000", "templateReactionReagents": [{"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/fum_c"}, {"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/fum_e"}, {"coefficient": 2.0, "templatecompcompound_ref": "~/compcompounds/id/h_c"}, {"coefficient": -2.0, "templatecompcompound_ref": "~/compcompounds/id/h_e"}], "templatecompartment_ref": "~/compartments/id/", "templatecomplex_refs": [], "type": "conditional"}, {"id": "G6PDH2r_c", "name": "Glucose 6-phosphate dehydrogenase", "GapfillDirection": "=", "base_cost": 1000, "reverse_penalty": 1000, "forward_penalty": 1000, "upper_bound": 1000.0, "lower_bound": -1000.0, "direction": "=", "maxforflux": 1000.0, "maxrevflux": 1000.0, "reaction_ref": "kbase/default/reactions/id/rxn00000", "templateReactionReagents": [{"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/6pgl_c"}, {"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/g6p_c"}, {"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/h_c"}, {"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/nadp_c"}, {"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/nadph_c"}], "templatecompartment_ref": "~/compartments/id/", "templatecomplex_refs": [], "type": "conditional"}, {"id": "GAPD_c", "name": "Glyceraldehyde-3-phosphate dehydrogenase", "GapfillDirection": "=", "base_cost": 1000, "reverse_penalty": 1000, "forward_penalty": 1000, "upper_bound": 1000.0, "lower_bound": -1000.0, "direction": "=", "maxforflux": 1000.0, "maxrevflux": 1000.0, "reaction_ref": "kbase/default/reactions/id/rxn00000", "templateReactionReagents": [{"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/13dpg_c"}, {"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/g3p_c"}, {"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/h_c"}, {"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/nad_c"}, {"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/nadh_c"}, {"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/pi_c"}], "templatecompartment_ref": "~/compartments/id/", "templatecomplex_refs": [], "type": "conditional"}, {"id": "GLCpts_c", "name": "D-glucose transport via PEP:Pyr PTS", "GapfillDirection": "=", "base_cost": 1000, "reverse_penalty": 1000, "forward_penalty": 1000, "upper_bound": 1000.0, "lower_bound": 0.0, "direction": ">", "maxforflux": 1000.0, "maxrevflux": 0.0, "reaction_ref": "kbase/default/reactions/id/rxn00000", "templateReactionReagents": [{"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/g6p_c"}, {"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/glc__D_e"}, {"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/pep_c"}, {"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/pyr_c"}], "templatecompartment_ref": "~/compartments/id/", "templatecomplex_refs": [], "type": "conditional"}, {"id": "GLNS_c", "name": "Glutamine synthetase", "GapfillDirection": "=", "base_cost": 1000, "reverse_penalty": 1000, "forward_penalty": 1000, "upper_bound": 1000.0, "lower_bound": 0.0, "direction": ">", "maxforflux": 1000.0, "maxrevflux": 0.0, "reaction_ref": "kbase/default/reactions/id/rxn00000", "templateReactionReagents": [{"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/adp_c"}, {"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/atp_c"}, {"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/gln__L_c"}, {"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/glu__L_c"}, {"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/h_c"}, {"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/nh4_c"}, {"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/pi_c"}], "templatecompartment_ref": "~/compartments/id/", "templatecomplex_refs": [], "type": "conditional"}, {"id": "GLNabc_c", "name": "L-glutamine transport via ABC system", "GapfillDirection": "=", "base_cost": 1000, "reverse_penalty": 1000, "forward_penalty": 1000, "upper_bound": 1000.0, "lower_bound": 0.0, "direction": ">", "maxforflux": 1000.0, "maxrevflux": 0.0, "reaction_ref": "kbase/default/reactions/id/rxn00000", "templateReactionReagents": [{"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/adp_c"}, {"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/atp_c"}, {"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/gln__L_c"}, {"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/gln__L_e"}, {"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/h2o_c"}, {"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/h_c"}, {"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/pi_c"}], "templatecompartment_ref": "~/compartments/id/", "templatecomplex_refs": [], "type": "conditional"}, {"id": "GLUDy_c", "name": "Glutamate dehydrogenase (NADP)", "GapfillDirection": "=", "base_cost": 1000, "reverse_penalty": 1000, "forward_penalty": 1000, "upper_bound": 1000.0, "lower_bound": -1000.0, "direction": "=", "maxforflux": 1000.0, "maxrevflux": 1000.0, "reaction_ref": "kbase/default/reactions/id/rxn00000", "templateReactionReagents": [{"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/akg_c"}, {"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/glu__L_c"}, {"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/h2o_c"}, {"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/h_c"}, {"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/nadp_c"}, {"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/nadph_c"}, {"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/nh4_c"}], "templatecompartment_ref": "~/compartments/id/", "templatecomplex_refs": [], "type": "conditional"}, {"id": "GLUN_c", "name": "Glutaminase", "GapfillDirection": "=", "base_cost": 1000, "reverse_penalty": 1000, "forward_penalty": 1000, "upper_bound": 1000.0, "lower_bound": 0.0, "direction": ">", "maxforflux": 1000.0, "maxrevflux": 0.0, "reaction_ref": "kbase/default/reactions/id/rxn00000", "templateReactionReagents": [{"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/gln__L_c"}, {"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/glu__L_c"}, {"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/h2o_c"}, {"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/nh4_c"}], "templatecompartment_ref": "~/compartments/id/", "templatecomplex_refs": [], "type": "conditional"}, {"id": "GLUSy_c", "name": "Glutamate synthase (NADPH)", "GapfillDirection": "=", "base_cost": 1000, "reverse_penalty": 1000, "forward_penalty": 1000, "upper_bound": 1000.0, "lower_bound": 0.0, "direction": ">", "maxforflux": 1000.0, "maxrevflux": 0.0, "reaction_ref": "kbase/default/reactions/id/rxn00000", "templateReactionReagents": [{"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/akg_c"}, {"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/gln__L_c"}, {"coefficient": 2.0, "templatecompcompound_ref": "~/compcompounds/id/glu__L_c"}, {"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/h_c"}, {"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/nadp_c"}, {"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/nadph_c"}], "templatecompartment_ref": "~/compartments/id/", "templatecomplex_refs": [], "type": "conditional"}, {"id": "GLUt2r_c", "name": "L glutamate transport via proton symport reversible", "GapfillDirection": "=", "base_cost": 1000, "reverse_penalty": 1000, "forward_penalty": 1000, "upper_bound": 1000.0, "lower_bound": -1000.0, "direction": "=", "maxforflux": 1000.0, "maxrevflux": 1000.0, "reaction_ref": "kbase/default/reactions/id/rxn00000", "templateReactionReagents": [{"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/glu__L_c"}, {"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/glu__L_e"}, {"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/h_c"}, {"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/h_e"}], "templatecompartment_ref": "~/compartments/id/", "templatecomplex_refs": [], "type": "conditional"}, {"id": "GND_c", "name": "Phosphogluconate dehydrogenase", "GapfillDirection": "=", "base_cost": 1000, "reverse_penalty": 1000, "forward_penalty": 1000, "upper_bound": 1000.0, "lower_bound": 0.0, "direction": ">", "maxforflux": 1000.0, "maxrevflux": 0.0, "reaction_ref": "kbase/default/reactions/id/rxn00000", "templateReactionReagents": [{"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/6pgc_c"}, {"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/co2_c"}, {"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/nadp_c"}, {"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/nadph_c"}, {"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/ru5p__D_c"}], "templatecompartment_ref": "~/compartments/id/", "templatecomplex_refs": [], "type": "conditional"}, {"id": "H2Ot_c", "name": "H2O transport via diffusion", "GapfillDirection": "=", "base_cost": 1000, "reverse_penalty": 1000, "forward_penalty": 1000, "upper_bound": 1000.0, "lower_bound": -1000.0, "direction": "=", "maxforflux": 1000.0, "maxrevflux": 1000.0, "reaction_ref": "kbase/default/reactions/id/rxn00000", "templateReactionReagents": [{"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/h2o_c"}, {"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/h2o_e"}], "templatecompartment_ref": "~/compartments/id/", "templatecomplex_refs": [], "type": "conditional"}, {"id": "ICDHyr_c", "name": "Isocitrate dehydrogenase (NADP)", "GapfillDirection": "=", "base_cost": 1000, "reverse_penalty": 1000, "forward_penalty": 1000, "upper_bound": 1000.0, "lower_bound": -1000.0, "direction": "=", "maxforflux": 1000.0, "maxrevflux": 1000.0, "reaction_ref": "kbase/default/reactions/id/rxn00000", "templateReactionReagents": [{"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/akg_c"}, {"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/co2_c"}, {"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/icit_c"}, {"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/nadp_c"}, {"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/nadph_c"}], "templatecompartment_ref": "~/compartments/id/", "templatecomplex_refs": [], "type": "conditional"}, {"id": "ICL_c", "name": "Isocitrate lyase", "GapfillDirection": "=", "base_cost": 1000, "reverse_penalty": 1000, "forward_penalty": 1000, "upper_bound": 1000.0, "lower_bound": 0.0, "direction": ">", "maxforflux": 1000.0, "maxrevflux": 0.0, "reaction_ref": "kbase/default/reactions/id/rxn00000", "templateReactionReagents": [{"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/glx_c"}, {"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/icit_c"}, {"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/succ_c"}], "templatecompartment_ref": "~/compartments/id/", "templatecomplex_refs": [], "type": "conditional"}, {"id": "LDH_D_c", "name": "D-lactate dehydrogenase", "GapfillDirection": "=", "base_cost": 1000, "reverse_penalty": 1000, "forward_penalty": 1000, "upper_bound": 1000.0, "lower_bound": -1000.0, "direction": "=", "maxforflux": 1000.0, "maxrevflux": 1000.0, "reaction_ref": "kbase/default/reactions/id/rxn00000", "templateReactionReagents": [{"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/h_c"}, {"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/lac__D_c"}, {"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/nad_c"}, {"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/nadh_c"}, {"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/pyr_c"}], "templatecompartment_ref": "~/compartments/id/", "templatecomplex_refs": [], "type": "conditional"}, {"id": "MALS_c", "name": "Malate synthase", "GapfillDirection": "=", "base_cost": 1000, "reverse_penalty": 1000, "forward_penalty": 1000, "upper_bound": 1000.0, "lower_bound": 0.0, "direction": ">", "maxforflux": 1000.0, "maxrevflux": 0.0, "reaction_ref": "kbase/default/reactions/id/rxn00000", "templateReactionReagents": [{"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/accoa_c"}, {"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/coa_c"}, {"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/glx_c"}, {"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/h2o_c"}, {"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/h_c"}, {"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/mal__L_c"}], "templatecompartment_ref": "~/compartments/id/", "templatecomplex_refs": [], "type": "conditional"}, {"id": "MALt2_2_c", "name": "Malate transport via proton symport (2 H)", "GapfillDirection": "=", "base_cost": 1000, "reverse_penalty": 1000, "forward_penalty": 1000, "upper_bound": 1000.0, "lower_bound": 0.0, "direction": ">", "maxforflux": 1000.0, "maxrevflux": 0.0, "reaction_ref": "kbase/default/reactions/id/rxn00000", "templateReactionReagents": [{"coefficient": 2.0, "templatecompcompound_ref": "~/compcompounds/id/h_c"}, {"coefficient": -2.0, "templatecompcompound_ref": "~/compcompounds/id/h_e"}, {"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/mal__L_c"}, {"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/mal__L_e"}], "templatecompartment_ref": "~/compartments/id/", "templatecomplex_refs": [], "type": "conditional"}, {"id": "MDH_c", "name": "Malate dehydrogenase", "GapfillDirection": "=", "base_cost": 1000, "reverse_penalty": 1000, "forward_penalty": 1000, "upper_bound": 1000.0, "lower_bound": -1000.0, "direction": "=", "maxforflux": 1000.0, "maxrevflux": 1000.0, "reaction_ref": "kbase/default/reactions/id/rxn00000", "templateReactionReagents": [{"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/h_c"}, {"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/mal__L_c"}, {"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/nad_c"}, {"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/nadh_c"}, {"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/oaa_c"}], "templatecompartment_ref": "~/compartments/id/", "templatecomplex_refs": [], "type": "conditional"}, {"id": "ME1_c", "name": "Malic enzyme (NAD)", "GapfillDirection": "=", "base_cost": 1000, "reverse_penalty": 1000, "forward_penalty": 1000, "upper_bound": 1000.0, "lower_bound": 0.0, "direction": ">", "maxforflux": 1000.0, "maxrevflux": 0.0, "reaction_ref": "kbase/default/reactions/id/rxn00000", "templateReactionReagents": [{"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/co2_c"}, {"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/mal__L_c"}, {"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/nad_c"}, {"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/nadh_c"}, {"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/pyr_c"}], "templatecompartment_ref": "~/compartments/id/", "templatecomplex_refs": [], "type": "conditional"}, {"id": "ME2_c", "name": "Malic enzyme (NADP)", "GapfillDirection": "=", "base_cost": 1000, "reverse_penalty": 1000, "forward_penalty": 1000, "upper_bound": 1000.0, "lower_bound": 0.0, "direction": ">", "maxforflux": 1000.0, "maxrevflux": 0.0, "reaction_ref": "kbase/default/reactions/id/rxn00000", "templateReactionReagents": [{"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/co2_c"}, {"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/mal__L_c"}, {"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/nadp_c"}, {"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/nadph_c"}, {"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/pyr_c"}], "templatecompartment_ref": "~/compartments/id/", "templatecomplex_refs": [], "type": "conditional"}, {"id": "NADH16_c", "name": "NADH dehydrogenase (ubiquinone-8 & 3 protons)", "GapfillDirection": "=", "base_cost": 1000, "reverse_penalty": 1000, "forward_penalty": 1000, "upper_bound": 1000.0, "lower_bound": 0.0, "direction": ">", "maxforflux": 1000.0, "maxrevflux": 0.0, "reaction_ref": "kbase/default/reactions/id/rxn00000", "templateReactionReagents": [{"coefficient": -4.0, "templatecompcompound_ref": "~/compcompounds/id/h_c"}, {"coefficient": 3.0, "templatecompcompound_ref": "~/compcompounds/id/h_e"}, {"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/nad_c"}, {"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/nadh_c"}, {"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/q8_c"}, {"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/q8h2_c"}], "templatecompartment_ref": "~/compartments/id/", "templatecomplex_refs": [], "type": "conditional"}, {"id": "NADTRHD_c", "name": "NAD transhydrogenase", "GapfillDirection": "=", "base_cost": 1000, "reverse_penalty": 1000, "forward_penalty": 1000, "upper_bound": 1000.0, "lower_bound": 0.0, "direction": ">", "maxforflux": 1000.0, "maxrevflux": 0.0, "reaction_ref": "kbase/default/reactions/id/rxn00000", "templateReactionReagents": [{"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/nad_c"}, {"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/nadh_c"}, {"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/nadp_c"}, {"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/nadph_c"}], "templatecompartment_ref": "~/compartments/id/", "templatecomplex_refs": [], "type": "conditional"}, {"id": "NH4t_c", "name": "Ammonia reversible transport", "GapfillDirection": "=", "base_cost": 1000, "reverse_penalty": 1000, "forward_penalty": 1000, "upper_bound": 1000.0, "lower_bound": -1000.0, "direction": "=", "maxforflux": 1000.0, "maxrevflux": 1000.0, "reaction_ref": "kbase/default/reactions/id/rxn00000", "templateReactionReagents": [{"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/nh4_c"}, {"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/nh4_e"}], "templatecompartment_ref": "~/compartments/id/", "templatecomplex_refs": [], "type": "conditional"}, {"id": "O2t_c", "name": "O2 transport diffusion ", "GapfillDirection": "=", "base_cost": 1000, "reverse_penalty": 1000, "forward_penalty": 1000, "upper_bound": 1000.0, "lower_bound": -1000.0, "direction": "=", "maxforflux": 1000.0, "maxrevflux": 1000.0, "reaction_ref": "kbase/default/reactions/id/rxn00000", "templateReactionReagents": [{"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/o2_c"}, {"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/o2_e"}], "templatecompartment_ref": "~/compartments/id/", "templatecomplex_refs": [], "type": "conditional"}, {"id": "PDH_c", "name": "Pyruvate dehydrogenase", "GapfillDirection": "=", "base_cost": 1000, "reverse_penalty": 1000, "forward_penalty": 1000, "upper_bound": 1000.0, "lower_bound": 0.0, "direction": ">", "maxforflux": 1000.0, "maxrevflux": 0.0, "reaction_ref": "kbase/default/reactions/id/rxn00000", "templateReactionReagents": [{"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/accoa_c"}, {"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/co2_c"}, {"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/coa_c"}, {"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/nad_c"}, {"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/nadh_c"}, {"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/pyr_c"}], "templatecompartment_ref": "~/compartments/id/", "templatecomplex_refs": [], "type": "conditional"}], "biomasses": [], "pathways": [], "subsystems": []} \ No newline at end of file From fca9f002dae9898257cecc7647147db964ee6a6b Mon Sep 17 00:00:00 2001 From: Filipe Liu Date: Wed, 20 Jul 2022 06:10:59 -0500 Subject: [PATCH 6/8] tests --- .gitignore | 1 + modelseedpy/core/msatpcorrection.py | 32 ++-- tests/core/test_msatpcorreption.py | 153 ++++++++++++++++-- tests/core/test_msgapfill.py | 2 +- .../test_data/template_genome_scale_bigg.json | 1 + 5 files changed, 163 insertions(+), 26 deletions(-) create mode 100644 tests/test_data/template_genome_scale_bigg.json diff --git a/.gitignore b/.gitignore index c52318cf..6390162b 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ .DS_Store +@eaDir # Byte-compiled / optimized / DLL files __pycache__/ diff --git a/modelseedpy/core/msatpcorrection.py b/modelseedpy/core/msatpcorrection.py index 5a84cfb7..4a4b22d0 100755 --- a/modelseedpy/core/msatpcorrection.py +++ b/modelseedpy/core/msatpcorrection.py @@ -19,7 +19,7 @@ class MSATPCorrection: DEBUG = False - def __init__(self, model, core_template, atp_medias, compartment="c0", + def __init__(self, model, core_template, atp_medias: list, compartment="c0", max_gapfilling=None, gapfilling_delta=0, atp_hydrolysis_id=None): """ @@ -45,8 +45,8 @@ def __init__(self, model, core_template, atp_medias, compartment="c0", self.atp_hydrolysis = output["reaction"] self.atp_medias = [] for media in atp_medias: - if isinstance(media,MSMedia): - self.atp_medias.append([media,0.01]) + if isinstance(media, MSMedia): + self.atp_medias.append([media, 0.01]) else: self.atp_medias.append(media) self.max_gapfilling = max_gapfilling @@ -163,12 +163,11 @@ def evaluate_growth_media(self): with self.model: self.model.objective = self.atp_hydrolysis.id #self.model.objective = self.model.problem.Objective(Zero,direction="max") - #self.atp_hydrolysis.update_variable_bounds() + logger.debug(f'ATP bounds: ({self.atp_hydrolysis.lower_bound}, {self.atp_hydrolysis.upper_bound})') #self.model.objective.set_linear_coefficients({self.atp_hydrolysis.forward_variable:1}) pkgmgr = MSPackageManager.get_pkg_mgr(self.model) - for media_tuple in self.atp_medias: - media = media_tuple[0] + for media, minimum_obj in self.atp_medias: logger.debug('evaluate media %s', media) pkgmgr.getpkg("KBaseMediaPkg").build_package(media) logger.debug('model.medium %s', self.model.medium) @@ -176,12 +175,14 @@ def evaluate_growth_media(self): logger.debug('evaluate media %s - %f (%s)', media.id, solution.objective_value, solution.status) self.media_gapfill_stats[media] = None output[media.id] = solution.objective_value - if solution.objective_value < media_tuple[1] or solution.status != 'optimal': - self.media_gapfill_stats[media] = self.msgapfill.run_gapfilling(media, self.atp_hydrolysis.id,media_tuple[1]) + if solution.objective_value < minimum_obj or solution.status != 'optimal': + self.media_gapfill_stats[media] = self.msgapfill.run_gapfilling(media, + self.atp_hydrolysis.id, + minimum_obj) #IF gapfilling fails - need to activate and penalize the noncore and try again - elif solution.objective_value >= media_tuple[1]: + elif solution.objective_value >= minimum_obj: self.media_gapfill_stats[media] = {'reversed': {}, 'new': {}} - logger.debug('gapfilling stats:',json.dumps(self.media_gapfill_stats[media],indent=2)) + logger.debug('gapfilling stats: %s', json.dumps(self.media_gapfill_stats[media], indent=2)) if MSATPCorrection.DEBUG: with open('debug.json', 'w') as outfile: @@ -335,10 +336,13 @@ def run_atp_correction(self): self.evaluate_growth_media() self.determine_growth_media() self.apply_growth_media_gapfilling() + self.evaluate_growth_media() self.expand_model_to_genome_scale() + return self.build_tests() @staticmethod - def atp_correction(model,coretemplate,atp_medias = None,atp_objective = "bio2",max_gapfilling = None,gapfilling_delta = 0): - msatpobj = MSATPCorrection(model,coretemplate,atp_medias,atp_objective,max_gapfilling,gapfilling_delta) - msatpobj.run_atp_correction() - return msatpobj + def atp_correction(model, core_template, atp_medias=None, atp_objective="bio2", + max_gapfilling=None, gapfilling_delta=0): + atp_correction = MSATPCorrection(model, core_template, atp_medias, atp_hydrolysis_id=atp_objective, + max_gapfilling=max_gapfilling, gapfilling_delta=gapfilling_delta) + return atp_correction.run_atp_correction() diff --git a/tests/core/test_msatpcorreption.py b/tests/core/test_msatpcorreption.py index 623c4cb6..ff315ae6 100644 --- a/tests/core/test_msatpcorreption.py +++ b/tests/core/test_msatpcorreption.py @@ -11,10 +11,16 @@ def template(): return MSTemplateBuilder.from_dict(json.load(fh)).build() +@pytest.fixture +def template_genome_scale(): + with open('./tests/test_data/template_genome_scale_bigg.json', 'r') as fh: + return MSTemplateBuilder.from_dict(json.load(fh)).build() + + @pytest.fixture def get_model(): - def _method(ko=None): + def _method(ko=None, added_compounds=None, added_reactions=None): if ko is None: ko = [] with open('./tests/test_data/e_coli_core.json', 'r') as fh: @@ -36,6 +42,13 @@ def _method(ko=None): r['id'] += '_' + 'c0' # hack cause there is only combo between e0 and c0 model_json['reactions'] = [x for x in model_json['reactions'] if x['id'] not in ko] + + if added_compounds: + for o in added_compounds: + model_json['metabolites'].append(o) + if added_reactions: + for o in added_reactions: + model_json['reactions'].append(o) model = cobra.io.from_json(json.dumps(model_json)) model.reactions.ATPM_c0.lower_bound = 0 model.reactions.ATPM_c0.upper_bound = 1000 @@ -68,25 +81,143 @@ def media_acetate_aerobic(): return media +@pytest.fixture +def media_genome_scale_glucose_aerobic(): + media = MSMedia.from_dict({ + 'glc__D': (-10, 1000), + 'o2': (-1000, 1000), + 'h': (-1000, 1000), + 'h2o': (-1000, 1000), + 'pi': (-1000, 1000), + 'co2': (-1000, 1000), + 'nh4': (-1000, 1000), + 'k': (-1000, 1000), + }) + return media + + @pytest.fixture def media_all_aerobic(media_glucose_aerobic, media_acetate_aerobic): return [media_glucose_aerobic, media_acetate_aerobic] +@pytest.fixture +def get_model_with_infinite_atp_loop(get_model, template_genome_scale): + + def _method(ko=None): + added_compounds = [{ + 'id': 'k_c0', + 'name': 'K [c]', + 'compartment': 'c0', + 'charge': 1, + 'formula': 'K', + 'notes': {}, + 'annotation': {'sbo': 'SBO:0000247'} + }, { + 'id': 'k_e0', + 'name': 'K [e]', + 'compartment': 'e0', + 'charge': 1, + 'formula': 'K', + 'notes': {}, + 'annotation': {'sbo': 'SBO:0000247'} + }] + added_reactions = [{ + 'id': 'EX_k_e0', + 'name': 'K exchange', + 'metabolites': {'k_e0': -1.0}, + 'lower_bound': -1000, + 'upper_bound': 1000.0, + 'gene_reaction_rule': '', + 'subsystem': 'Extracellular exchange', + 'notes': {}, + 'annotation': {} + }] + model = get_model(ko, added_compounds, added_reactions) + model.reactions.get_by_id('BIOMASS_Ecoli_core_w_GAM_c0').add_metabolites({ + model.metabolites.get_by_id('k_c0'): 0.01 + }) + model.add_reactions([template_genome_scale.reactions.Kt2r_c.to_reaction(model)]) + model.add_reactions([template_genome_scale.reactions.Ktex_c.to_reaction(model)]) + model.medium = { + 'EX_co2_e0': 1000.0, + 'EX_glc__D_e0': 10.0, + 'EX_h_e0': 1000.0, + 'EX_h2o_e0': 1000.0, + 'EX_nh4_e0': 1000.0, + 'EX_o2_e0': 1000.0, + 'EX_pi_e0': 1000.0, + 'EX_k_e0': 1000.0 + } + + return model + + return _method + + +def test_infinite_atp_model_growth_boost(get_model_with_infinite_atp_loop, template, template_genome_scale, media_glucose_aerobic): + model = get_model_with_infinite_atp_loop() + solution = model.optimize() + assert solution.objective_value > 1.2 # should be around 1.316 + assert solution.status == 'optimal' + + def test_ms_atp_correction1(get_model, template, media_all_aerobic): - model = get_model(["GLCpts_c0", "NADH16_c0", "GLCpts_c0", "O2t_c0"]) + model = get_model(["GLCpts_c0", "NADH16_c0", "CYTBD_c0", "O2t_c0"]) atp_correction = MSATPCorrection(model, template, media_all_aerobic, atp_hydrolysis_id='ATPM_c0') atp_correction.evaluate_growth_media() - print('non_core_reactions', len(atp_correction.noncore_reactions), - 'other_compartments', len(atp_correction.other_compartments), - 'original_bounds', len(atp_correction.original_bounds)) - for media in atp_correction.media_gapfill_stats: - print(media, atp_correction.media_gapfill_stats[media]) + assert len(atp_correction.noncore_reactions) == 1 # the biomass + assert len(atp_correction.other_compartments) == 0 # none + assert len(atp_correction.original_bounds) == 70 # 70 reactions + + """ + glc/o2 {'reversed': {}, 'new': {'GLCpts_c0': '>'}} + ac/o2 {'reversed': {}, 'new': {'CYTBD_c0': '>', 'NADH16_c0': '>', 'O2t_c0': '>'}} + """ atp_correction.determine_growth_media() - print(atp_correction.selected_media) + + assert len(atp_correction.selected_media) == 1 # selects glucose + + atp_correction.apply_growth_media_gapfilling() + media_eval = atp_correction.evaluate_growth_media() - print(media_eval) + atp_correction.expand_model_to_genome_scale() tests = atp_correction.build_tests() - print(tests) - assert True + + assert tests + assert len(tests) == 1 + assert tests[0]['threshold'] > 0 + assert tests[0]['objective'] == 'ATPM_c0' + + +def test_ms_atp_correction_and_gap_fill1(get_model_with_infinite_atp_loop, template, template_genome_scale, + media_glucose_aerobic, media_genome_scale_glucose_aerobic): + from modelseedpy import MSGapfill + + model = get_model_with_infinite_atp_loop(['GLCpts_c0', 'GLUSy_c0', 'GLUDy_c0']) + model.reactions.ATPM_c0.lower_bound = 0 + model.reactions.ATPM_c0.upper_bound = 1000 + + atp_correction = MSATPCorrection(model, template, [media_glucose_aerobic], atp_hydrolysis_id='ATPM_c0') + tests = atp_correction.run_atp_correction() + + # expected tests = [{'media': MSMedia object, 'is_max_threshold': True, 'threshold': 21.0, 'objective': 'ATPM_c0'}] + + assert tests + assert len(tests) == 1 + assert tests[0]['threshold'] > 0 + assert tests[0]['objective'] == 'ATPM_c0' + + gap_fill = MSGapfill(model, [template_genome_scale], [], tests, {}, []) + result = gap_fill.run_gapfilling(media_genome_scale_glucose_aerobic, 'BIOMASS_Ecoli_core_w_GAM_c0', minimum_obj=0.1) + + # either GLUSy_c0 or GLUDy_c0 should be gap filled for glutamate + + assert result + assert len(result['new']) == 1 + assert 'GLUSy_c0' in result['new'] or 'GLUDy_c0' in result['new'] + + model = gap_fill.integrate_gapfill_solution(result) + + assert model diff --git a/tests/core/test_msgapfill.py b/tests/core/test_msgapfill.py index 7726f9e5..27e572f3 100644 --- a/tests/core/test_msgapfill.py +++ b/tests/core/test_msgapfill.py @@ -70,7 +70,7 @@ def test_ms_gap_fill1(template, get_model, media_glucose_aerobic): """ Test gap filling with glucose aerobic requesting minimal growth value """ - model = get_model(["GLCpts_c0", "NADH16_c0", "GLCpts_c0", "O2t_c0"]) + model = get_model(["CYTBD_c0", "NADH16_c0", "GLCpts_c0", "O2t_c0"]) gap_fill = MSGapfill(model, [template]) result = gap_fill.run_gapfilling(media_glucose_aerobic, 'BIOMASS_Ecoli_core_w_GAM_c0', minimum_obj=0.1) assert result diff --git a/tests/test_data/template_genome_scale_bigg.json b/tests/test_data/template_genome_scale_bigg.json new file mode 100644 index 00000000..938817a7 --- /dev/null +++ b/tests/test_data/template_genome_scale_bigg.json @@ -0,0 +1 @@ +{"__VERSION__": 1, "id": "template_genome_scale", "name": "", "domain": "", "biochemistry_ref": "", "type": "Test", "compartments": [], "compcompounds": [{"charge": 0, "id": "glc__D_e", "maxuptake": 0, "templatecompartment_ref": "~/compartments/id/e", "templatecompound_ref": "~/compounds/id/glc__D"}, {"charge": 0, "id": "gln__L_c", "maxuptake": 0, "templatecompartment_ref": "~/compartments/id/c", "templatecompound_ref": "~/compounds/id/gln__L"}, {"charge": 0, "id": "gln__L_e", "maxuptake": 0, "templatecompartment_ref": "~/compartments/id/e", "templatecompound_ref": "~/compounds/id/gln__L"}, {"charge": -1, "id": "glu__L_c", "maxuptake": 0, "templatecompartment_ref": "~/compartments/id/c", "templatecompound_ref": "~/compounds/id/glu__L"}, {"charge": -1, "id": "glu__L_e", "maxuptake": 0, "templatecompartment_ref": "~/compartments/id/e", "templatecompound_ref": "~/compounds/id/glu__L"}, {"charge": -1, "id": "glx_c", "maxuptake": 0, "templatecompartment_ref": "~/compartments/id/c", "templatecompound_ref": "~/compounds/id/glx"}, {"charge": 0, "id": "h2o_c", "maxuptake": 0, "templatecompartment_ref": "~/compartments/id/c", "templatecompound_ref": "~/compounds/id/h2o"}, {"charge": 0, "id": "h2o_e", "maxuptake": 0, "templatecompartment_ref": "~/compartments/id/e", "templatecompound_ref": "~/compounds/id/h2o"}, {"charge": 1, "id": "h_c", "maxuptake": 0, "templatecompartment_ref": "~/compartments/id/c", "templatecompound_ref": "~/compounds/id/h"}, {"charge": 1, "id": "h_e", "maxuptake": 0, "templatecompartment_ref": "~/compartments/id/e", "templatecompound_ref": "~/compounds/id/h"}, {"charge": -3, "id": "icit_c", "maxuptake": 0, "templatecompartment_ref": "~/compartments/id/c", "templatecompound_ref": "~/compounds/id/icit"}, {"charge": -1, "id": "lac__D_c", "maxuptake": 0, "templatecompartment_ref": "~/compartments/id/c", "templatecompound_ref": "~/compounds/id/lac__D"}, {"charge": -1, "id": "lac__D_e", "maxuptake": 0, "templatecompartment_ref": "~/compartments/id/e", "templatecompound_ref": "~/compounds/id/lac__D"}, {"charge": -2, "id": "mal__L_c", "maxuptake": 0, "templatecompartment_ref": "~/compartments/id/c", "templatecompound_ref": "~/compounds/id/mal__L"}, {"charge": -2, "id": "mal__L_e", "maxuptake": 0, "templatecompartment_ref": "~/compartments/id/e", "templatecompound_ref": "~/compounds/id/mal__L"}, {"charge": -1, "id": "nad_c", "maxuptake": 0, "templatecompartment_ref": "~/compartments/id/c", "templatecompound_ref": "~/compounds/id/nad"}, {"charge": -2, "id": "nadh_c", "maxuptake": 0, "templatecompartment_ref": "~/compartments/id/c", "templatecompound_ref": "~/compounds/id/nadh"}, {"charge": -3, "id": "nadp_c", "maxuptake": 0, "templatecompartment_ref": "~/compartments/id/c", "templatecompound_ref": "~/compounds/id/nadp"}, {"charge": -4, "id": "nadph_c", "maxuptake": 0, "templatecompartment_ref": "~/compartments/id/c", "templatecompound_ref": "~/compounds/id/nadph"}, {"charge": 1, "id": "nh4_c", "maxuptake": 0, "templatecompartment_ref": "~/compartments/id/c", "templatecompound_ref": "~/compounds/id/nh4"}, {"charge": 1, "id": "nh4_e", "maxuptake": 0, "templatecompartment_ref": "~/compartments/id/e", "templatecompound_ref": "~/compounds/id/nh4"}, {"charge": -4, "id": "13dpg_c", "maxuptake": 0, "templatecompartment_ref": "~/compartments/id/c", "templatecompound_ref": "~/compounds/id/13dpg"}, {"charge": 0, "id": "o2_c", "maxuptake": 0, "templatecompartment_ref": "~/compartments/id/c", "templatecompound_ref": "~/compounds/id/o2"}, {"charge": 0, "id": "o2_e", "maxuptake": 0, "templatecompartment_ref": "~/compartments/id/e", "templatecompound_ref": "~/compounds/id/o2"}, {"charge": -3, "id": "2pg_c", "maxuptake": 0, "templatecompartment_ref": "~/compartments/id/c", "templatecompound_ref": "~/compounds/id/2pg"}, {"charge": -3, "id": "3pg_c", "maxuptake": 0, "templatecompartment_ref": "~/compartments/id/c", "templatecompound_ref": "~/compounds/id/3pg"}, {"charge": -2, "id": "oaa_c", "maxuptake": 0, "templatecompartment_ref": "~/compartments/id/c", "templatecompound_ref": "~/compounds/id/oaa"}, {"charge": -3, "id": "pep_c", "maxuptake": 0, "templatecompartment_ref": "~/compartments/id/c", "templatecompound_ref": "~/compounds/id/pep"}, {"charge": -3, "id": "6pgc_c", "maxuptake": 0, "templatecompartment_ref": "~/compartments/id/c", "templatecompound_ref": "~/compounds/id/6pgc"}, {"charge": -2, "id": "pi_c", "maxuptake": 0, "templatecompartment_ref": "~/compartments/id/c", "templatecompound_ref": "~/compounds/id/pi"}, {"charge": -2, "id": "pi_e", "maxuptake": 0, "templatecompartment_ref": "~/compartments/id/e", "templatecompound_ref": "~/compounds/id/pi"}, {"charge": -2, "id": "6pgl_c", "maxuptake": 0, "templatecompartment_ref": "~/compartments/id/c", "templatecompound_ref": "~/compounds/id/6pgl"}, {"charge": -1, "id": "ac_c", "maxuptake": 0, "templatecompartment_ref": "~/compartments/id/c", "templatecompound_ref": "~/compounds/id/ac"}, {"charge": -1, "id": "ac_e", "maxuptake": 0, "templatecompartment_ref": "~/compartments/id/e", "templatecompound_ref": "~/compounds/id/ac"}, {"charge": -1, "id": "pyr_c", "maxuptake": 0, "templatecompartment_ref": "~/compartments/id/c", "templatecompound_ref": "~/compounds/id/pyr"}, {"charge": -1, "id": "pyr_e", "maxuptake": 0, "templatecompartment_ref": "~/compartments/id/e", "templatecompound_ref": "~/compounds/id/pyr"}, {"charge": 0, "id": "q8_c", "maxuptake": 0, "templatecompartment_ref": "~/compartments/id/c", "templatecompound_ref": "~/compounds/id/q8"}, {"charge": 0, "id": "q8h2_c", "maxuptake": 0, "templatecompartment_ref": "~/compartments/id/c", "templatecompound_ref": "~/compounds/id/q8h2"}, {"charge": -2, "id": "r5p_c", "maxuptake": 0, "templatecompartment_ref": "~/compartments/id/c", "templatecompound_ref": "~/compounds/id/r5p"}, {"charge": -2, "id": "ru5p__D_c", "maxuptake": 0, "templatecompartment_ref": "~/compartments/id/c", "templatecompound_ref": "~/compounds/id/ru5p__D"}, {"charge": 0, "id": "acald_c", "maxuptake": 0, "templatecompartment_ref": "~/compartments/id/c", "templatecompound_ref": "~/compounds/id/acald"}, {"charge": 0, "id": "acald_e", "maxuptake": 0, "templatecompartment_ref": "~/compartments/id/e", "templatecompound_ref": "~/compounds/id/acald"}, {"charge": -2, "id": "s7p_c", "maxuptake": 0, "templatecompartment_ref": "~/compartments/id/c", "templatecompound_ref": "~/compounds/id/s7p"}, {"charge": -4, "id": "accoa_c", "maxuptake": 0, "templatecompartment_ref": "~/compartments/id/c", "templatecompound_ref": "~/compounds/id/accoa"}, {"charge": -2, "id": "succ_c", "maxuptake": 0, "templatecompartment_ref": "~/compartments/id/c", "templatecompound_ref": "~/compounds/id/succ"}, {"charge": -2, "id": "succ_e", "maxuptake": 0, "templatecompartment_ref": "~/compartments/id/e", "templatecompound_ref": "~/compounds/id/succ"}, {"charge": -5, "id": "succoa_c", "maxuptake": 0, "templatecompartment_ref": "~/compartments/id/c", "templatecompound_ref": "~/compounds/id/succoa"}, {"charge": -3, "id": "acon_C_c", "maxuptake": 0, "templatecompartment_ref": "~/compartments/id/c", "templatecompound_ref": "~/compounds/id/acon_C"}, {"charge": -2, "id": "xu5p__D_c", "maxuptake": 0, "templatecompartment_ref": "~/compartments/id/c", "templatecompound_ref": "~/compounds/id/xu5p__D"}, {"charge": -2, "id": "actp_c", "maxuptake": 0, "templatecompartment_ref": "~/compartments/id/c", "templatecompound_ref": "~/compounds/id/actp"}, {"charge": -3, "id": "adp_c", "maxuptake": 0, "templatecompartment_ref": "~/compartments/id/c", "templatecompound_ref": "~/compounds/id/adp"}, {"charge": -2, "id": "akg_c", "maxuptake": 0, "templatecompartment_ref": "~/compartments/id/c", "templatecompound_ref": "~/compounds/id/akg"}, {"charge": -2, "id": "akg_e", "maxuptake": 0, "templatecompartment_ref": "~/compartments/id/e", "templatecompound_ref": "~/compounds/id/akg"}, {"charge": -2, "id": "amp_c", "maxuptake": 0, "templatecompartment_ref": "~/compartments/id/c", "templatecompound_ref": "~/compounds/id/amp"}, {"charge": -4, "id": "atp_c", "maxuptake": 0, "templatecompartment_ref": "~/compartments/id/c", "templatecompound_ref": "~/compounds/id/atp"}, {"charge": -3, "id": "cit_c", "maxuptake": 0, "templatecompartment_ref": "~/compartments/id/c", "templatecompound_ref": "~/compounds/id/cit"}, {"charge": 0, "id": "co2_c", "maxuptake": 0, "templatecompartment_ref": "~/compartments/id/c", "templatecompound_ref": "~/compounds/id/co2"}, {"charge": 0, "id": "co2_e", "maxuptake": 0, "templatecompartment_ref": "~/compartments/id/e", "templatecompound_ref": "~/compounds/id/co2"}, {"charge": -4, "id": "coa_c", "maxuptake": 0, "templatecompartment_ref": "~/compartments/id/c", "templatecompound_ref": "~/compounds/id/coa"}, {"charge": -2, "id": "dhap_c", "maxuptake": 0, "templatecompartment_ref": "~/compartments/id/c", "templatecompound_ref": "~/compounds/id/dhap"}, {"charge": -2, "id": "e4p_c", "maxuptake": 0, "templatecompartment_ref": "~/compartments/id/c", "templatecompound_ref": "~/compounds/id/e4p"}, {"charge": 0, "id": "etoh_c", "maxuptake": 0, "templatecompartment_ref": "~/compartments/id/c", "templatecompound_ref": "~/compounds/id/etoh"}, {"charge": 0, "id": "etoh_e", "maxuptake": 0, "templatecompartment_ref": "~/compartments/id/e", "templatecompound_ref": "~/compounds/id/etoh"}, {"charge": -2, "id": "f6p_c", "maxuptake": 0, "templatecompartment_ref": "~/compartments/id/c", "templatecompound_ref": "~/compounds/id/f6p"}, {"charge": -4, "id": "fdp_c", "maxuptake": 0, "templatecompartment_ref": "~/compartments/id/c", "templatecompound_ref": "~/compounds/id/fdp"}, {"charge": -1, "id": "for_c", "maxuptake": 0, "templatecompartment_ref": "~/compartments/id/c", "templatecompound_ref": "~/compounds/id/for"}, {"charge": -1, "id": "for_e", "maxuptake": 0, "templatecompartment_ref": "~/compartments/id/e", "templatecompound_ref": "~/compounds/id/for"}, {"charge": 0, "id": "fru_e", "maxuptake": 0, "templatecompartment_ref": "~/compartments/id/e", "templatecompound_ref": "~/compounds/id/fru"}, {"charge": -2, "id": "fum_c", "maxuptake": 0, "templatecompartment_ref": "~/compartments/id/c", "templatecompound_ref": "~/compounds/id/fum"}, {"charge": -2, "id": "fum_e", "maxuptake": 0, "templatecompartment_ref": "~/compartments/id/e", "templatecompound_ref": "~/compounds/id/fum"}, {"charge": -2, "id": "g3p_c", "maxuptake": 0, "templatecompartment_ref": "~/compartments/id/c", "templatecompound_ref": "~/compounds/id/g3p"}, {"charge": -2, "id": "g6p_c", "maxuptake": 0, "templatecompartment_ref": "~/compartments/id/c", "templatecompound_ref": "~/compounds/id/g6p"}, {"charge": 1, "id": "k_e", "maxuptake": 0, "templatecompartment_ref": "~/compartments/id/e", "templatecompound_ref": "~/compounds/id/k"}, {"charge": 1, "id": "k_c", "maxuptake": 0, "templatecompartment_ref": "~/compartments/id/c", "templatecompound_ref": "~/compounds/id/k"}], "compounds": [{"id": "glc__D", "name": "D-Glucose", "abbreviation": "", "aliases": [], "defaultCharge": 0, "deltaG": 10000000, "deltaGErr": 10000000, "formula": "C6H12O6", "isCofactor": 0, "mass": 0}, {"id": "gln__L", "name": "L-Glutamine", "abbreviation": "", "aliases": [], "defaultCharge": 0, "deltaG": 10000000, "deltaGErr": 10000000, "formula": "C5H10N2O3", "isCofactor": 0, "mass": 0}, {"id": "glu__L", "name": "L-Glutamate", "abbreviation": "", "aliases": [], "defaultCharge": 0, "deltaG": 10000000, "deltaGErr": 10000000, "formula": "C5H8NO4", "isCofactor": 0, "mass": 0}, {"id": "glx", "name": "Glyoxylate", "abbreviation": "", "aliases": [], "defaultCharge": 0, "deltaG": 10000000, "deltaGErr": 10000000, "formula": "C2H1O3", "isCofactor": 0, "mass": 0}, {"id": "h2o", "name": "H2O H2O", "abbreviation": "", "aliases": [], "defaultCharge": 0, "deltaG": 10000000, "deltaGErr": 10000000, "formula": "H2O", "isCofactor": 0, "mass": 0}, {"id": "h", "name": "H+", "abbreviation": "", "aliases": [], "defaultCharge": 0, "deltaG": 10000000, "deltaGErr": 10000000, "formula": "H", "isCofactor": 0, "mass": 0}, {"id": "icit", "name": "Isocitrate", "abbreviation": "", "aliases": [], "defaultCharge": 0, "deltaG": 10000000, "deltaGErr": 10000000, "formula": "C6H5O7", "isCofactor": 0, "mass": 0}, {"id": "lac__D", "name": "D-Lactate", "abbreviation": "", "aliases": [], "defaultCharge": 0, "deltaG": 10000000, "deltaGErr": 10000000, "formula": "C3H5O3", "isCofactor": 0, "mass": 0}, {"id": "mal__L", "name": "L-Malate", "abbreviation": "", "aliases": [], "defaultCharge": 0, "deltaG": 10000000, "deltaGErr": 10000000, "formula": "C4H4O5", "isCofactor": 0, "mass": 0}, {"id": "nad", "name": "Nicotinamide adenine dinucleotide", "abbreviation": "", "aliases": [], "defaultCharge": 0, "deltaG": 10000000, "deltaGErr": 10000000, "formula": "C21H26N7O14P2", "isCofactor": 0, "mass": 0}, {"id": "nadh", "name": "Nicotinamide adenine dinucleotide - reduced", "abbreviation": "", "aliases": [], "defaultCharge": 0, "deltaG": 10000000, "deltaGErr": 10000000, "formula": "C21H27N7O14P2", "isCofactor": 0, "mass": 0}, {"id": "nadp", "name": "Nicotinamide adenine dinucleotide phosphate", "abbreviation": "", "aliases": [], "defaultCharge": 0, "deltaG": 10000000, "deltaGErr": 10000000, "formula": "C21H25N7O17P3", "isCofactor": 0, "mass": 0}, {"id": "nadph", "name": "Nicotinamide adenine dinucleotide phosphate - reduced", "abbreviation": "", "aliases": [], "defaultCharge": 0, "deltaG": 10000000, "deltaGErr": 10000000, "formula": "C21H26N7O17P3", "isCofactor": 0, "mass": 0}, {"id": "nh4", "name": "Ammonium", "abbreviation": "", "aliases": [], "defaultCharge": 0, "deltaG": 10000000, "deltaGErr": 10000000, "formula": "H4N", "isCofactor": 0, "mass": 0}, {"id": "13dpg", "name": "3-Phospho-D-glyceroyl phosphate", "abbreviation": "", "aliases": [], "defaultCharge": 0, "deltaG": 10000000, "deltaGErr": 10000000, "formula": "C3H4O10P2", "isCofactor": 0, "mass": 0}, {"id": "o2", "name": "O2 O2", "abbreviation": "", "aliases": [], "defaultCharge": 0, "deltaG": 10000000, "deltaGErr": 10000000, "formula": "O2", "isCofactor": 0, "mass": 0}, {"id": "2pg", "name": "D-Glycerate 2-phosphate", "abbreviation": "", "aliases": [], "defaultCharge": 0, "deltaG": 10000000, "deltaGErr": 10000000, "formula": "C3H4O7P", "isCofactor": 0, "mass": 0}, {"id": "3pg", "name": "3-Phospho-D-glycerate", "abbreviation": "", "aliases": [], "defaultCharge": 0, "deltaG": 10000000, "deltaGErr": 10000000, "formula": "C3H4O7P", "isCofactor": 0, "mass": 0}, {"id": "oaa", "name": "Oxaloacetate", "abbreviation": "", "aliases": [], "defaultCharge": 0, "deltaG": 10000000, "deltaGErr": 10000000, "formula": "C4H2O5", "isCofactor": 0, "mass": 0}, {"id": "pep", "name": "Phosphoenolpyruvate", "abbreviation": "", "aliases": [], "defaultCharge": 0, "deltaG": 10000000, "deltaGErr": 10000000, "formula": "C3H2O6P", "isCofactor": 0, "mass": 0}, {"id": "6pgc", "name": "6-Phospho-D-gluconate", "abbreviation": "", "aliases": [], "defaultCharge": 0, "deltaG": 10000000, "deltaGErr": 10000000, "formula": "C6H10O10P", "isCofactor": 0, "mass": 0}, {"id": "pi", "name": "Phosphate", "abbreviation": "", "aliases": [], "defaultCharge": 0, "deltaG": 10000000, "deltaGErr": 10000000, "formula": "HO4P", "isCofactor": 0, "mass": 0}, {"id": "6pgl", "name": "6-phospho-D-glucono-1,5-lactone", "abbreviation": "", "aliases": [], "defaultCharge": 0, "deltaG": 10000000, "deltaGErr": 10000000, "formula": "C6H9O9P", "isCofactor": 0, "mass": 0}, {"id": "ac", "name": "Acetate", "abbreviation": "", "aliases": [], "defaultCharge": 0, "deltaG": 10000000, "deltaGErr": 10000000, "formula": "C2H3O2", "isCofactor": 0, "mass": 0}, {"id": "pyr", "name": "Pyruvate", "abbreviation": "", "aliases": [], "defaultCharge": 0, "deltaG": 10000000, "deltaGErr": 10000000, "formula": "C3H3O3", "isCofactor": 0, "mass": 0}, {"id": "q8", "name": "Ubiquinone-8", "abbreviation": "", "aliases": [], "defaultCharge": 0, "deltaG": 10000000, "deltaGErr": 10000000, "formula": "C49H74O4", "isCofactor": 0, "mass": 0}, {"id": "q8h2", "name": "Ubiquinol-8", "abbreviation": "", "aliases": [], "defaultCharge": 0, "deltaG": 10000000, "deltaGErr": 10000000, "formula": "C49H76O4", "isCofactor": 0, "mass": 0}, {"id": "r5p", "name": "Alpha-D-Ribose 5-phosphate", "abbreviation": "", "aliases": [], "defaultCharge": 0, "deltaG": 10000000, "deltaGErr": 10000000, "formula": "C5H9O8P", "isCofactor": 0, "mass": 0}, {"id": "ru5p__D", "name": "D-Ribulose 5-phosphate", "abbreviation": "", "aliases": [], "defaultCharge": 0, "deltaG": 10000000, "deltaGErr": 10000000, "formula": "C5H9O8P", "isCofactor": 0, "mass": 0}, {"id": "acald", "name": "Acetaldehyde", "abbreviation": "", "aliases": [], "defaultCharge": 0, "deltaG": 10000000, "deltaGErr": 10000000, "formula": "C2H4O", "isCofactor": 0, "mass": 0}, {"id": "s7p", "name": "Sedoheptulose 7-phosphate", "abbreviation": "", "aliases": [], "defaultCharge": 0, "deltaG": 10000000, "deltaGErr": 10000000, "formula": "C7H13O10P", "isCofactor": 0, "mass": 0}, {"id": "accoa", "name": "Acetyl-CoA", "abbreviation": "", "aliases": [], "defaultCharge": 0, "deltaG": 10000000, "deltaGErr": 10000000, "formula": "C23H34N7O17P3S", "isCofactor": 0, "mass": 0}, {"id": "succ", "name": "Succinate", "abbreviation": "", "aliases": [], "defaultCharge": 0, "deltaG": 10000000, "deltaGErr": 10000000, "formula": "C4H4O4", "isCofactor": 0, "mass": 0}, {"id": "succoa", "name": "Succinyl-CoA", "abbreviation": "", "aliases": [], "defaultCharge": 0, "deltaG": 10000000, "deltaGErr": 10000000, "formula": "C25H35N7O19P3S", "isCofactor": 0, "mass": 0}, {"id": "acon_C", "name": "Cis-Aconitate", "abbreviation": "", "aliases": [], "defaultCharge": 0, "deltaG": 10000000, "deltaGErr": 10000000, "formula": "C6H3O6", "isCofactor": 0, "mass": 0}, {"id": "xu5p__D", "name": "D-Xylulose 5-phosphate", "abbreviation": "", "aliases": [], "defaultCharge": 0, "deltaG": 10000000, "deltaGErr": 10000000, "formula": "C5H9O8P", "isCofactor": 0, "mass": 0}, {"id": "actp", "name": "Acetyl phosphate", "abbreviation": "", "aliases": [], "defaultCharge": 0, "deltaG": 10000000, "deltaGErr": 10000000, "formula": "C2H3O5P", "isCofactor": 0, "mass": 0}, {"id": "adp", "name": "ADP C10H12N5O10P2", "abbreviation": "", "aliases": [], "defaultCharge": 0, "deltaG": 10000000, "deltaGErr": 10000000, "formula": "C10H12N5O10P2", "isCofactor": 0, "mass": 0}, {"id": "akg", "name": "2-Oxoglutarate", "abbreviation": "", "aliases": [], "defaultCharge": 0, "deltaG": 10000000, "deltaGErr": 10000000, "formula": "C5H4O5", "isCofactor": 0, "mass": 0}, {"id": "amp", "name": "AMP C10H12N5O7P", "abbreviation": "", "aliases": [], "defaultCharge": 0, "deltaG": 10000000, "deltaGErr": 10000000, "formula": "C10H12N5O7P", "isCofactor": 0, "mass": 0}, {"id": "atp", "name": "ATP C10H12N5O13P3", "abbreviation": "", "aliases": [], "defaultCharge": 0, "deltaG": 10000000, "deltaGErr": 10000000, "formula": "C10H12N5O13P3", "isCofactor": 0, "mass": 0}, {"id": "cit", "name": "Citrate", "abbreviation": "", "aliases": [], "defaultCharge": 0, "deltaG": 10000000, "deltaGErr": 10000000, "formula": "C6H5O7", "isCofactor": 0, "mass": 0}, {"id": "co2", "name": "CO2 CO2", "abbreviation": "", "aliases": [], "defaultCharge": 0, "deltaG": 10000000, "deltaGErr": 10000000, "formula": "CO2", "isCofactor": 0, "mass": 0}, {"id": "coa", "name": "Coenzyme A", "abbreviation": "", "aliases": [], "defaultCharge": 0, "deltaG": 10000000, "deltaGErr": 10000000, "formula": "C21H32N7O16P3S", "isCofactor": 0, "mass": 0}, {"id": "dhap", "name": "Dihydroxyacetone phosphate", "abbreviation": "", "aliases": [], "defaultCharge": 0, "deltaG": 10000000, "deltaGErr": 10000000, "formula": "C3H5O6P", "isCofactor": 0, "mass": 0}, {"id": "e4p", "name": "D-Erythrose 4-phosphate", "abbreviation": "", "aliases": [], "defaultCharge": 0, "deltaG": 10000000, "deltaGErr": 10000000, "formula": "C4H7O7P", "isCofactor": 0, "mass": 0}, {"id": "etoh", "name": "Ethanol", "abbreviation": "", "aliases": [], "defaultCharge": 0, "deltaG": 10000000, "deltaGErr": 10000000, "formula": "C2H6O", "isCofactor": 0, "mass": 0}, {"id": "f6p", "name": "D-Fructose 6-phosphate", "abbreviation": "", "aliases": [], "defaultCharge": 0, "deltaG": 10000000, "deltaGErr": 10000000, "formula": "C6H11O9P", "isCofactor": 0, "mass": 0}, {"id": "fdp", "name": "D-Fructose 1,6-bisphosphate", "abbreviation": "", "aliases": [], "defaultCharge": 0, "deltaG": 10000000, "deltaGErr": 10000000, "formula": "C6H10O12P2", "isCofactor": 0, "mass": 0}, {"id": "for", "name": "Formate", "abbreviation": "", "aliases": [], "defaultCharge": 0, "deltaG": 10000000, "deltaGErr": 10000000, "formula": "CH1O2", "isCofactor": 0, "mass": 0}, {"id": "fru", "name": "D-Fructose", "abbreviation": "", "aliases": [], "defaultCharge": 0, "deltaG": 10000000, "deltaGErr": 10000000, "formula": "C6H12O6", "isCofactor": 0, "mass": 0}, {"id": "fum", "name": "Fumarate", "abbreviation": "", "aliases": [], "defaultCharge": 0, "deltaG": 10000000, "deltaGErr": 10000000, "formula": "C4H2O4", "isCofactor": 0, "mass": 0}, {"id": "g3p", "name": "Glyceraldehyde 3-phosphate", "abbreviation": "", "aliases": [], "defaultCharge": 0, "deltaG": 10000000, "deltaGErr": 10000000, "formula": "C3H5O6P", "isCofactor": 0, "mass": 0}, {"id": "g6p", "name": "D-Glucose 6-phosphate", "abbreviation": "", "aliases": [], "defaultCharge": 0, "deltaG": 10000000, "deltaGErr": 10000000, "formula": "C6H11O9P", "isCofactor": 0, "mass": 0}, {"id": "k", "name": "Potassium", "abbreviation": "", "aliases": [], "defaultCharge": 0, "deltaG": 10000000, "deltaGErr": 10000000, "formula": "K", "isCofactor": 0, "mass": 0}], "roles": [], "complexes": [], "reactions": [{"id": "PFK_c", "name": "Phosphofructokinase", "GapfillDirection": "=", "base_cost": 1000, "reverse_penalty": 1000, "forward_penalty": 1000, "upper_bound": 1000.0, "lower_bound": 0.0, "direction": ">", "maxforflux": 1000.0, "maxrevflux": 0.0, "reaction_ref": "kbase/default/reactions/id/rxn00000", "templateReactionReagents": [{"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/adp_c"}, {"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/atp_c"}, {"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/f6p_c"}, {"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/fdp_c"}, {"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/h_c"}], "templatecompartment_ref": "~/compartments/id/c", "templatecomplex_refs": [], "type": "conditional"}, {"id": "PFL_c", "name": "Pyruvate formate lyase", "GapfillDirection": "=", "base_cost": 1000, "reverse_penalty": 1000, "forward_penalty": 1000, "upper_bound": 1000.0, "lower_bound": 0.0, "direction": ">", "maxforflux": 1000.0, "maxrevflux": 0.0, "reaction_ref": "kbase/default/reactions/id/rxn00000", "templateReactionReagents": [{"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/accoa_c"}, {"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/coa_c"}, {"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/for_c"}, {"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/pyr_c"}], "templatecompartment_ref": "~/compartments/id/c", "templatecomplex_refs": [], "type": "conditional"}, {"id": "PGI_c", "name": "Glucose-6-phosphate isomerase", "GapfillDirection": "=", "base_cost": 1000, "reverse_penalty": 1000, "forward_penalty": 1000, "upper_bound": 1000.0, "lower_bound": -1000.0, "direction": "=", "maxforflux": 1000.0, "maxrevflux": 1000.0, "reaction_ref": "kbase/default/reactions/id/rxn00000", "templateReactionReagents": [{"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/f6p_c"}, {"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/g6p_c"}], "templatecompartment_ref": "~/compartments/id/c", "templatecomplex_refs": [], "type": "conditional"}, {"id": "PGK_c", "name": "Phosphoglycerate kinase", "GapfillDirection": "=", "base_cost": 1000, "reverse_penalty": 1000, "forward_penalty": 1000, "upper_bound": 1000.0, "lower_bound": -1000.0, "direction": "=", "maxforflux": 1000.0, "maxrevflux": 1000.0, "reaction_ref": "kbase/default/reactions/id/rxn00000", "templateReactionReagents": [{"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/13dpg_c"}, {"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/3pg_c"}, {"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/adp_c"}, {"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/atp_c"}], "templatecompartment_ref": "~/compartments/id/c", "templatecomplex_refs": [], "type": "conditional"}, {"id": "PGL_c", "name": "6-phosphogluconolactonase", "GapfillDirection": "=", "base_cost": 1000, "reverse_penalty": 1000, "forward_penalty": 1000, "upper_bound": 1000.0, "lower_bound": 0.0, "direction": ">", "maxforflux": 1000.0, "maxrevflux": 0.0, "reaction_ref": "kbase/default/reactions/id/rxn00000", "templateReactionReagents": [{"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/6pgc_c"}, {"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/6pgl_c"}, {"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/h2o_c"}, {"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/h_c"}], "templatecompartment_ref": "~/compartments/id/c", "templatecomplex_refs": [], "type": "conditional"}, {"id": "ACALD_c", "name": "Acetaldehyde dehydrogenase (acetylating)", "GapfillDirection": "=", "base_cost": 1000, "reverse_penalty": 1000, "forward_penalty": 1000, "upper_bound": 1000.0, "lower_bound": -1000.0, "direction": "=", "maxforflux": 1000.0, "maxrevflux": 1000.0, "reaction_ref": "kbase/default/reactions/id/rxn00000", "templateReactionReagents": [{"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/acald_c"}, {"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/accoa_c"}, {"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/coa_c"}, {"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/h_c"}, {"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/nad_c"}, {"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/nadh_c"}], "templatecompartment_ref": "~/compartments/id/c", "templatecomplex_refs": [], "type": "conditional"}, {"id": "AKGt2r_c", "name": "2 oxoglutarate reversible transport via symport", "GapfillDirection": "=", "base_cost": 1000, "reverse_penalty": 1000, "forward_penalty": 1000, "upper_bound": 1000.0, "lower_bound": -1000.0, "direction": "=", "maxforflux": 1000.0, "maxrevflux": 1000.0, "reaction_ref": "kbase/default/reactions/id/rxn00000", "templateReactionReagents": [{"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/akg_c"}, {"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/akg_e"}, {"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/h_c"}, {"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/h_e"}], "templatecompartment_ref": "~/compartments/id/c", "templatecomplex_refs": [], "type": "conditional"}, {"id": "PGM_c", "name": "Phosphoglycerate mutase", "GapfillDirection": "=", "base_cost": 1000, "reverse_penalty": 1000, "forward_penalty": 1000, "upper_bound": 1000.0, "lower_bound": -1000.0, "direction": "=", "maxforflux": 1000.0, "maxrevflux": 1000.0, "reaction_ref": "kbase/default/reactions/id/rxn00000", "templateReactionReagents": [{"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/2pg_c"}, {"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/3pg_c"}], "templatecompartment_ref": "~/compartments/id/c", "templatecomplex_refs": [], "type": "conditional"}, {"id": "PIt2r_c", "name": "Phosphate reversible transport via symport", "GapfillDirection": "=", "base_cost": 1000, "reverse_penalty": 1000, "forward_penalty": 1000, "upper_bound": 1000.0, "lower_bound": -1000.0, "direction": "=", "maxforflux": 1000.0, "maxrevflux": 1000.0, "reaction_ref": "kbase/default/reactions/id/rxn00000", "templateReactionReagents": [{"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/h_c"}, {"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/h_e"}, {"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/pi_c"}, {"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/pi_e"}], "templatecompartment_ref": "~/compartments/id/c", "templatecomplex_refs": [], "type": "conditional"}, {"id": "ALCD2x_c", "name": "Alcohol dehydrogenase (ethanol)", "GapfillDirection": "=", "base_cost": 1000, "reverse_penalty": 1000, "forward_penalty": 1000, "upper_bound": 1000.0, "lower_bound": -1000.0, "direction": "=", "maxforflux": 1000.0, "maxrevflux": 1000.0, "reaction_ref": "kbase/default/reactions/id/rxn00000", "templateReactionReagents": [{"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/acald_c"}, {"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/etoh_c"}, {"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/h_c"}, {"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/nad_c"}, {"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/nadh_c"}], "templatecompartment_ref": "~/compartments/id/c", "templatecomplex_refs": [], "type": "conditional"}, {"id": "ACALDt_c", "name": "Acetaldehyde reversible transport", "GapfillDirection": "=", "base_cost": 1000, "reverse_penalty": 1000, "forward_penalty": 1000, "upper_bound": 1000.0, "lower_bound": -1000.0, "direction": "=", "maxforflux": 1000.0, "maxrevflux": 1000.0, "reaction_ref": "kbase/default/reactions/id/rxn00000", "templateReactionReagents": [{"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/acald_c"}, {"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/acald_e"}], "templatecompartment_ref": "~/compartments/id/c", "templatecomplex_refs": [], "type": "conditional"}, {"id": "ACKr_c", "name": "Acetate kinase", "GapfillDirection": "=", "base_cost": 1000, "reverse_penalty": 1000, "forward_penalty": 1000, "upper_bound": 1000.0, "lower_bound": -1000.0, "direction": "=", "maxforflux": 1000.0, "maxrevflux": 1000.0, "reaction_ref": "kbase/default/reactions/id/rxn00000", "templateReactionReagents": [{"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/ac_c"}, {"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/actp_c"}, {"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/adp_c"}, {"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/atp_c"}], "templatecompartment_ref": "~/compartments/id/c", "templatecomplex_refs": [], "type": "conditional"}, {"id": "PPC_c", "name": "Phosphoenolpyruvate carboxylase", "GapfillDirection": "=", "base_cost": 1000, "reverse_penalty": 1000, "forward_penalty": 1000, "upper_bound": 1000.0, "lower_bound": 0.0, "direction": ">", "maxforflux": 1000.0, "maxrevflux": 0.0, "reaction_ref": "kbase/default/reactions/id/rxn00000", "templateReactionReagents": [{"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/co2_c"}, {"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/h2o_c"}, {"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/h_c"}, {"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/oaa_c"}, {"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/pep_c"}, {"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/pi_c"}], "templatecompartment_ref": "~/compartments/id/c", "templatecomplex_refs": [], "type": "conditional"}, {"id": "ACONTa_c", "name": "Aconitase (half-reaction A, Citrate hydro-lyase)", "GapfillDirection": "=", "base_cost": 1000, "reverse_penalty": 1000, "forward_penalty": 1000, "upper_bound": 1000.0, "lower_bound": -1000.0, "direction": "=", "maxforflux": 1000.0, "maxrevflux": 1000.0, "reaction_ref": "kbase/default/reactions/id/rxn00000", "templateReactionReagents": [{"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/acon_C_c"}, {"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/cit_c"}, {"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/h2o_c"}], "templatecompartment_ref": "~/compartments/id/c", "templatecomplex_refs": [], "type": "conditional"}, {"id": "ACONTb_c", "name": "Aconitase (half-reaction B, Isocitrate hydro-lyase)", "GapfillDirection": "=", "base_cost": 1000, "reverse_penalty": 1000, "forward_penalty": 1000, "upper_bound": 1000.0, "lower_bound": -1000.0, "direction": "=", "maxforflux": 1000.0, "maxrevflux": 1000.0, "reaction_ref": "kbase/default/reactions/id/rxn00000", "templateReactionReagents": [{"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/acon_C_c"}, {"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/h2o_c"}, {"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/icit_c"}], "templatecompartment_ref": "~/compartments/id/c", "templatecomplex_refs": [], "type": "conditional"}, {"id": "PPCK_c", "name": "Phosphoenolpyruvate carboxykinase", "GapfillDirection": "=", "base_cost": 1000, "reverse_penalty": 1000, "forward_penalty": 1000, "upper_bound": 1000.0, "lower_bound": 0.0, "direction": ">", "maxforflux": 1000.0, "maxrevflux": 0.0, "reaction_ref": "kbase/default/reactions/id/rxn00000", "templateReactionReagents": [{"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/adp_c"}, {"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/atp_c"}, {"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/co2_c"}, {"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/oaa_c"}, {"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/pep_c"}], "templatecompartment_ref": "~/compartments/id/c", "templatecomplex_refs": [], "type": "conditional"}, {"id": "ACt2r_c", "name": "Acetate reversible transport via proton symport", "GapfillDirection": "=", "base_cost": 1000, "reverse_penalty": 1000, "forward_penalty": 1000, "upper_bound": 1000.0, "lower_bound": -1000.0, "direction": "=", "maxforflux": 1000.0, "maxrevflux": 1000.0, "reaction_ref": "kbase/default/reactions/id/rxn00000", "templateReactionReagents": [{"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/ac_c"}, {"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/ac_e"}, {"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/h_c"}, {"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/h_e"}], "templatecompartment_ref": "~/compartments/id/c", "templatecomplex_refs": [], "type": "conditional"}, {"id": "PPS_c", "name": "Phosphoenolpyruvate synthase", "GapfillDirection": "=", "base_cost": 1000, "reverse_penalty": 1000, "forward_penalty": 1000, "upper_bound": 1000.0, "lower_bound": 0.0, "direction": ">", "maxforflux": 1000.0, "maxrevflux": 0.0, "reaction_ref": "kbase/default/reactions/id/rxn00000", "templateReactionReagents": [{"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/amp_c"}, {"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/atp_c"}, {"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/h2o_c"}, {"coefficient": 2.0, "templatecompcompound_ref": "~/compcompounds/id/h_c"}, {"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/pep_c"}, {"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/pi_c"}, {"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/pyr_c"}], "templatecompartment_ref": "~/compartments/id/c", "templatecomplex_refs": [], "type": "conditional"}, {"id": "ADK1_c", "name": "Adenylate kinase", "GapfillDirection": "=", "base_cost": 1000, "reverse_penalty": 1000, "forward_penalty": 1000, "upper_bound": 1000.0, "lower_bound": -1000.0, "direction": "=", "maxforflux": 1000.0, "maxrevflux": 1000.0, "reaction_ref": "kbase/default/reactions/id/rxn00000", "templateReactionReagents": [{"coefficient": 2.0, "templatecompcompound_ref": "~/compcompounds/id/adp_c"}, {"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/amp_c"}, {"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/atp_c"}], "templatecompartment_ref": "~/compartments/id/c", "templatecomplex_refs": [], "type": "conditional"}, {"id": "AKGDH_c", "name": "2-Oxogluterate dehydrogenase", "GapfillDirection": "=", "base_cost": 1000, "reverse_penalty": 1000, "forward_penalty": 1000, "upper_bound": 1000.0, "lower_bound": 0.0, "direction": ">", "maxforflux": 1000.0, "maxrevflux": 0.0, "reaction_ref": "kbase/default/reactions/id/rxn00000", "templateReactionReagents": [{"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/akg_c"}, {"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/co2_c"}, {"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/coa_c"}, {"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/nad_c"}, {"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/nadh_c"}, {"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/succoa_c"}], "templatecompartment_ref": "~/compartments/id/c", "templatecomplex_refs": [], "type": "conditional"}, {"id": "ATPS4r_c", "name": "ATP synthase (four protons for one ATP)", "GapfillDirection": "=", "base_cost": 1000, "reverse_penalty": 1000, "forward_penalty": 1000, "upper_bound": 1000.0, "lower_bound": -1000.0, "direction": "=", "maxforflux": 1000.0, "maxrevflux": 1000.0, "reaction_ref": "kbase/default/reactions/id/rxn00000", "templateReactionReagents": [{"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/adp_c"}, {"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/atp_c"}, {"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/h2o_c"}, {"coefficient": 3.0, "templatecompcompound_ref": "~/compcompounds/id/h_c"}, {"coefficient": -4.0, "templatecompcompound_ref": "~/compcompounds/id/h_e"}, {"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/pi_c"}], "templatecompartment_ref": "~/compartments/id/c", "templatecomplex_refs": [], "type": "conditional"}, {"id": "PTAr_c", "name": "Phosphotransacetylase", "GapfillDirection": "=", "base_cost": 1000, "reverse_penalty": 1000, "forward_penalty": 1000, "upper_bound": 1000.0, "lower_bound": -1000.0, "direction": "=", "maxforflux": 1000.0, "maxrevflux": 1000.0, "reaction_ref": "kbase/default/reactions/id/rxn00000", "templateReactionReagents": [{"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/accoa_c"}, {"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/actp_c"}, {"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/coa_c"}, {"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/pi_c"}], "templatecompartment_ref": "~/compartments/id/c", "templatecomplex_refs": [], "type": "conditional"}, {"id": "PYK_c", "name": "Pyruvate kinase", "GapfillDirection": "=", "base_cost": 1000, "reverse_penalty": 1000, "forward_penalty": 1000, "upper_bound": 1000.0, "lower_bound": 0.0, "direction": ">", "maxforflux": 1000.0, "maxrevflux": 0.0, "reaction_ref": "kbase/default/reactions/id/rxn00000", "templateReactionReagents": [{"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/adp_c"}, {"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/atp_c"}, {"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/h_c"}, {"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/pep_c"}, {"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/pyr_c"}], "templatecompartment_ref": "~/compartments/id/c", "templatecomplex_refs": [], "type": "conditional"}, {"id": "PYRt2_c", "name": "Pyruvate transport in via proton symport", "GapfillDirection": "=", "base_cost": 1000, "reverse_penalty": 1000, "forward_penalty": 1000, "upper_bound": 1000.0, "lower_bound": -1000.0, "direction": "=", "maxforflux": 1000.0, "maxrevflux": 1000.0, "reaction_ref": "kbase/default/reactions/id/rxn00000", "templateReactionReagents": [{"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/h_c"}, {"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/h_e"}, {"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/pyr_c"}, {"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/pyr_e"}], "templatecompartment_ref": "~/compartments/id/c", "templatecomplex_refs": [], "type": "conditional"}, {"id": "CO2t_c", "name": "CO2 transporter via diffusion", "GapfillDirection": "=", "base_cost": 1000, "reverse_penalty": 1000, "forward_penalty": 1000, "upper_bound": 1000.0, "lower_bound": -1000.0, "direction": "=", "maxforflux": 1000.0, "maxrevflux": 1000.0, "reaction_ref": "kbase/default/reactions/id/rxn00000", "templateReactionReagents": [{"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/co2_c"}, {"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/co2_e"}], "templatecompartment_ref": "~/compartments/id/c", "templatecomplex_refs": [], "type": "conditional"}, {"id": "RPE_c", "name": "Ribulose 5-phosphate 3-epimerase", "GapfillDirection": "=", "base_cost": 1000, "reverse_penalty": 1000, "forward_penalty": 1000, "upper_bound": 1000.0, "lower_bound": -1000.0, "direction": "=", "maxforflux": 1000.0, "maxrevflux": 1000.0, "reaction_ref": "kbase/default/reactions/id/rxn00000", "templateReactionReagents": [{"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/ru5p__D_c"}, {"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/xu5p__D_c"}], "templatecompartment_ref": "~/compartments/id/c", "templatecomplex_refs": [], "type": "conditional"}, {"id": "CS_c", "name": "Citrate synthase", "GapfillDirection": "=", "base_cost": 1000, "reverse_penalty": 1000, "forward_penalty": 1000, "upper_bound": 1000.0, "lower_bound": 0.0, "direction": ">", "maxforflux": 1000.0, "maxrevflux": 0.0, "reaction_ref": "kbase/default/reactions/id/rxn00000", "templateReactionReagents": [{"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/accoa_c"}, {"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/cit_c"}, {"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/coa_c"}, {"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/h2o_c"}, {"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/h_c"}, {"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/oaa_c"}], "templatecompartment_ref": "~/compartments/id/c", "templatecomplex_refs": [], "type": "conditional"}, {"id": "RPI_c", "name": "Ribose-5-phosphate isomerase", "GapfillDirection": "=", "base_cost": 1000, "reverse_penalty": 1000, "forward_penalty": 1000, "upper_bound": 1000.0, "lower_bound": -1000.0, "direction": "=", "maxforflux": 1000.0, "maxrevflux": 1000.0, "reaction_ref": "kbase/default/reactions/id/rxn00000", "templateReactionReagents": [{"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/r5p_c"}, {"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/ru5p__D_c"}], "templatecompartment_ref": "~/compartments/id/c", "templatecomplex_refs": [], "type": "conditional"}, {"id": "SUCCt2_2_c", "name": "Succinate transport via proton symport (2 H)", "GapfillDirection": "=", "base_cost": 1000, "reverse_penalty": 1000, "forward_penalty": 1000, "upper_bound": 1000.0, "lower_bound": 0.0, "direction": ">", "maxforflux": 1000.0, "maxrevflux": 0.0, "reaction_ref": "kbase/default/reactions/id/rxn00000", "templateReactionReagents": [{"coefficient": 2.0, "templatecompcompound_ref": "~/compcompounds/id/h_c"}, {"coefficient": -2.0, "templatecompcompound_ref": "~/compcompounds/id/h_e"}, {"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/succ_c"}, {"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/succ_e"}], "templatecompartment_ref": "~/compartments/id/c", "templatecomplex_refs": [], "type": "conditional"}, {"id": "CYTBD_c", "name": "Cytochrome oxidase bd (ubiquinol-8: 2 protons)", "GapfillDirection": "=", "base_cost": 1000, "reverse_penalty": 1000, "forward_penalty": 1000, "upper_bound": 1000.0, "lower_bound": 0.0, "direction": ">", "maxforflux": 1000.0, "maxrevflux": 0.0, "reaction_ref": "kbase/default/reactions/id/rxn00000", "templateReactionReagents": [{"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/h2o_c"}, {"coefficient": -2.0, "templatecompcompound_ref": "~/compcompounds/id/h_c"}, {"coefficient": 2.0, "templatecompcompound_ref": "~/compcompounds/id/h_e"}, {"coefficient": -0.5, "templatecompcompound_ref": "~/compcompounds/id/o2_c"}, {"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/q8_c"}, {"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/q8h2_c"}], "templatecompartment_ref": "~/compartments/id/c", "templatecomplex_refs": [], "type": "conditional"}, {"id": "D_LACt2_c", "name": "D lactate transport via proton symport", "GapfillDirection": "=", "base_cost": 1000, "reverse_penalty": 1000, "forward_penalty": 1000, "upper_bound": 1000.0, "lower_bound": -1000.0, "direction": "=", "maxforflux": 1000.0, "maxrevflux": 1000.0, "reaction_ref": "kbase/default/reactions/id/rxn00000", "templateReactionReagents": [{"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/h_c"}, {"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/h_e"}, {"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/lac__D_c"}, {"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/lac__D_e"}], "templatecompartment_ref": "~/compartments/id/c", "templatecomplex_refs": [], "type": "conditional"}, {"id": "ENO_c", "name": "Enolase", "GapfillDirection": "=", "base_cost": 1000, "reverse_penalty": 1000, "forward_penalty": 1000, "upper_bound": 1000.0, "lower_bound": -1000.0, "direction": "=", "maxforflux": 1000.0, "maxrevflux": 1000.0, "reaction_ref": "kbase/default/reactions/id/rxn00000", "templateReactionReagents": [{"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/2pg_c"}, {"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/h2o_c"}, {"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/pep_c"}], "templatecompartment_ref": "~/compartments/id/c", "templatecomplex_refs": [], "type": "conditional"}, {"id": "SUCCt3_c", "name": "Succinate transport out via proton antiport", "GapfillDirection": "=", "base_cost": 1000, "reverse_penalty": 1000, "forward_penalty": 1000, "upper_bound": 1000.0, "lower_bound": 0.0, "direction": ">", "maxforflux": 1000.0, "maxrevflux": 0.0, "reaction_ref": "kbase/default/reactions/id/rxn00000", "templateReactionReagents": [{"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/h_c"}, {"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/h_e"}, {"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/succ_c"}, {"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/succ_e"}], "templatecompartment_ref": "~/compartments/id/c", "templatecomplex_refs": [], "type": "conditional"}, {"id": "ETOHt2r_c", "name": "Ethanol reversible transport via proton symport", "GapfillDirection": "=", "base_cost": 1000, "reverse_penalty": 1000, "forward_penalty": 1000, "upper_bound": 1000.0, "lower_bound": -1000.0, "direction": "=", "maxforflux": 1000.0, "maxrevflux": 1000.0, "reaction_ref": "kbase/default/reactions/id/rxn00000", "templateReactionReagents": [{"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/etoh_c"}, {"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/etoh_e"}, {"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/h_c"}, {"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/h_e"}], "templatecompartment_ref": "~/compartments/id/c", "templatecomplex_refs": [], "type": "conditional"}, {"id": "SUCDi_c", "name": "Succinate dehydrogenase (irreversible)", "GapfillDirection": "=", "base_cost": 1000, "reverse_penalty": 1000, "forward_penalty": 1000, "upper_bound": 1000.0, "lower_bound": 0.0, "direction": ">", "maxforflux": 1000.0, "maxrevflux": 0.0, "reaction_ref": "kbase/default/reactions/id/rxn00000", "templateReactionReagents": [{"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/fum_c"}, {"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/q8_c"}, {"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/q8h2_c"}, {"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/succ_c"}], "templatecompartment_ref": "~/compartments/id/c", "templatecomplex_refs": [], "type": "conditional"}, {"id": "SUCOAS_c", "name": "Succinyl-CoA synthetase (ADP-forming)", "GapfillDirection": "=", "base_cost": 1000, "reverse_penalty": 1000, "forward_penalty": 1000, "upper_bound": 1000.0, "lower_bound": -1000.0, "direction": "=", "maxforflux": 1000.0, "maxrevflux": 1000.0, "reaction_ref": "kbase/default/reactions/id/rxn00000", "templateReactionReagents": [{"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/adp_c"}, {"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/atp_c"}, {"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/coa_c"}, {"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/pi_c"}, {"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/succ_c"}, {"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/succoa_c"}], "templatecompartment_ref": "~/compartments/id/c", "templatecomplex_refs": [], "type": "conditional"}, {"id": "TALA_c", "name": "Transaldolase", "GapfillDirection": "=", "base_cost": 1000, "reverse_penalty": 1000, "forward_penalty": 1000, "upper_bound": 1000.0, "lower_bound": -1000.0, "direction": "=", "maxforflux": 1000.0, "maxrevflux": 1000.0, "reaction_ref": "kbase/default/reactions/id/rxn00000", "templateReactionReagents": [{"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/e4p_c"}, {"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/f6p_c"}, {"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/g3p_c"}, {"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/s7p_c"}], "templatecompartment_ref": "~/compartments/id/c", "templatecomplex_refs": [], "type": "conditional"}, {"id": "THD2_c", "name": "NAD(P) transhydrogenase", "GapfillDirection": "=", "base_cost": 1000, "reverse_penalty": 1000, "forward_penalty": 1000, "upper_bound": 1000.0, "lower_bound": 0.0, "direction": ">", "maxforflux": 1000.0, "maxrevflux": 0.0, "reaction_ref": "kbase/default/reactions/id/rxn00000", "templateReactionReagents": [{"coefficient": 2.0, "templatecompcompound_ref": "~/compcompounds/id/h_c"}, {"coefficient": -2.0, "templatecompcompound_ref": "~/compcompounds/id/h_e"}, {"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/nad_c"}, {"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/nadh_c"}, {"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/nadp_c"}, {"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/nadph_c"}], "templatecompartment_ref": "~/compartments/id/c", "templatecomplex_refs": [], "type": "conditional"}, {"id": "TKT1_c", "name": "Transketolase", "GapfillDirection": "=", "base_cost": 1000, "reverse_penalty": 1000, "forward_penalty": 1000, "upper_bound": 1000.0, "lower_bound": -1000.0, "direction": "=", "maxforflux": 1000.0, "maxrevflux": 1000.0, "reaction_ref": "kbase/default/reactions/id/rxn00000", "templateReactionReagents": [{"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/g3p_c"}, {"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/r5p_c"}, {"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/s7p_c"}, {"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/xu5p__D_c"}], "templatecompartment_ref": "~/compartments/id/c", "templatecomplex_refs": [], "type": "conditional"}, {"id": "TKT2_c", "name": "Transketolase", "GapfillDirection": "=", "base_cost": 1000, "reverse_penalty": 1000, "forward_penalty": 1000, "upper_bound": 1000.0, "lower_bound": -1000.0, "direction": "=", "maxforflux": 1000.0, "maxrevflux": 1000.0, "reaction_ref": "kbase/default/reactions/id/rxn00000", "templateReactionReagents": [{"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/e4p_c"}, {"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/f6p_c"}, {"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/g3p_c"}, {"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/xu5p__D_c"}], "templatecompartment_ref": "~/compartments/id/c", "templatecomplex_refs": [], "type": "conditional"}, {"id": "TPI_c", "name": "Triose-phosphate isomerase", "GapfillDirection": "=", "base_cost": 1000, "reverse_penalty": 1000, "forward_penalty": 1000, "upper_bound": 1000.0, "lower_bound": -1000.0, "direction": "=", "maxforflux": 1000.0, "maxrevflux": 1000.0, "reaction_ref": "kbase/default/reactions/id/rxn00000", "templateReactionReagents": [{"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/dhap_c"}, {"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/g3p_c"}], "templatecompartment_ref": "~/compartments/id/c", "templatecomplex_refs": [], "type": "conditional"}, {"id": "FBA_c", "name": "Fructose-bisphosphate aldolase", "GapfillDirection": "=", "base_cost": 1000, "reverse_penalty": 1000, "forward_penalty": 1000, "upper_bound": 1000.0, "lower_bound": -1000.0, "direction": "=", "maxforflux": 1000.0, "maxrevflux": 1000.0, "reaction_ref": "kbase/default/reactions/id/rxn00000", "templateReactionReagents": [{"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/dhap_c"}, {"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/fdp_c"}, {"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/g3p_c"}], "templatecompartment_ref": "~/compartments/id/c", "templatecomplex_refs": [], "type": "conditional"}, {"id": "FBP_c", "name": "Fructose-bisphosphatase", "GapfillDirection": "=", "base_cost": 1000, "reverse_penalty": 1000, "forward_penalty": 1000, "upper_bound": 1000.0, "lower_bound": 0.0, "direction": ">", "maxforflux": 1000.0, "maxrevflux": 0.0, "reaction_ref": "kbase/default/reactions/id/rxn00000", "templateReactionReagents": [{"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/f6p_c"}, {"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/fdp_c"}, {"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/h2o_c"}, {"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/pi_c"}], "templatecompartment_ref": "~/compartments/id/c", "templatecomplex_refs": [], "type": "conditional"}, {"id": "FORt2_c", "name": "Formate transport in via proton symport", "GapfillDirection": "=", "base_cost": 1000, "reverse_penalty": 1000, "forward_penalty": 1000, "upper_bound": 1000.0, "lower_bound": 0.0, "direction": ">", "maxforflux": 1000.0, "maxrevflux": 0.0, "reaction_ref": "kbase/default/reactions/id/rxn00000", "templateReactionReagents": [{"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/for_c"}, {"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/for_e"}, {"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/h_c"}, {"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/h_e"}], "templatecompartment_ref": "~/compartments/id/c", "templatecomplex_refs": [], "type": "conditional"}, {"id": "FORt_c", "name": "Formate transport via diffusion", "GapfillDirection": "=", "base_cost": 1000, "reverse_penalty": 1000, "forward_penalty": 1000, "upper_bound": 0.0, "lower_bound": -1000.0, "direction": "<", "maxforflux": 0.0, "maxrevflux": 1000.0, "reaction_ref": "kbase/default/reactions/id/rxn00000", "templateReactionReagents": [{"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/for_c"}, {"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/for_e"}], "templatecompartment_ref": "~/compartments/id/c", "templatecomplex_refs": [], "type": "conditional"}, {"id": "FRD7_c", "name": "Fumarate reductase", "GapfillDirection": "=", "base_cost": 1000, "reverse_penalty": 1000, "forward_penalty": 1000, "upper_bound": 1000.0, "lower_bound": 0.0, "direction": ">", "maxforflux": 1000.0, "maxrevflux": 0.0, "reaction_ref": "kbase/default/reactions/id/rxn00000", "templateReactionReagents": [{"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/fum_c"}, {"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/q8_c"}, {"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/q8h2_c"}, {"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/succ_c"}], "templatecompartment_ref": "~/compartments/id/c", "templatecomplex_refs": [], "type": "conditional"}, {"id": "FRUpts2_c", "name": "Fructose transport via PEP:Pyr PTS (f6p generating)", "GapfillDirection": "=", "base_cost": 1000, "reverse_penalty": 1000, "forward_penalty": 1000, "upper_bound": 1000.0, "lower_bound": 0.0, "direction": ">", "maxforflux": 1000.0, "maxrevflux": 0.0, "reaction_ref": "kbase/default/reactions/id/rxn00000", "templateReactionReagents": [{"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/f6p_c"}, {"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/fru_e"}, {"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/pep_c"}, {"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/pyr_c"}], "templatecompartment_ref": "~/compartments/id/c", "templatecomplex_refs": [], "type": "conditional"}, {"id": "FUM_c", "name": "Fumarase", "GapfillDirection": "=", "base_cost": 1000, "reverse_penalty": 1000, "forward_penalty": 1000, "upper_bound": 1000.0, "lower_bound": -1000.0, "direction": "=", "maxforflux": 1000.0, "maxrevflux": 1000.0, "reaction_ref": "kbase/default/reactions/id/rxn00000", "templateReactionReagents": [{"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/fum_c"}, {"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/h2o_c"}, {"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/mal__L_c"}], "templatecompartment_ref": "~/compartments/id/c", "templatecomplex_refs": [], "type": "conditional"}, {"id": "FUMt2_2_c", "name": "Fumarate transport via proton symport (2 H)", "GapfillDirection": "=", "base_cost": 1000, "reverse_penalty": 1000, "forward_penalty": 1000, "upper_bound": 1000.0, "lower_bound": 0.0, "direction": ">", "maxforflux": 1000.0, "maxrevflux": 0.0, "reaction_ref": "kbase/default/reactions/id/rxn00000", "templateReactionReagents": [{"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/fum_c"}, {"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/fum_e"}, {"coefficient": 2.0, "templatecompcompound_ref": "~/compcompounds/id/h_c"}, {"coefficient": -2.0, "templatecompcompound_ref": "~/compcompounds/id/h_e"}], "templatecompartment_ref": "~/compartments/id/c", "templatecomplex_refs": [], "type": "conditional"}, {"id": "G6PDH2r_c", "name": "Glucose 6-phosphate dehydrogenase", "GapfillDirection": "=", "base_cost": 1000, "reverse_penalty": 1000, "forward_penalty": 1000, "upper_bound": 1000.0, "lower_bound": -1000.0, "direction": "=", "maxforflux": 1000.0, "maxrevflux": 1000.0, "reaction_ref": "kbase/default/reactions/id/rxn00000", "templateReactionReagents": [{"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/6pgl_c"}, {"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/g6p_c"}, {"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/h_c"}, {"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/nadp_c"}, {"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/nadph_c"}], "templatecompartment_ref": "~/compartments/id/c", "templatecomplex_refs": [], "type": "conditional"}, {"id": "GAPD_c", "name": "Glyceraldehyde-3-phosphate dehydrogenase", "GapfillDirection": "=", "base_cost": 1000, "reverse_penalty": 1000, "forward_penalty": 1000, "upper_bound": 1000.0, "lower_bound": -1000.0, "direction": "=", "maxforflux": 1000.0, "maxrevflux": 1000.0, "reaction_ref": "kbase/default/reactions/id/rxn00000", "templateReactionReagents": [{"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/13dpg_c"}, {"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/g3p_c"}, {"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/h_c"}, {"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/nad_c"}, {"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/nadh_c"}, {"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/pi_c"}], "templatecompartment_ref": "~/compartments/id/c", "templatecomplex_refs": [], "type": "conditional"}, {"id": "GLCpts_c", "name": "D-glucose transport via PEP:Pyr PTS", "GapfillDirection": "=", "base_cost": 1000, "reverse_penalty": 1000, "forward_penalty": 1000, "upper_bound": 1000.0, "lower_bound": 0.0, "direction": ">", "maxforflux": 1000.0, "maxrevflux": 0.0, "reaction_ref": "kbase/default/reactions/id/rxn00000", "templateReactionReagents": [{"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/g6p_c"}, {"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/glc__D_e"}, {"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/pep_c"}, {"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/pyr_c"}], "templatecompartment_ref": "~/compartments/id/c", "templatecomplex_refs": [], "type": "conditional"}, {"id": "GLNS_c", "name": "Glutamine synthetase", "GapfillDirection": "=", "base_cost": 1000, "reverse_penalty": 1000, "forward_penalty": 1000, "upper_bound": 1000.0, "lower_bound": 0.0, "direction": ">", "maxforflux": 1000.0, "maxrevflux": 0.0, "reaction_ref": "kbase/default/reactions/id/rxn00000", "templateReactionReagents": [{"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/adp_c"}, {"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/atp_c"}, {"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/gln__L_c"}, {"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/glu__L_c"}, {"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/h_c"}, {"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/nh4_c"}, {"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/pi_c"}], "templatecompartment_ref": "~/compartments/id/c", "templatecomplex_refs": [], "type": "conditional"}, {"id": "GLNabc_c", "name": "L-glutamine transport via ABC system", "GapfillDirection": "=", "base_cost": 1000, "reverse_penalty": 1000, "forward_penalty": 1000, "upper_bound": 1000.0, "lower_bound": 0.0, "direction": ">", "maxforflux": 1000.0, "maxrevflux": 0.0, "reaction_ref": "kbase/default/reactions/id/rxn00000", "templateReactionReagents": [{"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/adp_c"}, {"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/atp_c"}, {"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/gln__L_c"}, {"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/gln__L_e"}, {"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/h2o_c"}, {"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/h_c"}, {"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/pi_c"}], "templatecompartment_ref": "~/compartments/id/c", "templatecomplex_refs": [], "type": "conditional"}, {"id": "GLUDy_c", "name": "Glutamate dehydrogenase (NADP)", "GapfillDirection": "=", "base_cost": 1000, "reverse_penalty": 1000, "forward_penalty": 1000, "upper_bound": 1000.0, "lower_bound": -1000.0, "direction": "=", "maxforflux": 1000.0, "maxrevflux": 1000.0, "reaction_ref": "kbase/default/reactions/id/rxn00000", "templateReactionReagents": [{"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/akg_c"}, {"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/glu__L_c"}, {"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/h2o_c"}, {"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/h_c"}, {"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/nadp_c"}, {"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/nadph_c"}, {"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/nh4_c"}], "templatecompartment_ref": "~/compartments/id/c", "templatecomplex_refs": [], "type": "conditional"}, {"id": "GLUN_c", "name": "Glutaminase", "GapfillDirection": "=", "base_cost": 1000, "reverse_penalty": 1000, "forward_penalty": 1000, "upper_bound": 1000.0, "lower_bound": 0.0, "direction": ">", "maxforflux": 1000.0, "maxrevflux": 0.0, "reaction_ref": "kbase/default/reactions/id/rxn00000", "templateReactionReagents": [{"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/gln__L_c"}, {"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/glu__L_c"}, {"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/h2o_c"}, {"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/nh4_c"}], "templatecompartment_ref": "~/compartments/id/c", "templatecomplex_refs": [], "type": "conditional"}, {"id": "GLUSy_c", "name": "Glutamate synthase (NADPH)", "GapfillDirection": "=", "base_cost": 1000, "reverse_penalty": 1000, "forward_penalty": 1000, "upper_bound": 1000.0, "lower_bound": 0.0, "direction": ">", "maxforflux": 1000.0, "maxrevflux": 0.0, "reaction_ref": "kbase/default/reactions/id/rxn00000", "templateReactionReagents": [{"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/akg_c"}, {"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/gln__L_c"}, {"coefficient": 2.0, "templatecompcompound_ref": "~/compcompounds/id/glu__L_c"}, {"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/h_c"}, {"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/nadp_c"}, {"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/nadph_c"}], "templatecompartment_ref": "~/compartments/id/c", "templatecomplex_refs": [], "type": "conditional"}, {"id": "GLUt2r_c", "name": "L glutamate transport via proton symport reversible", "GapfillDirection": "=", "base_cost": 1000, "reverse_penalty": 1000, "forward_penalty": 1000, "upper_bound": 1000.0, "lower_bound": -1000.0, "direction": "=", "maxforflux": 1000.0, "maxrevflux": 1000.0, "reaction_ref": "kbase/default/reactions/id/rxn00000", "templateReactionReagents": [{"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/glu__L_c"}, {"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/glu__L_e"}, {"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/h_c"}, {"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/h_e"}], "templatecompartment_ref": "~/compartments/id/c", "templatecomplex_refs": [], "type": "conditional"}, {"id": "GND_c", "name": "Phosphogluconate dehydrogenase", "GapfillDirection": "=", "base_cost": 1000, "reverse_penalty": 1000, "forward_penalty": 1000, "upper_bound": 1000.0, "lower_bound": 0.0, "direction": ">", "maxforflux": 1000.0, "maxrevflux": 0.0, "reaction_ref": "kbase/default/reactions/id/rxn00000", "templateReactionReagents": [{"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/6pgc_c"}, {"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/co2_c"}, {"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/nadp_c"}, {"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/nadph_c"}, {"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/ru5p__D_c"}], "templatecompartment_ref": "~/compartments/id/c", "templatecomplex_refs": [], "type": "conditional"}, {"id": "H2Ot_c", "name": "H2O transport via diffusion", "GapfillDirection": "=", "base_cost": 1000, "reverse_penalty": 1000, "forward_penalty": 1000, "upper_bound": 1000.0, "lower_bound": -1000.0, "direction": "=", "maxforflux": 1000.0, "maxrevflux": 1000.0, "reaction_ref": "kbase/default/reactions/id/rxn00000", "templateReactionReagents": [{"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/h2o_c"}, {"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/h2o_e"}], "templatecompartment_ref": "~/compartments/id/c", "templatecomplex_refs": [], "type": "conditional"}, {"id": "ICDHyr_c", "name": "Isocitrate dehydrogenase (NADP)", "GapfillDirection": "=", "base_cost": 1000, "reverse_penalty": 1000, "forward_penalty": 1000, "upper_bound": 1000.0, "lower_bound": -1000.0, "direction": "=", "maxforflux": 1000.0, "maxrevflux": 1000.0, "reaction_ref": "kbase/default/reactions/id/rxn00000", "templateReactionReagents": [{"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/akg_c"}, {"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/co2_c"}, {"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/icit_c"}, {"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/nadp_c"}, {"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/nadph_c"}], "templatecompartment_ref": "~/compartments/id/c", "templatecomplex_refs": [], "type": "conditional"}, {"id": "ICL_c", "name": "Isocitrate lyase", "GapfillDirection": "=", "base_cost": 1000, "reverse_penalty": 1000, "forward_penalty": 1000, "upper_bound": 1000.0, "lower_bound": 0.0, "direction": ">", "maxforflux": 1000.0, "maxrevflux": 0.0, "reaction_ref": "kbase/default/reactions/id/rxn00000", "templateReactionReagents": [{"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/glx_c"}, {"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/icit_c"}, {"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/succ_c"}], "templatecompartment_ref": "~/compartments/id/c", "templatecomplex_refs": [], "type": "conditional"}, {"id": "LDH_D_c", "name": "D-lactate dehydrogenase", "GapfillDirection": "=", "base_cost": 1000, "reverse_penalty": 1000, "forward_penalty": 1000, "upper_bound": 1000.0, "lower_bound": -1000.0, "direction": "=", "maxforflux": 1000.0, "maxrevflux": 1000.0, "reaction_ref": "kbase/default/reactions/id/rxn00000", "templateReactionReagents": [{"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/h_c"}, {"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/lac__D_c"}, {"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/nad_c"}, {"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/nadh_c"}, {"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/pyr_c"}], "templatecompartment_ref": "~/compartments/id/c", "templatecomplex_refs": [], "type": "conditional"}, {"id": "MALS_c", "name": "Malate synthase", "GapfillDirection": "=", "base_cost": 1000, "reverse_penalty": 1000, "forward_penalty": 1000, "upper_bound": 1000.0, "lower_bound": 0.0, "direction": ">", "maxforflux": 1000.0, "maxrevflux": 0.0, "reaction_ref": "kbase/default/reactions/id/rxn00000", "templateReactionReagents": [{"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/accoa_c"}, {"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/coa_c"}, {"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/glx_c"}, {"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/h2o_c"}, {"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/h_c"}, {"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/mal__L_c"}], "templatecompartment_ref": "~/compartments/id/c", "templatecomplex_refs": [], "type": "conditional"}, {"id": "MALt2_2_c", "name": "Malate transport via proton symport (2 H)", "GapfillDirection": "=", "base_cost": 1000, "reverse_penalty": 1000, "forward_penalty": 1000, "upper_bound": 1000.0, "lower_bound": 0.0, "direction": ">", "maxforflux": 1000.0, "maxrevflux": 0.0, "reaction_ref": "kbase/default/reactions/id/rxn00000", "templateReactionReagents": [{"coefficient": 2.0, "templatecompcompound_ref": "~/compcompounds/id/h_c"}, {"coefficient": -2.0, "templatecompcompound_ref": "~/compcompounds/id/h_e"}, {"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/mal__L_c"}, {"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/mal__L_e"}], "templatecompartment_ref": "~/compartments/id/c", "templatecomplex_refs": [], "type": "conditional"}, {"id": "MDH_c", "name": "Malate dehydrogenase", "GapfillDirection": "=", "base_cost": 1000, "reverse_penalty": 1000, "forward_penalty": 1000, "upper_bound": 1000.0, "lower_bound": -1000.0, "direction": "=", "maxforflux": 1000.0, "maxrevflux": 1000.0, "reaction_ref": "kbase/default/reactions/id/rxn00000", "templateReactionReagents": [{"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/h_c"}, {"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/mal__L_c"}, {"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/nad_c"}, {"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/nadh_c"}, {"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/oaa_c"}], "templatecompartment_ref": "~/compartments/id/c", "templatecomplex_refs": [], "type": "conditional"}, {"id": "ME1_c", "name": "Malic enzyme (NAD)", "GapfillDirection": "=", "base_cost": 1000, "reverse_penalty": 1000, "forward_penalty": 1000, "upper_bound": 1000.0, "lower_bound": 0.0, "direction": ">", "maxforflux": 1000.0, "maxrevflux": 0.0, "reaction_ref": "kbase/default/reactions/id/rxn00000", "templateReactionReagents": [{"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/co2_c"}, {"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/mal__L_c"}, {"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/nad_c"}, {"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/nadh_c"}, {"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/pyr_c"}], "templatecompartment_ref": "~/compartments/id/c", "templatecomplex_refs": [], "type": "conditional"}, {"id": "ME2_c", "name": "Malic enzyme (NADP)", "GapfillDirection": "=", "base_cost": 1000, "reverse_penalty": 1000, "forward_penalty": 1000, "upper_bound": 1000.0, "lower_bound": 0.0, "direction": ">", "maxforflux": 1000.0, "maxrevflux": 0.0, "reaction_ref": "kbase/default/reactions/id/rxn00000", "templateReactionReagents": [{"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/co2_c"}, {"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/mal__L_c"}, {"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/nadp_c"}, {"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/nadph_c"}, {"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/pyr_c"}], "templatecompartment_ref": "~/compartments/id/c", "templatecomplex_refs": [], "type": "conditional"}, {"id": "NADH16_c", "name": "NADH dehydrogenase (ubiquinone-8 & 3 protons)", "GapfillDirection": "=", "base_cost": 1000, "reverse_penalty": 1000, "forward_penalty": 1000, "upper_bound": 1000.0, "lower_bound": 0.0, "direction": ">", "maxforflux": 1000.0, "maxrevflux": 0.0, "reaction_ref": "kbase/default/reactions/id/rxn00000", "templateReactionReagents": [{"coefficient": -4.0, "templatecompcompound_ref": "~/compcompounds/id/h_c"}, {"coefficient": 3.0, "templatecompcompound_ref": "~/compcompounds/id/h_e"}, {"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/nad_c"}, {"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/nadh_c"}, {"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/q8_c"}, {"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/q8h2_c"}], "templatecompartment_ref": "~/compartments/id/c", "templatecomplex_refs": [], "type": "conditional"}, {"id": "NADTRHD_c", "name": "NAD transhydrogenase", "GapfillDirection": "=", "base_cost": 1000, "reverse_penalty": 1000, "forward_penalty": 1000, "upper_bound": 1000.0, "lower_bound": 0.0, "direction": ">", "maxforflux": 1000.0, "maxrevflux": 0.0, "reaction_ref": "kbase/default/reactions/id/rxn00000", "templateReactionReagents": [{"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/nad_c"}, {"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/nadh_c"}, {"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/nadp_c"}, {"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/nadph_c"}], "templatecompartment_ref": "~/compartments/id/c", "templatecomplex_refs": [], "type": "conditional"}, {"id": "NH4t_c", "name": "Ammonia reversible transport", "GapfillDirection": "=", "base_cost": 1000, "reverse_penalty": 1000, "forward_penalty": 1000, "upper_bound": 1000.0, "lower_bound": -1000.0, "direction": "=", "maxforflux": 1000.0, "maxrevflux": 1000.0, "reaction_ref": "kbase/default/reactions/id/rxn00000", "templateReactionReagents": [{"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/nh4_c"}, {"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/nh4_e"}], "templatecompartment_ref": "~/compartments/id/c", "templatecomplex_refs": [], "type": "conditional"}, {"id": "O2t_c", "name": "O2 transport diffusion ", "GapfillDirection": "=", "base_cost": 1000, "reverse_penalty": 1000, "forward_penalty": 1000, "upper_bound": 1000.0, "lower_bound": -1000.0, "direction": "=", "maxforflux": 1000.0, "maxrevflux": 1000.0, "reaction_ref": "kbase/default/reactions/id/rxn00000", "templateReactionReagents": [{"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/o2_c"}, {"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/o2_e"}], "templatecompartment_ref": "~/compartments/id/c", "templatecomplex_refs": [], "type": "conditional"}, {"id": "PDH_c", "name": "Pyruvate dehydrogenase", "GapfillDirection": "=", "base_cost": 1000, "reverse_penalty": 1000, "forward_penalty": 1000, "upper_bound": 1000.0, "lower_bound": 0.0, "direction": ">", "maxforflux": 1000.0, "maxrevflux": 0.0, "reaction_ref": "kbase/default/reactions/id/rxn00000", "templateReactionReagents": [{"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/accoa_c"}, {"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/co2_c"}, {"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/coa_c"}, {"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/nad_c"}, {"coefficient": 1.0, "templatecompcompound_ref": "~/compcompounds/id/nadh_c"}, {"coefficient": -1.0, "templatecompcompound_ref": "~/compcompounds/id/pyr_c"}], "templatecompartment_ref": "~/compartments/id/c", "templatecomplex_refs": [], "type": "conditional"}, {"id": "Kt2r_c", "name": "Potassium reversible transport via proton symport", "GapfillDirection": "=", "base_cost": 1000, "reverse_penalty": 1000, "forward_penalty": 1000, "upper_bound": 1000, "lower_bound": -1000, "direction": "=", "maxforflux": 1000, "maxrevflux": 1000.0, "reaction_ref": "kbase/default/reactions/id/rxn00000", "templateReactionReagents": [{"coefficient": -1, "templatecompcompound_ref": "~/compcompounds/id/h_e"}, {"coefficient": -1, "templatecompcompound_ref": "~/compcompounds/id/k_e"}, {"coefficient": 1, "templatecompcompound_ref": "~/compcompounds/id/k_c"}, {"coefficient": 1, "templatecompcompound_ref": "~/compcompounds/id/h_c"}], "templatecompartment_ref": "~/compartments/id/c", "templatecomplex_refs": [], "type": "conditional"}, {"id": "Ktex_c", "name": "Potassium transport via diffusion", "GapfillDirection": "=", "base_cost": 1000, "reverse_penalty": 1000, "forward_penalty": 1000, "upper_bound": 1000, "lower_bound": -1000, "direction": "=", "maxforflux": 1000, "maxrevflux": 1000.0, "reaction_ref": "kbase/default/reactions/id/rxn00000", "templateReactionReagents": [{"coefficient": -1, "templatecompcompound_ref": "~/compcompounds/id/k_e"}, {"coefficient": 1, "templatecompcompound_ref": "~/compcompounds/id/k_c"}], "templatecompartment_ref": "~/compartments/id/c", "templatecomplex_refs": [], "type": "conditional"}], "biomasses": [], "pathways": [], "subsystems": []} \ No newline at end of file From eeabcbb31dc5569d2da9034b51ab90e63881d3f4 Mon Sep 17 00:00:00 2001 From: Andrew Freiburger Date: Fri, 22 Jul 2022 21:46:08 -0400 Subject: [PATCH 7/8] msatpcorrection polishing --- modelseedpy/core/msatpcorrection.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/modelseedpy/core/msatpcorrection.py b/modelseedpy/core/msatpcorrection.py index 28c41b89..c97e70cb 100755 --- a/modelseedpy/core/msatpcorrection.py +++ b/modelseedpy/core/msatpcorrection.py @@ -13,8 +13,6 @@ from modelseedpy.fbapkg.mspackagemanager import MSPackageManager logger = logging.getLogger(__name__) -import itertools # !!! import never used -import cobra # !!! import never used class MSATPCorrection: @@ -105,8 +103,7 @@ def disable_noncore_reactions(self): self.original_bounds = {} self.noncore_reactions, self.other_compartments = [], [] #Iterating through reactions and disabling - self.noncore_reactions = [] - self.other_compartments = [] + self.noncore_reactions, self.other_compartments = [], [] # Iterating through reactions and disabling for reaction in self.model.reactions: if any([reaction.id == self.atp_hydrolysis.id, FBAHelper.is_ex(reaction), FBAHelper.is_biomass(reaction)]): @@ -156,6 +153,7 @@ def evaluate_growth_media(self): with self.model: self.model.objective = self.atp_hydrolysis.id #self.model.objective = self.model.problem.Objective(Zero,direction="max") + logger.debug(f'ATP bounds: ({self.atp_hydrolysis.lower_bound}, {self.atp_hydrolysis.upper_bound})') #self.model.objective.set_linear_coefficients({self.atp_hydrolysis.forward_variable:1}) pkgmgr = MSPackageManager.get_pkg_mgr(self.model) @@ -209,7 +207,7 @@ def determine_growth_media(self): if gfscore <= self.max_gapfilling and gfscore <= (best_score+self.gapfilling_delta): self.selected_media.append(media) - def determine_growth_media2(self, max_gapfilling=None): #!!! unused function + def determine_growth_media2(self, max_gapfilling=None): """ Decides which of the test media to use as growth conditions for this model :return: From 81a8e8a12190267ad16c9e01977ef4226ddde580 Mon Sep 17 00:00:00 2001 From: Andrew Freiburger Date: Thu, 15 Sep 2022 15:51:07 -0500 Subject: [PATCH 8/8] final polish --- modelseedpy/core/msatpcorrection.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modelseedpy/core/msatpcorrection.py b/modelseedpy/core/msatpcorrection.py index c97e70cb..d6e91eda 100755 --- a/modelseedpy/core/msatpcorrection.py +++ b/modelseedpy/core/msatpcorrection.py @@ -1,4 +1,6 @@ import logging +from modelseedpy.core.msgapfill import MSGapfill # !!! import never used +from modelseedpy.core.fbahelper import FBAHelper # !!! import never used import itertools # !!! import never used import cobra # !!! import never used import json @@ -102,8 +104,6 @@ def disable_noncore_reactions(self): # Now clearing the existing noncore data structures self.original_bounds = {} self.noncore_reactions, self.other_compartments = [], [] - #Iterating through reactions and disabling - self.noncore_reactions, self.other_compartments = [], [] # Iterating through reactions and disabling for reaction in self.model.reactions: if any([reaction.id == self.atp_hydrolysis.id, FBAHelper.is_ex(reaction), FBAHelper.is_biomass(reaction)]):