Skip to content

Commit

Permalink
temporarily prevent comment issues
Browse files Browse the repository at this point in the history
  • Loading branch information
exaexa committed Jan 13, 2025
1 parent d2655e3 commit 6863951
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 15 deletions.
6 changes: 0 additions & 6 deletions docs/src/examples/07a-srba.jl
Original file line number Diff line number Diff line change
Expand Up @@ -516,14 +516,10 @@ res = screen(mus, workers = [1]) do mu
end

# finally, we can plot the data, to see if we can recapitulate known phenomena

#= TODO
using CairoMakie
# load measured ribosome protein mass fractions
ribosome_measurements = CSV.File(joinpath(data_root, "ecoli_ribosomes.tsv"))
# First, show that the predicted ribosome density matches experimental
# observations, and also show that overflow metabolism occurs (latter is due to
# the membrane bound).
Expand All @@ -537,12 +533,10 @@ scatter!(
)
lines!(ax, mus, [r.ribosome_mass / r.total_mass for r in res], label = "Model predictions")
axislegend(ax, position = :lt)
ax2 = Axis(fig[2, 1], xlabel = "Growth rate, 1/h", ylabel = "Metabolite flux")
lines!(ax2, mus, [r.ac_flux for r in res], label = "Acetate")
lines!(ax2, mus, [abs(r.glc_flux) for r in res], label = "Glucose")
lines!(ax2, mus, [abs(r.o2_flux) for r in res], label = "Oxygen")
axislegend(ax2, position = :lt)
fig
=#
10 changes: 1 addition & 9 deletions docs/src/examples/07b-community-ecfba.jl
Original file line number Diff line number Diff line change
Expand Up @@ -439,18 +439,15 @@ wt = simplified_enzyme_constrained_flux_balance_constraints(
open_bounds_ecfbc!(wt, :EX_glc__D_e)
fix_bounds_ecfbc!(wt)

eccfba_res = screen(specs. workers = [1]) do spec
eccfba_res = screen(specs, workers = [1]) do spec
auxotrophe_fba(wt, spec)
end

#=
# ## Plot cFBA vs. ec-cFBA vs. experimental data
# Now that we have simulated the models, we need to compare them to data. The
# data from the paper is processed below, and then plotted.
using CairoMakie
# data from Mee et al., 2014
observed_abundances = [ # these pairings were simulated
(:metA, :thrC, 17.0 / (17.0 + 80.8)),
Expand All @@ -464,18 +461,15 @@ observed_abundances = [ # these pairings were simulated
(:ilvA, :metA, 71.3 / (71.3 + 17.3)),
]
observed_abundances = last.(observed_abundances) # in order of aa_pairs
# get maximum growth for each pairing in both simulations
cfba_abs = zeros(9) # optimal abundance using cFBA
eccfba_abs = zeros(9) # optimal abundance using ec-cFBA
for (i, (ko1, ko2)) in enumerate(aa_pairs)
x = argmax(x -> x.mu, filter(x -> haskey(x, ko1) && haskey(x, ko2), cfba_res))
cfba_abs[i] = x[ko1] / (x[ko1] + x[ko2])
x = argmax(x -> x.mu, filter(x -> haskey(x, ko1) && haskey(x, ko2), eccfba_res))
eccfba_abs[i] = x[ko1] / (x[ko1] + x[ko2])
end
# The figure below shows that using enzyme constraints dramatically improves the
# predictive validity of community simulations
fig = Figure();
Expand All @@ -498,7 +492,6 @@ stem!(
)
xlims!(ax, 0, 1)
ylims!(ax, 0, 1)
ax2 = Axis(fig[1, 2], xlabel = "Observed composition", title = "ec-cFBA")
stem!(
ax2,
Expand All @@ -514,5 +507,4 @@ stem!(
xlims!(ax2, 0, 1)
ylims!(ax2, 0, 1)
fig
=#

0 comments on commit 6863951

Please sign in to comment.