Skip to content

Commit

Permalink
fix a mistake in enzyme builders
Browse files Browse the repository at this point in the history
  • Loading branch information
exaexa committed Jan 24, 2024
1 parent 328ec68 commit fb1409a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
12 changes: 8 additions & 4 deletions docs/src/examples/05-enzyme-constrained-models.jl
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,11 @@ ec_solution = enzyme_constrained_flux_balance_analysis(
)

#src these values should be unique (glucose transporter is the only way to get carbon into the system)
@test isapprox(ec_solution.objective, 1.671357282901553, atol = TEST_TOLERANCE) #src
@test isapprox(ec_solution.total_proteome_bound, 0.1, atol = TEST_TOLERANCE) #src
@test isapprox(ec_solution.fluxes.EX_glc__D_e, -49.92966287110028, atol = 0.1) #src
@test isapprox(ec_solution.enzymes.b2417, 0.00011859224858442563, atol = 1e-7) #src
@test isapprox(ec_solution.objective, 0.706993382849705, atol = TEST_TOLERANCE) #src
@test isapprox(ec_solution.gene_product_capacity, 50.0, atol = TEST_TOLERANCE) #src
@test isapprox(ec_solution.fluxes.EX_glc__D_e, -10, atol = TEST_TOLERANCE) #src
@test isapprox( #src
ec_solution.gene_product_amounts.b2417, #src
0.011875920383431717, #src
atol = TEST_TOLERANCE, #src
) #src
2 changes: 1 addition & 1 deletion src/builders/enzymes.jl
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ function gene_product_isozyme_constraints(
res[gp].value += i.value * stoi
else
res[gp] =
equal_value_constraint(i.value * stoi, gene_product_amounts[gp])
C.Constraint(i.value * stoi - gene_product_amounts[gp].value, 0)
end
end
end
Expand Down

0 comments on commit fb1409a

Please sign in to comment.