Skip to content
Snippets Groups Projects
Unverified Commit ad76b3e2 authored by Laurent Heirendt's avatar Laurent Heirendt :airplane: Committed by GitHub
Browse files

Merge pull request #387 from LCSB-BioCore/mo-makie

Use Makie instead of Plots
parents 6ea062d4 70edc80f
No related branches found
No related tags found
No related merge requests found
[deps] [deps]
CairoMakie = "13f3f980-e62b-5c42-98c6-ff1f3baf88f0"
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4" Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
JSON = "682c06a0-de6a-54ab-a142-c8b1cf79cde6" JSON = "682c06a0-de6a-54ab-a142-c8b1cf79cde6"
JuMP = "4076af6c-e467-56ae-b986-b466b2749572" JuMP = "4076af6c-e467-56ae-b986-b466b2749572"
Literate = "98b081ad-f1c9-55d3-8b20-4c87d4299306"
OSQP = "ab2f91bb-94b4-55e3-9ba0-7f65df51de79" OSQP = "ab2f91bb-94b4-55e3-9ba0-7f65df51de79"
Plots = "91a5bcdd-55d7-5caf-9e0b-520d859cae80"
Tulip = "6dd1b50a-3aae-11e9-10b5-ef983d2400fa" Tulip = "6dd1b50a-3aae-11e9-10b5-ef983d2400fa"
Literate = "98b081ad-f1c9-55d3-8b20-4c87d4299306"
[compat] [compat]
Documenter = "0.26" Documenter = "0.26"
...@@ -52,8 +52,18 @@ productions = screen_variants( ...@@ -52,8 +52,18 @@ productions = screen_variants(
# This can be nicely plotted to give a more comprehensive overview of which # This can be nicely plotted to give a more comprehensive overview of which
# reactions are critical or not: # reactions are critical or not:
using Plots using CairoMakie
bar(reactions(model), productions, orientation = :hor, dpi = 600)
disp_rxns = rand(1:95, 20) # only display 20 random fluxes to save space
barplot(
productions[disp_rxns],
direction = :x,
axis = (
yticks = (1:20, reactions(model)[disp_rxns]),
xlabel = "Flux [mmol/gDW/h]",
ylabel = "Reaction ID",
),
)
# ## Knocking out reaction combinations # ## Knocking out reaction combinations
# #
...@@ -77,4 +87,15 @@ productions = screen_variants( ...@@ -77,4 +87,15 @@ productions = screen_variants(
model -> get_biomass(flux_balance_analysis_dict(model, Tulip.Optimizer)), model -> get_biomass(flux_balance_analysis_dict(model, Tulip.Optimizer)),
) )
heatmap(productions, dpi = 600) f = Figure()
ax = Axis(
f[1, 1],
ylabel = "Reaction KO",
xlabel = "Reaction KO",
yticks = (1:20, reactions(model)[disp_rxns]),
xticks = (1:20, reactions(model)[disp_rxns]),
xticklabelrotation = -pi / 4,
)
hm = heatmap!(ax, productions[disp_rxns, disp_rxns])
Colorbar(f[1, 2], hm, label = "Flux [mmol/gDW/h]")
f
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment