From 8484432a4b1c20748bdca8f85adacb6ab5a61c25 Mon Sep 17 00:00:00 2001 From: Mirek Kratochvil Date: Wed, 22 Jan 2025 21:01:24 +0100 Subject: [PATCH] prevent a few unnecessary outputs in the docs --- docs/src/examples/07a-srba.jl | 16 ++++++++-------- docs/src/examples/07b-community-ecfba.jl | 8 ++++---- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/docs/src/examples/07a-srba.jl b/docs/src/examples/07a-srba.jl index c14701c8..be79ba38 100644 --- a/docs/src/examples/07a-srba.jl +++ b/docs/src/examples/07a-srba.jl @@ -156,13 +156,13 @@ ec_constraints = enzyme_constrained_flux_balance_constraints( # simplistic FBA-style analysis; in our case the enzyme capacity serves as a # sufficient and more realistic limiter. We have to unblock both the # bidirectional reaction and the "reversed" view, since both carry the bound.) -ec_constraints.fluxes.EX_glc__D_e.bound.lower = -1000 -ec_constraints.fluxes_reverse.EX_glc__D_e.bound.upper = 1000 +ec_constraints.fluxes.EX_glc__D_e.bound.lower = -1000; +ec_constraints.fluxes_reverse.EX_glc__D_e.bound.upper = 1000; # To avoid the model from growing in unexpected modes, we will constraint the # original biomass reaction to zero: -ec_constraints.fluxes.BIOMASS_Ec_iML1515_core_75p37M.bound = C.EqualTo(0) -ec_constraints.fluxes.BIOMASS_Ec_iML1515_WT_75p37M.bound = C.EqualTo(0) +ec_constraints.fluxes.BIOMASS_Ec_iML1515_core_75p37M.bound = C.EqualTo(0); +ec_constraints.fluxes.BIOMASS_Ec_iML1515_WT_75p37M.bound = C.EqualTo(0); # ### RBA translation machinery @@ -200,7 +200,7 @@ end # To make the construction nicer, we'll make a helper for summing up # constraint-tree values: -sum_values(x...) = C.sum(x..., init = zero(C.LinearValue)) +sum_values(x...) = C.sum(x..., init = zero(C.LinearValue)); # ...and another helper for adding values in constraint trees together: add_trees(ts...) = @@ -210,7 +210,7 @@ add_trees(ts...) = return C.merge(t1, t2) do c1, c2 C.Constraint(z(c1) + z(c2)) end - end + end; # Since we have to solve the problem for multiple growth rates to be able to # scan for optimum, we will wrap the growth-dependent part in a reusable @@ -330,12 +330,12 @@ rb_constraints *= translation_constraints( # growth; to obtain a realistic solution for we can ask the solver to minimize # the mass of used resources. Accordingly, we re-constraint the total mass of # the model: -rb_constraints.gene_product_capacity.total_capacity.bound = nothing +rb_constraints.gene_product_capacity.total_capacity.bound = nothing; rb_constraints.total_capacity = C.Constraint( rb_constraints.gene_product_capacity.total_capacity.value + rb_constraints.total_ribosome_mass.value, (0.0, 550.0), -) +); # We can optimize the model now, minimizing the mass: res = optimized_values( diff --git a/docs/src/examples/07b-community-ecfba.jl b/docs/src/examples/07b-community-ecfba.jl index 92b90d5b..c226d745 100644 --- a/docs/src/examples/07b-community-ecfba.jl +++ b/docs/src/examples/07b-community-ecfba.jl @@ -102,15 +102,15 @@ wt_model = load_model("iML1515.json", A.CanonicalModel.Model) # As the usual quirk, we loosen the lower bound on glucose intake that is # required for plain FBA: -wt_model.reactions["EX_glc__D_e"].lower_bound = -1000.0 +wt_model.reactions["EX_glc__D_e"].lower_bound = -1000.0; # Additionally we allow the models isoleucine and methionine uptake: -wt_model.reactions["EX_ile__L_e"].lower_bound = -1000.0 -wt_model.reactions["EX_met__L_e"].lower_bound = -1000.0 +wt_model.reactions["EX_ile__L_e"].lower_bound = -1000.0; +wt_model.reactions["EX_met__L_e"].lower_bound = -1000.0; # ...and for good manners, we also remove the biomass annotation from the # biomass reaction that we are not interested in: -wt_model.reactions["BIOMASS_Ec_iML1515_WT_75p37M"].annotations["sbo"] = [] +wt_model.reactions["BIOMASS_Ec_iML1515_WT_75p37M"].annotations["sbo"] = []; # Let's create these two knockouts-- one incapable of producing isoleucine: