Commit 66ff9c0f authored by Documenter.jl's avatar Documenter.jl
Browse files

build based on 77603c3b

parent 0857008a
......@@ -87,4 +87,4 @@ end</code></pre><p>In turn, these variants can be used in <a href="../../functio
nothing
nothing
[7.47738193404817, 1.8840414375838503e-8, 4.860861010127701, -16.023526104614593, … ]
[7.47738193404817, 1.8840414375838503e-8, 4.860861010127701, -16.023526104614593, … ]</code></pre></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../">« All advanced tutorials</a><a class="docs-footer-nextpage" href="../2_custom_model/">Working with custom models »</a><div class="flexbox-break"></div><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> on <span class="colophon-date" title="Monday 16 May 2022 13:40">Monday 16 May 2022</span>. Using Julia version 1.7.0.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
[7.47738193404817, 1.8840414375838503e-8, 4.860861010127701, -16.023526104614593, … ]</code></pre></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../">« All advanced tutorials</a><a class="docs-footer-nextpage" href="../2_custom_model/">Working with custom models »</a><div class="flexbox-break"></div><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> on <span class="colophon-date" title="Monday 16 May 2022 19:38">Monday 16 May 2022</span>. Using Julia version 1.7.0.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
......@@ -43,4 +43,4 @@ Dict{String, Float64} with 5 entries:
&quot;rxn4&quot; =&gt; 1.0
</code></pre><h2 id="Writing-generic-model-modifications"><a class="docs-heading-anchor" href="#Writing-generic-model-modifications">Writing generic model modifications</a><a id="Writing-generic-model-modifications-1"></a><a class="docs-heading-anchor-permalink" href="#Writing-generic-model-modifications" title="Permalink"></a></h2><p>The custom model structure can also be made compatible with many of the existing variant-generating functions and analysis modifiers.</p><p>The functions prepared for use as &quot;variants&quot; in <a href="../../functions/analysis/#COBREXA.screen-Tuple"><code>screen</code></a>, usually prefixed by <code>with_</code>, have their generic variants that only call simpler, overloadable functions for each specific model. This choice is based on the overloading dispatch system of Julia. For example,<a href="../../functions/reconstruction/#COBREXA.with_removed_metabolites-Tuple"><code>with_removed_metabolites</code></a> is implemented very generically by reducing the problem to some specific <a href="../../functions/reconstruction/#COBREXA.remove_metabolites-Tuple{CoreModel, AbstractVector{Int64}}"><code>remove_metabolites</code></a> functions selected by the dispatch, as follows:</p><pre><code class="language-julia">with_removed_metabolites(args...; kwargs...) =
m -&gt; remove_metabolites(m, args...; kwargs...)</code></pre><p>To be able to use <a href="../../functions/reconstruction/#COBREXA.with_removed_metabolites-Tuple"><code>with_removed_metabolites</code></a> in your model, we can just overload the actual inner function. For the simple circular model, the modification might as well look like this:</p><pre><code class="language-julia">COBREXA.remove_metabolites(m::CircularModel, n::Int) =
return CircularModel(m.size - n)</code></pre><div class="admonition is-danger"><header class="admonition-header">Functions that generate model variants must be pure</header><div class="admonition-body"><p>Notice that the function is &quot;pure&quot;, i.e., does not make any in-place modifications to the original model structure. That property is required for <a href="../../functions/analysis/#COBREXA.screen-Tuple"><code>screen</code></a> and other functions to properly and predictably apply the modifications to the model. To expose potential in-place modifications to your codebase, you should instead overload the &quot;bang&quot; counterpart of remove metabolites, called <a href="../../functions/reconstruction/#COBREXA.remove_metabolites!-Tuple{CoreModel, AbstractVector{Int64}}"><code>remove_metabolites!</code></a>.</p></div></div></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../1_variants/">« Exploring many model variants</a><a class="docs-footer-nextpage" href="../../notebooks/">All notebooks »</a><div class="flexbox-break"></div><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> on <span class="colophon-date" title="Monday 16 May 2022 13:40">Monday 16 May 2022</span>. Using Julia version 1.7.0.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
return CircularModel(m.size - n)</code></pre><div class="admonition is-danger"><header class="admonition-header">Functions that generate model variants must be pure</header><div class="admonition-body"><p>Notice that the function is &quot;pure&quot;, i.e., does not make any in-place modifications to the original model structure. That property is required for <a href="../../functions/analysis/#COBREXA.screen-Tuple"><code>screen</code></a> and other functions to properly and predictably apply the modifications to the model. To expose potential in-place modifications to your codebase, you should instead overload the &quot;bang&quot; counterpart of remove metabolites, called <a href="../../functions/reconstruction/#COBREXA.remove_metabolites!-Tuple{CoreModel, AbstractVector{Int64}}"><code>remove_metabolites!</code></a>.</p></div></div></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../1_variants/">« Exploring many model variants</a><a class="docs-footer-nextpage" href="../../notebooks/">All notebooks »</a><div class="flexbox-break"></div><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> on <span class="colophon-date" title="Monday 16 May 2022 19:38">Monday 16 May 2022</span>. Using Julia version 1.7.0.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
<!DOCTYPE html>
<html lang="en"><head><meta charset="UTF-8"/><meta name="viewport" content="width=device-width, initial-scale=1.0"/><title>All advanced tutorials · COBREXA.jl</title><link href="https://fonts.googleapis.com/css?family=Lato|Roboto+Mono" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.0/css/fontawesome.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.0/css/solid.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.0/css/brands.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.11.1/katex.min.css" rel="stylesheet" type="text/css"/><script>documenterBaseURL=".."</script><script src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.6/require.min.js" data-main="../assets/documenter.js"></script><script src="../siteinfo.js"></script><script src="../../versions.js"></script><link class="docs-theme-link" rel="stylesheet" type="text/css" href="../assets/themes/documenter-dark.css" data-theme-name="documenter-dark" data-theme-primary-dark/><link class="docs-theme-link" rel="stylesheet" type="text/css" href="../assets/themes/documenter-light.css" data-theme-name="documenter-light" data-theme-primary/><script src="../assets/themeswap.js"></script><link href="../assets/favicon.ico" rel="icon" type="image/x-icon"/></head><body><div id="documenter"><nav class="docs-sidebar"><a class="docs-logo" href="../"><img class="docs-light-only" src="../assets/logo.svg" alt="COBREXA.jl logo"/><img class="docs-dark-only" src="../assets/logo-dark.svg" alt="COBREXA.jl logo"/></a><div class="docs-package-name"><span class="docs-autofit">COBREXA.jl</span></div><form class="docs-search" action="../search/"><input class="docs-search-query" id="documenter-search-query" name="q" type="text" placeholder="Search docs"/></form><ul class="docs-menu"><li><a class="tocitem" href="../">Home</a></li><li><span class="tocitem">User guide</span><ul><li><input class="collapse-toggle" id="menuitem-2-1" type="checkbox"/><label class="tocitem" for="menuitem-2-1"><span class="docs-label">Quickstart tutorials</span><i class="docs-chevron"></i></label><ul class="collapsed"><li><a class="tocitem" href="../tutorials/">All tutorials</a></li><li><a class="tocitem" href="../tutorials/1_loading/">Loading and converting model data</a></li><li><a class="tocitem" href="../tutorials/2_analysis/">Basic analysis of constraint-based models</a></li><li><a class="tocitem" href="../tutorials/3_hpc/">Distributed processing and HPC environments</a></li><li><a class="tocitem" href="../tutorials/4_modifying/">Modifying and saving the models</a></li></ul></li><li><input class="collapse-toggle" id="menuitem-2-2" type="checkbox" checked/><label class="tocitem" for="menuitem-2-2"><span class="docs-label">Advanced tutorials</span><i class="docs-chevron"></i></label><ul class="collapsed"><li class="is-active"><a class="tocitem" href>All advanced tutorials</a></li><li><a class="tocitem" href="1_variants/">Exploring many model variants</a></li><li><a class="tocitem" href="2_custom_model/">Working with custom models</a></li></ul></li><li><input class="collapse-toggle" id="menuitem-2-3" type="checkbox"/><label class="tocitem" for="menuitem-2-3"><span class="docs-label">Examples and notebooks</span><i class="docs-chevron"></i></label><ul class="collapsed"><li><a class="tocitem" href="../notebooks/">All notebooks</a></li><li><a class="tocitem" href="../notebooks/1_loading_converting_saving/">Loading, converting, and saving models</a></li><li><a class="tocitem" href="../notebooks/2_finding_balance/">Finding balance and variability of constraint-based models</a></li><li><a class="tocitem" href="../notebooks/3_basic_stdmodel_usage/">Basic usage of <code>StandardModel</code></a></li><li><a class="tocitem" href="../notebooks/4_basic_core_coupled_usage/">Basic usage of <code>CoreModel</code> and <code>CoreModelCoupled</code></a></li><li><a class="tocitem" href="../notebooks/5_basic_stdmodel_construction/">Model construction and modification</a></li><li><a class="tocitem" href="../notebooks/6_screening/">Exploring model variants with <code>screen</code></a></li><li><a class="tocitem" href="../notebooks/7_community_model/">Building and analysing a small community model</a></li><li><a class="tocitem" href="../notebooks/8_custom_model/">Using a custom model data structure</a></li><li><a class="tocitem" href="../notebooks/9_max_min_driving_force_analysis/">Maximum-minimum driving force analysis</a></li></ul></li></ul></li><li><span class="tocitem">Types and functions</span><ul><li><a class="tocitem" href="../functions/">Contents</a></li><li><a class="tocitem" href="../functions/analysis/">Analysis functions</a></li><li><a class="tocitem" href="../functions/base/">Base functions</a></li><li><a class="tocitem" href="../functions/io/">Input and output</a></li><li><a class="tocitem" href="../functions/reconstruction/">Model construction functions</a></li><li><a class="tocitem" href="../functions/types/">Types</a></li><li><a class="tocitem" href="../functions/utils/">Utilities</a></li></ul></li><li><a class="tocitem" href="../howToContribute/">How to contribute</a></li></ul><div class="docs-version-selector field has-addons"><div class="control"><span class="docs-label button is-static is-size-7">Version</span></div><div class="docs-selector control is-expanded"><div class="select is-fullwidth is-size-7"><select id="documenter-version-selector"></select></div></div></div></nav><div class="docs-main"><header class="docs-navbar"><nav class="breadcrumb"><ul class="is-hidden-mobile"><li><a class="is-disabled">User guide</a></li><li><a class="is-disabled">Advanced tutorials</a></li><li class="is-active"><a href>All advanced tutorials</a></li></ul><ul class="is-hidden-tablet"><li class="is-active"><a href>All advanced tutorials</a></li></ul></nav><div class="docs-right"><a class="docs-edit-link" href="https://github.com/lcsb-biocore/COBREXA.jl/blob/master/docs/src/advanced.md" title="Edit on GitHub"><span class="docs-icon fab"></span><span class="docs-label is-hidden-touch">Edit on GitHub</span></a><a class="docs-settings-button fas fa-cog" id="documenter-settings-button" href="#" title="Settings"></a><a class="docs-sidebar-button fa fa-bars is-hidden-desktop" id="documenter-sidebar-button" href="#"></a></div></header><article class="content" id="documenter-page"><h1 id="COBREXA-Advanced-tutorials"><a class="docs-heading-anchor" href="#COBREXA-Advanced-tutorials">COBREXA Advanced tutorials</a><a id="COBREXA-Advanced-tutorials-1"></a><a class="docs-heading-anchor-permalink" href="#COBREXA-Advanced-tutorials" title="Permalink"></a></h1><ul><li><a href="1_variants/#Exploring-many-model-variants">Exploring many model variants</a></li><ul><li><a href="1_variants/#Variant-specification">Variant specification</a></li><li><a href="1_variants/#Writing-custom-variant-functions">Writing custom variant functions</a></li><li><a href="1_variants/#Passing-extra-arguments-to-the-analysis-function">Passing extra arguments to the analysis function</a></li></ul><li><a href="2_custom_model/#Working-with-custom-models">Working with custom models</a></li><ul><li><a href="2_custom_model/#Writing-the-generic-accessors">Writing the generic accessors</a></li><li><a href="2_custom_model/#Writing-generic-model-modifications">Writing generic model modifications</a></li></ul></ul></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../tutorials/4_modifying/">« Modifying and saving the models</a><a class="docs-footer-nextpage" href="1_variants/">Exploring many model variants »</a><div class="flexbox-break"></div><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> on <span class="colophon-date" title="Monday 16 May 2022 13:40">Monday 16 May 2022</span>. Using Julia version 1.7.0.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
<html lang="en"><head><meta charset="UTF-8"/><meta name="viewport" content="width=device-width, initial-scale=1.0"/><title>All advanced tutorials · COBREXA.jl</title><link href="https://fonts.googleapis.com/css?family=Lato|Roboto+Mono" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.0/css/fontawesome.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.0/css/solid.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.0/css/brands.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.11.1/katex.min.css" rel="stylesheet" type="text/css"/><script>documenterBaseURL=".."</script><script src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.6/require.min.js" data-main="../assets/documenter.js"></script><script src="../siteinfo.js"></script><script src="../../versions.js"></script><link class="docs-theme-link" rel="stylesheet" type="text/css" href="../assets/themes/documenter-dark.css" data-theme-name="documenter-dark" data-theme-primary-dark/><link class="docs-theme-link" rel="stylesheet" type="text/css" href="../assets/themes/documenter-light.css" data-theme-name="documenter-light" data-theme-primary/><script src="../assets/themeswap.js"></script><link href="../assets/favicon.ico" rel="icon" type="image/x-icon"/></head><body><div id="documenter"><nav class="docs-sidebar"><a class="docs-logo" href="../"><img class="docs-light-only" src="../assets/logo.svg" alt="COBREXA.jl logo"/><img class="docs-dark-only" src="../assets/logo-dark.svg" alt="COBREXA.jl logo"/></a><div class="docs-package-name"><span class="docs-autofit">COBREXA.jl</span></div><form class="docs-search" action="../search/"><input class="docs-search-query" id="documenter-search-query" name="q" type="text" placeholder="Search docs"/></form><ul class="docs-menu"><li><a class="tocitem" href="../">Home</a></li><li><span class="tocitem">User guide</span><ul><li><input class="collapse-toggle" id="menuitem-2-1" type="checkbox"/><label class="tocitem" for="menuitem-2-1"><span class="docs-label">Quickstart tutorials</span><i class="docs-chevron"></i></label><ul class="collapsed"><li><a class="tocitem" href="../tutorials/">All tutorials</a></li><li><a class="tocitem" href="../tutorials/1_loading/">Loading and converting model data</a></li><li><a class="tocitem" href="../tutorials/2_analysis/">Basic analysis of constraint-based models</a></li><li><a class="tocitem" href="../tutorials/3_hpc/">Distributed processing and HPC environments</a></li><li><a class="tocitem" href="../tutorials/4_modifying/">Modifying and saving the models</a></li></ul></li><li><input class="collapse-toggle" id="menuitem-2-2" type="checkbox" checked/><label class="tocitem" for="menuitem-2-2"><span class="docs-label">Advanced tutorials</span><i class="docs-chevron"></i></label><ul class="collapsed"><li class="is-active"><a class="tocitem" href>All advanced tutorials</a></li><li><a class="tocitem" href="1_variants/">Exploring many model variants</a></li><li><a class="tocitem" href="2_custom_model/">Working with custom models</a></li></ul></li><li><input class="collapse-toggle" id="menuitem-2-3" type="checkbox"/><label class="tocitem" for="menuitem-2-3"><span class="docs-label">Examples and notebooks</span><i class="docs-chevron"></i></label><ul class="collapsed"><li><a class="tocitem" href="../notebooks/">All notebooks</a></li><li><a class="tocitem" href="../notebooks/1_loading_converting_saving/">Loading, converting, and saving models</a></li><li><a class="tocitem" href="../notebooks/2_finding_balance/">Finding balance and variability of constraint-based models</a></li><li><a class="tocitem" href="../notebooks/3_basic_stdmodel_usage/">Basic usage of <code>StandardModel</code></a></li><li><a class="tocitem" href="../notebooks/4_basic_core_coupled_usage/">Basic usage of <code>CoreModel</code> and <code>CoreModelCoupled</code></a></li><li><a class="tocitem" href="../notebooks/5_basic_stdmodel_construction/">Model construction and modification</a></li><li><a class="tocitem" href="../notebooks/6_screening/">Exploring model variants with <code>screen</code></a></li><li><a class="tocitem" href="../notebooks/7_community_model/">Building and analysing a small community model</a></li><li><a class="tocitem" href="../notebooks/8_custom_model/">Using a custom model data structure</a></li><li><a class="tocitem" href="../notebooks/9_max_min_driving_force_analysis/">Maximum-minimum driving force analysis</a></li></ul></li></ul></li><li><span class="tocitem">Types and functions</span><ul><li><a class="tocitem" href="../functions/">Contents</a></li><li><a class="tocitem" href="../functions/analysis/">Analysis functions</a></li><li><a class="tocitem" href="../functions/base/">Base functions</a></li><li><a class="tocitem" href="../functions/io/">Input and output</a></li><li><a class="tocitem" href="../functions/reconstruction/">Model construction functions</a></li><li><a class="tocitem" href="../functions/types/">Types</a></li><li><a class="tocitem" href="../functions/utils/">Utilities</a></li></ul></li><li><a class="tocitem" href="../howToContribute/">How to contribute</a></li></ul><div class="docs-version-selector field has-addons"><div class="control"><span class="docs-label button is-static is-size-7">Version</span></div><div class="docs-selector control is-expanded"><div class="select is-fullwidth is-size-7"><select id="documenter-version-selector"></select></div></div></div></nav><div class="docs-main"><header class="docs-navbar"><nav class="breadcrumb"><ul class="is-hidden-mobile"><li><a class="is-disabled">User guide</a></li><li><a class="is-disabled">Advanced tutorials</a></li><li class="is-active"><a href>All advanced tutorials</a></li></ul><ul class="is-hidden-tablet"><li class="is-active"><a href>All advanced tutorials</a></li></ul></nav><div class="docs-right"><a class="docs-edit-link" href="https://github.com/lcsb-biocore/COBREXA.jl/blob/master/docs/src/advanced.md" title="Edit on GitHub"><span class="docs-icon fab"></span><span class="docs-label is-hidden-touch">Edit on GitHub</span></a><a class="docs-settings-button fas fa-cog" id="documenter-settings-button" href="#" title="Settings"></a><a class="docs-sidebar-button fa fa-bars is-hidden-desktop" id="documenter-sidebar-button" href="#"></a></div></header><article class="content" id="documenter-page"><h1 id="COBREXA-Advanced-tutorials"><a class="docs-heading-anchor" href="#COBREXA-Advanced-tutorials">COBREXA Advanced tutorials</a><a id="COBREXA-Advanced-tutorials-1"></a><a class="docs-heading-anchor-permalink" href="#COBREXA-Advanced-tutorials" title="Permalink"></a></h1><ul><li><a href="1_variants/#Exploring-many-model-variants">Exploring many model variants</a></li><ul><li><a href="1_variants/#Variant-specification">Variant specification</a></li><li><a href="1_variants/#Writing-custom-variant-functions">Writing custom variant functions</a></li><li><a href="1_variants/#Passing-extra-arguments-to-the-analysis-function">Passing extra arguments to the analysis function</a></li></ul><li><a href="2_custom_model/#Working-with-custom-models">Working with custom models</a></li><ul><li><a href="2_custom_model/#Writing-the-generic-accessors">Writing the generic accessors</a></li><li><a href="2_custom_model/#Writing-generic-model-modifications">Writing generic model modifications</a></li></ul></ul></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../tutorials/4_modifying/">« Modifying and saving the models</a><a class="docs-footer-nextpage" href="1_variants/">Exploring many model variants »</a><div class="flexbox-break"></div><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> on <span class="colophon-date" title="Monday 16 May 2022 19:38">Monday 16 May 2022</span>. Using Julia version 1.7.0.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
......@@ -5,7 +5,7 @@
samples = 10,
ranges = collect(zip(bounds(model)...))[ridxs],
reaction_samples = fill(samples, length(ridxs)),
)</code></pre><p>Create a lattice (list of &quot;tick&quot; vectors) for reactions at indexes <code>ridxs</code> in a model. Arguments <code>samples</code>, <code>ranges</code>, and <code>reaction_samples</code> may be optionally specified to customize the lattice creation process.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/lcsb-biocore/COBREXA.jl/blob/6d0e83c79c7269889049f6bc22eafe09365ddbe2/src/analysis/envelopes.jl#L11-L23">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.envelope_lattice-Tuple{MetabolicModel, Vector{String}}" href="#COBREXA.envelope_lattice-Tuple{MetabolicModel, Vector{String}}"><code>COBREXA.envelope_lattice</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">envelope_lattice(model::MetabolicModel, rids::Vector{String}; kwargs...)</code></pre><p>Version of <a href="#COBREXA.envelope_lattice-Tuple{MetabolicModel, Vector{Int64}}"><code>envelope_lattice</code></a> that works on string reaction IDs instead of integer indexes.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/lcsb-biocore/COBREXA.jl/blob/6d0e83c79c7269889049f6bc22eafe09365ddbe2/src/analysis/envelopes.jl#L2-L7">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.objective_envelope-Tuple{MetabolicModel, Vector{Int64}, Any}" href="#COBREXA.objective_envelope-Tuple{MetabolicModel, Vector{Int64}, Any}"><code>COBREXA.objective_envelope</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">objective_envelope(
)</code></pre><p>Create a lattice (list of &quot;tick&quot; vectors) for reactions at indexes <code>ridxs</code> in a model. Arguments <code>samples</code>, <code>ranges</code>, and <code>reaction_samples</code> may be optionally specified to customize the lattice creation process.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/lcsb-biocore/COBREXA.jl/blob/77603c3b626a5edd84a1fbd03d11477955788b00/src/analysis/envelopes.jl#L11-L23">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.envelope_lattice-Tuple{MetabolicModel, Vector{String}}" href="#COBREXA.envelope_lattice-Tuple{MetabolicModel, Vector{String}}"><code>COBREXA.envelope_lattice</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">envelope_lattice(model::MetabolicModel, rids::Vector{String}; kwargs...)</code></pre><p>Version of <a href="#COBREXA.envelope_lattice-Tuple{MetabolicModel, Vector{Int64}}"><code>envelope_lattice</code></a> that works on string reaction IDs instead of integer indexes.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/lcsb-biocore/COBREXA.jl/blob/77603c3b626a5edd84a1fbd03d11477955788b00/src/analysis/envelopes.jl#L2-L7">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.objective_envelope-Tuple{MetabolicModel, Vector{Int64}, Any}" href="#COBREXA.objective_envelope-Tuple{MetabolicModel, Vector{Int64}, Any}"><code>COBREXA.objective_envelope</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">objective_envelope(
model::MetabolicModel,
ridxs::Vector{Int},
optimizer;
......@@ -32,7 +32,7 @@ julia&gt; envelope.values # the computed flux objective values for each reacti
16.6666 18.6097 20.2847 21.894 22.6825 22.6825
16.6666 18.6097 20.2847 21.894 22.6825 22.6825
16.6666 18.6097 20.2847 21.894 22.6825 22.6825
16.6666 18.6097 20.2847 21.894 22.6825 22.6825</code></pre></div><a class="docs-sourcelink" target="_blank" href="https://github.com/lcsb-biocore/COBREXA.jl/blob/6d0e83c79c7269889049f6bc22eafe09365ddbe2/src/analysis/envelopes.jl#L49-L109">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.objective_envelope-Tuple{MetabolicModel, Vector{String}, Vararg{Any}}" href="#COBREXA.objective_envelope-Tuple{MetabolicModel, Vector{String}, Vararg{Any}}"><code>COBREXA.objective_envelope</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">objective_envelope(model::MetabolicModel, rids::Vector{String}, args...; kwargs...)</code></pre><p>Version of <a href="#COBREXA.objective_envelope-Tuple{MetabolicModel, Vector{Int64}, Any}"><code>objective_envelope</code></a> that works on string reaction IDs instead of integer indexes.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/lcsb-biocore/COBREXA.jl/blob/6d0e83c79c7269889049f6bc22eafe09365ddbe2/src/analysis/envelopes.jl#L35-L40">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.flux_balance_analysis-Union{Tuple{M}, Tuple{M, Any}} where M&lt;:MetabolicModel" href="#COBREXA.flux_balance_analysis-Union{Tuple{M}, Tuple{M, Any}} where M&lt;:MetabolicModel"><code>COBREXA.flux_balance_analysis</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">flux_balance_analysis(
16.6666 18.6097 20.2847 21.894 22.6825 22.6825</code></pre></div><a class="docs-sourcelink" target="_blank" href="https://github.com/lcsb-biocore/COBREXA.jl/blob/77603c3b626a5edd84a1fbd03d11477955788b00/src/analysis/envelopes.jl#L49-L109">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.objective_envelope-Tuple{MetabolicModel, Vector{String}, Vararg{Any}}" href="#COBREXA.objective_envelope-Tuple{MetabolicModel, Vector{String}, Vararg{Any}}"><code>COBREXA.objective_envelope</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">objective_envelope(model::MetabolicModel, rids::Vector{String}, args...; kwargs...)</code></pre><p>Version of <a href="#COBREXA.objective_envelope-Tuple{MetabolicModel, Vector{Int64}, Any}"><code>objective_envelope</code></a> that works on string reaction IDs instead of integer indexes.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/lcsb-biocore/COBREXA.jl/blob/77603c3b626a5edd84a1fbd03d11477955788b00/src/analysis/envelopes.jl#L35-L40">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.flux_balance_analysis-Union{Tuple{M}, Tuple{M, Any}} where M&lt;:MetabolicModel" href="#COBREXA.flux_balance_analysis-Union{Tuple{M}, Tuple{M, Any}} where M&lt;:MetabolicModel"><code>COBREXA.flux_balance_analysis</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">flux_balance_analysis(
model::M,
optimizer;
modifications = [],
......@@ -45,11 +45,11 @@ value.(solution[:x]) # extract flux steady state from the optimizer
biomass_reaction_id = findfirst(model.reactions, &quot;BIOMASS_Ecoli_core_w_GAM&quot;)
modified_solution = flux_balance_analysis(model, GLPK.optimizer;
modifications=[change_objective(biomass_reaction_id)])</code></pre></div><a class="docs-sourcelink" target="_blank" href="https://github.com/lcsb-biocore/COBREXA.jl/blob/6d0e83c79c7269889049f6bc22eafe09365ddbe2/src/analysis/flux_balance_analysis.jl#L35-L73">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.flux_balance_analysis_dict-Tuple{MetabolicModel, Vararg{Any}}" href="#COBREXA.flux_balance_analysis_dict-Tuple{MetabolicModel, Vararg{Any}}"><code>COBREXA.flux_balance_analysis_dict</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">flux_balance_analysis_dict(model::MetabolicModel, args...)::Maybe{Dict{String, Float64}}</code></pre><p>A variant of FBA that returns a dictionary assigning fluxes to reactions, if the solution is found. Arguments are passed to <a href="#COBREXA.flux_balance_analysis-Union{Tuple{M}, Tuple{M, Any}} where M&lt;:MetabolicModel"><code>flux_balance_analysis</code></a>.</p><p>This function is kept for backwards compatibility, use <a href="../base/#COBREXA.flux_dict-Tuple{MetabolicModel, Any}"><code>flux_dict</code></a> instead.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/lcsb-biocore/COBREXA.jl/blob/6d0e83c79c7269889049f6bc22eafe09365ddbe2/src/analysis/flux_balance_analysis.jl#L19-L27">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.flux_balance_analysis_vec-Tuple{MetabolicModel, Vararg{Any}}" href="#COBREXA.flux_balance_analysis_vec-Tuple{MetabolicModel, Vararg{Any}}"><code>COBREXA.flux_balance_analysis_vec</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">flux_balance_analysis_vec(model::MetabolicModel, args...)::Maybe{Vector{Float64}}</code></pre><p>A variant of FBA that returns a vector of fluxes in the same order as reactions of the model, if the solution is found.</p><p>Arguments are passed to <a href="#COBREXA.flux_balance_analysis-Union{Tuple{M}, Tuple{M, Any}} where M&lt;:MetabolicModel"><code>flux_balance_analysis</code></a>.</p><p>This function is kept for backwards compatibility, use <a href="../base/#COBREXA.flux_vector-Tuple{MetabolicModel, Any}"><code>flux_vector</code></a> instead.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/lcsb-biocore/COBREXA.jl/blob/6d0e83c79c7269889049f6bc22eafe09365ddbe2/src/analysis/flux_balance_analysis.jl#L1-L11">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA._max_variability_flux-NTuple{4, Any}" href="#COBREXA._max_variability_flux-NTuple{4, Any}"><code>COBREXA._max_variability_flux</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">_max_variability_flux(opt_model, flux, sense, ret)</code></pre><p>Internal helper for maximizing reactions in optimization model.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/lcsb-biocore/COBREXA.jl/blob/6d0e83c79c7269889049f6bc22eafe09365ddbe2/src/analysis/flux_variability_analysis.jl#L184-L188">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.flux_variability_analysis-Tuple{MetabolicModel, Any}" href="#COBREXA.flux_variability_analysis-Tuple{MetabolicModel, Any}"><code>COBREXA.flux_variability_analysis</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">flux_variability_analysis(
modifications=[change_objective(biomass_reaction_id)])</code></pre></div><a class="docs-sourcelink" target="_blank" href="https://github.com/lcsb-biocore/COBREXA.jl/blob/77603c3b626a5edd84a1fbd03d11477955788b00/src/analysis/flux_balance_analysis.jl#L35-L73">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.flux_balance_analysis_dict-Tuple{MetabolicModel, Vararg{Any}}" href="#COBREXA.flux_balance_analysis_dict-Tuple{MetabolicModel, Vararg{Any}}"><code>COBREXA.flux_balance_analysis_dict</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">flux_balance_analysis_dict(model::MetabolicModel, args...)::Maybe{Dict{String, Float64}}</code></pre><p>A variant of FBA that returns a dictionary assigning fluxes to reactions, if the solution is found. Arguments are passed to <a href="#COBREXA.flux_balance_analysis-Union{Tuple{M}, Tuple{M, Any}} where M&lt;:MetabolicModel"><code>flux_balance_analysis</code></a>.</p><p>This function is kept for backwards compatibility, use <a href="../base/#COBREXA.flux_dict-Tuple{MetabolicModel, Any}"><code>flux_dict</code></a> instead.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/lcsb-biocore/COBREXA.jl/blob/77603c3b626a5edd84a1fbd03d11477955788b00/src/analysis/flux_balance_analysis.jl#L19-L27">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.flux_balance_analysis_vec-Tuple{MetabolicModel, Vararg{Any}}" href="#COBREXA.flux_balance_analysis_vec-Tuple{MetabolicModel, Vararg{Any}}"><code>COBREXA.flux_balance_analysis_vec</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">flux_balance_analysis_vec(model::MetabolicModel, args...)::Maybe{Vector{Float64}}</code></pre><p>A variant of FBA that returns a vector of fluxes in the same order as reactions of the model, if the solution is found.</p><p>Arguments are passed to <a href="#COBREXA.flux_balance_analysis-Union{Tuple{M}, Tuple{M, Any}} where M&lt;:MetabolicModel"><code>flux_balance_analysis</code></a>.</p><p>This function is kept for backwards compatibility, use <a href="../base/#COBREXA.flux_vector-Tuple{MetabolicModel, Any}"><code>flux_vector</code></a> instead.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/lcsb-biocore/COBREXA.jl/blob/77603c3b626a5edd84a1fbd03d11477955788b00/src/analysis/flux_balance_analysis.jl#L1-L11">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA._max_variability_flux-NTuple{4, Any}" href="#COBREXA._max_variability_flux-NTuple{4, Any}"><code>COBREXA._max_variability_flux</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">_max_variability_flux(opt_model, flux, sense, ret)</code></pre><p>Internal helper for maximizing reactions in optimization model.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/lcsb-biocore/COBREXA.jl/blob/77603c3b626a5edd84a1fbd03d11477955788b00/src/analysis/flux_variability_analysis.jl#L184-L188">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.flux_variability_analysis-Tuple{MetabolicModel, Any}" href="#COBREXA.flux_variability_analysis-Tuple{MetabolicModel, Any}"><code>COBREXA.flux_variability_analysis</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">flux_variability_analysis(
model::MetabolicModel,
optimizer;
kwargs...
)</code></pre><p>A simpler version of <a href="#COBREXA.flux_variability_analysis-Tuple{MetabolicModel, Any}"><code>flux_variability_analysis</code></a> that maximizes and minimizes all declared fluxes in the model. Arguments are forwarded.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/lcsb-biocore/COBREXA.jl/blob/6d0e83c79c7269889049f6bc22eafe09365ddbe2/src/analysis/flux_variability_analysis.jl#L133-L142">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.flux_variability_analysis-Tuple{MetabolicModel, SparseArrays.SparseMatrixCSC{Float64, Int64}, Any}" href="#COBREXA.flux_variability_analysis-Tuple{MetabolicModel, SparseArrays.SparseMatrixCSC{Float64, Int64}, Any}"><code>COBREXA.flux_variability_analysis</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">flux_variability_analysis(
)</code></pre><p>A simpler version of <a href="#COBREXA.flux_variability_analysis-Tuple{MetabolicModel, Any}"><code>flux_variability_analysis</code></a> that maximizes and minimizes all declared fluxes in the model. Arguments are forwarded.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/lcsb-biocore/COBREXA.jl/blob/77603c3b626a5edd84a1fbd03d11477955788b00/src/analysis/flux_variability_analysis.jl#L133-L142">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.flux_variability_analysis-Tuple{MetabolicModel, SparseArrays.SparseMatrixCSC{Float64, Int64}, Any}" href="#COBREXA.flux_variability_analysis-Tuple{MetabolicModel, SparseArrays.SparseMatrixCSC{Float64, Int64}, Any}"><code>COBREXA.flux_variability_analysis</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">flux_variability_analysis(
model::MetabolicModel,
fluxes::Vector{Int},
optimizer;
......@@ -63,7 +63,7 @@ s.t. S x = b
xₗ ≤ x ≤ xᵤ
cᵀx ≥ bounds(Z₀)[1]
cᵀx ≤ bounds(Z₀)[2]</code></pre><p>where Z₀:= cᵀx₀ is the objective value of an optimal solution of the associated FBA problem (see <a href="#COBREXA.flux_balance_analysis-Union{Tuple{M}, Tuple{M, Any}} where M&lt;:MetabolicModel"><code>flux_balance_analysis</code></a> for a related analysis, also for explanation of the <code>modifications</code> argument).</p><p>The <code>bounds</code> is a user-supplied function that specifies the objective bounds for the variability optimizations, by default it restricts the flux objective value to the precise optimum reached in FBA. It can return <code>-Inf</code> and <code>Inf</code> in first and second pair to remove the limit. Use <a href="../utils/#COBREXA.gamma_bounds-Tuple{Any}"><code>gamma_bounds</code></a> and <a href="../utils/#COBREXA.objective_bounds-Tuple{Any}"><code>objective_bounds</code></a> for simple bounds.</p><p><code>optimizer</code> must be set to a <code>JuMP</code>-compatible optimizer. The computation of the individual optimization problems is transparently distributed to <code>workers</code> (see <code>Distributed.workers()</code>). The value of Z₀ can be optionally supplied in argument <code>optimal_objective_value</code>, which prevents this function from calling the non-parallelizable FBA. Separating the single-threaded FBA and multithreaded variability computation can be used to improve resource allocation efficiency in many common use-cases.</p><p><code>ret</code> is a function used to extract results from optimized JuMP models of the individual fluxes. By default, it calls and returns the value of <code>JuMP.objective_value</code>. More information can be extracted e.g. by setting it to a function that returns a more elaborate data structure; such as <code>m -&gt; (JuMP.objective_value(m), JuMP.value.(m[:x]))</code>.</p><p>Returns a matrix of extracted <code>ret</code> values for minima and maxima, of total size (<code>size(fluxes,2)</code>,2). The optimizer result status is checked with <a href="../base/#COBREXA.is_solved-Tuple{Any}"><code>is_solved</code></a>; <code>nothing</code> is returned if the optimization failed for any reason.</p><p><strong>Example</strong></p><pre><code class="language-none">model = load_model(&quot;e_coli_core.json&quot;)
flux_variability_analysis(model, [1, 2, 3, 42], GLPK.optimizer)</code></pre></div><a class="docs-sourcelink" target="_blank" href="https://github.com/lcsb-biocore/COBREXA.jl/blob/6d0e83c79c7269889049f6bc22eafe09365ddbe2/src/analysis/flux_variability_analysis.jl#L1-L56">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.flux_variability_analysis-Tuple{MetabolicModel, Vector{Int64}, Any}" href="#COBREXA.flux_variability_analysis-Tuple{MetabolicModel, Vector{Int64}, Any}"><code>COBREXA.flux_variability_analysis</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">flux_variability_analysis(model::MetabolicModel, flux_indexes::Vector{Int}, optimizer; kwargs...)</code></pre><p>An overload of <a href="#COBREXA.flux_variability_analysis-Tuple{MetabolicModel, Any}"><code>flux_variability_analysis</code></a> that explores the fluxes specified by integer indexes</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/lcsb-biocore/COBREXA.jl/blob/6d0e83c79c7269889049f6bc22eafe09365ddbe2/src/analysis/flux_variability_analysis.jl#L110-L114">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.flux_variability_analysis_dict-Tuple{MetabolicModel, Any}" href="#COBREXA.flux_variability_analysis_dict-Tuple{MetabolicModel, Any}"><code>COBREXA.flux_variability_analysis_dict</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">flux_variability_analysis_dict(
flux_variability_analysis(model, [1, 2, 3, 42], GLPK.optimizer)</code></pre></div><a class="docs-sourcelink" target="_blank" href="https://github.com/lcsb-biocore/COBREXA.jl/blob/77603c3b626a5edd84a1fbd03d11477955788b00/src/analysis/flux_variability_analysis.jl#L1-L56">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.flux_variability_analysis-Tuple{MetabolicModel, Vector{Int64}, Any}" href="#COBREXA.flux_variability_analysis-Tuple{MetabolicModel, Vector{Int64}, Any}"><code>COBREXA.flux_variability_analysis</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">flux_variability_analysis(model::MetabolicModel, flux_indexes::Vector{Int}, optimizer; kwargs...)</code></pre><p>An overload of <a href="#COBREXA.flux_variability_analysis-Tuple{MetabolicModel, Any}"><code>flux_variability_analysis</code></a> that explores the fluxes specified by integer indexes</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/lcsb-biocore/COBREXA.jl/blob/77603c3b626a5edd84a1fbd03d11477955788b00/src/analysis/flux_variability_analysis.jl#L110-L114">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.flux_variability_analysis_dict-Tuple{MetabolicModel, Any}" href="#COBREXA.flux_variability_analysis_dict-Tuple{MetabolicModel, Any}"><code>COBREXA.flux_variability_analysis_dict</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">flux_variability_analysis_dict(
model::MetabolicModel,
optimizer;
kwargs...
......@@ -76,14 +76,14 @@ flux_variability_analysis(model, [1, 2, 3, 42], GLPK.optimizer)</code></pre></di
change_constraint(&quot;EX_glc__D_e&quot;; lb = -10, ub = -10),
change_constraint(&quot;EX_o2_e&quot;; lb = 0, ub = 0),
],
)</code></pre></div><a class="docs-sourcelink" target="_blank" href="https://github.com/lcsb-biocore/COBREXA.jl/blob/6d0e83c79c7269889049f6bc22eafe09365ddbe2/src/analysis/flux_variability_analysis.jl#L146-L170">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.reaction_variability_analysis-Tuple{MetabolicModel, Any}" href="#COBREXA.reaction_variability_analysis-Tuple{MetabolicModel, Any}"><code>COBREXA.reaction_variability_analysis</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">reaction_variability_analysis( model::MetabolicModel, optimizer; kwargs...)</code></pre><p>Shortcut for <a href="#COBREXA.reaction_variability_analysis-Tuple{MetabolicModel, Any}"><code>reaction_variability_analysis</code></a> that examines all reactions.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/lcsb-biocore/COBREXA.jl/blob/6d0e83c79c7269889049f6bc22eafe09365ddbe2/src/analysis/flux_variability_analysis.jl#L228-L232">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.reaction_variability_analysis-Tuple{MetabolicModel, Vector{Int64}, Any}" href="#COBREXA.reaction_variability_analysis-Tuple{MetabolicModel, Vector{Int64}, Any}"><code>COBREXA.reaction_variability_analysis</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">reaction_variability_analysis(model::MetabolicModel, reaction_indexes::Vector{Int}, optimizer; kwargs...)</code></pre><p>A variant for <a href="#COBREXA.flux_variability_analysis-Tuple{MetabolicModel, Any}"><code>flux_variability_analysis</code></a> that examines actual reactions (selected by their indexes in <code>reactions</code> argument) instead of whole fluxes. This may be useful for models where the sets of reactions and fluxes differ.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/lcsb-biocore/COBREXA.jl/blob/6d0e83c79c7269889049f6bc22eafe09365ddbe2/src/analysis/flux_variability_analysis.jl#L196-L203">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.make_gecko_model-Tuple{MetabolicModel}" href="#COBREXA.make_gecko_model-Tuple{MetabolicModel}"><code>COBREXA.make_gecko_model</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">make_gecko_model(
)</code></pre></div><a class="docs-sourcelink" target="_blank" href="https://github.com/lcsb-biocore/COBREXA.jl/blob/77603c3b626a5edd84a1fbd03d11477955788b00/src/analysis/flux_variability_analysis.jl#L146-L170">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.reaction_variability_analysis-Tuple{MetabolicModel, Any}" href="#COBREXA.reaction_variability_analysis-Tuple{MetabolicModel, Any}"><code>COBREXA.reaction_variability_analysis</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">reaction_variability_analysis( model::MetabolicModel, optimizer; kwargs...)</code></pre><p>Shortcut for <a href="#COBREXA.reaction_variability_analysis-Tuple{MetabolicModel, Any}"><code>reaction_variability_analysis</code></a> that examines all reactions.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/lcsb-biocore/COBREXA.jl/blob/77603c3b626a5edd84a1fbd03d11477955788b00/src/analysis/flux_variability_analysis.jl#L228-L232">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.reaction_variability_analysis-Tuple{MetabolicModel, Vector{Int64}, Any}" href="#COBREXA.reaction_variability_analysis-Tuple{MetabolicModel, Vector{Int64}, Any}"><code>COBREXA.reaction_variability_analysis</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">reaction_variability_analysis(model::MetabolicModel, reaction_indexes::Vector{Int}, optimizer; kwargs...)</code></pre><p>A variant for <a href="#COBREXA.flux_variability_analysis-Tuple{MetabolicModel, Any}"><code>flux_variability_analysis</code></a> that examines actual reactions (selected by their indexes in <code>reactions</code> argument) instead of whole fluxes. This may be useful for models where the sets of reactions and fluxes differ.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/lcsb-biocore/COBREXA.jl/blob/77603c3b626a5edd84a1fbd03d11477955788b00/src/analysis/flux_variability_analysis.jl#L196-L203">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.make_gecko_model-Tuple{MetabolicModel}" href="#COBREXA.make_gecko_model-Tuple{MetabolicModel}"><code>COBREXA.make_gecko_model</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">make_gecko_model(
model::MetabolicModel;
reaction_isozymes::Union{Function,Dict{String,Vector{Isozyme}}}
gene_product_bounds::Union{Function,Dict{String,Tuple{Float64,Float64}}},
gene_product_molar_mass::Union{Function,Dict{String,Float64}},
gene_product_mass_group::Union{Function,Dict{String,String}} = _ -&gt; &quot;uncategorized&quot;,
gene_product_mass_group_bound::Union{Function,Dict{String,Float64}},
)</code></pre><p>Wrap a model into a <a href="../types/#COBREXA.GeckoModel"><code>GeckoModel</code></a>, following the structure given by GECKO algorithm (see <a href="../types/#COBREXA.GeckoModel"><code>GeckoModel</code></a> documentation for details).</p><p><strong>Arguments</strong></p><ul><li><code>reaction_isozymes</code> is a function that returns a vector of <a href="../types/#COBREXA.Isozyme"><code>Isozyme</code></a>s for each reaction, or empty vector if the reaction is not enzymatic.</li><li><code>gene_product_bounds</code> is a function that returns lower and upper bound for concentration for a given gene product (specified by the same string gene ID as in <code>reaction_isozymes</code>), as <code>Tuple{Float64,Float64}</code>.</li><li><code>gene_product_molar_mass</code> is a function that returns a numeric molar mass of a given gene product specified by string gene ID.</li><li><code>gene_product_mass_group</code> is a function that returns a string group identifier for a given gene product, again specified by string gene ID. By default, all gene products belong to group <code>&quot;uncategorized&quot;</code> which is the behavior of original GECKO.</li><li><code>gene_product_mass_group_bound</code> is a function that returns the maximum mass for a given mass group.</li></ul><p>Alternatively, all function arguments may be also supplied as dictionaries that provide the same data lookup.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/lcsb-biocore/COBREXA.jl/blob/6d0e83c79c7269889049f6bc22eafe09365ddbe2/src/analysis/gecko.jl#L1-L32">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA._mmdf_add_df_bound-Tuple{Any, Any}" href="#COBREXA._mmdf_add_df_bound-Tuple{Any, Any}"><code>COBREXA._mmdf_add_df_bound</code></a><span class="docstring-category">Method</span></header><section><div><p>Helper function to add a new constraint on the driving force.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/lcsb-biocore/COBREXA.jl/blob/6d0e83c79c7269889049f6bc22eafe09365ddbe2/src/analysis/max_min_driving_force.jl#L298-L300">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA._mmdf_concen_objective-Tuple{Any, Any}" href="#COBREXA._mmdf_concen_objective-Tuple{Any, Any}"><code>COBREXA._mmdf_concen_objective</code></a><span class="docstring-category">Method</span></header><section><div><p>Helper function to change the objective to optimizing some concentration.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/lcsb-biocore/COBREXA.jl/blob/6d0e83c79c7269889049f6bc22eafe09365ddbe2/src/analysis/max_min_driving_force.jl#L289-L291">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA._mmdf_dgr_objective-Tuple{Any, Any}" href="#COBREXA._mmdf_dgr_objective-Tuple{Any, Any}"><code>COBREXA._mmdf_dgr_objective</code></a><span class="docstring-category">Method</span></header><section><div><p>Helper function to change the objective to optimizing some dG.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/lcsb-biocore/COBREXA.jl/blob/6d0e83c79c7269889049f6bc22eafe09365ddbe2/src/analysis/max_min_driving_force.jl#L280-L282">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.max_min_driving_force-Tuple{MetabolicModel, Dict{String, Float64}, Any}" href="#COBREXA.max_min_driving_force-Tuple{MetabolicModel, Dict{String, Float64}, Any}"><code>COBREXA.max_min_driving_force</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">max_min_driving_force(
)</code></pre><p>Wrap a model into a <a href="../types/#COBREXA.GeckoModel"><code>GeckoModel</code></a>, following the structure given by GECKO algorithm (see <a href="../types/#COBREXA.GeckoModel"><code>GeckoModel</code></a> documentation for details).</p><p><strong>Arguments</strong></p><ul><li><code>reaction_isozymes</code> is a function that returns a vector of <a href="../types/#COBREXA.Isozyme"><code>Isozyme</code></a>s for each reaction, or empty vector if the reaction is not enzymatic.</li><li><code>gene_product_bounds</code> is a function that returns lower and upper bound for concentration for a given gene product (specified by the same string gene ID as in <code>reaction_isozymes</code>), as <code>Tuple{Float64,Float64}</code>.</li><li><code>gene_product_molar_mass</code> is a function that returns a numeric molar mass of a given gene product specified by string gene ID.</li><li><code>gene_product_mass_group</code> is a function that returns a string group identifier for a given gene product, again specified by string gene ID. By default, all gene products belong to group <code>&quot;uncategorized&quot;</code> which is the behavior of original GECKO.</li><li><code>gene_product_mass_group_bound</code> is a function that returns the maximum mass for a given mass group.</li></ul><p>Alternatively, all function arguments may be also supplied as dictionaries that provide the same data lookup.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/lcsb-biocore/COBREXA.jl/blob/77603c3b626a5edd84a1fbd03d11477955788b00/src/analysis/gecko.jl#L1-L32">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA._mmdf_add_df_bound-Tuple{Any, Any}" href="#COBREXA._mmdf_add_df_bound-Tuple{Any, Any}"><code>COBREXA._mmdf_add_df_bound</code></a><span class="docstring-category">Method</span></header><section><div><p>Helper function to add a new constraint on the driving force.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/lcsb-biocore/COBREXA.jl/blob/77603c3b626a5edd84a1fbd03d11477955788b00/src/analysis/max_min_driving_force.jl#L298-L300">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA._mmdf_concen_objective-Tuple{Any, Any}" href="#COBREXA._mmdf_concen_objective-Tuple{Any, Any}"><code>COBREXA._mmdf_concen_objective</code></a><span class="docstring-category">Method</span></header><section><div><p>Helper function to change the objective to optimizing some concentration.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/lcsb-biocore/COBREXA.jl/blob/77603c3b626a5edd84a1fbd03d11477955788b00/src/analysis/max_min_driving_force.jl#L289-L291">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA._mmdf_dgr_objective-Tuple{Any, Any}" href="#COBREXA._mmdf_dgr_objective-Tuple{Any, Any}"><code>COBREXA._mmdf_dgr_objective</code></a><span class="docstring-category">Method</span></header><section><div><p>Helper function to change the objective to optimizing some dG.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/lcsb-biocore/COBREXA.jl/blob/77603c3b626a5edd84a1fbd03d11477955788b00/src/analysis/max_min_driving_force.jl#L280-L282">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.max_min_driving_force-Tuple{MetabolicModel, Dict{String, Float64}, Any}" href="#COBREXA.max_min_driving_force-Tuple{MetabolicModel, Dict{String, Float64}, Any}"><code>COBREXA.max_min_driving_force</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">max_min_driving_force(
model::MetabolicModel,
reaction_standard_gibbs_free_energies::Dict{String,Float64},
optimizer;
......@@ -105,7 +105,7 @@ flux_variability_analysis(model, [1, 2, 3, 42], GLPK.optimizer)</code></pre></di
)</code></pre><p>Perform a max-min driving force analysis on the <code>model</code>, as defined by Noor, et al., &quot;Pathway thermodynamics highlights kinetic obstacles in central metabolism.&quot;, PLoS computational biology, 2014.</p><p>The function uses the supplied <code>optimizer</code> and <code>reaction_standard_gibbs_free_energies</code>. Optionally, <code>flux_solution</code> can be used to set the directions of each reaction in <code>model</code> (all reactions are assumed to proceed forward and are active by default). The supplied <code>flux_solution</code> should be free of internal cycles i.e. thermodynamically consistent. This optional input is important if a reaction in <code>model</code> normally runs in reverse (negative flux). Note, reactions in <code>flux_solution</code> that are smaller than <code>small_flux_tol</code> are also ignored in the analysis function (for numerical stability).</p><p>The max-min driving force algorithm returns the Gibbs free energy of the reactions, the concentrations of metabolites and the actual maximum minimum driving force. The optimization problem solved is:</p><pre><code class="language-none">max min -ΔᵣG
s.t. ΔᵣG = ΔrG⁰ + R T S&#39; ln(C)
ΔᵣG ≤ 0
ln(Cₗ) ≤ ln(C) ≤ ln(Cᵤ)</code></pre><p>where <code>ΔrG</code> are the Gibbs energies dissipated by the reactions, R is the gas constant, T is the temperature, S is the stoichiometry of the model, and C is the vector of metabolite concentrations (and their respective lower and upper bounds).</p><p>In case no feasible solution exists, <code>nothing</code> is returned.</p><p>Reactions specified in <code>ignore_reaction_ids</code> are internally ignored when calculating the max-min driving force. This should include water and proton importers.</p><p>Since biochemical thermodynamics are assumed, the <code>proton_ids</code> and <code>water_ids</code> need to be specified so that they can be ignored in the calculations. Effectively this assumes an aqueous environment at constant pH is used.</p><p><code>constant_concentrations</code> is used to fix the concentrations of certain metabolites (such as CO₂). <code>concentration_ratios</code> is used to specify additional constraints on metabolite pair concentrations (typically, this is done with various cofactors such as the ATP/ADP ratio. For example, you can fix the concentration of ATP to be always 5× higher than of ADP by specifying <code>Dict((&quot;ATP&quot;,&quot;ADP&quot;) =&gt; 5.0)</code></p><p><code>concentration_lb</code> and <code>concentration_ub</code> set the <code>Cₗ</code> and <code>Cᵤ</code> in the optimization problems.</p><p><code>T</code> and <code>R</code> can be specified in the corresponding units; defaults are K and kJ/K/mol.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/lcsb-biocore/COBREXA.jl/blob/6d0e83c79c7269889049f6bc22eafe09365ddbe2/src/analysis/max_min_driving_force.jl#L1-L67">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.max_min_driving_force_variability-Tuple{MetabolicModel, Dict{String, Float64}, Any}" href="#COBREXA.max_min_driving_force_variability-Tuple{MetabolicModel, Dict{String, Float64}, Any}"><code>COBREXA.max_min_driving_force_variability</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">max_min_driving_force_variability(
ln(Cₗ) ≤ ln(C) ≤ ln(Cᵤ)</code></pre><p>where <code>ΔrG</code> are the Gibbs energies dissipated by the reactions, R is the gas constant, T is the temperature, S is the stoichiometry of the model, and C is the vector of metabolite concentrations (and their respective lower and upper bounds).</p><p>In case no feasible solution exists, <code>nothing</code> is returned.</p><p>Reactions specified in <code>ignore_reaction_ids</code> are internally ignored when calculating the max-min driving force. This should include water and proton importers.</p><p>Since biochemical thermodynamics are assumed, the <code>proton_ids</code> and <code>water_ids</code> need to be specified so that they can be ignored in the calculations. Effectively this assumes an aqueous environment at constant pH is used.</p><p><code>constant_concentrations</code> is used to fix the concentrations of certain metabolites (such as CO₂). <code>concentration_ratios</code> is used to specify additional constraints on metabolite pair concentrations (typically, this is done with various cofactors such as the ATP/ADP ratio. For example, you can fix the concentration of ATP to be always 5× higher than of ADP by specifying <code>Dict((&quot;ATP&quot;,&quot;ADP&quot;) =&gt; 5.0)</code></p><p><code>concentration_lb</code> and <code>concentration_ub</code> set the <code>Cₗ</code> and <code>Cᵤ</code> in the optimization problems.</p><p><code>T</code> and <code>R</code> can be specified in the corresponding units; defaults are K and kJ/K/mol.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/lcsb-biocore/COBREXA.jl/blob/77603c3b626a5edd84a1fbd03d11477955788b00/src/analysis/max_min_driving_force.jl#L1-L67">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.max_min_driving_force_variability-Tuple{MetabolicModel, Dict{String, Float64}, Any}" href="#COBREXA.max_min_driving_force_variability-Tuple{MetabolicModel, Dict{String, Float64}, Any}"><code>COBREXA.max_min_driving_force_variability</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">max_min_driving_force_variability(
model::MetabolicModel,
reaction_standard_gibbs_free_energies::Dict{String,Float64},
optimizer;
......@@ -127,7 +127,7 @@ s.t. ΔᵣG = ΔrG⁰ + R T S&#39; ln(C)
small_flux_tol = 1e-6,
modifications = [],
ignore_reaction_ids = [],
)</code></pre><p>Perform a variant of flux variability analysis on a max min driving force type problem. Arguments are forwarded to <a href="#COBREXA.max_min_driving_force-Tuple{MetabolicModel, Dict{String, Float64}, Any}"><code>max_min_driving_force</code></a>. Calls <a href="#COBREXA.screen-Tuple"><code>screen</code></a> internally and possibly distributes computation across <code>workers</code>. If <code>optimal_objective_value = nothing</code>, the function first performs regular max min driving force analysis to find the max min driving force of the model and sets this to <code>optimal_objective_value</code>. Then iteratively maximizes and minimizes the driving force across each reaction, and then the concentrations while staying close to the original max min driving force as specified in <code>bounds</code>.</p><p>The <code>bounds</code> is a user-supplied function that specifies the max min driving force bounds for the variability optimizations, by default it restricts the flux objective value to the precise optimum reached in the normal max min driving force analysis. It can return <code>-Inf</code> and <code>Inf</code> in first and second pair to remove the limit. Use <a href="../utils/#COBREXA.gamma_bounds-Tuple{Any}"><code>gamma_bounds</code></a> and <a href="../utils/#COBREXA.objective_bounds-Tuple{Any}"><code>objective_bounds</code></a> for simple bounds.</p><p>Returns a matrix of solutions to <a href="#COBREXA.max_min_driving_force-Tuple{MetabolicModel, Dict{String, Float64}, Any}"><code>max_min_driving_force</code></a> additionally constrained as described above, where the rows are in the order of the reactions and then the metabolites of the <code>model</code>. For the reaction rows the first column is the maximum dG of that reaction, and the second column is the minimum dG of that reaction subject to the above constraints. For the metabolite rows, the first column is the maximum concentration, and the second column is the minimum concentration subject to the constraints above.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/lcsb-biocore/COBREXA.jl/blob/6d0e83c79c7269889049f6bc22eafe09365ddbe2/src/analysis/max_min_driving_force.jl#L185-L231">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.minimize_metabolic_adjustment-Tuple{Dict{String, Float64}}" href="#COBREXA.minimize_metabolic_adjustment-Tuple{Dict{String, Float64}}"><code>COBREXA.minimize_metabolic_adjustment</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">minimize_metabolic_adjustment(flux_ref_dict::Dict{String, Float64})</code></pre><p>Overload of <a href="#COBREXA.minimize_metabolic_adjustment-Tuple{Dict{String, Float64}}"><code>minimize_metabolic_adjustment</code></a> that works with a dictionary of fluxes.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/lcsb-biocore/COBREXA.jl/blob/6d0e83c79c7269889049f6bc22eafe09365ddbe2/src/analysis/minimize_metabolic_adjustment.jl#L71-L76">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.minimize_metabolic_adjustment-Tuple{Vector{Float64}}" href="#COBREXA.minimize_metabolic_adjustment-Tuple{Vector{Float64}}"><code>COBREXA.minimize_metabolic_adjustment</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">minimize_metabolic_adjustment(flux_ref::Vector{Float64})</code></pre><p>An optimization model modification that implements the MOMA in <a href="#COBREXA.minimize_metabolic_adjustment_analysis-Tuple{MetabolicModel, Union{Dict{String, Float64}, Vector{Float64}}, Any}"><code>minimize_metabolic_adjustment_analysis</code></a>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/lcsb-biocore/COBREXA.jl/blob/6d0e83c79c7269889049f6bc22eafe09365ddbe2/src/analysis/minimize_metabolic_adjustment.jl#L54-L59">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.minimize_metabolic_adjustment_analysis-Tuple{MetabolicModel, Union{Dict{String, Float64}, Vector{Float64}}, Any}" href="#COBREXA.minimize_metabolic_adjustment_analysis-Tuple{MetabolicModel, Union{Dict{String, Float64}, Vector{Float64}}, Any}"><code>COBREXA.minimize_metabolic_adjustment_analysis</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">minimize_metabolic_adjustment_analysis(
)</code></pre><p>Perform a variant of flux variability analysis on a max min driving force type problem. Arguments are forwarded to <a href="#COBREXA.max_min_driving_force-Tuple{MetabolicModel, Dict{String, Float64}, Any}"><code>max_min_driving_force</code></a>. Calls <a href="#COBREXA.screen-Tuple"><code>screen</code></a> internally and possibly distributes computation across <code>workers</code>. If <code>optimal_objective_value = nothing</code>, the function first performs regular max min driving force analysis to find the max min driving force of the model and sets this to <code>optimal_objective_value</code>. Then iteratively maximizes and minimizes the driving force across each reaction, and then the concentrations while staying close to the original max min driving force as specified in <code>bounds</code>.</p><p>The <code>bounds</code> is a user-supplied function that specifies the max min driving force bounds for the variability optimizations, by default it restricts the flux objective value to the precise optimum reached in the normal max min driving force analysis. It can return <code>-Inf</code> and <code>Inf</code> in first and second pair to remove the limit. Use <a href="../utils/#COBREXA.gamma_bounds-Tuple{Any}"><code>gamma_bounds</code></a> and <a href="../utils/#COBREXA.objective_bounds-Tuple{Any}"><code>objective_bounds</code></a> for simple bounds.</p><p>Returns a matrix of solutions to <a href="#COBREXA.max_min_driving_force-Tuple{MetabolicModel, Dict{String, Float64}, Any}"><code>max_min_driving_force</code></a> additionally constrained as described above, where the rows are in the order of the reactions and then the metabolites of the <code>model</code>. For the reaction rows the first column is the maximum dG of that reaction, and the second column is the minimum dG of that reaction subject to the above constraints. For the metabolite rows, the first column is the maximum concentration, and the second column is the minimum concentration subject to the constraints above.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/lcsb-biocore/COBREXA.jl/blob/77603c3b626a5edd84a1fbd03d11477955788b00/src/analysis/max_min_driving_force.jl#L185-L231">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.minimize_metabolic_adjustment-Tuple{Dict{String, Float64}}" href="#COBREXA.minimize_metabolic_adjustment-Tuple{Dict{String, Float64}}"><code>COBREXA.minimize_metabolic_adjustment</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">minimize_metabolic_adjustment(flux_ref_dict::Dict{String, Float64})</code></pre><p>Overload of <a href="#COBREXA.minimize_metabolic_adjustment-Tuple{Dict{String, Float64}}"><code>minimize_metabolic_adjustment</code></a> that works with a dictionary of fluxes.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/lcsb-biocore/COBREXA.jl/blob/77603c3b626a5edd84a1fbd03d11477955788b00/src/analysis/minimize_metabolic_adjustment.jl#L71-L76">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.minimize_metabolic_adjustment-Tuple{Vector{Float64}}" href="#COBREXA.minimize_metabolic_adjustment-Tuple{Vector{Float64}}"><code>COBREXA.minimize_metabolic_adjustment</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">minimize_metabolic_adjustment(flux_ref::Vector{Float64})</code></pre><p>An optimization model modification that implements the MOMA in <a href="#COBREXA.minimize_metabolic_adjustment_analysis-Tuple{MetabolicModel, Union{Dict{String, Float64}, Vector{Float64}}, Any}"><code>minimize_metabolic_adjustment_analysis</code></a>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/lcsb-biocore/COBREXA.jl/blob/77603c3b626a5edd84a1fbd03d11477955788b00/src/analysis/minimize_metabolic_adjustment.jl#L54-L59">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.minimize_metabolic_adjustment_analysis-Tuple{MetabolicModel, Union{Dict{String, Float64}, Vector{Float64}}, Any}" href="#COBREXA.minimize_metabolic_adjustment_analysis-Tuple{MetabolicModel, Union{Dict{String, Float64}, Vector{Float64}}, Any}"><code>COBREXA.minimize_metabolic_adjustment_analysis</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">minimize_metabolic_adjustment_analysis(
model::MetabolicModel,
flux_ref::Union{Dict{String,Float64}, Vector{Float64}},
optimizer;
......@@ -143,7 +143,7 @@ optmodel = minimize_metabolic_adjustment(
Gurobi.Optimizer;
modifications = [change_constraint(&quot;PFL&quot;; lb=0, ub=0)], # find flux of mutant that is closest to the wild type (reference) model
)
value.(solution[:x]) # extract the flux from the optimizer</code></pre></div><a class="docs-sourcelink" target="_blank" href="https://github.com/lcsb-biocore/COBREXA.jl/blob/6d0e83c79c7269889049f6bc22eafe09365ddbe2/src/analysis/minimize_metabolic_adjustment.jl#L1-L40">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.minimize_metabolic_adjustment_analysis_dict-Tuple{MetabolicModel, Vararg{Any}}" href="#COBREXA.minimize_metabolic_adjustment_analysis_dict-Tuple{MetabolicModel, Vararg{Any}}"><code>COBREXA.minimize_metabolic_adjustment_analysis_dict</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">minimize_metabolic_adjustment_analysis_dict(model::MetabolicModel, args...; kwargs...)</code></pre><p>Perform minimization of metabolic adjustment (MOMA) and return a dictionary mapping the reaction IDs to fluxes. Arguments are forwarded to <a href="#COBREXA.minimize_metabolic_adjustment-Tuple{Dict{String, Float64}}"><code>minimize_metabolic_adjustment</code></a> internally.</p><p>This function is kept for backwards compatibility, use <a href="../base/#COBREXA.flux_vector-Tuple{MetabolicModel, Any}"><code>flux_vector</code></a> instead.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/lcsb-biocore/COBREXA.jl/blob/6d0e83c79c7269889049f6bc22eafe09365ddbe2/src/analysis/minimize_metabolic_adjustment.jl#L97-L106">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.minimize_metabolic_adjustment_analysis_vec-Tuple{MetabolicModel, Vararg{Any}}" href="#COBREXA.minimize_metabolic_adjustment_analysis_vec-Tuple{MetabolicModel, Vararg{Any}}"><code>COBREXA.minimize_metabolic_adjustment_analysis_vec</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">minimize_metabolic_adjustment_analysis_vec(model::MetabolicModel, args...; kwargs...)</code></pre><p>Perform minimization of metabolic adjustment (MOMA) and return a vector of fluxes in the same order as the reactions in <code>model</code>. Arguments are forwarded to <a href="#COBREXA.minimize_metabolic_adjustment-Tuple{Dict{String, Float64}}"><code>minimize_metabolic_adjustment</code></a> internally.</p><p>This function is kept for backwards compatibility, use <a href="../base/#COBREXA.flux_vector-Tuple{MetabolicModel, Any}"><code>flux_vector</code></a> instead.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/lcsb-biocore/COBREXA.jl/blob/6d0e83c79c7269889049f6bc22eafe09365ddbe2/src/analysis/minimize_metabolic_adjustment.jl#L84-L93">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.parsimonious_flux_balance_analysis-Tuple{MetabolicModel, Any}" href="#COBREXA.parsimonious_flux_balance_analysis-Tuple{MetabolicModel, Any}"><code>COBREXA.parsimonious_flux_balance_analysis</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">parsimonious_flux_balance_analysis(
value.(solution[:x]) # extract the flux from the optimizer</code></pre></div><a class="docs-sourcelink" target="_blank" href="https://github.com/lcsb-biocore/COBREXA.jl/blob/77603c3b626a5edd84a1fbd03d11477955788b00/src/analysis/minimize_metabolic_adjustment.jl#L1-L40">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.minimize_metabolic_adjustment_analysis_dict-Tuple{MetabolicModel, Vararg{Any}}" href="#COBREXA.minimize_metabolic_adjustment_analysis_dict-Tuple{MetabolicModel, Vararg{Any}}"><code>COBREXA.minimize_metabolic_adjustment_analysis_dict</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">minimize_metabolic_adjustment_analysis_dict(model::MetabolicModel, args...; kwargs...)</code></pre><p>Perform minimization of metabolic adjustment (MOMA) and return a dictionary mapping the reaction IDs to fluxes. Arguments are forwarded to <a href="#COBREXA.minimize_metabolic_adjustment-Tuple{Dict{String, Float64}}"><code>minimize_metabolic_adjustment</code></a> internally.</p><p>This function is kept for backwards compatibility, use <a href="../base/#COBREXA.flux_vector-Tuple{MetabolicModel, Any}"><code>flux_vector</code></a> instead.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/lcsb-biocore/COBREXA.jl/blob/77603c3b626a5edd84a1fbd03d11477955788b00/src/analysis/minimize_metabolic_adjustment.jl#L97-L106">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.minimize_metabolic_adjustment_analysis_vec-Tuple{MetabolicModel, Vararg{Any}}" href="#COBREXA.minimize_metabolic_adjustment_analysis_vec-Tuple{MetabolicModel, Vararg{Any}}"><code>COBREXA.minimize_metabolic_adjustment_analysis_vec</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">minimize_metabolic_adjustment_analysis_vec(model::MetabolicModel, args...; kwargs...)</code></pre><p>Perform minimization of metabolic adjustment (MOMA) and return a vector of fluxes in the same order as the reactions in <code>model</code>. Arguments are forwarded to <a href="#COBREXA.minimize_metabolic_adjustment-Tuple{Dict{String, Float64}}"><code>minimize_metabolic_adjustment</code></a> internally.</p><p>This function is kept for backwards compatibility, use <a href="../base/#COBREXA.flux_vector-Tuple{MetabolicModel, Any}"><code>flux_vector</code></a> instead.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/lcsb-biocore/COBREXA.jl/blob/77603c3b626a5edd84a1fbd03d11477955788b00/src/analysis/minimize_metabolic_adjustment.jl#L84-L93">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.parsimonious_flux_balance_analysis-Tuple{MetabolicModel, Any}" href="#COBREXA.parsimonious_flux_balance_analysis-Tuple{MetabolicModel, Any}"><code>COBREXA.parsimonious_flux_balance_analysis</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">parsimonious_flux_balance_analysis(
model::MetabolicModel,
optimizer;
modifications = [],
......@@ -156,13 +156,13 @@ s.t. S x = b
xₗ ≤ x ≤ xᵤ
μ = μ⁰</code></pre><p>Where the optimal solution of the FBA problem, μ⁰, has been added as an additional constraint. See &quot;Lewis, Nathan E, Hixson, Kim K, Conrad, Tom M, Lerman, Joshua A, Charusanti, Pep, Polpitiya, Ashoka D, Adkins, Joshua N, Schramm, Gunnar, Purvine, Samuel O, Lopez-Ferrer, Daniel, Weitz, Karl K, Eils, Roland, König, Rainer, Smith, Richard D, Palsson, Bernhard Ø, (2010) Omic data from evolved E. coli are consistent with computed optimal growth from genome-scale models. Molecular Systems Biology, 6. 390. doi: accession:10.1038/msb.2010.47&quot; for more details.</p><p>pFBA gets the model optimum by standard FBA (using <a href="#COBREXA.flux_balance_analysis-Union{Tuple{M}, Tuple{M, Any}} where M&lt;:MetabolicModel"><code>flux_balance_analysis</code></a> with <code>optimizer</code> and <code>modifications</code>), then finds a minimal total flux through the model that still satisfies the (slightly relaxed) optimum. This is done using a quadratic problem optimizer. If the original optimizer does not support quadratic optimization, it can be changed using the callback in <code>qp_modifications</code>, which are applied after the FBA. See the documentation of <a href="#COBREXA.flux_balance_analysis-Union{Tuple{M}, Tuple{M, Any}} where M&lt;:MetabolicModel"><code>flux_balance_analysis</code></a> for usage examples of modifications.</p><p>Thhe optimum relaxation sequence can be specified in <code>relax</code> parameter, it defaults to multiplicative range of <code>[1.0, 0.999999, ..., 0.99]</code> of the original bound.</p><p>Returns an optimized model that contains the pFBA solution; or <code>nothing</code> if the optimization failed.</p><p><strong>Example</strong></p><pre><code class="language-none">model = load_model(&quot;e_coli_core.json&quot;)
optmodel = parsimonious_flux_balance_analysis(model, biomass, Gurobi.Optimizer)
value.(solution[:x]) # extract the flux from the optimizer</code></pre></div><a class="docs-sourcelink" target="_blank" href="https://github.com/lcsb-biocore/COBREXA.jl/blob/6d0e83c79c7269889049f6bc22eafe09365ddbe2/src/analysis/parsimonious_flux_balance_analysis.jl#L1-L54">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.parsimonious_flux_balance_analysis_dict-Tuple{MetabolicModel, Vararg{Any}}" href="#COBREXA.parsimonious_flux_balance_analysis_dict-Tuple{MetabolicModel, Vararg{Any}}"><code>COBREXA.parsimonious_flux_balance_analysis_dict</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">parsimonious_flux_balance_analysis_dict(model::MetabolicModel, args...; kwargs...)</code></pre><p>Perform parsimonious flux balance analysis on <code>model</code> using <code>optimizer</code>. Returns a dictionary mapping the reaction IDs to fluxes. Arguments are forwarded to <a href="#COBREXA.parsimonious_flux_balance_analysis-Tuple{MetabolicModel, Any}"><code>parsimonious_flux_balance_analysis</code></a> internally.</p><p>This function is kept for backwards compatibility, use <a href="../base/#COBREXA.flux_dict-Tuple{MetabolicModel, Any}"><code>flux_dict</code></a> instead.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/lcsb-biocore/COBREXA.jl/blob/6d0e83c79c7269889049f6bc22eafe09365ddbe2/src/analysis/parsimonious_flux_balance_analysis.jl#L110-L119">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.parsimonious_flux_balance_analysis_vec-Tuple{MetabolicModel, Vararg{Any}}" href="#COBREXA.parsimonious_flux_balance_analysis_vec-Tuple{MetabolicModel, Vararg{Any}}"><code>COBREXA.parsimonious_flux_balance_analysis_vec</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">parsimonious_flux_balance_analysis_vec(model::MetabolicModel, args...; kwargs...)</code></pre><p>Perform parsimonious flux balance analysis on <code>model</code> using <code>optimizer</code>. Returns a vector of fluxes in the same order as the reactions in <code>model</code>. Arguments are forwarded to <a href="#COBREXA.parsimonious_flux_balance_analysis-Tuple{MetabolicModel, Any}"><code>parsimonious_flux_balance_analysis</code></a> internally.</p><p>This function is kept for backwards compatibility, use <a href="../base/#COBREXA.flux_vector-Tuple{MetabolicModel, Any}"><code>flux_vector</code></a> instead.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/lcsb-biocore/COBREXA.jl/blob/6d0e83c79c7269889049f6bc22eafe09365ddbe2/src/analysis/parsimonious_flux_balance_analysis.jl#L96-L106">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA._screen_args-Tuple{Any, Any, Any}" href="#COBREXA._screen_args-Tuple{Any, Any, Any}"><code>COBREXA._screen_args</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">_screen_args(argtuple, kwargtuple, modsname)</code></pre><p>Internal helper to check the presence and shape of modification and argument arrays in <a href="#COBREXA.screen-Tuple"><code>screen</code></a> and pals.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/lcsb-biocore/COBREXA.jl/blob/6d0e83c79c7269889049f6bc22eafe09365ddbe2/src/analysis/screening.jl#L2-L7">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA._screen_impl-Union{Tuple{MetabolicModel}, Tuple{N}, Tuple{A}, Tuple{V}} where {V&lt;:(AbstractVector), A, N}" href="#COBREXA._screen_impl-Union{Tuple{MetabolicModel}, Tuple{N}, Tuple{A}, Tuple{V}} where {V&lt;:(AbstractVector), A, N}"><code>COBREXA._screen_impl</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">_screen_impl(
value.(solution[:x]) # extract the flux from the optimizer</code></pre></div><a class="docs-sourcelink" target="_blank" href="https://github.com/lcsb-biocore/COBREXA.jl/blob/77603c3b626a5edd84a1fbd03d11477955788b00/src/analysis/parsimonious_flux_balance_analysis.jl#L1-L54">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.parsimonious_flux_balance_analysis_dict-Tuple{MetabolicModel, Vararg{Any}}" href="#COBREXA.parsimonious_flux_balance_analysis_dict-Tuple{MetabolicModel, Vararg{Any}}"><code>COBREXA.parsimonious_flux_balance_analysis_dict</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">parsimonious_flux_balance_analysis_dict(model::MetabolicModel, args...; kwargs...)</code></pre><p>Perform parsimonious flux balance analysis on <code>model</code> using <code>optimizer</code>. Returns a dictionary mapping the reaction IDs to fluxes. Arguments are forwarded to <a href="#COBREXA.parsimonious_flux_balance_analysis-Tuple{MetabolicModel, Any}"><code>parsimonious_flux_balance_analysis</code></a> internally.</p><p>This function is kept for backwards compatibility, use <a href="../base/#COBREXA.flux_dict-Tuple{MetabolicModel, Any}"><code>flux_dict</code></a> instead.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/lcsb-biocore/COBREXA.jl/blob/77603c3b626a5edd84a1fbd03d11477955788b00/src/analysis/parsimonious_flux_balance_analysis.jl#L110-L119">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.parsimonious_flux_balance_analysis_vec-Tuple{MetabolicModel, Vararg{Any}}" href="#COBREXA.parsimonious_flux_balance_analysis_vec-Tuple{MetabolicModel, Vararg{Any}}"><code>COBREXA.parsimonious_flux_balance_analysis_vec</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">parsimonious_flux_balance_analysis_vec(model::MetabolicModel, args...; kwargs...)</code></pre><p>Perform parsimonious flux balance analysis on <code>model</code> using <code>optimizer</code>. Returns a vector of fluxes in the same order as the reactions in <code>model</code>. Arguments are forwarded to <a href="#COBREXA.parsimonious_flux_balance_analysis-Tuple{MetabolicModel, Any}"><code>parsimonious_flux_balance_analysis</code></a> internally.</p><p>This function is kept for backwards compatibility, use <a href="../base/#COBREXA.flux_vector-Tuple{MetabolicModel, Any}"><code>flux_vector</code></a> instead.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/lcsb-biocore/COBREXA.jl/blob/77603c3b626a5edd84a1fbd03d11477955788b00/src/analysis/parsimonious_flux_balance_analysis.jl#L96-L106">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA._screen_args-Tuple{Any, Any, Any}" href="#COBREXA._screen_args-Tuple{Any, Any, Any}"><code>COBREXA._screen_args</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">_screen_args(argtuple, kwargtuple, modsname)</code></pre><p>Internal helper to check the presence and shape of modification and argument arrays in <a href="#COBREXA.screen-Tuple"><code>screen</code></a> and pals.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/lcsb-biocore/COBREXA.jl/blob/77603c3b626a5edd84a1fbd03d11477955788b00/src/analysis/screening.jl#L2-L7">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA._screen_impl-Union{Tuple{MetabolicModel}, Tuple{N}, Tuple{A}, Tuple{V}} where {V&lt;:(AbstractVector), A, N}" href="#COBREXA._screen_impl-Union{Tuple{MetabolicModel}, Tuple{N}, Tuple{A}, Tuple{V}} where {V&lt;:(AbstractVector), A, N}"><code>COBREXA._screen_impl</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">_screen_impl(
model::MetabolicModel;
variants::Array{V,N},
analysis,
args::Array{A,N},
workers = [myid()],
)::Array where {V&lt;:AbstractVector,A,N}</code></pre><p>The actual implementation of <a href="#COBREXA.screen-Tuple"><code>screen</code></a>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/lcsb-biocore/COBREXA.jl/blob/6d0e83c79c7269889049f6bc22eafe09365ddbe2/src/analysis/screening.jl#L113-L123">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA._screen_optmodel_item-Tuple{Any}" href="#COBREXA._screen_optmodel_item-Tuple{Any}"><code>COBREXA._screen_optmodel_item</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">_screen_optmodel_item((mods, args))</code></pre><p>Internal helper for <a href="#COBREXA.screen_optmodel_modifications-Tuple"><code>screen_optmodel_modifications</code></a> that computes one item of the screening task.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/lcsb-biocore/COBREXA.jl/blob/6d0e83c79c7269889049f6bc22eafe09365ddbe2/src/analysis/screening.jl#L200-L205">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA._screen_optmodel_modifications_impl-Union{Tuple{N}, Tuple{A}, Tuple{VF}, Tuple{V}, Tuple{MetabolicModel, Any}} where {V&lt;:(AbstractVector), VF&lt;:(AbstractVector), A, N}" href="#COBREXA._screen_optmodel_modifications_impl-Union{Tuple{N}, Tuple{A}, Tuple{VF}, Tuple{V}, Tuple{MetabolicModel, Any}} where {V&lt;:(AbstractVector), VF&lt;:(AbstractVector), A, N}"><code>COBREXA._screen_optmodel_modifications_impl</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">_screen_optmodel_modifications_impl(
)::Array where {V&lt;:AbstractVector,A,N}</code></pre><p>The actual implementation of <a href="#COBREXA.screen-Tuple"><code>screen</code></a>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/lcsb-biocore/COBREXA.jl/blob/77603c3b626a5edd84a1fbd03d11477955788b00/src/analysis/screening.jl#L113-L123">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA._screen_optmodel_item-Tuple{Any}" href="#COBREXA._screen_optmodel_item-Tuple{Any}"><code>COBREXA._screen_optmodel_item</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">_screen_optmodel_item((mods, args))</code></pre><p>Internal helper for <a href="#COBREXA.screen_optmodel_modifications-Tuple"><code>screen_optmodel_modifications</code></a> that computes one item of the screening task.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/lcsb-biocore/COBREXA.jl/blob/77603c3b626a5edd84a1fbd03d11477955788b00/src/analysis/screening.jl#L200-L205">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA._screen_optmodel_modifications_impl-Union{Tuple{N}, Tuple{A}, Tuple{VF}, Tuple{V}, Tuple{MetabolicModel, Any}} where {V&lt;:(AbstractVector), VF&lt;:(AbstractVector), A, N}" href="#COBREXA._screen_optmodel_modifications_impl-Union{Tuple{N}, Tuple{A}, Tuple{VF}, Tuple{V}, Tuple{MetabolicModel, Any}} where {V&lt;:(AbstractVector), VF&lt;:(AbstractVector), A, N}"><code>COBREXA._screen_optmodel_modifications_impl</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">_screen_optmodel_modifications_impl(
model::MetabolicModel,
optimizer;
common_modifications::VF = [],
......@@ -170,7 +170,7 @@ value.(solution[:x]) # extract the flux from the optimizer</code></pre></div><a
args::Array{A,N},
analysis::Function,
workers = [myid()],
)::Array where {V&lt;:AbstractVector,VF&lt;:AbstractVector,A,N}</code></pre><p>The actual implementation of <a href="#COBREXA.screen_optmodel_modifications-Tuple"><code>screen_optmodel_modifications</code></a>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/lcsb-biocore/COBREXA.jl/blob/6d0e83c79c7269889049f6bc22eafe09365ddbe2/src/analysis/screening.jl#L256-L268">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA._screen_optmodel_prepare-Tuple{Any, Any, Any}" href="#COBREXA._screen_optmodel_prepare-Tuple{Any, Any, Any}"><code>COBREXA._screen_optmodel_prepare</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">_screen_optmodel_prepare(model, optimizer, common_modifications)</code></pre><p>Internal helper for <a href="#COBREXA.screen_optmodel_modifications-Tuple"><code>screen_optmodel_modifications</code></a> that creates the model and applies the modifications.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/lcsb-biocore/COBREXA.jl/blob/6d0e83c79c7269889049f6bc22eafe09365ddbe2/src/analysis/screening.jl#L185-L190">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.screen-Tuple" href="#COBREXA.screen-Tuple"><code>COBREXA.screen</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">screen(
)::Array where {V&lt;:AbstractVector,VF&lt;:AbstractVector,A,N}</code></pre><p>The actual implementation of <a href="#COBREXA.screen_optmodel_modifications-Tuple"><code>screen_optmodel_modifications</code></a>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/lcsb-biocore/COBREXA.jl/blob/77603c3b626a5edd84a1fbd03d11477955788b00/src/analysis/screening.jl#L256-L268">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA._screen_optmodel_prepare-Tuple{Any, Any, Any}" href="#COBREXA._screen_optmodel_prepare-Tuple{Any, Any, Any}"><code>COBREXA._screen_optmodel_prepare</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">_screen_optmodel_prepare(model, optimizer, common_modifications)</code></pre><p>Internal helper for <a href="#COBREXA.screen_optmodel_modifications-Tuple"><code>screen_optmodel_modifications</code></a> that creates the model and applies the modifications.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/lcsb-biocore/COBREXA.jl/blob/77603c3b626a5edd84a1fbd03d11477955788b00/src/analysis/screening.jl#L185-L190">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.screen-Tuple" href="#COBREXA.screen-Tuple"><code>COBREXA.screen</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">screen(
model::MetabolicModel;
variants::Array{V,N}, # defaults to an array of identities
analysis,
......@@ -198,7 +198,7 @@ screen(m,
[reverse_reaction(5)],
[reverse_reaction(3), reverse_reaction(6)]
],
analysis = mod -&gt; flux_balance_analysis_vec(mod, GLPK.Optimizer))</code></pre></div><a class="docs-sourcelink" target="_blank" href="https://github.com/lcsb-biocore/COBREXA.jl/blob/6d0e83c79c7269889049f6bc22eafe09365ddbe2/src/analysis/screening.jl#L35-L109">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.screen_optimize_objective-Tuple{Any, Any}" href="#COBREXA.screen_optimize_objective-Tuple{Any, Any}"><code>COBREXA.screen_optimize_objective</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">screen_optimize_objective(_, optmodel)::Maybe{Float64}</code></pre><p>A variant of <a href="../base/#COBREXA.optimize_objective-Tuple{Any}"><code>optimize_objective</code></a> directly usable in <a href="#COBREXA.screen_optmodel_modifications-Tuple"><code>screen_optmodel_modifications</code></a>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/lcsb-biocore/COBREXA.jl/blob/6d0e83c79c7269889049f6bc22eafe09365ddbe2/src/analysis/screening.jl#L177-L182">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.screen_optmodel_modifications-Tuple" href="#COBREXA.screen_optmodel_modifications-Tuple"><code>COBREXA.screen_optmodel_modifications</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">screen_optmodel_modifications(
analysis = mod -&gt; flux_balance_analysis_vec(mod, GLPK.Optimizer))</code></pre></div><a class="docs-sourcelink" target="_blank" href="https://github.com/lcsb-biocore/COBREXA.jl/blob/77603c3b626a5edd84a1fbd03d11477955788b00/src/analysis/screening.jl#L35-L109">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.screen_optimize_objective-Tuple{Any, Any}" href="#COBREXA.screen_optimize_objective-Tuple{Any, Any}"><code>COBREXA.screen_optimize_objective</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">screen_optimize_objective(_, optmodel)::Maybe{Float64}</code></pre><p>A variant of <a href="../base/#COBREXA.optimize_objective-Tuple{Any}"><code>optimize_objective</code></a> directly usable in <a href="#COBREXA.screen_optmodel_modifications-Tuple"><code>screen_optmodel_modifications</code></a>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/lcsb-biocore/COBREXA.jl/blob/77603c3b626a5edd84a1fbd03d11477955788b00/src/analysis/screening.jl#L177-L182">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.screen_optmodel_modifications-Tuple" href="#COBREXA.screen_optmodel_modifications-Tuple"><code>COBREXA.screen_optmodel_modifications</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">screen_optmodel_modifications(
model::MetabolicModel,
optimizer;
common_modifications::VF = [],
......@@ -206,12 +206,12 @@ screen(m,
args::Array{A,N}, # defaults to an array of empty argument lists
analysis::Function,
workers = [myid()],
)::Array where {V&lt;:AbstractVector,VF&lt;:AbstractVector,A,N}</code></pre><p>Screen multiple modifications of the same optimization model.</p><p>This function is potentially more efficient than <a href="#COBREXA.screen-Tuple"><code>screen</code></a> because it avoids making variants of the model structure and remaking of the optimization model. On the other hand, modification functions need to keep the optimization model in a recoverable state (one that leaves the model usable for the next modification), which limits the possible spectrum of modifications applied.</p><p>Internally, <code>model</code> is distributed to <code>workers</code> and transformed into the optimization model using <a href="../base/#COBREXA.make_optimization_model-Tuple{MetabolicModel, Any}"><code>make_optimization_model</code></a>. <code>common_modifications</code> are applied to the models at that point. Next, vectors of functions in <code>modifications</code> are consecutively applied, and the result of <code>analysis</code> function called on model are collected to an array of the same extent as <code>modifications</code>. Calls of <code>analysis</code> are optionally supplied with extra arguments from <code>args</code> expanded with <code>...</code>, just like in <a href="#COBREXA.screen-Tuple"><code>screen</code></a>.</p><p>Both the modification functions (in vectors) and the analysis function here have 2 base parameters (as opposed to 1 with <a href="#COBREXA.screen-Tuple"><code>screen</code></a>): first is the <code>model</code> (carried through as-is), second is the prepared JuMP optimization model that may be modified and acted upon. As an example, you can use modification <a href="#COBREXA.change_constraint-Tuple{String}"><code>change_constraint</code></a> and analysis <a href="#COBREXA.screen_optimize_objective-Tuple{Any, Any}"><code>screen_optimize_objective</code></a>.</p><p>Note: This function is a thin argument-handling wrapper around <a href="#COBREXA._screen_optmodel_modifications_impl-Union{Tuple{N}, Tuple{A}, Tuple{VF}, Tuple{V}, Tuple{MetabolicModel, Any}} where {V&lt;:(AbstractVector), VF&lt;:(AbstractVector), A, N}"><code>_screen_optmodel_modifications_impl</code></a>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/lcsb-biocore/COBREXA.jl/blob/6d0e83c79c7269889049f6bc22eafe09365ddbe2/src/analysis/screening.jl#L214-L249">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.screen_variant" href="#COBREXA.screen_variant"><code>COBREXA.screen_variant</code></a><span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia">screen_variant(model::MetabolicModel, variant::Vector, analysis, args = ())</code></pre><p>Helper function for <a href="#COBREXA.screen-Tuple"><code>screen</code></a> that applies all single-argument functions in <code>variant</code> to the <code>model</code> (in order from &quot;first&quot; to &quot;last&quot;), and executes <code>analysis</code> on the result.</p><p>Can be used to test model variants locally.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/lcsb-biocore/COBREXA.jl/blob/6d0e83c79c7269889049f6bc22eafe09365ddbe2/src/analysis/screening.jl#L153-L161">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.screen_variants-Tuple{Any, Any, Any}" href="#COBREXA.screen_variants-Tuple{Any, Any, Any}"><code>COBREXA.screen_variants</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">screen_variants(model, variants, analysis; workers=[myid()])</code></pre><p>A shortcut for <a href="#COBREXA.screen-Tuple"><code>screen</code></a> that only works with model variants.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/lcsb-biocore/COBREXA.jl/blob/6d0e83c79c7269889049f6bc22eafe09365ddbe2/src/analysis/screening.jl#L169-L173">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.make_smoment_model-Tuple{MetabolicModel}" href="#COBREXA.make_smoment_model-Tuple{MetabolicModel}"><code>COBREXA.make_smoment_model</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">make_smoment_model(
)::Array where {V&lt;:AbstractVector,VF&lt;:AbstractVector,A,N}</code></pre><p>Screen multiple modifications of the same optimization model.</p><p>This function is potentially more efficient than <a href="#COBREXA.screen-Tuple"><code>screen</code></a> because it avoids making variants of the model structure and remaking of the optimization model. On the other hand, modification functions need to keep the optimization model in a recoverable state (one that leaves the model usable for the next modification), which limits the possible spectrum of modifications applied.</p><p>Internally, <code>model</code> is distributed to <code>workers</code> and transformed into the optimization model using <a href="../base/#COBREXA.make_optimization_model-Tuple{MetabolicModel, Any}"><code>make_optimization_model</code></a>. <code>common_modifications</code> are applied to the models at that point. Next, vectors of functions in <code>modifications</code> are consecutively applied, and the result of <code>analysis</code> function called on model are collected to an array of the same extent as <code>modifications</code>. Calls of <code>analysis</code> are optionally supplied with extra arguments from <code>args</code> expanded with <code>...</code>, just like in <a href="#COBREXA.screen-Tuple"><code>screen</code></a>.</p><p>Both the modification functions (in vectors) and the analysis function here have 2 base parameters (as opposed to 1 with <a href="#COBREXA.screen-Tuple"><code>screen</code></a>): first is the <code>model</code> (carried through as-is), second is the prepared JuMP optimization model that may be modified and acted upon. As an example, you can use modification <a href="#COBREXA.change_constraint-Tuple{String}"><code>change_constraint</code></a> and analysis <a href="#COBREXA.screen_optimize_objective-Tuple{Any, Any}"><code>screen_optimize_objective</code></a>.</p><p>Note: This function is a thin argument-handling wrapper around <a href="#COBREXA._screen_optmodel_modifications_impl-Union{Tuple{N}, Tuple{A}, Tuple{VF}, Tuple{V}, Tuple{MetabolicModel, Any}} where {V&lt;:(AbstractVector), VF&lt;:(AbstractVector), A, N}"><code>_screen_optmodel_modifications_impl</code></a>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/lcsb-biocore/COBREXA.jl/blob/77603c3b626a5edd84a1fbd03d11477955788b00/src/analysis/screening.jl#L214-L249">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.screen_variant" href="#COBREXA.screen_variant"><code>COBREXA.screen_variant</code></a><span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia">screen_variant(model::MetabolicModel, variant::Vector, analysis, args = ())</code></pre><p>Helper function for <a href="#COBREXA.screen-Tuple"><code>screen</code></a> that applies all single-argument functions in <code>variant</code> to the <code>model</code> (in order from &quot;first&quot; to &quot;last&quot;), and executes <code>analysis</code> on the result.</p><p>Can be used to test model variants locally.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/lcsb-biocore/COBREXA.jl/blob/77603c3b626a5edd84a1fbd03d11477955788b00/src/analysis/screening.jl#L153-L161">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.screen_variants-Tuple{Any, Any, Any}" href="#COBREXA.screen_variants-Tuple{Any, Any, Any}"><code>COBREXA.screen_variants</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">screen_variants(model, variants, analysis; workers=[myid()])</code></pre><p>A shortcut for <a href="#COBREXA.screen-Tuple"><code>screen</code></a> that only works with model variants.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/lcsb-biocore/COBREXA.jl/blob/77603c3b626a5edd84a1fbd03d11477955788b00/src/analysis/screening.jl#L169-L173">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.make_smoment_model-Tuple{MetabolicModel}" href="#COBREXA.make_smoment_model-Tuple{MetabolicModel}"><code>COBREXA.make_smoment_model</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">make_smoment_model(
model::MetabolicModel;
reaction_isozyme::Union{Function,Dict{String,Isozyme}},
gene_product_molar_mass::Union{Function,Dict{String,Float64}},
total_enzyme_capacity::Float64,
)</code></pre><p>Construct a model with a structure given by sMOMENT algorithm; returns a <a href="../types/#COBREXA.SMomentModel"><code>SMomentModel</code></a> (see the documentation for details).</p><p><strong>Arguments</strong></p><ul><li><code>reaction_isozyme</code> parameter is a function that returns a single <a href="../types/#COBREXA.Isozyme"><code>Isozyme</code></a> for each reaction, or <code>nothing</code> if the reaction is not enzymatic. If the reaction has multiple isozymes, use <a href="../utils/#COBREXA.smoment_isozyme_speed-Tuple{Function}"><code>smoment_isozyme_speed</code></a> to select the fastest one, as recommended by the sMOMENT paper.</li><li><code>gene_product_molar_mass</code> parameter is a function that returns a molar mass of each gene product as specified by sMOMENT.</li><li><code>total_enzyme_capacity</code> is the maximum &quot;enzyme capacity&quot; in the model.</li></ul><p>Alternatively, all function arguments also accept dictionaries that are used to provide the same data lookup.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/lcsb-biocore/COBREXA.jl/blob/6d0e83c79c7269889049f6bc22eafe09365ddbe2/src/analysis/smoment.jl#L2-L26">source</a></section></article><h2 id="Sampling"><a class="docs-heading-anchor" href="#Sampling">Sampling</a><a id="Sampling-1"></a><a class="docs-heading-anchor-permalink" href="#Sampling" title="Permalink"></a></h2><article class="docstring"><header><a class="docstring-binding" id="COBREXA._affine_hit_and_run_chain-NTuple{5, Any}" href="#COBREXA._affine_hit_and_run_chain-NTuple{5, Any}"><code>COBREXA._affine_hit_and_run_chain</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">_affine_hit_and_run_chain(warmup, lbs, ubs, iters, seed)</code></pre><p>Internal helper function for computing a single affine hit-and-run chain.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/lcsb-biocore/COBREXA.jl/blob/6d0e83c79c7269889049f6bc22eafe09365ddbe2/src/analysis/sampling/affine_hit_and_run.jl#L78-L82">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.affine_hit_and_run-Tuple{Matrix{Float64}, Vector{Float64}, Vector{Float64}}" href="#COBREXA.affine_hit_and_run-Tuple{Matrix{Float64}, Vector{Float64}, Vector{Float64}}"><code>COBREXA.affine_hit_and_run</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">function affine_hit_and_run(
)</code></pre><p>Construct a model with a structure given by sMOMENT algorithm; returns a <a href="../types/#COBREXA.SMomentModel"><code>SMomentModel</code></a> (see the documentation for details).</p><p><strong>Arguments</strong></p><ul><li><code>reaction_isozyme</code> parameter is a function that returns a single <a href="../types/#COBREXA.Isozyme"><code>Isozyme</code></a> for each reaction, or <code>nothing</code> if the reaction is not enzymatic. If the reaction has multiple isozymes, use <a href="../utils/#COBREXA.smoment_isozyme_speed-Tuple{Function}"><code>smoment_isozyme_speed</code></a> to select the fastest one, as recommended by the sMOMENT paper.</li><li><code>gene_product_molar_mass</code> parameter is a function that returns a molar mass of each gene product as specified by sMOMENT.</li><li><code>total_enzyme_capacity</code> is the maximum &quot;enzyme capacity&quot; in the model.</li></ul><p>Alternatively, all function arguments also accept dictionaries that are used to provide the same data lookup.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/lcsb-biocore/COBREXA.jl/blob/77603c3b626a5edd84a1fbd03d11477955788b00/src/analysis/smoment.jl#L2-L26">source</a></section></article><h2 id="Sampling"><a class="docs-heading-anchor" href="#Sampling">Sampling</a><a id="Sampling-1"></a><a class="docs-heading-anchor-permalink" href="#Sampling" title="Permalink"></a></h2><article class="docstring"><header><a class="docstring-binding" id="COBREXA._affine_hit_and_run_chain-NTuple{5, Any}" href="#COBREXA._affine_hit_and_run_chain-NTuple{5, Any}"><code>COBREXA._affine_hit_and_run_chain</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">_affine_hit_and_run_chain(warmup, lbs, ubs, iters, seed)</code></pre><p>Internal helper function for computing a single affine hit-and-run chain.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/lcsb-biocore/COBREXA.jl/blob/77603c3b626a5edd84a1fbd03d11477955788b00/src/analysis/sampling/affine_hit_and_run.jl#L78-L82">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.affine_hit_and_run-Tuple{Matrix{Float64}, Vector{Float64}, Vector{Float64}}" href="#COBREXA.affine_hit_and_run-Tuple{Matrix{Float64}, Vector{Float64}, Vector{Float64}}"><code>COBREXA.affine_hit_and_run</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">function affine_hit_and_run(
warmup_points::Matrix{Float64},
lbs::Vector{Float64},
ubs::Vector{Float64};
......@@ -228,19 +228,19 @@ warmup, lbs, ubs = warmup_from_variability(model, Tulip.Optimizer, 100)
samples = affine_hit_and_run(warmup, lbs, ubs, sample_iters = 1:3)
# convert the result to flux (for models where the distinction matters):
fluxes = reaction_flux(model)&#39; * samples</code></pre></div><a class="docs-sourcelink" target="_blank" href="https://github.com/lcsb-biocore/COBREXA.jl/blob/6d0e83c79c7269889049f6bc22eafe09365ddbe2/src/analysis/sampling/affine_hit_and_run.jl#L1-L45">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA._maximize_warmup_reaction-Tuple{Any, Any, Any}" href="#COBREXA._maximize_warmup_reaction-Tuple{Any, Any, Any}"><code>COBREXA._maximize_warmup_reaction</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">_maximize_warmup_reaction(opt_model, rid, ret)</code></pre><p>A helper function for finding warmup points from reaction variability.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/lcsb-biocore/COBREXA.jl/blob/6d0e83c79c7269889049f6bc22eafe09365ddbe2/src/analysis/sampling/warmup_variability.jl#L100-L104">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.warmup_from_variability" href="#COBREXA.warmup_from_variability"><code>COBREXA.warmup_from_variability</code></a><span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia">function warmup_from_variability(
fluxes = reaction_flux(model)&#39; * samples</code></pre></div><a class="docs-sourcelink" target="_blank" href="https://github.com/lcsb-biocore/COBREXA.jl/blob/77603c3b626a5edd84a1fbd03d11477955788b00/src/analysis/sampling/affine_hit_and_run.jl#L1-L45">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA._maximize_warmup_reaction-Tuple{Any, Any, Any}" href="#COBREXA._maximize_warmup_reaction-Tuple{Any, Any, Any}"><code>COBREXA._maximize_warmup_reaction</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">_maximize_warmup_reaction(opt_model, rid, ret)</code></pre><p>A helper function for finding warmup points from reaction variability.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/lcsb-biocore/COBREXA.jl/blob/77603c3b626a5edd84a1fbd03d11477955788b00/src/analysis/sampling/warmup_variability.jl#L100-L104">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.warmup_from_variability" href="#COBREXA.warmup_from_variability"><code>COBREXA.warmup_from_variability</code></a><span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia">function warmup_from_variability(
model::MetabolicModel,
optimizer,
min_reactions::Vector{Int}=1:n_reactions(model),
max_reactions::Vector{Int}=1:n_reactions(model);
modifications = [],
workers::Vector{Int} = [myid()],
)::Tuple{Matrix{Float64}, Vector{Float64}, Vector{Float64}}</code></pre><p>Generate FVA-like warmup points for samplers, by minimizing and maximizing the specified reactions. The result is returned as a matrix, each point occupies as single column in the result.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/lcsb-biocore/COBREXA.jl/blob/6d0e83c79c7269889049f6bc22eafe09365ddbe2/src/analysis/sampling/warmup_variability.jl#L39-L52">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.warmup_from_variability" href="#COBREXA.warmup_from_variability"><code>COBREXA.warmup_from_variability</code></a><span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia">warmup_from_variability(
)::Tuple{Matrix{Float64}, Vector{Float64}, Vector{Float64}}</code></pre><p>Generate FVA-like warmup points for samplers, by minimizing and maximizing the specified reactions. The result is returned as a matrix, each point occupies as single column in the result.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/lcsb-biocore/COBREXA.jl/blob/77603c3b626a5edd84a1fbd03d11477955788b00/src/analysis/sampling/warmup_variability.jl#L39-L52">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.warmup_from_variability" href="#COBREXA.warmup_from_variability"><code>COBREXA.warmup_from_variability</code></a><span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia">warmup_from_variability(
model::MetabolicModel,
optimizer,
n_points::Int;
kwargs...
)</code></pre><p>Generates FVA-like warmup points for samplers, by selecting random points by minimizing and maximizing reactions. Can not return more than 2 times the number of reactions in the model.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/lcsb-biocore/COBREXA.jl/blob/6d0e83c79c7269889049f6bc22eafe09365ddbe2/src/analysis/sampling/warmup_variability.jl#L1-L12">source</a></section></article><h2 id="Analysis-modifiers"><a class="docs-heading-anchor" href="#Analysis-modifiers">Analysis modifiers</a><a id="Analysis-modifiers-1"></a><a class="docs-heading-anchor-permalink" href="#Analysis-modifiers" title="Permalink"></a></h2><article class="docstring"><header><a class="docstring-binding" id="COBREXA.add_crowding_constraints-Tuple{Dict{Int64, Float64}}" href="#COBREXA.add_crowding_constraints-Tuple{Dict{Int64, Float64}}"><code>COBREXA.add_crowding_constraints</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">add_crowding_constraints(weights::Dict{Int64, Float64})</code></pre><p>Adds a molecular crowding constraint to the optimization problem: <code>∑ wᵢ × vᵢ ≤ 1</code> where <code>wᵢ</code> is a weight and <code>vᵢ</code> is a flux index in the model&#39;s reactions specified in <code>weights</code> as <code>vᵢ =&gt; wᵢ</code> pairs.</p><p>See Beg, Qasim K., et al. &quot;Intracellular crowding defines the mode and sequence of substrate uptake by Escherichia coli and constrains its metabolic activity.&quot; Proceedings of the National Academy of Sciences 104.31 (2007) for more details.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/lcsb-biocore/COBREXA.jl/blob/6d0e83c79c7269889049f6bc22eafe09365ddbe2/src/analysis/modifications/crowding.jl#L2-L12">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.add_crowding_constraints-Tuple{Dict{String, Float64}}" href="#COBREXA.add_crowding_constraints-Tuple{Dict{String, Float64}}"><code>COBREXA.add_crowding_constraints</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">add_crowding_constraints(weights::Dict{String, Float64})</code></pre><p>Variant of <a href="#COBREXA.add_crowding_constraints-Tuple{Dict{Int64, Float64}}"><code>add_crowding_constraints</code></a> that takes a dictinary of reactions <code>ids</code> instead of reaction indices mapped to weights.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/lcsb-biocore/COBREXA.jl/blob/6d0e83c79c7269889049f6bc22eafe09365ddbe2/src/analysis/modifications/crowding.jl#L25-L30">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.change_constraint-Tuple{String}" href="#COBREXA.change_constraint-Tuple{String}"><code>COBREXA.change_constraint</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">change_constraint(id::String; lb=nothing, ub=nothing)</code></pre><p>Change the lower and upper bounds (<code>lb</code> and <code>ub</code> respectively) of reaction <code>id</code> if supplied.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/lcsb-biocore/COBREXA.jl/blob/6d0e83c79c7269889049f6bc22eafe09365ddbe2/src/analysis/modifications/generic.jl#L15-L19">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.change_objective-Tuple{Union{String, Vector{String}}}" href="#COBREXA.change_objective-Tuple{Union{String, Vector{String}}}"><code>COBREXA.change_objective</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">change_objective(new_objective::Union{String,Vector{String}}; weights=[], sense=MAX_SENSE)</code></pre><p>Modification that changes the objective function used in a constraint based analysis function. <code>new_objective</code> can be a single reaction identifier, or an array of reactions identifiers.</p><p>Optionally, the objective can be weighted by a vector of <code>weights</code>, and a optimization <code>sense</code> can be set to either <code>MAX_SENSE</code> or <code>MIN_SENSE</code>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/lcsb-biocore/COBREXA.jl/blob/6d0e83c79c7269889049f6bc22eafe09365ddbe2/src/analysis/modifications/generic.jl#L27-L36">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.constrain_objective_value-Tuple{Any}" href="#COBREXA.constrain_objective_value-Tuple{Any}"><code>COBREXA.constrain_objective_value</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">constrain_objective_value(tolerance)</code></pre><p>Limit the objective value to <code>tolerance</code>-times the current objective value, as with <a href="../utils/#COBREXA.objective_bounds-Tuple{Any}"><code>objective_bounds</code></a>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/lcsb-biocore/COBREXA.jl/blob/6d0e83c79c7269889049f6bc22eafe09365ddbe2/src/analysis/modifications/generic.jl#L2-L7">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA._do_knockout-Tuple{MetabolicModel, Any, Vector{String}}" href="#COBREXA._do_knockout-Tuple{MetabolicModel, Any, Vector{String}}"><code>COBREXA._do_knockout</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">_do_knockout(model::MetabolicModel, opt_model)</code></pre><p>Internal helper for knockouts on generic MetabolicModels. This can be overloaded so that the knockouts may work differently (more efficiently) with other models.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/lcsb-biocore/COBREXA.jl/blob/6d0e83c79c7269889049f6bc22eafe09365ddbe2/src/analysis/modifications/knockout.jl#L29-L35">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.knockout-Tuple{String}" href="#COBREXA.knockout-Tuple{String}"><code>COBREXA.knockout</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">knockout(gene_id::String)</code></pre><p>A helper variant of <a href="#COBREXA.knockout-Tuple{String}"><code>knockout</code></a> for a single gene.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/lcsb-biocore/COBREXA.jl/blob/6d0e83c79c7269889049f6bc22eafe09365ddbe2/src/analysis/modifications/knockout.jl#L22-L26">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.knockout-Tuple{Vector{String}}" href="#COBREXA.knockout-Tuple{Vector{String}}"><code>COBREXA.knockout</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">knockout(gene_ids::Vector{String})</code></pre><p>A modification that zeroes the bounds of all reactions that would be knocked out by the combination of specified genes (effectively disabling the reactions).</p><p>A slightly counter-intuitive behavior may occur if knocking out multiple genes: Because this only changes the reaction bounds, multiple gene knockouts <em>must</em> be specified in a single call to <a href="#COBREXA.knockout-Tuple{String}"><code>knockout</code></a>, because the modifications have no way to remember which genes are already knocked out and which not.</p><p>In turn, having a reaction that can be catalyzed either by Gene1 or by Gene2, specifying <code>modifications = [knockout([&quot;Gene1&quot;, &quot;Gene2&quot;])]</code> does indeed disable the reaction, but <code>modifications = [knockout(&quot;Gene1&quot;), knockout(&quot;Gene2&quot;)]</code> does <em>not</em> disable the reaction (although reactions that depend either only on Gene1 or only on Gene2 are disabled).</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/lcsb-biocore/COBREXA.jl/blob/6d0e83c79c7269889049f6bc22eafe09365ddbe2/src/analysis/modifications/knockout.jl#L1-L18">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.add_loopless_constraints-Tuple{}" href="#COBREXA.add_loopless_constraints-Tuple{}"><code>COBREXA.add_loopless_constraints</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">add_loopless_constraints(;
)</code></pre><p>Generates FVA-like warmup points for samplers, by selecting random points by minimizing and maximizing reactions. Can not return more than 2 times the number of reactions in the model.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/lcsb-biocore/COBREXA.jl/blob/77603c3b626a5edd84a1fbd03d11477955788b00/src/analysis/sampling/warmup_variability.jl#L1-L12">source</a></section></article><h2 id="Analysis-modifiers"><a class="docs-heading-anchor" href="#Analysis-modifiers">Analysis modifiers</a><a id="Analysis-modifiers-1"></a><a class="docs-heading-anchor-permalink" href="#Analysis-modifiers" title="Permalink"></a></h2><article class="docstring"><header><a class="docstring-binding" id="COBREXA.add_crowding_constraints-Tuple{Dict{Int64, Float64}}" href="#COBREXA.add_crowding_constraints-Tuple{Dict{Int64, Float64}}"><code>COBREXA.add_crowding_constraints</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">add_crowding_constraints(weights::Dict{Int64, Float64})</code></pre><p>Adds a molecular crowding constraint to the optimization problem: <code>∑ wᵢ × vᵢ ≤ 1</code> where <code>wᵢ</code> is a weight and <code>vᵢ</code> is a flux index in the model&#39;s reactions specified in <code>weights</code> as <code>vᵢ =&gt; wᵢ</code> pairs.</p><p>See Beg, Qasim K., et al. &quot;Intracellular crowding defines the mode and sequence of substrate uptake by Escherichia coli and constrains its metabolic activity.&quot; Proceedings of the National Academy of Sciences 104.31 (2007) for more details.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/lcsb-biocore/COBREXA.jl/blob/77603c3b626a5edd84a1fbd03d11477955788b00/src/analysis/modifications/crowding.jl#L2-L12">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.add_crowding_constraints-Tuple{Dict{String, Float64}}" href="#COBREXA.add_crowding_constraints-Tuple{Dict{String, Float64}}"><code>COBREXA.add_crowding_constraints</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">add_crowding_constraints(weights::Dict{String, Float64})</code></pre><p>Variant of <a href="#COBREXA.add_crowding_constraints-Tuple{Dict{Int64, Float64}}"><code>add_crowding_constraints</code></a> that takes a dictinary of reactions <code>ids</code> instead of reaction indices mapped to weights.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/lcsb-biocore/COBREXA.jl/blob/77603c3b626a5edd84a1fbd03d11477955788b00/src/analysis/modifications/crowding.jl#L25-L30">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.change_constraint-Tuple{String}" href="#COBREXA.change_constraint-Tuple{String}"><code>COBREXA.change_constraint</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">change_constraint(id::String; lb=nothing, ub=nothing)</code></pre><p>Change the lower and upper bounds (<code>lb</code> and <code>ub</code> respectively) of reaction <code>id</code> if supplied.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/lcsb-biocore/COBREXA.jl/blob/77603c3b626a5edd84a1fbd03d11477955788b00/src/analysis/modifications/generic.jl#L15-L19">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.change_objective-Tuple{Union{String, Vector{String}}}" href="#COBREXA.change_objective-Tuple{Union{String, Vector{String}}}"><code>COBREXA.change_objective</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">change_objective(new_objective::Union{String,Vector{String}}; weights=[], sense=MAX_SENSE)</code></pre><p>Modification that changes the objective function used in a constraint based analysis function. <code>new_objective</code> can be a single reaction identifier, or an array of reactions identifiers.</p><p>Optionally, the objective can be weighted by a vector of <code>weights</code>, and a optimization <code>sense</code> can be set to either <code>MAX_SENSE</code> or <code>MIN_SENSE</code>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/lcsb-biocore/COBREXA.jl/blob/77603c3b626a5edd84a1fbd03d11477955788b00/src/analysis/modifications/generic.jl#L27-L36">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.constrain_objective_value-Tuple{Any}" href="#COBREXA.constrain_objective_value-Tuple{Any}"><code>COBREXA.constrain_objective_value</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">constrain_objective_value(tolerance)</code></pre><p>Limit the objective value to <code>tolerance</code>-times the current objective value, as with <a href="../utils/#COBREXA.objective_bounds-Tuple{Any}"><code>objective_bounds</code></a>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/lcsb-biocore/COBREXA.jl/blob/77603c3b626a5edd84a1fbd03d11477955788b00/src/analysis/modifications/generic.jl#L2-L7">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA._do_knockout-Tuple{MetabolicModel, Any, Vector{String}}" href="#COBREXA._do_knockout-Tuple{MetabolicModel, Any, Vector{String}}"><code>COBREXA._do_knockout</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">_do_knockout(model::MetabolicModel, opt_model)</code></pre><p>Internal helper for knockouts on generic MetabolicModels. This can be overloaded so that the knockouts may work differently (more efficiently) with other models.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/lcsb-biocore/COBREXA.jl/blob/77603c3b626a5edd84a1fbd03d11477955788b00/src/analysis/modifications/knockout.jl#L29-L35">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.knockout-Tuple{String}" href="#COBREXA.knockout-Tuple{String}"><code>COBREXA.knockout</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">knockout(gene_id::String)</code></pre><p>A helper variant of <a href="#COBREXA.knockout-Tuple{String}"><code>knockout</code></a> for a single gene.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/lcsb-biocore/COBREXA.jl/blob/77603c3b626a5edd84a1fbd03d11477955788b00/src/analysis/modifications/knockout.jl#L22-L26">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.knockout-Tuple{Vector{String}}" href="#COBREXA.knockout-Tuple{Vector{String}}"><code>COBREXA.knockout</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">knockout(gene_ids::Vector{String})</code></pre><p>A modification that zeroes the bounds of all reactions that would be knocked out by the combination of specified genes (effectively disabling the reactions).</p><p>A slightly counter-intuitive behavior may occur if knocking out multiple genes: Because this only changes the reaction bounds, multiple gene knockouts <em>must</em> be specified in a single call to <a href="#COBREXA.knockout-Tuple{String}"><code>knockout</code></a>, because the modifications have no way to remember which genes are already knocked out and which not.</p><p>In turn, having a reaction that can be catalyzed either by Gene1 or by Gene2, specifying <code>modifications = [knockout([&quot;Gene1&quot;, &quot;Gene2&quot;])]</code> does indeed disable the reaction, but <code>modifications = [knockout(&quot;Gene1&quot;), knockout(&quot;Gene2&quot;)]</code> does <em>not</em> disable the reaction (although reactions that depend either only on Gene1 or only on Gene2 are disabled).</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/lcsb-biocore/COBREXA.jl/blob/77603c3b626a5edd84a1fbd03d11477955788b00/src/analysis/modifications/knockout.jl#L1-L18">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.add_loopless_constraints-Tuple{}" href="#COBREXA.add_loopless_constraints-Tuple{}"><code>COBREXA.add_loopless_constraints</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">add_loopless_constraints(;
max_flux_bound = _constants.default_reaction_bound,
strict_inequality_tolerance = _constants.loopless_strict_inequality_tolerance,
)</code></pre><p>Add quasi-thermodynamic constraints to the model to ensure that no thermodynamically infeasible internal cycles can occur. Adds the following constraints to the problem:</p><pre><code class="language-none">-max_flux_bound × (1 - yᵢ) ≤ xᵢ ≤ max_flux_bound × yᵢ
......@@ -250,7 +250,7 @@ Nᵢₙₜ&#39; × G = 0
yᵢ ∈ {0, 1}
Gᵢ ∈ ℝ
i ∈ internal reactions
Nᵢₙₜ is the nullspace of the internal stoichiometric matrix</code></pre><p>Note, this modification introduces binary variables, so an optimization solver capable of handing mixed integer problems needs to be used. The arguments <code>max_flux_bound</code> and <code>strict_inequality_tolerance</code> implement the &quot;big-M&quot; method of indicator constraints.</p><p>For more details about the algorithm, see <code>Schellenberger, Lewis, and, Palsson. &quot;Elimination of thermodynamically infeasible loops in steady-state metabolic models.&quot;, Biophysical journal, 2011</code>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/lcsb-biocore/COBREXA.jl/blob/6d0e83c79c7269889049f6bc22eafe09365ddbe2/src/analysis/modifications/loopless.jl#L1-L26">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.add_moment_constraints-Tuple{Dict{String, Float64}, Float64}" href="#COBREXA.add_moment_constraints-Tuple{Dict{String, Float64}, Float64}"><code>COBREXA.add_moment_constraints</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">add_moment_constraints(
Nᵢₙₜ is the nullspace of the internal stoichiometric matrix</code></pre><p>Note, this modification introduces binary variables, so an optimization solver capable of handing mixed integer problems needs to be used. The arguments <code>max_flux_bound</code> and <code>strict_inequality_tolerance</code> implement the &quot;big-M&quot; method of indicator constraints.</p><p>For more details about the algorithm, see <code>Schellenberger, Lewis, and, Palsson. &quot;Elimination of thermodynamically infeasible loops in steady-state metabolic models.&quot;, Biophysical journal, 2011</code>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/lcsb-biocore/COBREXA.jl/blob/77603c3b626a5edd84a1fbd03d11477955788b00/src/analysis/modifications/loopless.jl#L1-L26">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.add_moment_constraints-Tuple{Dict{String, Float64}, Float64}" href="#COBREXA.add_moment_constraints-Tuple{Dict{String, Float64}, Float64}"><code>COBREXA.add_moment_constraints</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">add_moment_constraints(
ksas::Dict{String,Float64},
protein_mass_fraction::Float64
)</code></pre><p>A modification that adds enzyme capacity constraints to the problem using a <em>modified</em> version of the MOMENT algorithm. Requires specific activities, <code>ksas</code> [mmol product/g enzyme/h], for each reaction. Proteins are identified by their associated gene IDs. Adds a variable vector <code>y</code> to the problem corresponding to the protein concentration [g enzyme/gDW cell] of each gene product in the order of <code>genes(model)</code>. The total protein concentration [g protein/gDW cell] is constrained to be less than or equal to the <code>protein_mass_fraction</code>. Reaction flux constraints are changed to the MOMENT constraints (see below) for all reactions that have a gene reaction rule, otherwise the flux bounds are left unaltered.</p><p>See Adadi, Roi, et al. &quot;Prediction of microbial growth rate versus biomass yield by a metabolic network with kinetic parameters.&quot; PLoS computational biology (2012) for more details of the original algorithm.</p><p>Here, a streamlined version of the algorithm is implemented to ensure that the correct units are used. Specifically, this implementation uses specific activities instead of <code>kcats</code>. Thus, for a reaction that can only proceed forward and is catalyzed by protein <code>a</code>, the flux <code>x[i]</code> is bounded by <code>x[i] &lt;= ksas[i] * y[a]</code>. If isozymes <code>a</code> or <code>b</code> catalyse the reaction, then <code>x[i] &lt;= ksas[i] * (y[a] + y[b])</code>. If a reaction is catalyzed by subunits <code>a</code> and <code>b</code> then <code>x[i] &lt;= ksas[i] * min(y[a], y[b])</code>. These rules are applied recursively in the model like in the original algorithm. The enzyme capacity constraint is then implemented by <code>sum(y) ≤ protein_mass_fraction</code>. The major benefit of using <code>ksas</code> instead of <code>kcats</code> is that active site number and unit issues are prevented.</p><p><strong>Example</strong></p><p>``` flux<em>balance</em>analysis( ..., modifications = [ add<em>moment</em>constraints(my_kcats, 0.6) ], )</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/lcsb-biocore/COBREXA.jl/blob/6d0e83c79c7269889049f6bc22eafe09365ddbe2/src/analysis/modifications/moment.jl#L1-L36">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.change_optimizer-Tuple{Any}" href="#COBREXA.change_optimizer-Tuple{Any}"><code>COBREXA.change_optimizer</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">change_optimizer(optimizer)</code></pre><p>Change the JuMP optimizer used to run the optimization.</p><p>This may be used to try different approaches for reaching the optimum, and in problems that may require different optimizers for different parts, such as the <a href="#COBREXA.parsimonious_flux_balance_analysis-Tuple{MetabolicModel, Any}"><code>parsimonious_flux_balance_analysis</code></a>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/lcsb-biocore/COBREXA.jl/blob/6d0e83c79c7269889049f6bc22eafe09365ddbe2/src/analysis/modifications/optimizer.jl#L14-L22">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.change_optimizer_attribute-Tuple{Any, Any}" href="#COBREXA.change_optimizer_attribute-Tuple{Any, Any}"><code>COBREXA.change_optimizer_attribute</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">change_optimizer_attribute(attribute_key, value)</code></pre><p>Change a JuMP optimizer attribute. The attributes are optimizer-specific, refer to the JuMP documentation and the documentation of the specific optimizer for usable keys and values.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/lcsb-biocore/COBREXA.jl/blob/6d0e83c79c7269889049f6bc22eafe09365ddbe2/src/analysis/modifications/optimizer.jl#L25-L31">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.change_sense-Tuple{Any}" href="#COBREXA.change_sense-Tuple{Any}"><code>COBREXA.change_sense</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">change_sense(objective_sense)</code></pre><p>Change the objective sense of optimization. Possible arguments are <code>MOI.MAX_SENSE</code> and <code>MOI.MIN_SENSE</code>.</p><p>If you want to change the objective and sense at the same time, use <a href="#COBREXA.change_objective-Tuple{Union{String, Vector{String}}}"><code>change_objective</code></a> instead to do both at once.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/lcsb-biocore/COBREXA.jl/blob/6d0e83c79c7269889049f6bc22eafe09365ddbe2/src/analysis/modifications/optimizer.jl#L2-L10">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.silence" href="#COBREXA.silence"><code>COBREXA.silence</code></a><span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia">silence</code></pre><p>Modification that disable all output from the JuMP optimizer (shortcut for <code>set_silent</code> from JuMP).</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/lcsb-biocore/COBREXA.jl/blob/6d0e83c79c7269889049f6bc22eafe09365ddbe2/src/analysis/modifications/optimizer.jl#L35-L40">source</a></section></article></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../">« Contents</a><a class="docs-footer-nextpage" href="../base/">Base functions »</a><div class="flexbox-break"></div><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> on <span class="colophon-date" title="Monday 16 May 2022 13:40">Monday 16 May 2022</span>. Using Julia version 1.7.0.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
)</code></pre><p>A modification that adds enzyme capacity constraints to the problem using a <em>modified</em> version of the MOMENT algorithm. Requires specific activities, <code>ksas</code> [mmol product/g enzyme/h], for each reaction. Proteins are identified by their associated gene IDs. Adds a variable vector <code>y</code> to the problem corresponding to the protein concentration [g enzyme/gDW cell] of each gene product in the order of <code>genes(model)</code>. The total protein concentration [g protein/gDW cell] is constrained to be less than or equal to the <code>protein_mass_fraction</code>. Reaction flux constraints are changed to the MOMENT constraints (see below) for all reactions that have a gene reaction rule, otherwise the flux bounds are left unaltered.</p><p>See Adadi, Roi, et al. &quot;Prediction of microbial growth rate versus biomass yield by a metabolic network with kinetic parameters.&quot; PLoS computational biology (2012) for more details of the original algorithm.</p><p>Here, a streamlined version of the algorithm is implemented to ensure that the correct units are used. Specifically, this implementation uses specific activities instead of <code>kcats</code>. Thus, for a reaction that can only proceed forward and is catalyzed by protein <code>a</code>, the flux <code>x[i]</code> is bounded by <code>x[i] &lt;= ksas[i] * y[a]</code>. If isozymes <code>a</code> or <code>b</code> catalyse the reaction, then <code>x[i] &lt;= ksas[i] * (y[a] + y[b])</code>. If a reaction is catalyzed by subunits <code>a</code> and <code>b</code> then <code>x[i] &lt;= ksas[i] * min(y[a], y[b])</code>. These rules are applied recursively in the model like in the original algorithm. The enzyme capacity constraint is then implemented by <code>sum(y) ≤ protein_mass_fraction</code>. The major benefit of using <code>ksas</code> instead of <code>kcats</code> is that active site number and unit issues are prevented.</p><p><strong>Example</strong></p><p>``` flux<em>balance</em>analysis( ..., modifications = [ add<em>moment</em>constraints(my_kcats, 0.6) ], )</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/lcsb-biocore/COBREXA.jl/blob/77603c3b626a5edd84a1fbd03d11477955788b00/src/analysis/modifications/moment.jl#L1-L36">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.change_optimizer-Tuple{Any}" href="#COBREXA.change_optimizer-Tuple{Any}"><code>COBREXA.change_optimizer</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">change_optimizer(optimizer)</code></pre><p>Change the JuMP optimizer used to run the optimization.</p><p>This may be used to try different approaches for reaching the optimum, and in problems that may require different optimizers for different parts, such as the <a href="#COBREXA.parsimonious_flux_balance_analysis-Tuple{MetabolicModel, Any}"><code>parsimonious_flux_balance_analysis</code></a>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/lcsb-biocore/COBREXA.jl/blob/77603c3b626a5edd84a1fbd03d11477955788b00/src/analysis/modifications/optimizer.jl#L14-L22">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.change_optimizer_attribute-Tuple{Any, Any}" href="#COBREXA.change_optimizer_attribute-Tuple{Any, Any}"><code>COBREXA.change_optimizer_attribute</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">change_optimizer_attribute(attribute_key, value)</code></pre><p>Change a JuMP optimizer attribute. The attributes are optimizer-specific, refer to the JuMP documentation and the documentation of the specific optimizer for usable keys and values.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/lcsb-biocore/COBREXA.jl/blob/77603c3b626a5edd84a1fbd03d11477955788b00/src/analysis/modifications/optimizer.jl#L25-L31">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.change_sense-Tuple{Any}" href="#COBREXA.change_sense-Tuple{Any}"><code>COBREXA.change_sense</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">change_sense(objective_sense)</code></pre><p>Change the objective sense of optimization. Possible arguments are <code>MOI.MAX_SENSE</code> and <code>MOI.MIN_SENSE</code>.</p><p>If you want to change the objective and sense at the same time, use <a href="#COBREXA.change_objective-Tuple{Union{String, Vector{String}}}"><code>change_objective</code></a> instead to do both at once.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/lcsb-biocore/COBREXA.jl/blob/77603c3b626a5edd84a1fbd03d11477955788b00/src/analysis/modifications/optimizer.jl#L2-L10">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.silence" href="#COBREXA.silence"><code>COBREXA.silence</code></a><span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia">silence</code></pre><p>Modification that disable all output from the JuMP optimizer (shortcut for <code>set_silent</code> from JuMP).</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/lcsb-biocore/COBREXA.jl/blob/77603c3b626a5edd84a1fbd03d11477955788b00/src/analysis/modifications/optimizer.jl#L35-L40">source</a></section></article></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../">« Contents</a><a class="docs-footer-nextpage" href="../base/">Base functions »</a><div class="flexbox-break"></div><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> on <span class="colophon-date" title="Monday 16 May 2022 19:38">Monday 16 May 2022</span>. Using Julia version 1.7.0.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
<!DOCTYPE html>
<html lang="en"><head><meta charset="UTF-8"/><meta name="viewport" content="width=device-width, initial-scale=1.0"/><title>Base functions · COBREXA.jl</title><link href="https://fonts.googleapis.com/css?family=Lato|Roboto+Mono" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.0/css/fontawesome.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.0/css/solid.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.0/css/brands.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.11.1/katex.min.css" rel="stylesheet" type="text/css"/><script>documenterBaseURL="../.."</script><script src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.6/require.min.js" data-main="../../assets/documenter.js"></script><script src="../../siteinfo.js"></script><script src="../../../versions.js"></script><link class="docs-theme-link" rel="stylesheet" type="text/css" href="../../assets/themes/documenter-dark.css" data-theme-name="documenter-dark" data-theme-primary-dark/><link class="docs-theme-link" rel="stylesheet" type="text/css" href="../../assets/themes/documenter-light.css" data-theme-name="documenter-light" data-theme-primary/><script src="../../assets/themeswap.js"></script><link href="../../assets/favicon.ico" rel="icon" type="image/x-icon"/></head><body><div id="documenter"><nav class="docs-sidebar"><a class="docs-logo" href="../../"><img class="docs-light-only" src="../../assets/logo.svg" alt="COBREXA.jl logo"/><img class="docs-dark-only" src="../../assets/logo-dark.svg" alt="COBREXA.jl logo"/></a><div class="docs-package-name"><span class="docs-autofit">COBREXA.jl</span></div><form class="docs-search" action="../../search/"><input class="docs-search-query" id="documenter-search-query" name="q" type="text" placeholder="Search docs"/></form><ul class="docs-menu"><li><a class="tocitem" href="../../">Home</a></li><li><span class="tocitem">User guide</span><ul><li><input class="collapse-toggle" id="menuitem-2-1" type="checkbox"/><label class="tocitem" for="menuitem-2-1"><span class="docs-label">Quickstart tutorials</span><i class="docs-chevron"></i></label><ul class="collapsed"><li><a class="tocitem" href="../../tutorials/">All tutorials</a></li><li><a class="tocitem" href="../../tutorials/1_loading/">Loading and converting model data</a></li><li><a class="tocitem" href="../../tutorials/2_analysis/">Basic analysis of constraint-based models</a></li><li><a class="tocitem" href="../../tutorials/3_hpc/">Distributed processing and HPC environments</a></li><li><a class="tocitem" href="../../tutorials/4_modifying/">Modifying and saving the models</a></li></ul></li><li><input class="collapse-toggle" id="menuitem-2-2" type="checkbox"/><label class="tocitem" for="menuitem-2-2"><span class="docs-label">Advanced tutorials</span><i class="docs-chevron"></i></label><ul class="collapsed"><li><a class="tocitem" href="../../advanced/">All advanced tutorials</a></li><li><a class="tocitem" href="../../advanced/1_variants/">Exploring many model variants</a></li><li><a class="tocitem" href="../../advanced/2_custom_model/">Working with custom models</a></li></ul></li><li><input class="collapse-toggle" id="menuitem-2-3" type="checkbox"/><label class="tocitem" for="menuitem-2-3"><span class="docs-label">Examples and notebooks</span><i class="docs-chevron"></i></label><ul class="collapsed"><li><a class="tocitem" href="../../notebooks/">All notebooks</a></li><li><a class="tocitem" href="../../notebooks/1_loading_converting_saving/">Loading, converting, and saving models</a></li><li><a class="tocitem" href="../../notebooks/2_finding_balance/">Finding balance and variability of constraint-based models</a></li><li><a class="tocitem" href="../../notebooks/3_basic_stdmodel_usage/">Basic usage of <code>StandardModel</code></a></li><li><a class="tocitem" href="../../notebooks/4_basic_core_coupled_usage/">Basic usage of <code>CoreModel</code> and <code>CoreModelCoupled</code></a></li><li><a class="tocitem" href="../../notebooks/5_basic_stdmodel_construction/">Model construction and modification</a></li><li><a class="tocitem" href="../../notebooks/6_screening/">Exploring model variants with <code>screen</code></a></li><li><a class="tocitem" href="../../notebooks/7_community_model/">Building and analysing a small community model</a></li><li><a class="tocitem" href="../../notebooks/8_custom_model/">Using a custom model data structure</a></li><li><a class="tocitem" href="../../notebooks/9_max_min_driving_force_analysis/">Maximum-minimum driving force analysis</a></li></ul></li></ul></li><li><span class="tocitem">Types and functions</span><ul><li><a class="tocitem" href="../">Contents</a></li><li><a class="tocitem" href="../analysis/">Analysis functions</a></li><li class="is-active"><a class="tocitem" href>Base functions</a></li><li><a class="tocitem" href="../io/">Input and output</a></li><li><a class="tocitem" href="../reconstruction/">Model construction functions</a></li><li><a class="tocitem" href="../types/">Types</a></li><li><a class="tocitem" href="../utils/">Utilities</a></li></ul></li><li><a class="tocitem" href="../../howToContribute/">How to contribute</a></li></ul><div class="docs-version-selector field has-addons"><div class="control"><span class="docs-label button is-static is-size-7">Version</span></div><div class="docs-selector control is-expanded"><div class="select is-fullwidth is-size-7"><select id="documenter-version-selector"></select></div></div></div></nav><div class="docs-main"><header class="docs-navbar"><nav class="breadcrumb"><ul class="is-hidden-mobile"><li><a class="is-disabled">Types and functions</a></li><li class="is-active"><a href>Base functions</a></li></ul><ul class="is-hidden-tablet"><li class="is-active"><a href>Base functions</a></li></ul></nav><div class="docs-right"><a class="docs-edit-link" href="https://github.com/lcsb-biocore/COBREXA.jl/blob/master/docs/src/functions/base.md" title="Edit on GitHub"><span class="docs-icon fab"></span><span class="docs-label is-hidden-touch">Edit on GitHub</span></a><a class="docs-settings-button fas fa-cog" id="documenter-settings-button" href="#" title="Settings"></a><a class="docs-sidebar-button fa fa-bars is-hidden-desktop" id="documenter-sidebar-button" href="#"></a></div></header><article class="content" id="documenter-page"><h1 id="Base-functions"><a class="docs-heading-anchor" href="#Base-functions">Base functions</a><a id="Base-functions-1"></a><a class="docs-heading-anchor-permalink" href="#Base-functions" title="Permalink"></a></h1><article class="docstring"><header><a class="docstring-binding" id="COBREXA._constants" href="#COBREXA._constants"><code>COBREXA._constants</code></a><span class="docstring-category">Constant</span></header><section><div><p>A named tuple that contains the magic values that are used globally for whatever purposes.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/lcsb-biocore/COBREXA.jl/blob/6d0e83c79c7269889049f6bc22eafe09365ddbe2/src/base/constants.jl#L2-L5">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.flux_dict-Tuple{MetabolicModel, Any}" href="#COBREXA.flux_dict-Tuple{MetabolicModel, Any}"><code>COBREXA.flux_dict</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">flux_dict(model::MetabolicModel, opt_model)::Maybe{Dict{String, Float64}, Nothing}</code></pre><p>Returns the fluxes of the model as a reaction-keyed dictionary, if solved.</p><p><strong>Example</strong></p><pre><code class="language-none">flux_dict(model, flux_balance_analysis(model, ...))</code></pre></div><a class="docs-sourcelink" target="_blank" href="https://github.com/lcsb-biocore/COBREXA.jl/blob/6d0e83c79c7269889049f6bc22eafe09365ddbe2/src/base/solver.jl#L116-L125">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.flux_dict-Tuple{MetabolicModel}" href="#COBREXA.flux_dict-Tuple{MetabolicModel}"><code>COBREXA.flux_dict</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">flux_dict(model::MetabolicModel)</code></pre><p>A pipeable variant of <code>flux_dict</code>.</p><p><strong>Example</strong></p><pre><code class="language-none">flux_balance_analysis(model, ...) |&gt; flux_dict(model)</code></pre></div><a class="docs-sourcelink" target="_blank" href="https://github.com/lcsb-biocore/COBREXA.jl/blob/6d0e83c79c7269889049f6bc22eafe09365ddbe2/src/base/solver.jl#L130-L139">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.flux_vector-Tuple{MetabolicModel, Any}" href="#COBREXA.flux_vector-Tuple{MetabolicModel, Any}"><code>COBREXA.flux_vector</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">flux_vector(opt_model)::Maybe{Vector{Float64}}</code></pre><p>Returns a vector of fluxes of the model, if solved.</p><p><strong>Example</strong></p><pre><code class="language-none">flux_vector(flux_balance_analysis(model, ...))</code></pre></div><a class="docs-sourcelink" target="_blank" href="https://github.com/lcsb-biocore/COBREXA.jl/blob/6d0e83c79c7269889049f6bc22eafe09365ddbe2/src/base/solver.jl#L103-L112">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.get_optmodel_bounds-Tuple{Any}" href="#COBREXA.get_optmodel_bounds-Tuple{Any}"><code>COBREXA.get_optmodel_bounds</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">get_optmodel_bounds(opt_model)</code></pre><p>Returns vectors of the lower and upper bounds of <code>opt_model</code> constraints, where <code>opt_model</code> is a JuMP model constructed by e.g. <a href="#COBREXA.make_optimization_model-Tuple{MetabolicModel, Any}"><code>make_optimization_model</code></a> or <a href="../analysis/#COBREXA.flux_balance_analysis-Union{Tuple{M}, Tuple{M, Any}} where M&lt;:MetabolicModel"><code>flux_balance_analysis</code></a>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/lcsb-biocore/COBREXA.jl/blob/6d0e83c79c7269889049f6bc22eafe09365ddbe2/src/base/solver.jl#L58-L64">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.is_solved-Tuple{Any}" href="#COBREXA.is_solved-Tuple{Any}"><code>COBREXA.is_solved</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">is_solved(opt_model)</code></pre><p>Return <code>true</code> if <code>opt_model</code> solved successfully (solution is optimal or locally optimal). Return <code>false</code> if any other termination status is reached. Termination status is defined in the documentation of <code>JuMP</code>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/lcsb-biocore/COBREXA.jl/blob/6d0e83c79c7269889049f6bc22eafe09365ddbe2/src/base/solver.jl#L38-L44">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.make_optimization_model-Tuple{MetabolicModel, Any}" href="#COBREXA.make_optimization_model-Tuple{MetabolicModel, Any}"><code>COBREXA.make_optimization_model</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">make_optimization_model(
<html lang="en"><head><meta charset="UTF-8"/><meta name="viewport" content="width=device-width, initial-scale=1.0"/><title>Base functions · COBREXA.jl</title><link href="https://fonts.googleapis.com/css?family=Lato|Roboto+Mono" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.0/css/fontawesome.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.0/css/solid.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.0/css/brands.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.11.1/katex.min.css" rel="stylesheet" type="text/css"/><script>documenterBaseURL="../.."</script><script src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.6/require.min.js" data-main="../../assets/documenter.js"></script><script src="../../siteinfo.js"></script><script src="../../../versions.js"></script><link class="docs-theme-link" rel="stylesheet" type="text/css" href="../../assets/themes/documenter-dark.css" data-theme-name="documenter-dark" data-theme-primary-dark/><link class="docs-theme-link" rel="stylesheet" type="text/css" href="../../assets/themes/documenter-light.css" data-theme-name="documenter-light" data-theme-primary/><script src="../../assets/themeswap.js"></script><link href="../../assets/favicon.ico" rel="icon" type="image/x-icon"/></head><body><div id="documenter"><nav class="docs-sidebar"><a class="docs-logo" href="../../"><img class="docs-light-only" src="../../assets/logo.svg" alt="COBREXA.jl logo"/><img class="docs-dark-only" src="../../assets/logo-dark.svg" alt="COBREXA.jl logo"/></a><div class="docs-package-name"><span class="docs-autofit">COBREXA.jl</span></div><form class="docs-search" action="../../search/"><input class="docs-search-query" id="documenter-search-query" name="q" type="text" placeholder="Search docs"/></form><ul class="docs-menu"><li><a class="tocitem" href="../../">Home</a></li><li><span class="tocitem">User guide</span><ul><li><input class="collapse-toggle" id="menuitem-2-1" type="checkbox"/><label class="tocitem" for="menuitem-2-1"><span class="docs-label">Quickstart tutorials</span><i class="docs-chevron"></i></label><ul class="collapsed"><li><a class="tocitem" href="../../tutorials/">All tutorials</a></li><li><a class="tocitem" href="../../tutorials/1_loading/">Loading and converting model data</a></li><li><a class="tocitem" href="../../tutorials/2_analysis/">Basic analysis of constraint-based models</a></li><li><a class="tocitem" href="../../tutorials/3_hpc/">Distributed processing and HPC environments</a></li><li><a class="tocitem" href="../../tutorials/4_modifying/">Modifying and saving the models</a></li></ul></li><li><input class="collapse-toggle" id="menuitem-2-2" type="checkbox"/><label class="tocitem" for="menuitem-2-2"><span class="docs-label">Advanced tutorials</span><i class="docs-chevron"></i></label><ul class="collapsed"><li><a class="tocitem" href="../../advanced/">All advanced tutorials</a></li><li><a class="tocitem" href="../../advanced/1_variants/">Exploring many model variants</a></li><li><a class="tocitem" href="../../advanced/2_custom_model/">Working with custom models</a></li></ul></li><li><input class="collapse-toggle" id="menuitem-2-3" type="checkbox"/><label class="tocitem" for="menuitem-2-3"><span class="docs-label">Examples and notebooks</span><i class="docs-chevron"></i></label><ul class="collapsed"><li><a class="tocitem" href="../../notebooks/">All notebooks</a></li><li><a class="tocitem" href="../../notebooks/1_loading_converting_saving/">Loading, converting, and saving models</a></li><li><a class="tocitem" href="../../notebooks/2_finding_balance/">Finding balance and variability of constraint-based models</a></li><li><a class="tocitem" href="../../notebooks/3_basic_stdmodel_usage/">Basic usage of <code>StandardModel</code></a></li><li><a class="tocitem" href="../../notebooks/4_basic_core_coupled_usage/">Basic usage of <code>CoreModel</code> and <code>CoreModelCoupled</code></a></li><li><a class="tocitem" href="../../notebooks/5_basic_stdmodel_construction/">Model construction and modification</a></li><li><a class="tocitem" href="../../notebooks/6_screening/">Exploring model variants with <code>screen</code></a></li><li><a class="tocitem" href="../../notebooks/7_community_model/">Building and analysing a small community model</a></li><li><a class="tocitem" href="../../notebooks/8_custom_model/">Using a custom model data structure</a></li><li><a class="tocitem" href="../../notebooks/9_max_min_driving_force_analysis/">Maximum-minimum driving force analysis</a></li></ul></li></ul></li><li><span class="tocitem">Types and functions</span><ul><li><a class="tocitem" href="../">Contents</a></li><li><a class="tocitem" href="../analysis/">Analysis functions</a></li><li class="is-active"><a class="tocitem" href>Base functions</a></li><li><a class="tocitem" href="../io/">Input and output</a></li><li><a class="tocitem" href="../reconstruction/">Model construction functions</a></li><li><a class="tocitem" href="../types/">Types</a></li><li><a class="tocitem" href="../utils/">Utilities</a></li></ul></li><li><a class="tocitem" href="../../howToContribute/">How to contribute</a></li></ul><div class="docs-version-selector field has-addons"><div class="control"><span class="docs-label button is-static is-size-7">Version</span></div><div class="docs-selector control is-expanded"><div class="select is-fullwidth is-size-7"><select id="documenter-version-selector"></select></div></div></div></nav><div class="docs-main"><header class="docs-navbar"><nav class="breadcrumb"><ul class="is-hidden-mobile"><li><a class="is-disabled">Types and functions</a></li><li class="is-active"><a href>Base functions</a></li></ul><ul class="is-hidden-tablet"><li class="is-active"><a href>Base functions</a></li></ul></nav><div class="docs-right"><a class="docs-edit-link" href="https://github.com/lcsb-biocore/COBREXA.jl/blob/master/docs/src/functions/base.md" title="Edit on GitHub"><span class="docs-icon fab"></span><span class="docs-label is-hidden-touch">Edit on GitHub</span></a><a class="docs-settings-button fas fa-cog" id="documenter-settings-button" href="#" title="Settings"></a><a class="docs-sidebar-button fa fa-bars is-hidden-desktop" id="documenter-sidebar-button" href="#"></a></div></header><article class="content" id="documenter-page"><h1 id="Base-functions"><a class="docs-heading-anchor" href="#Base-functions">Base functions</a><a id="Base-functions-1"></a><a class="docs-heading-anchor-permalink" href="#Base-functions" title="Permalink"></a></h1><article class="docstring"><header><a class="docstring-binding" id="COBREXA._constants" href="#COBREXA._constants"><code>COBREXA._constants</code></a><span class="docstring-category">Constant</span></header><section><div><p>A named tuple that contains the magic values that are used globally for whatever purposes.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/lcsb-biocore/COBREXA.jl/blob/77603c3b626a5edd84a1fbd03d11477955788b00/src/base/constants.jl#L2-L5">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.flux_dict-Tuple{MetabolicModel, Any}" href="#COBREXA.flux_dict-Tuple{MetabolicModel, Any}"><code>COBREXA.flux_dict</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">flux_dict(model::MetabolicModel, opt_model)::Maybe{Dict{String, Float64}, Nothing}</code></pre><p>Returns the fluxes of the model as a reaction-keyed dictionary, if solved.</p><p><strong>Example</strong></p><pre><code class="language-none">flux_dict(model, flux_balance_analysis(model, ...))</code></pre></div><a class="docs-sourcelink" target="_blank" href="https://github.com/lcsb-biocore/COBREXA.jl/blob/77603c3b626a5edd84a1fbd03d11477955788b00/src/base/solver.jl#L116-L125">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.flux_dict-Tuple{MetabolicModel}" href="#COBREXA.flux_dict-Tuple{MetabolicModel}"><code>COBREXA.flux_dict</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">flux_dict(model::MetabolicModel)</code></pre><p>A pipeable variant of <code>flux_dict</code>.</p><p><strong>Example</strong></p><pre><code class="language-none">flux_balance_analysis(model, ...) |&gt; flux_dict(model)</code></pre></div><a class="docs-sourcelink" target="_blank" href="https://github.com/lcsb-biocore/COBREXA.jl/blob/77603c3b626a5edd84a1fbd03d11477955788b00/src/base/solver.jl#L130-L139">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.flux_vector-Tuple{MetabolicModel, Any}" href="#COBREXA.flux_vector-Tuple{MetabolicModel, Any}"><code>COBREXA.flux_vector</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">flux_vector(opt_model)::Maybe{Vector{Float64}}</code></pre><p>Returns a vector of fluxes of the model, if solved.</p><p><strong>Example</strong></p><pre><code class="language-none">flux_vector(flux_balance_analysis(model, ...))</code></pre></div><a class="docs-sourcelink" target="_blank" href="https://github.com/lcsb-biocore/COBREXA.jl/blob/77603c3b626a5edd84a1fbd03d11477955788b00/src/base/solver.jl#L103-L112">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.get_optmodel_bounds-Tuple{Any}" href="#COBREXA.get_optmodel_bounds-Tuple{Any}"><code>COBREXA.get_optmodel_bounds</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">get_optmodel_bounds(opt_model)</code></pre><p>Returns vectors of the lower and upper bounds of <code>opt_model</code> constraints, where <code>opt_model</code> is a JuMP model constructed by e.g. <a href="#COBREXA.make_optimization_model-Tuple{MetabolicModel, Any}"><code>make_optimization_model</code></a> or <a href="../analysis/#COBREXA.flux_balance_analysis-Union{Tuple{M}, Tuple{M, Any}} where M&lt;:MetabolicModel"><code>flux_balance_analysis</code></a>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/lcsb-biocore/COBREXA.jl/blob/77603c3b626a5edd84a1fbd03d11477955788b00/src/base/solver.jl#L58-L64">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.is_solved-Tuple{Any}" href="#COBREXA.is_solved-Tuple{Any}"><code>COBREXA.is_solved</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">is_solved(opt_model)</code></pre><p>Return <code>true</code> if <code>opt_model</code> solved successfully (solution is optimal or locally optimal). Return <code>false</code> if any other termination status is reached. Termination status is defined in the documentation of <code>JuMP</code>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/lcsb-biocore/COBREXA.jl/blob/77603c3b626a5edd84a1fbd03d11477955788b00/src/base/solver.jl#L38-L44">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.make_optimization_model-Tuple{MetabolicModel, Any}" href="#COBREXA.make_optimization_model-Tuple{MetabolicModel, Any}"><code>COBREXA.make_optimization_model</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">make_optimization_model(
model::MetabolicModel,
optimizer;
sense = MAX_SENSE,
)</code></pre><p>Convert <code>MetabolicModel</code>s to a JuMP model, place objectives and the equality constraint.</p><p>Here coupling means inequality constraints coupling multiple variables together.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/lcsb-biocore/COBREXA.jl/blob/6d0e83c79c7269889049f6bc22eafe09365ddbe2/src/base/solver.jl#L2-L13">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.optimize_objective-Tuple{Any}" href="#COBREXA.optimize_objective-Tuple{Any}"><code>COBREXA.optimize_objective</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">optimize_objective(opt_model)::Maybe{Float64}</code></pre><p>Shortcut for running JuMP <code>optimize!</code> on a model and returning the objective value, if solved.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/lcsb-biocore/COBREXA.jl/blob/6d0e83c79c7269889049f6bc22eafe09365ddbe2/src/base/solver.jl#L47-L52">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.set_optmodel_bound!-Tuple{Any, Any}" href="#COBREXA.set_optmodel_bound!-Tuple{Any, Any}"><code>COBREXA.set_optmodel_bound!</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">set_optmodel_bound!(vidx, opt_model;
)</code></pre><p>Convert <code>MetabolicModel</code>s to a JuMP model, place objectives and the equality constraint.</p><p>Here coupling means inequality constraints coupling multiple variables together.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/lcsb-biocore/COBREXA.jl/blob/77603c3b626a5edd84a1fbd03d11477955788b00/src/base/solver.jl#L2-L13">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.optimize_objective-Tuple{Any}" href="#COBREXA.optimize_objective-Tuple{Any}"><code>COBREXA.optimize_objective</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">optimize_objective(opt_model)::Maybe{Float64}</code></pre><p>Shortcut for running JuMP <code>optimize!</code> on a model and returning the objective value, if solved.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/lcsb-biocore/COBREXA.jl/blob/77603c3b626a5edd84a1fbd03d11477955788b00/src/base/solver.jl#L47-L52">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.set_optmodel_bound!-Tuple{Any, Any}" href="#COBREXA.set_optmodel_bound!-Tuple{Any, Any}"><code>COBREXA.set_optmodel_bound!</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">set_optmodel_bound!(vidx, opt_model;
ub::Maybe{Real} = nothing,
lb::Maybe{Real} = nothing,
)</code></pre><p>Helper function to set the bounds of a variable in the model. Internally calls <code>set_normalized_rhs</code> from JuMP. If the bounds are set to <code>nothing</code>, they will not be changed.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/lcsb-biocore/COBREXA.jl/blob/6d0e83c79c7269889049f6bc22eafe09365ddbe2/src/base/solver.jl#L70-L79">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.solved_objective_value-Tuple{Any}" href="#COBREXA.solved_objective_value-Tuple{Any}"><code>COBREXA.solved_objective_value</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">solved_objective_value(opt_model)::Maybe{Float64}</code></pre><p>Returns the current objective value of a model, if solved.</p><p><strong>Example</strong></p><pre><code class="language-none">solved_objective_value(flux_balance_analysis(model, ...))</code></pre></div><a class="docs-sourcelink" target="_blank" href="https://github.com/lcsb-biocore/COBREXA.jl/blob/6d0e83c79c7269889049f6bc22eafe09365ddbe2/src/base/solver.jl#L90-L99">source</a></section></article></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../analysis/">« Analysis functions</a><a class="docs-footer-nextpage" href="../io/">Input and output »</a><div class="flexbox-break"></div><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> on <span class="colophon-date" title="Monday 16 May 2022 13:40">Monday 16 May 2022</span>. Using Julia version 1.7.0.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
)</code></pre><p>Helper function to set the bounds of a variable in the model. Internally calls <code>set_normalized_rhs</code> from JuMP. If the bounds are set to <code>nothing</code>, they will not be changed.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/lcsb-biocore/COBREXA.jl/blob/77603c3b626a5edd84a1fbd03d11477955788b00/src/base/solver.jl#L70-L79">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.solved_objective_value-Tuple{Any}" href="#COBREXA.solved_objective_value-Tuple{Any}"><code>COBREXA.solved_objective_value</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">solved_objective_value(opt_model)::Maybe{Float64}</code></pre><p>Returns the current objective value of a model, if solved.</p><p><strong>Example</strong></p><pre><code class="language-none">solved_objective_value(flux_balance_analysis(model, ...))</code></pre></div><a class="docs-sourcelink" target="_blank" href="https://github.com/lcsb-biocore/COBREXA.jl/blob/77603c3b626a5edd84a1fbd03d11477955788b00/src/base/solver.jl#L90-L99">source</a></section></article></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../analysis/">« Analysis functions</a><a class="docs-footer-nextpage" href="../io/">Input and output »</a><div class="flexbox-break"></div><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> on <span class="colophon-date" title="Monday 16 May 2022 19:38">Monday 16 May 2022</span>. Using Julia version 1.7.0.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
<!DOCTYPE html>
<html lang="en"><head><meta charset="UTF-8"/><meta name="viewport" content="width=device-width, initial-scale=1.0"/><title>Contents · COBREXA.jl</title><link href="https://fonts.googleapis.com/css?family=Lato|Roboto+Mono" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.0/css/fontawesome.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.0/css/solid.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.0/css/brands.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.11.1/katex.min.css" rel="stylesheet" type="text/css"/><script>documenterBaseURL=".."</script><script src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.6/require.min.js" data-main="../assets/documenter.js"></script><script src="../siteinfo.js"></script><script src="../../versions.js"></script><link class="docs-theme-link" rel="stylesheet" type="text/css" href="../assets/themes/documenter-dark.css" data-theme-name="documenter-dark" data-theme-primary-dark/><link class="docs-theme-link" rel="stylesheet" type="text/css" href="../assets/themes/documenter-light.css" data-theme-name="documenter-light" data-theme-primary/><script src="../assets/themeswap.js"></script><link href="../assets/favicon.ico" rel="icon" type="image/x-icon"/></head><body><div id="documenter"><nav class="docs-sidebar"><a class="docs-logo" href="../"><img class="docs-light-only" src="../assets/logo.svg" alt="COBREXA.jl logo"/><img class="docs-dark-only" src="../assets/logo-dark.svg" alt="COBREXA.jl logo"/></a><div class="docs-package-name"><span class="docs-autofit">COBREXA.jl</span></div><form class="docs-search" action="../search/"><input class="docs-search-query" id="documenter-search-query" name="q" type="text" placeholder="Search docs"/></form><ul class="docs-menu"><li><a class="tocitem" href="../">Home</a></li><li><span class="tocitem">User guide</span><ul><li><input class="collapse-toggle" id="menuitem-2-1" type="checkbox"/><label class="tocitem" for="menuitem-2-1"><span class="docs-label">Quickstart tutorials</span><i class="docs-chevron"></i></label><ul class="collapsed"><li><a class="tocitem" href="../tutorials/">All tutorials</a></li><li><a class="tocitem" href="../tutorials/1_loading/">Loading and converting model data</a></li><li><a class="tocitem" href="../tutorials/2_analysis/">Basic analysis of constraint-based models</a></li><li><a class="tocitem" href="../tutorials/3_hpc/">Distributed processing and HPC environments</a></li><li><a class="tocitem" href="../tutorials/4_modifying/">Modifying and saving the models</a></li></ul></li><li><input class="collapse-toggle" id="menuitem-2-2" type="checkbox"/><label class="tocitem" for="menuitem-2-2"><span class="docs-label">Advanced tutorials</span><i class="docs-chevron"></i></label><ul class="collapsed"><li><a class="tocitem" href="../advanced/">All advanced tutorials</a></li><li><a class="tocitem" href="../advanced/1_variants/">Exploring many model variants</a></li><li><a class="tocitem" href="../advanced/2_custom_model/">Working with custom models</a></li></ul></li><li><input class="collapse-toggle" id="menuitem-2-3" type="checkbox"/><label class="tocitem" for="menuitem-2-3"><span class="docs-label">Examples and notebooks</span><i class="docs-chevron"></i></label><ul class="collapsed"><li><a class="tocitem" href="../notebooks/">All notebooks</a></li><li><a class="tocitem" href="../notebooks/1_loading_converting_saving/">Loading, converting, and saving models</a></li><li><a class="tocitem" href="../notebooks/2_finding_balance/">Finding balance and variability of constraint-based models</a></li><li><a class="tocitem" href="../notebooks/3_basic_stdmodel_usage/">Basic usage of <code>StandardModel</code></a></li><li><a class="tocitem" href="../notebooks/4_basic_core_coupled_usage/">Basic usage of <code>CoreModel</code> and <code>CoreModelCoupled</code></a></li><li><a class="tocitem" href="../notebooks/5_basic_stdmodel_construction/">Model construction and modification</a></li><li><a class="tocitem" href="../notebooks/6_screening/">Exploring model variants with <code>screen</code></a></li><li><a class="tocitem" href="../notebooks/7_community_model/">Building and analysing a small community model</a></li><li><a class="tocitem" href="../notebooks/8_custom_model/">Using a custom model data structure</a></li><li><a class="tocitem" href="../notebooks/9_max_min_driving_force_analysis/">Maximum-minimum driving force analysis</a></li></ul></li></ul></li><li><span class="tocitem">Types and functions</span><ul><li class="is-active"><a class="tocitem" href>Contents</a></li><li><a class="tocitem" href="analysis/">Analysis functions</a></li><li><a class="tocitem" href="base/">Base functions</a></li><li><a class="tocitem" href="io/">Input and output</a></li><li><a class="tocitem" href="reconstruction/">Model construction functions</a></li><li><a class="tocitem" href="types/">Types</a></li><li><a class="tocitem" href="utils/">Utilities</a></li></ul></li><li><a class="tocitem" href="../howToContribute/">How to contribute</a></li></ul><div class="docs-version-selector field has-addons"><div class="control"><span class="docs-label button is-static is-size-7">Version</span></div><div class="docs-selector control is-expanded"><div class="select is-fullwidth is-size-7"><select id="documenter-version-selector"></select></div></div></div></nav><div class="docs-main"><header class="docs-navbar"><nav class="breadcrumb"><ul class="is-hidden-mobile"><li><a class="is-disabled">Types and functions</a></li><li class="is-active"><a href>Contents</a></li></ul><ul class="is-hidden-tablet"><li class="is-active"><a href>Contents</a></li></ul></nav><div class="docs-right"><a class="docs-edit-link" href="https://github.com/lcsb-biocore/COBREXA.jl/blob/master/docs/src/functions.md" title="Edit on GitHub"><span class="docs-icon fab"></span><span class="docs-label is-hidden-touch">Edit on GitHub</span></a><a class="docs-settings-button fas fa-cog" id="documenter-settings-button" href="#" title="Settings"></a><a class="docs-sidebar-button fa fa-bars is-hidden-desktop" id="documenter-sidebar-button" href="#"></a></div></header><article class="content" id="documenter-page"><h1 id="Types-and-functions"><a class="docs-heading-anchor" href="#Types-and-functions">Types and functions</a><a id="Types-and-functions-1"></a><a class="docs-heading-anchor-permalink" href="#Types-and-functions" title="Permalink"></a></h1><ul><li><a href="analysis/#Analysis-functions">Analysis functions</a></li><ul><li><a href="analysis/#Common-analysis-functions">Common analysis functions</a></li><li><a href="analysis/#Sampling">Sampling</a></li><li><a href="analysis/#Analysis-modifiers">Analysis modifiers</a></li></ul><li><a href="base/#Base-functions">Base functions</a></li><li><a href="io/#Input-and-output">Input and output</a></li><ul><li><a href="io/#File-I/O-and-serialization">File I/O and serialization</a></li><li><a href="io/#Pretty-printing">Pretty printing</a></li></ul><li><a href="reconstruction/#Model-construction-functions">Model construction functions</a></li><ul><li><a href="reconstruction/#Functions-for-changing-the-models">Functions for changing the models</a></li><li><a href="reconstruction/#Variant-specifiers">Variant specifiers</a></li></ul><li><a href="types/#Types">Types</a></li><ul><li><a href="types/#Base-types">Base types</a></li><li><a href="types/#Model-types-and-contents">Model types and contents</a></li><li><a href="types/#Model-type-wrappers">Model type wrappers</a></li></ul><li><a href="utils/#Utilities">Utilities</a></li><ul><li><a href="utils/#Helper-functions">Helper functions</a></li><li><a href="utils/#Macro-generated-functions-and-internal-helpers">Macro-generated functions and internal helpers</a></li><li><a href="utils/#Logging-and-debugging-helpers">Logging and debugging helpers</a></li></ul></ul></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../notebooks/9_max_min_driving_force_analysis/">« Maximum-minimum driving force analysis</a><a class="docs-footer-nextpage" href="analysis/">Analysis functions »</a><div class="flexbox-break"></div><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> on <span class="colophon-date" title="Monday 16 May 2022 13:40">Monday 16 May 2022</span>. Using Julia version 1.7.0.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
<html lang="en"><head><meta charset="UTF-8"/><meta name="viewport" content="width=device-width, initial-scale=1.0"/><title>Contents · COBREXA.jl</title><link href="https://fonts.googleapis.com/css?family=Lato|Roboto+Mono" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.0/css/fontawesome.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.0/css/solid.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.0/css/brands.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.11.1/katex.min.css" rel="stylesheet" type="text/css"/><script>documenterBaseURL=".."</script><script src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.6/require.min.js" data-main="../assets/documenter.js"></script><script src="../siteinfo.js"></script><script src="../../versions.js"></script><link class="docs-theme-link" rel="stylesheet" type="text/css" href="../assets/themes/documenter-dark.css" data-theme-name="documenter-dark" data-theme-primary-dark/><link class="docs-theme-link" rel="stylesheet" type="text/css" href="../assets/themes/documenter-light.css" data-theme-name="documenter-light" data-theme-primary/><script src="../assets/themeswap.js"></script><link href="../assets/favicon.ico" rel="icon" type="image/x-icon"/></head><body><div id="documenter"><nav class="docs-sidebar"><a class="docs-logo" href="../"><img class="docs-light-only" src="../assets/logo.svg" alt="COBREXA.jl logo"/><img class="docs-dark-only" src="../assets/logo-dark.svg" alt="COBREXA.jl logo"/></a><div class="docs-package-name"><span class="docs-autofit">COBREXA.jl</span></div><form class="docs-search" action="../search/"><input class="docs-search-query" id="documenter-search-query" name="q" type="text" placeholder="Search docs"/></form><ul class="docs-menu"><li><a class="tocitem" href="../">Home</a></li><li><span class="tocitem">User guide</span><ul><li><input class="collapse-toggle" id="menuitem-2-1" type="checkbox"/><label class="tocitem" for="menuitem-2-1"><span class="docs-label">Quickstart tutorials</span><i class="docs-chevron"></i></label><ul class="collapsed"><li><a class="tocitem" href="../tutorials/">All tutorials</a></li><li><a class="tocitem" href="../tutorials/1_loading/">Loading and converting model data</a></li><li><a class="tocitem" href="../tutorials/2_analysis/">Basic analysis of constraint-based models</a></li><li><a class="tocitem" href="../tutorials/3_hpc/">Distributed processing and HPC environments</a></li><li><a class="tocitem" href="../tutorials/4_modifying/">Modifying and saving the models</a></li></ul></li><li><input class="collapse-toggle" id="menuitem-2-2" type="checkbox"/><label class="tocitem" for="menuitem-2-2"><span class="docs-label">Advanced tutorials</span><i class="docs-chevron"></i></label><ul class="collapsed"><li><a class="tocitem" href="../advanced/">All advanced tutorials</a></li><li><a class="tocitem" href="../advanced/1_variants/">Exploring many model variants</a></li><li><a class="tocitem" href="../advanced/2_custom_model/">Working with custom models</a></li></ul></li><li><input class="collapse-toggle" id="menuitem-2-3" type="checkbox"/><label class="tocitem" for="menuitem-2-3"><span class="docs-label">Examples and notebooks</span><i class="docs-chevron"></i></label><ul class="collapsed"><li><a class="tocitem" href="../notebooks/">All notebooks</a></li><li><a class="tocitem" href="../notebooks/1_loading_converting_saving/">Loading, converting, and saving models</a></li><li><a class="tocitem" href="../notebooks/2_finding_balance/">Finding balance and variability of constraint-based models</a></li><li><a class="tocitem" href="../notebooks/3_basic_stdmodel_usage/">Basic usage of <code>StandardModel</code></a></li><li><a class="tocitem" href="../notebooks/4_basic_core_coupled_usage/">Basic usage of <code>CoreModel</code> and <code>CoreModelCoupled</code></a></li><li><a class="tocitem" href="../notebooks/5_basic_stdmodel_construction/">Model construction and modification</a></li><li><a class="tocitem" href="../notebooks/6_screening/">Exploring model variants with <code>screen</code></a></li><li><a class="tocitem" href="../notebooks/7_community_model/">Building and analysing a small community model</a></li><li><a class="tocitem" href="../notebooks/8_custom_model/">Using a custom model data structure</a></li><li><a class="tocitem" href="../notebooks/9_max_min_driving_force_analysis/">Maximum-minimum driving force analysis</a></li></ul></li></ul></li><li><span class="tocitem">Types and functions</span><ul><li class="is-active"><a class="tocitem" href>Contents</a></li><li><a class="tocitem" href="analysis/">Analysis functions</a></li><li><a class="tocitem" href="base/">Base functions</a></li><li><a class="tocitem" href="io/">Input and output</a></li><li><a class="tocitem" href="reconstruction/">Model construction functions</a></li><li><a class="tocitem" href="types/">Types</a></li><li><a class="tocitem" href="utils/">Utilities</a></li></ul></li><li><a class="tocitem" href="../howToContribute/">How to contribute</a></li></ul><div class="docs-version-selector field has-addons"><div class="control"><span class="docs-label button is-static is-size-7">Version</span></div><div class="docs-selector control is-expanded"><div class="select is-fullwidth is-size-7"><select id="documenter-version-selector"></select></div></div></div></nav><div class="docs-main"><header class="docs-navbar"><nav class="breadcrumb"><ul class="is-hidden-mobile"><li><a class="is-disabled">Types and functions</a></li><li class="is-active"><a href>Contents</a></li></ul><ul class="is-hidden-tablet"><li class="is-active"><a href>Contents</a></li></ul></nav><div class="docs-right"><a class="docs-edit-link" href="https://github.com/lcsb-biocore/COBREXA.jl/blob/master/docs/src/functions.md" title="Edit on GitHub"><span class="docs-icon fab"></span><span class="docs-label is-hidden-touch">Edit on GitHub</span></a><a class="docs-settings-button fas fa-cog" id="documenter-settings-button" href="#" title="Settings"></a><a class="docs-sidebar-button fa fa-bars is-hidden-desktop" id="documenter-sidebar-button" href="#"></a></div></header><article class="content" id="documenter-page"><h1 id="Types-and-functions"><a class="docs-heading-anchor" href="#Types-and-functions">Types and functions</a><a id="Types-and-functions-1"></a><a class="docs-heading-anchor-permalink" href="#Types-and-functions" title="Permalink"></a></h1><ul><li><a href="analysis/#Analysis-functions">Analysis functions</a></li><ul><li><a href="analysis/#Common-analysis-functions">Common analysis functions</a></li><li><a href="analysis/#Sampling">Sampling</a></li><li><a href="analysis/#Analysis-modifiers">Analysis modifiers</a></li></ul><li><a href="base/#Base-functions">Base functions</a></li><li><a href="io/#Input-and-output">Input and output</a></li><ul><li><a href="io/#File-I/O-and-serialization">File I/O and serialization</a></li><li><a href="io/#Pretty-printing">Pretty printing</a></li></ul><li><a href="reconstruction/#Model-construction-functions">Model construction functions</a></li><ul><li><a href="reconstruction/#Functions-for-changing-the-models">Functions for changing the models</a></li><li><a href="reconstruction/#Variant-specifiers">Variant specifiers</a></li></ul><li><a href="types/#Types">Types</a></li><ul><li><a href="types/#Base-types">Base types</a></li><li><a href="types/#Model-types-and-contents">Model types and contents</a></li><li><a href="types/#Model-type-wrappers">Model type wrappers</a></li></ul><li><a href="utils/#Utilities">Utilities</a></li><ul><li><a href="utils/#Helper-functions">Helper functions</a></li><li><a href="utils/#Macro-generated-functions-and-internal-helpers">Macro-generated functions and internal helpers</a></li><li><a href="utils/#Logging-and-debugging-helpers">Logging and debugging helpers</a></li></ul></ul></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../notebooks/9_max_min_driving_force_analysis/">« Maximum-minimum driving force analysis</a><a class="docs-footer-nextpage" href="analysis/">Analysis functions »</a><div class="flexbox-break"></div><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> on <span class="colophon-date" title="Monday 16 May 2022 19:38">Monday 16 May 2022</span>. Using Julia version 1.7.0.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
<!DOCTYPE html>
<html lang="en"><head><meta charset="UTF-8"/><meta name="viewport" content="width=device-width, initial-scale=1.0"/><title>Input and output · COBREXA.jl</title><link href="https://fonts.googleapis.com/css?family=Lato|Roboto+Mono" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.0/css/fontawesome.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.0/css/solid.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.0/css/brands.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.11.1/katex.min.css" rel="stylesheet" type="text/css"/><script>documenterBaseURL="../.."</script><script src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.6/require.min.js" data-main="../../assets/documenter.js"></script><script src="../../siteinfo.js"></script><script src="../../../versions.js"></script><link class="docs-theme-link" rel="stylesheet" type="text/css" href="../../assets/themes/documenter-dark.css" data-theme-name="documenter-dark" data-theme-primary-dark/><link class="docs-theme-link" rel="stylesheet" type="text/css" href="../../assets/themes/documenter-light.css" data-theme-name="documenter-light" data-theme-primary/><script src="../../assets/themeswap.js"></script><link href="../../assets/favicon.ico" rel="icon" type="image/x-icon"/></head><body><div id="documenter"><nav class="docs-sidebar"><a class="docs-logo" href="../../"><img class="docs-light-only" src="../../assets/logo.svg" alt="COBREXA.jl logo"/><img class="docs-dark-only" src="../../assets/logo-dark.svg" alt="COBREXA.jl logo"/></a><div class="docs-package-name"><span class="docs-autofit">COBREXA.jl</span></div><form class="docs-search" action="../../search/"><input class="docs-search-query" id="documenter-search-query" name="q" type="text" placeholder="Search docs"/></form><ul class="docs-menu"><li><a class="tocitem" href="../../">Home</a></li><li><span class="tocitem">User guide</span><ul><li><input class="collapse-toggle" id="menuitem-2-1" type="checkbox"/><label class="tocitem" for="menuitem-2-1"><span class="docs-label">Quickstart tutorials</span><i class="docs-chevron"></i></label><ul class="collapsed"><li><a class="tocitem" href="../../tutorials/">All tutorials</a></li><li><a class="tocitem" href="../../tutorials/1_loading/">Loading and converting model data</a></li><li><a class="tocitem" href="../../tutorials/2_analysis/">Basic analysis of constraint-based models</a></li><li><a class="tocitem" href="../../tutorials/3_hpc/">Distributed processing and HPC environments</a></li><li><a class="tocitem" href="../../tutorials/4_modifying/">Modifying and saving the models</a></li></ul></li><li><input class="collapse-toggle" id="menuitem-2-2" type="checkbox"/><label class="tocitem" for="menuitem-2-2"><span class="docs-label">Advanced tutorials</span><i class="docs-chevron"></i></label><ul class="collapsed"><li><a class="tocitem" href="../../advanced/">All advanced tutorials</a></li><li><a class="tocitem" href="../../advanced/1_variants/">Exploring many model variants</a></li><li><a class="tocitem" href="../../advanced/2_custom_model/">Working with custom models</a></li></ul></li><li><input class="collapse-toggle" id="menuitem-2-3" type="checkbox"/><label class="tocitem" for="menuitem-2-3"><span class="docs-label">Examples and notebooks</span><i class="docs-chevron"></i></label><ul class="collapsed"><li><a class="tocitem" href="../../notebooks/">All notebooks</a></li><li><a class="tocitem" href="../../notebooks/1_loading_converting_saving/">Loading, converting, and saving models</a></li><li><a class="tocitem" href="../../notebooks/2_finding_balance/">Finding balance and variability of constraint-based models</a></li><li><a class="tocitem" href="../../notebooks/3_basic_stdmodel_usage/">Basic usage of <code>StandardModel</code></a></li><li><a class="tocitem" href="../../notebooks/4_basic_core_coupled_usage/">Basic usage of <code>CoreModel</code> and <code>CoreModelCoupled</code></a></li><li><a class="tocitem" href="../../notebooks/5_basic_stdmodel_construction/">Model construction and modification</a></li><li><a class="tocitem" href="../../notebooks/6_screening/">Exploring model variants with <code>screen</code></a></li><li><a class="tocitem" href="../../notebooks/7_community_model/">Building and analysing a small community model</a></li><li><a class="tocitem" href="../../notebooks/8_custom_model/">Using a custom model data structure</a></li><li><a class="tocitem" href="../../notebooks/9_max_min_driving_force_analysis/">Maximum-minimum driving force analysis</a></li></ul></li></ul></li><li><span class="tocitem">Types and functions</span><ul><li><a class="tocitem" href="../">Contents</a></li><li><a class="tocitem" href="../analysis/">Analysis functions</a></li><li><a class="tocitem" href="../base/">Base functions</a></li><li class="is-active"><a class="tocitem" href>Input and output</a><ul class="internal"><li><a class="tocitem" href="#File-I/O-and-serialization"><span>File I/O and serialization</span></a></li><li><a class="tocitem" href="#Pretty-printing"><span>Pretty printing</span></a></li></ul></li><li><a class="tocitem" href="../reconstruction/">Model construction functions</a></li><li><a class="tocitem" href="../types/">Types</a></li><li><a class="tocitem" href="../utils/">Utilities</a></li></ul></li><li><a class="tocitem" href="../../howToContribute/">How to contribute</a></li></ul><div class="docs-version-selector field has-addons"><div class="control"><span class="docs-label button is-static is-size-7">Version</span></div><div class="docs-selector control is-expanded"><div class="select is-fullwidth is-size-7"><select id="documenter-version-selector"></select></div></div></div></nav><div class="docs-main"><header class="docs-navbar"><nav class="breadcrumb"><ul class="is-hidden-mobile"><li><a class="is-disabled">Types and functions</a></li><li class="is-active"><a href>Input and output</a></li></ul><ul class="is-hidden-tablet"><li class="is-active"><a href>Input and output</a></li></ul></nav><div class="docs-right"><a class="docs-edit-link" href="https://github.com/lcsb-biocore/COBREXA.jl/blob/master/docs/src/functions/io.md" title="Edit on GitHub"><span class="docs-icon fab"></span><span class="docs-label is-hidden-touch">Edit on GitHub</span></a><a class="docs-settings-button fas fa-cog" id="documenter-settings-button" href="#" title="Settings"></a><a class="docs-sidebar-button fa fa-bars is-hidden-desktop" id="documenter-sidebar-button" href="#"></a></div></header><article class="content" id="documenter-page"><h1 id="Input-and-output"><a class="docs-heading-anchor" href="#Input-and-output">Input and output</a><a id="Input-and-output-1"></a><a class="docs-heading-anchor-permalink" href="#Input-and-output" title="Permalink"></a></h1><h2 id="File-I/O-and-serialization"><a class="docs-heading-anchor" href="#File-I/O-and-serialization">File I/O and serialization</a><a id="File-I/O-and-serialization-1"></a><a class="docs-heading-anchor-permalink" href="#File-I/O-and-serialization" title="Permalink"></a></h2><article class="docstring"><header><a class="docstring-binding" id="COBREXA.load_model-Tuple{String}" href="#COBREXA.load_model-Tuple{String}"><code>COBREXA.load_model</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">load_model(file_name::String)::MetabolicModel</code></pre><p>Generic function for loading models that chooses a specific loader function from the <code>file_name</code> extension, or throws an error.</p><p>Currently, these model types are supported:</p><ul><li>SBML models (<code>*.xml</code>, loaded with <a href="#COBREXA.load_sbml_model-Tuple{String}"><code>load_sbml_model</code></a>)</li><li>JSON models (<code>*.json</code>, loaded with <a href="#COBREXA.load_json_model-Tuple{String}"><code>load_json_model</code></a>)</li><li>MATLAB models (<code>*.mat</code>, loaded with <a href="#COBREXA.load_mat_model-Tuple{String}"><code>load_mat_model</code></a>)</li></ul></div><a class="docs-sourcelink" target="_blank" href="https://github.com/lcsb-biocore/COBREXA.jl/blob/6d0e83c79c7269889049f6bc22eafe09365ddbe2/src/io/io.jl#L2-L13">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.load_model-Union{Tuple{T}, Tuple{Type{T}, String}} where T&lt;:MetabolicModel" href="#COBREXA.load_model-Union{Tuple{T}, Tuple{Type{T}, String}} where T&lt;:MetabolicModel"><code>COBREXA.load_model</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">load_model(type::Type{T}, file_name::String)::T where T</code></pre><p>Helper function tht loads the model using <a href="#COBREXA.load_model-Tuple{String}"><code>load_model</code></a> and return it converted to <code>type</code>.</p><p><strong>Example:</strong></p><pre><code class="language-none">load_model(CoreModel, &quot;mySBMLModel.xml&quot;)</code></pre></div><a class="docs-sourcelink" target="_blank" href="https://github.com/lcsb-biocore/COBREXA.jl/blob/6d0e83c79c7269889049f6bc22eafe09365ddbe2/src/io/io.jl#L27-L36">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.save_model-Tuple{MetabolicModel, String}" href="#COBREXA.save_model-Tuple{MetabolicModel, String}"><code>COBREXA.save_model</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">save_model(model::MetabolicModel, file_name::String)</code></pre><p>Generic function for saving models that chooses a specific writer function from the <code>file_name</code> extension, or throws an error.</p><p>Currently, these model types are supported:</p><ul><li>JSON models (<code>*.json</code>, loaded with <a href="#COBREXA.save_json_model-Tuple{MetabolicModel, String}"><code>save_json_model</code></a>)</li><li>MATLAB models (<code>*.mat</code>, loaded with <a href="#COBREXA.save_mat_model-Tuple{MetabolicModel, String}"><code>save_mat_model</code></a>)</li></ul></div><a class="docs-sourcelink" target="_blank" href="https://github.com/lcsb-biocore/COBREXA.jl/blob/6d0e83c79c7269889049f6bc22eafe09365ddbe2/src/io/io.jl#L41-L51">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.load_json_model-Tuple{String}" href="#COBREXA.load_json_model-Tuple{String}"><code>COBREXA.load_json_model</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">load_json_model(filename::String)::JSONModel</code></pre><p>Load and return a JSON-formatted model that is stored in <code>file_name</code>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/lcsb-biocore/COBREXA.jl/blob/6d0e83c79c7269889049f6bc22eafe09365ddbe2/src/io/json.jl#L1-L5">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.save_json_model-Tuple{MetabolicModel, String}" href="#COBREXA.save_json_model-Tuple{MetabolicModel, String}"><code>COBREXA.save_json_model</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">save_json_model(model::MetabolicModel, file_name::String)</code></pre><p>Save a <a href="../types/#COBREXA.JSONModel"><code>JSONModel</code></a> in <code>model</code> to a JSON file <code>file_name</code>.</p><p>In case the <code>model</code> is not <code>JSONModel</code>, it will be converted automatically.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/lcsb-biocore/COBREXA.jl/blob/6d0e83c79c7269889049f6bc22eafe09365ddbe2/src/io/json.jl#L10-L16">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.load_mat_model-Tuple{String}" href="#COBREXA.load_mat_model-Tuple{String}"><code>COBREXA.load_mat_model</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">load_mat_model(file_name::String)</code></pre><p>Load and return a MATLAB file <code>file_name</code> that contains a COBRA-compatible model.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/lcsb-biocore/COBREXA.jl/blob/6d0e83c79c7269889049f6bc22eafe09365ddbe2/src/io/mat.jl#L2-L7">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.save_mat_model-Tuple{MetabolicModel, String}" href="#COBREXA.save_mat_model-Tuple{MetabolicModel, String}"><code>COBREXA.save_mat_model</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">save_mat_model(model::MetabolicModel, file_name::String; model_name::String=&quot;model&quot;)</code></pre><p>Save a <a href="../types/#COBREXA.MATModel"><code>MATModel</code></a> in <code>model</code> to a MATLAB file <code>file_name</code> in a format compatible with other MATLAB-based COBRA software.</p><p>In case the <code>model</code> is not <code>MATModel</code>, it will be converted automatically.</p><p><code>model_name</code> is the identifier name for the whole model written to the MATLAB file; defaults to just &quot;model&quot;.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/lcsb-biocore/COBREXA.jl/blob/6d0e83c79c7269889049f6bc22eafe09365ddbe2/src/io/mat.jl#L14-L24">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.load_sbml_model-Tuple{String}" href="#COBREXA.load_sbml_model-Tuple{String}"><code>COBREXA.load_sbml_model</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">load_sbml_model(file_name::String)::SBMLModel</code></pre><p>Load and return a SBML XML model in <code>file_name</code>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/lcsb-biocore/COBREXA.jl/blob/6d0e83c79c7269889049f6bc22eafe09365ddbe2/src/io/sbml.jl#L2-L6">source</a></section></article><h2 id="Pretty-printing"><a class="docs-heading-anchor" href="#Pretty-printing">Pretty printing</a><a id="Pretty-printing-1"></a><a class="docs-heading-anchor-permalink" href="#Pretty-printing" title="Permalink"></a></h2><article class="docstring"><header><a class="docstring-binding" id="Base.show-Tuple{IO, MIME{Symbol(&quot;text/plain&quot;)}, MetabolicModel}" href="#Base.show-Tuple{IO, MIME{Symbol(&quot;text/plain&quot;)}, MetabolicModel}"><code>Base.show</code></a><span class="docstring-category">Method</span></header><section><div><p>Pretty printing of everything metabolic-modelish.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/lcsb-biocore/COBREXA.jl/blob/6d0e83c79c7269889049f6bc22eafe09365ddbe2/src/io/show/MetabolicModel.jl#L1-L3">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA._pretty_substances-Tuple{Vector{String}}" href="#COBREXA._pretty_substances-Tuple{Vector{String}}"><code>COBREXA._pretty_substances</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">_pretty_substances(ss::Vector{String})::String</code></pre><p>Nicely format a substance list.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/lcsb-biocore/COBREXA.jl/blob/6d0e83c79c7269889049f6bc22eafe09365ddbe2/src/io/show/Reaction.jl#L2-L6">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="Base.show-Union{Tuple{M}, Tuple{IO, MIME{Symbol(&quot;text/plain&quot;)}, Serialized{M}}} where M" href="#Base.show-Union{Tuple{M}, Tuple{IO, MIME{Symbol(&quot;text/plain&quot;)}, Serialized{M}}} where M"><code>Base.show</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">Base.show(io::IO, ::MIME&quot;text/plain&quot;, m::Serialized{M}) where {M}</code></pre><p>Show the <a href="../types/#COBREXA.Serialized"><code>Serialized</code></a> model without unnecessarily loading it.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/lcsb-biocore/COBREXA.jl/blob/6d0e83c79c7269889049f6bc22eafe09365ddbe2/src/io/show/Serialized.jl#L2-L6">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA._pretty_print_keyvals-Tuple{Any, String, Any}" href="#COBREXA._pretty_print_keyvals-Tuple{Any, String, Any}"><code>COBREXA._pretty_print_keyvals</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">_pretty_print_keyvals(io, def::String, payload; kwargs...)</code></pre><p>Nicely prints keys and values.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/lcsb-biocore/COBREXA.jl/blob/6d0e83c79c7269889049f6bc22eafe09365ddbe2/src/io/show/pretty_printing.jl#L1-L5">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA._pretty_print_keyvals-Tuple{Any, String, Dict}" href="#COBREXA._pretty_print_keyvals-Tuple{Any, String, Dict}"><code>COBREXA._pretty_print_keyvals</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">_pretty_print_keyvals(
<html lang="en"><head><meta charset="UTF-8"/><meta name="viewport" content="width=device-width, initial-scale=1.0"/><title>Input and output · COBREXA.jl</title><link href="https://fonts.googleapis.com/css?family=Lato|Roboto+Mono" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.0/css/fontawesome.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.0/css/solid.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.0/css/brands.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.11.1/katex.min.css" rel="stylesheet" type="text/css"/><script>documenterBaseURL="../.."</script><script src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.6/require.min.js" data-main="../../assets/documenter.js"></script><script src="../../siteinfo.js"></script><script src="../../../versions.js"></script><link class="docs-theme-link" rel="stylesheet" type="text/css" href="../../assets/themes/documenter-dark.css" data-theme-name="documenter-dark" data-theme-primary-dark/><link class="docs-theme-link" rel="stylesheet" type="text/css" href="../../assets/themes/documenter-light.css" data-theme-name="documenter-light" data-theme-primary/><script src="../../assets/themeswap.js"></script><link href="../../assets/favicon.ico" rel="icon" type="image/x-icon"/></head><body><div id="documenter"><nav class="docs-sidebar"><a class="docs-logo" href="../../"><img class="docs-light-only" src="../../assets/logo.svg" alt="COBREXA.jl logo"/><img class="docs-dark-only" src="../../assets/logo-dark.svg" alt="COBREXA.jl logo"/></a><div class="docs-package-name"><span class="docs-autofit">COBREXA.jl</span></div><form class="docs-search" action="../../search/"><input class="docs-search-query" id="documenter-search-query" name="q" type="text" placeholder="Search docs"/></form><ul class="docs-menu"><li><a class="tocitem" href="../../">Home</a></li><li><span class="tocitem">User guide</span><ul><li><input class="collapse-toggle" id="menuitem-2-1" type="checkbox"/><label class="tocitem" for="menuitem-2-1"><span class="docs-label">Quickstart tutorials</span><i class="docs-chevron"></i></label><ul class="collapsed"><li><a class="tocitem" href="../../tutorials/">All tutorials</a></li><li><a class="tocitem" href="../../tutorials/1_loading/">Loading and converting model data</a></li><li><a class="tocitem" href="../../tutorials/2_analysis/">Basic analysis of constraint-based models</a></li><li><a class="tocitem" href="../../tutorials/3_hpc/">Distributed processing and HPC environments</a></li><li><a class="tocitem" href="../../tutorials/4_modifying/">Modifying and saving the models</a></li></ul></li><li><input class="collapse-toggle" id="menuitem-2-2" type="checkbox"/><label class="tocitem" for="menuitem-2-2"><span class="docs-label">Advanced tutorials</span><i class="docs-chevron"></i></label><ul class="collapsed"><li><a class="tocitem" href="../../advanced/">All advanced tutorials</a></li><li><a class="tocitem" href="../../advanced/1_variants/">Exploring many model variants</a></li><li><a class="tocitem" href="../../advanced/2_custom_model/">Working with custom models</a></li></ul></li><li><input class="collapse-toggle" id="menuitem-2-3" type="checkbox"/><label class="tocitem" for="menuitem-2-3"><span class="docs-label">Examples and notebooks</span><i class="docs-chevron"></i></label><ul class="collapsed"><li><a class="tocitem" href="../../notebooks/">All notebooks</a></li><li><a class="tocitem" href="../../notebooks/1_loading_converting_saving/">Loading, converting, and saving models</a></li><li><a class="tocitem" href="../../notebooks/2_finding_balance/">Finding balance and variability of constraint-based models</a></li><li><a class="tocitem" href="../../notebooks/3_basic_stdmodel_usage/">Basic usage of <code>StandardModel</code></a></li><li><a class="tocitem" href="../../notebooks/4_basic_core_coupled_usage/">Basic usage of <code>CoreModel</code> and <code>CoreModelCoupled</code></a></li><li><a class="tocitem" href="../../notebooks/5_basic_stdmodel_construction/">Model construction and modification</a></li><li><a class="tocitem" href="../../notebooks/6_screening/">Exploring model variants with <code>screen</code></a></li><li><a class="tocitem" href="../../notebooks/7_community_model/">Building and analysing a small community model</a></li><li><a class="tocitem" href="../../notebooks/8_custom_model/">Using a custom model data structure</a></li><li><a class="tocitem" href="../../notebooks/9_max_min_driving_force_analysis/">Maximum-minimum driving force analysis</a></li></ul></li></ul></li><li><span class="tocitem">Types and functions</span><ul><li><a class="tocitem" href="../">Contents</a></li><li><a class="tocitem" href="../analysis/">Analysis functions</a></li><li><a class="tocitem" href="../base/">Base functions</a></li><li class="is-active"><a class="tocitem" href>Input and output</a><ul class="internal"><li><a class="tocitem" href="#File-I/O-and-serialization"><span>File I/O and serialization</span></a></li><li><a class="tocitem" href="#Pretty-printing"><span>Pretty printing</span></a></li></ul></li><li><a class="tocitem" href="../reconstruction/">Model construction functions</a></li><li><a class="tocitem" href="../types/">Types</a></li><li><a class="tocitem" href="../utils/">Utilities</a></li></ul></li><li><a class="tocitem" href="../../howToContribute/">How to contribute</a></li></ul><div class="docs-version-selector field has-addons"><div class="control"><span class="docs-label button is-static is-size-7">Version</span></div><div class="docs-selector control is-expanded"><div class="select is-fullwidth is-size-7"><select id="documenter-version-selector"></select></div></div></div></nav><div class="docs-main"><header class="docs-navbar"><nav class="breadcrumb"><ul class="is-hidden-mobile"><li><a class="is-disabled">Types and functions</a></li><li class="is-active"><a href>Input and output</a></li></ul><ul class="is-hidden-tablet"><li class="is-active"><a href>Input and output</a></li></ul></nav><div class="docs-right"><a class="docs-edit-link" href="https://github.com/lcsb-biocore/COBREXA.jl/blob/master/docs/src/functions/io.md" title="Edit on GitHub"><span class="docs-icon fab"></span><span class="docs-label is-hidden-touch">Edit on GitHub</span></a><a class="docs-settings-button fas fa-cog" id="documenter-settings-button" href="#" title="Settings"></a><a class="docs-sidebar-button fa fa-bars is-hidden-desktop" id="documenter-sidebar-button" href="#"></a></div></header><article class="content" id="documenter-page"><h1 id="Input-and-output"><a class="docs-heading-anchor" href="#Input-and-output">Input and output</a><a id="Input-and-output-1"></a><a class="docs-heading-anchor-permalink" href="#Input-and-output" title="Permalink"></a></h1><h2 id="File-I/O-and-serialization"><a class="docs-heading-anchor" href="#File-I/O-and-serialization">File I/O and serialization</a><a id="File-I/O-and-serialization-1"></a><a class="docs-heading-anchor-permalink" href="#File-I/O-and-serialization" title="Permalink"></a></h2><article class="docstring"><header><a class="docstring-binding" id="COBREXA.load_model-Tuple{String}" href="#COBREXA.load_model-Tuple{String}"><code>COBREXA.load_model</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">load_model(file_name::String)::MetabolicModel</code></pre><p>Generic function for loading models that chooses a specific loader function from the <code>file_name</code> extension, or throws an error.</p><p>Currently, these model types are supported:</p><ul><li>SBML models (<code>*.xml</code>, loaded with <a href="#COBREXA.load_sbml_model-Tuple{String}"><code>load_sbml_model</code></a>)</li><li>JSON models (<code>*.json</code>, loaded with <a href="#COBREXA.load_json_model-Tuple{String}"><code>load_json_model</code></a>)</li><li>MATLAB models (<code>*.mat</code>, loaded with <a href="#COBREXA.load_mat_model-Tuple{String}"><code>load_mat_model</code></a>)</li></ul></div><a class="docs-sourcelink" target="_blank" href="https://github.com/lcsb-biocore/COBREXA.jl/blob/77603c3b626a5edd84a1fbd03d11477955788b00/src/io/io.jl#L2-L13">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.load_model-Union{Tuple{T}, Tuple{Type{T}, String}} where T&lt;:MetabolicModel" href="#COBREXA.load_model-Union{Tuple{T}, Tuple{Type{T}, String}} where T&lt;:MetabolicModel"><code>COBREXA.load_model</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">load_model(type::Type{T}, file_name::String)::T where T</code></pre><p>Helper function tht loads the model using <a href="#COBREXA.load_model-Tuple{String}"><code>load_model</code></a> and return it converted to <code>type</code>.</p><p><strong>Example:</strong></p><pre><code class="language-none">load_model(CoreModel, &quot;mySBMLModel.xml&quot;)</code></pre></div><a class="docs-sourcelink" target="_blank" href="https://github.com/lcsb-biocore/COBREXA.jl/blob/77603c3b626a5edd84a1fbd03d11477955788b00/src/io/io.jl#L27-L36">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.save_model-Tuple{MetabolicModel, String}" href="#COBREXA.save_model-Tuple{MetabolicModel, String}"><code>COBREXA.save_model</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">save_model(model::MetabolicModel, file_name::String)</code></pre><p>Generic function for saving models that chooses a specific writer function from the <code>file_name</code> extension, or throws an error.</p><p>Currently, these model types are supported:</p><ul><li>JSON models (<code>*.json</code>, loaded with <a href="#COBREXA.save_json_model-Tuple{MetabolicModel, String}"><code>save_json_model</code></a>)</li><li>MATLAB models (<code>*.mat</code>, loaded with <a href="#COBREXA.save_mat_model-Tuple{MetabolicModel, String}"><code>save_mat_model</code></a>)</li></ul></div><a class="docs-sourcelink" target="_blank" href="https://github.com/lcsb-biocore/COBREXA.jl/blob/77603c3b626a5edd84a1fbd03d11477955788b00/src/io/io.jl#L41-L51">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.load_json_model-Tuple{String}" href="#COBREXA.load_json_model-Tuple{String}"><code>COBREXA.load_json_model</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">load_json_model(filename::String)::JSONModel</code></pre><p>Load and return a JSON-formatted model that is stored in <code>file_name</code>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/lcsb-biocore/COBREXA.jl/blob/77603c3b626a5edd84a1fbd03d11477955788b00/src/io/json.jl#L1-L5">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.save_json_model-Tuple{MetabolicModel, String}" href="#COBREXA.save_json_model-Tuple{MetabolicModel, String}"><code>COBREXA.save_json_model</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">save_json_model(model::MetabolicModel, file_name::String)</code></pre><p>Save a <a href="../types/#COBREXA.JSONModel"><code>JSONModel</code></a> in <code>model</code> to a JSON file <code>file_name</code>.</p><p>In case the <code>model</code> is not <code>JSONModel</code>, it will be converted automatically.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/lcsb-biocore/COBREXA.jl/blob/77603c3b626a5edd84a1fbd03d11477955788b00/src/io/json.jl#L10-L16">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.load_mat_model-Tuple{String}" href="#COBREXA.load_mat_model-Tuple{String}"><code>COBREXA.load_mat_model</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">load_mat_model(file_name::String)</code></pre><p>Load and return a MATLAB file <code>file_name</code> that contains a COBRA-compatible model.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/lcsb-biocore/COBREXA.jl/blob/77603c3b626a5edd84a1fbd03d11477955788b00/src/io/mat.jl#L2-L7">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.save_mat_model-Tuple{MetabolicModel, String}" href="#COBREXA.save_mat_model-Tuple{MetabolicModel, String}"><code>COBREXA.save_mat_model</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">save_mat_model(model::MetabolicModel, file_name::String; model_name::String=&quot;model&quot;)</code></pre><p>Save a <a href="../types/#COBREXA.MATModel"><code>MATModel</code></a> in <code>model</code> to a MATLAB file <code>file_name</code> in a format compatible with other MATLAB-based COBRA software.</p><p>In case the <code>model</code> is not <code>MATModel</code>, it will be converted automatically.</p><p><code>model_name</code> is the identifier name for the whole model written to the MATLAB file; defaults to just &quot;model&quot;.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/lcsb-biocore/COBREXA.jl/blob/77603c3b626a5edd84a1fbd03d11477955788b00/src/io/mat.jl#L14-L24">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.load_sbml_model-Tuple{String}" href="#COBREXA.load_sbml_model-Tuple{String}"><code>COBREXA.load_sbml_model</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">load_sbml_model(file_name::String)::SBMLModel</code></pre><p>Load and return a SBML XML model in <code>file_name</code>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/lcsb-biocore/COBREXA.jl/blob/77603c3b626a5edd84a1fbd03d11477955788b00/src/io/sbml.jl#L2-L6">source</a></section></article><h2 id="Pretty-printing"><a class="docs-heading-anchor" href="#Pretty-printing">Pretty printing</a><a id="Pretty-printing-1"></a><a class="docs-heading-anchor-permalink" href="#Pretty-printing" title="Permalink"></a></h2><article class="docstring"><header><a class="docstring-binding" id="Base.show-Tuple{IO, MIME{Symbol(&quot;text/plain&quot;)}, MetabolicModel}" href="#Base.show-Tuple{IO, MIME{Symbol(&quot;text/plain&quot;)}, MetabolicModel}"><code>Base.show</code></a><span class="docstring-category">Method</span></header><section><div><p>Pretty printing of everything metabolic-modelish.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/lcsb-biocore/COBREXA.jl/blob/77603c3b626a5edd84a1fbd03d11477955788b00/src/io/show/MetabolicModel.jl#L1-L3">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA._pretty_substances-Tuple{Vector{String}}" href="#COBREXA._pretty_substances-Tuple{Vector{String}}"><code>COBREXA._pretty_substances</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">_pretty_substances(ss::Vector{String})::String</code></pre><p>Nicely format a substance list.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/lcsb-biocore/COBREXA.jl/blob/77603c3b626a5edd84a1fbd03d11477955788b00/src/io/show/Reaction.jl#L2-L6">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="Base.show-Union{Tuple{M}, Tuple{IO, MIME{Symbol(&quot;text/plain&quot;)}, Serialized{M}}} where M" href="#Base.show-Union{Tuple{M}, Tuple{IO, MIME{Symbol(&quot;text/plain&quot;)}, Serialized{M}}} where M"><code>Base.show</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">Base.show(io::IO, ::MIME&quot;text/plain&quot;, m::Serialized{M}) where {M}</code></pre><p>Show the <a href="../types/#COBREXA.Serialized"><code>Serialized</code></a> model without unnecessarily loading it.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/lcsb-biocore/COBREXA.jl/blob/77603c3b626a5edd84a1fbd03d11477955788b00/src/io/show/Serialized.jl#L2-L6">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA._pretty_print_keyvals-Tuple{Any, String, Any}" href="#COBREXA._pretty_print_keyvals-Tuple{Any, String, Any}"><code>COBREXA._pretty_print_keyvals</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">_pretty_print_keyvals(io, def::String, payload; kwargs...)</code></pre><p>Nicely prints keys and values.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/lcsb-biocore/COBREXA.jl/blob/77603c3b626a5edd84a1fbd03d11477955788b00/src/io/show/pretty_printing.jl#L1-L5">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA._pretty_print_keyvals-Tuple{Any, String, Dict}" href="#COBREXA._pretty_print_keyvals-Tuple{Any, String, Dict}"><code>COBREXA._pretty_print_keyvals</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">_pretty_print_keyvals(
io,
def::String,
payload::Dict
)</code></pre><p>Specialization of <code>_pretty_print_keyvals</code> for dictionaries.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/lcsb-biocore/COBREXA.jl/blob/6d0e83c79c7269889049f6bc22eafe09365ddbe2/src/io/show/pretty_printing.jl#L27-L35">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA._pretty_print_keyvals-Tuple{Any, String, String}" href="#COBREXA._pretty_print_keyvals-Tuple{Any, String, String}"><code>COBREXA._pretty_print_keyvals</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">_pretty_print_keyvals(
)</code></pre><p>Specialization of <code>_pretty_print_keyvals</code> for dictionaries.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/lcsb-biocore/COBREXA.jl/blob/77603c3b626a5edd84a1fbd03d11477955788b00/src/io/show/pretty_printing.jl#L27-L35">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA._pretty_print_keyvals-Tuple{Any, String, String}" href="#COBREXA._pretty_print_keyvals-Tuple{Any, String, String}"><code>COBREXA._pretty_print_keyvals</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">_pretty_print_keyvals(
io,
def::String,
payload::String
)</code></pre><p>Specialization of <code>_pretty_print_keyvals</code> for plain strings.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/lcsb-biocore/COBREXA.jl/blob/6d0e83c79c7269889049f6bc22eafe09365ddbe2/src/io/show/pretty_printing.jl#L9-L17">source</a></section></article></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../base/">« Base functions</a><a class="docs-footer-nextpage" href="../reconstruction/">Model construction functions »</a><div class="flexbox-break"></div><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> on <span class="colophon-date" title="Monday 16 May 2022 13:40">Monday 16 May 2022</span>. Using Julia version 1.7.0.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
)</code></pre><p>Specialization of <code>_pretty_print_keyvals</code> for plain strings.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/lcsb-biocore/COBREXA.jl/blob/77603c3b626a5edd84a1fbd03d11477955788b00/src/io/show/pretty_printing.jl#L9-L17">source</a></section></article></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../base/">« Base functions</a><a class="docs-footer-nextpage" href="../reconstruction/">Model construction functions »</a><div class="flexbox-break"></div><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> on <span class="colophon-date" title="Monday 16 May 2022 19:38">Monday 16 May 2022</span>. Using Julia version 1.7.0.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
<!DOCTYPE html>
<html lang="en"><head><meta charset="UTF-8"/><meta name="viewport" content="width=device-width, initial-scale=1.0"/><title>Utilities · COBREXA.jl</title><link href="https://fonts.googleapis.com/css?family=Lato|Roboto+Mono" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.0/css/fontawesome.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.0/css/solid.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.0/css/brands.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.11.1/katex.min.css" rel="stylesheet" type="text/css"/><script>documenterBaseURL="../.."</script><script src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.6/require.min.js" data-main="../../assets/documenter.js"></script><script src="../../siteinfo.js"></script><script src="../../../versions.js"></script><link class="docs-theme-link" rel="stylesheet" type="text/css" href="../../assets/themes/documenter-dark.css" data-theme-name="documenter-dark" data-theme-primary-dark/><link class="docs-theme-link" rel="stylesheet" type="text/css" href="../../assets/themes/documenter-light.css" data-theme-name="documenter-light" data-theme-primary/><script src="../../assets/themeswap.js"></script><link href="../../assets/favicon.ico" rel="icon" type="image/x-icon"/></head><body><div id="documenter"><nav class="docs-sidebar"><a class="docs-logo" href="../../"><img class="docs-light-only" src="../../assets/logo.svg" alt="COBREXA.jl logo"/><img class="docs-dark-only" src="../../assets/logo-dark.svg" alt="COBREXA.jl logo"/></a><div class="docs-package-name"><span class="docs-autofit">COBREXA.jl</span></div><form class="docs-search" action="../../search/"><input class="docs-search-query" id="documenter-search-query" name="q" type="text" placeholder="Search docs"/></form><ul class="docs-menu"><li><a class="tocitem" href="../../">Home</a></li><li><span class="tocitem">User guide</span><ul><li><input class="collapse-toggle" id="menuitem-2-1" type="checkbox"/><label class="tocitem" for="menuitem-2-1"><span class="docs-label">Quickstart tutorials</span><i class="docs-chevron"></i></label><ul class="collapsed"><li><a class="tocitem" href="../../tutorials/">All tutorials</a></li><li><a class="tocitem" href="../../tutorials/1_loading/">Loading and converting model data</a></li><li><a class="tocitem" href="../../tutorials/2_analysis/">Basic analysis of constraint-based models</a></li><li><a class="tocitem" href="../../tutorials/3_hpc/">Distributed processing and HPC environments</a></li><li><a class="tocitem" href="../../tutorials/4_modifying/">Modifying and saving the models</a></li></ul></li><li><input class="collapse-toggle" id="menuitem-2-2" type="checkbox"/><label class="tocitem" for="menuitem-2-2"><span class="docs-label">Advanced tutorials</span><i class="docs-chevron"></i></label><ul class="collapsed"><li><a class="tocitem" href="../../advanced/">All advanced tutorials</a></li><li><a class="tocitem" href="../../advanced/1_variants/">Exploring many model variants</a></li><li><a class="tocitem" href="../../advanced/2_custom_model/">Working with custom models</a></li></ul></li><li><input class="collapse-toggle" id="menuitem-2-3" type="checkbox"/><label class="tocitem" for="menuitem-2-3"><span class="docs-label">Examples and notebooks</span><i class="docs-chevron"></i></label><ul class="collapsed"><li><a class="tocitem" href="../../notebooks/">All notebooks</a></li><li><a class="tocitem" href="../../notebooks/1_loading_converting_saving/">Loading, converting, and saving models</a></li><li><a class="tocitem" href="../../notebooks/2_finding_balance/">Finding balance and variability of constraint-based models</a></li><li><a class="tocitem" href="../../notebooks/3_basic_stdmodel_usage/">Basic usage of <code>StandardModel</code></a></li><li><a class="tocitem" href="../../notebooks/4_basic_core_coupled_usage/">Basic usage of <code>CoreModel</code> and <code>CoreModelCoupled</code></a></li><li><a class="tocitem" href="../../notebooks/5_basic_stdmodel_construction/">Model construction and modification</a></li><li><a class="tocitem" href="../../notebooks/6_screening/">Exploring model variants with <code>screen</code></a></li><li><a class="tocitem" href="../../notebooks/7_community_model/">Building and analysing a small community model</a></li><li><a class="tocitem" href="../../notebooks/8_custom_model/">Using a custom model data structure</a></li><li><a class="tocitem" href="../../notebooks/9_max_min_driving_force_analysis/">Maximum-minimum driving force analysis</a></li></ul></li></ul></li><li><span class="tocitem">Types and functions</span><ul><li><a class="tocitem" href="../">Contents</a></li><li><a class="tocitem" href="../analysis/">Analysis functions</a></li><li><a class="tocitem" href="../base/">Base functions</a></li><li><a class="tocitem" href="../io/">Input and output</a></li><li><a class="tocitem" href="../reconstruction/">Model construction functions</a></li><li><a class="tocitem" href="../types/">Types</a></li><li class="is-active"><a class="tocitem" href>Utilities</a><ul class="internal"><li><a class="tocitem" href="#Helper-functions"><span>Helper functions</span></a></li><li><a class="tocitem" href="#Macro-generated-functions-and-internal-helpers"><span>Macro-generated functions and internal helpers</span></a></li><li><a class="tocitem" href="#Logging-and-debugging-helpers"><span>Logging and debugging helpers</span></a></li></ul></li></ul></li><li><a class="tocitem" href="../../howToContribute/">How to contribute</a></li></ul><div class="docs-version-selector field has-addons"><div class="control"><span class="docs-label button is-static is-size-7">Version</span></div><div class="docs-selector control is-expanded"><div class="select is-fullwidth is-size-7"><select id="documenter-version-selector"></select></div></div></div></nav><div class="docs-main"><header class="docs-navbar"><nav class="breadcrumb"><ul class="is-hidden-mobile"><li><a class="is-disabled">Types and functions</a></li><li class="is-active"><a href>Utilities</a></li></ul><ul class="is-hidden-tablet"><li class="is-active"><a href>Utilities</a></li></ul></nav><div class="docs-right"><a class="docs-edit-link" href="https://github.com/lcsb-biocore/COBREXA.jl/blob/master/docs/src/functions/utils.md" title="Edit on GitHub"><span class="docs-icon fab"></span><span class="docs-label is-hidden-touch">Edit on GitHub</span></a><a class="docs-settings-button fas fa-cog" id="documenter-settings-button" href="#" title="Settings"></a><a class="docs-sidebar-button fa fa-bars is-hidden-desktop" id="documenter-sidebar-button" href="#"></a></div></header><article class="content" id="documenter-page"><h1 id="Utilities"><a class="docs-heading-anchor" href="#Utilities">Utilities</a><a id="Utilities-1"></a><a class="docs-heading-anchor-permalink" href="#Utilities" title="Permalink"></a></h1><h2 id="Helper-functions"><a class="docs-heading-anchor" href="#Helper-functions">Helper functions</a><a id="Helper-functions-1"></a><a class="docs-heading-anchor-permalink" href="#Helper-functions" title="Permalink"></a></h2><article class="docstring"><header><a class="docstring-binding" id="COBREXA.ambiguously_identified_items-Tuple{Dict{String, Dict{String, Set{String}}}}" href="#COBREXA.ambiguously_identified_items-Tuple{Dict{String, Dict{String, Set{String}}}}"><code>COBREXA.ambiguously_identified_items</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">ambiguously_identified_items(
index::Dict{String,Dict{String,[String]}},
)::Vector{String}</code></pre><p>Find items (genes, metabolites, ...) from the annotation index that are identified non-uniquely by at least one of their annotations.</p><p>This often indicates that the items are duplicate or miscategorized.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/lcsb-biocore/COBREXA.jl/blob/6d0e83c79c7269889049f6bc22eafe09365ddbe2/src/base/utils/Annotation.jl#L44-L53">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.annotation_index-Tuple{AbstractDict{String}}" href="#COBREXA.annotation_index-Tuple{AbstractDict{String}}"><code>COBREXA.annotation_index</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">annotation_index(
)::Vector{String}</code></pre><p>Find items (genes, metabolites, ...) from the annotation index that are identified non-uniquely by at least one of their annotations.</p><p>This often indicates that the items are duplicate or miscategorized.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/lcsb-biocore/COBREXA.jl/blob/77603c3b626a5edd84a1fbd03d11477955788b00/src/base/utils/Annotation.jl#L44-L53">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.annotation_index-Tuple{AbstractDict{String}}" href="#COBREXA.annotation_index-Tuple{AbstractDict{String}}"><code>COBREXA.annotation_index</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">annotation_index(
xs::AbstractDict{String};
annotations = _annotations,
)::Dict{String,Dict{String,[String]}}</code></pre><p>Extract annotations from a dictionary of items <code>xs</code> and build an index that maps annotation &quot;kinds&quot; (e.g. <code>&quot;PubChem&quot;</code>) to the mapping from the annotations (e.g. <code>&quot;COMPOUND_12345&quot;</code>) to item IDs that carry the annotations.</p><p>Function <code>annotations</code> is used to access the <code>Annotations</code> object in the dictionary values.</p><p>This is extremely useful for finding items by annotation data.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/lcsb-biocore/COBREXA.jl/blob/6d0e83c79c7269889049f6bc22eafe09365ddbe2/src/base/utils/Annotation.jl#L6-L20">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.check_duplicate_reaction-Tuple{Reaction, OrderedCollections.OrderedDict{String, Reaction}}" href="#COBREXA.check_duplicate_reaction-Tuple{Reaction, OrderedCollections.OrderedDict{String, Reaction}}"><code>COBREXA.check_duplicate_reaction</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">check_duplicate_reaction(rxn::Reaction, rxns::Dict{String, Reaction}; only_metabolites=true)</code></pre><p>Check if <code>rxn</code> already exists in <code>rxns</code> but has another <code>id</code>. If <code>only_metabolites</code> is <code>true</code> then only the metabolite <code>id</code>s are checked. Otherwise, compares metabolite <code>id</code>s and the absolute value of their stoichiometric coefficients to those of <code>rxn</code>. If <code>rxn</code> has the same reaction equation as another reaction in <code>rxns</code>, the return the <code>id</code>. Otherwise return <code>nothing</code>.</p><p>See also: <a href="#COBREXA.reaction_mass_balanced-Tuple{StandardModel, String}"><code>reaction_mass_balanced</code></a></p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/lcsb-biocore/COBREXA.jl/blob/6d0e83c79c7269889049f6bc22eafe09365ddbe2/src/base/utils/Reaction.jl#L1-L11">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.is_boundary-Tuple{Dict{String, Float64}}" href="#COBREXA.is_boundary-Tuple{Dict{String, Float64}}"><code>COBREXA.is_boundary</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">is_boundary(rxn_dict::Dict{String, Float64})</code></pre><p>Return true if the reaction denoted by <code>rxn_dict</code> is a boundary reaction, otherwise return false. Checks if on boundary by inspecting the number of metabolites in <code>rxn_dict</code>. Boundary reactions have only one metabolite, e.g. an exchange reaction, or a sink/demand reaction.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/lcsb-biocore/COBREXA.jl/blob/6d0e83c79c7269889049f6bc22eafe09365ddbe2/src/base/utils/Reaction.jl#L41-L47">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.reaction_atom_balance-Tuple{StandardModel, Dict{String, Float64}}" href="#COBREXA.reaction_atom_balance-Tuple{StandardModel, Dict{String, Float64}}"><code>COBREXA.reaction_atom_balance</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">reaction_atom_balance(model::StandardModel, rxn)</code></pre><p>Returns a dictionary mapping the stoichiometry of atoms through a single reaction. Uses the metabolite information in <code>model</code> to determine the mass balance. Accepts a reaction dictionary, a reaction string id or a <code>Reaction</code> as an argument for <code>rxn</code>.</p><p>See also: <a href="#COBREXA.reaction_mass_balanced-Tuple{StandardModel, String}"><code>reaction_mass_balanced</code></a></p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/lcsb-biocore/COBREXA.jl/blob/6d0e83c79c7269889049f6bc22eafe09365ddbe2/src/base/utils/Reaction.jl#L59-L67">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.reaction_mass_balanced-Tuple{StandardModel, String}" href="#COBREXA.reaction_mass_balanced-Tuple{StandardModel, String}"><code>COBREXA.reaction_mass_balanced</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">reaction_mass_balanced(model::StandardModel, rxn)</code></pre><p>Checks if <code>rxn</code> is atom balanced. Returns a boolean for whether the reaction is balanced, and the associated balance of atoms for convenience (useful if not balanced). Calls <code>reaction_atom_balance</code> internally.</p><p>See also: <a href="#COBREXA.check_duplicate_reaction-Tuple{Reaction, OrderedCollections.OrderedDict{String, Reaction}}"><code>check_duplicate_reaction</code></a>, <a href="#COBREXA.reaction_atom_balance-Tuple{StandardModel, Dict{String, Float64}}"><code>reaction_atom_balance</code></a></p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/lcsb-biocore/COBREXA.jl/blob/6d0e83c79c7269889049f6bc22eafe09365ddbe2/src/base/utils/Reaction.jl#L89-L97">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.stoichiometry_string-Tuple{Any}" href="#COBREXA.stoichiometry_string-Tuple{Any}"><code>COBREXA.stoichiometry_string</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">stoichiometry_string(rxn_dict::Dict{String, Float64}; format_id = x -&gt; x)</code></pre><p>Return the reaction equation as a string. The metabolite strings can be manipulated by setting <code>format_id</code>.</p><p><strong>Example</strong></p><pre><code class="language-none">julia&gt; req = Dict(&quot;coa_c&quot; =&gt; -1, &quot;for_c&quot; =&gt; 1, &quot;accoa_c&quot; =&gt; 1, &quot;pyr_c&quot; =&gt; -1)
)::Dict{String,Dict{String,[String]}}</code></pre><p>Extract annotations from a dictionary of items <code>xs</code> and build an index that maps annotation &quot;kinds&quot; (e.g. <code>&quot;PubChem&quot;</code>) to the mapping from the annotations (e.g. <code>&quot;COMPOUND_12345&quot;</code>) to item IDs that carry the annotations.</p><p>Function <code>annotations</code> is used to access the <code>Annotations</code> object in the dictionary values.</p><p>This is extremely useful for finding items by annotation data.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/lcsb-biocore/COBREXA.jl/blob/77603c3b626a5edd84a1fbd03d11477955788b00/src/base/utils/Annotation.jl#L6-L20">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.check_duplicate_reaction-Tuple{Reaction, OrderedCollections.OrderedDict{String, Reaction}}" href="#COBREXA.check_duplicate_reaction-Tuple{Reaction, OrderedCollections.OrderedDict{String, Reaction}}"><code>COBREXA.check_duplicate_reaction</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">check_duplicate_reaction(rxn::Reaction, rxns::Dict{String, Reaction}; only_metabolites=true)</code></pre><p>Check if <code>rxn</code> already exists in <code>rxns</code> but has another <code>id</code>. If <code>only_metabolites</code> is <code>true</code> then only the metabolite <code>id</code>s are checked. Otherwise, compares metabolite <code>id</code>s and the absolute value of their stoichiometric coefficients to those of <code>rxn</code>. If <code>rxn</code> has the same reaction equation as another reaction in <code>rxns</code>, the return the <code>id</code>. Otherwise return <code>nothing</code>.</p><p>See also: <a href="#COBREXA.reaction_mass_balanced-Tuple{StandardModel, String}"><code>reaction_mass_balanced</code></a></p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/lcsb-biocore/COBREXA.jl/blob/77603c3b626a5edd84a1fbd03d11477955788b00/src/base/utils/Reaction.jl#L1-L11">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.is_boundary-Tuple{Dict{String, Float64}}" href="#COBREXA.is_boundary-Tuple{Dict{String, Float64}}"><code>COBREXA.is_boundary</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">is_boundary(rxn_dict::Dict{String, Float64})</code></pre><p>Return true if the reaction denoted by <code>rxn_dict</code> is a boundary reaction, otherwise return false. Checks if on boundary by inspecting the number of metabolites in <code>rxn_dict</code>. Boundary reactions have only one metabolite, e.g. an exchange reaction, or a sink/demand reaction.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/lcsb-biocore/COBREXA.jl/blob/77603c3b626a5edd84a1fbd03d11477955788b00/src/base/utils/Reaction.jl#L41-L47">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.reaction_atom_balance-Tuple{StandardModel, Dict{String, Float64}}" href="#COBREXA.reaction_atom_balance-Tuple{StandardModel, Dict{String, Float64}}"><code>COBREXA.reaction_atom_balance</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">reaction_atom_balance(model::StandardModel, rxn)</code></pre><p>Returns a dictionary mapping the stoichiometry of atoms through a single reaction. Uses the metabolite information in <code>model</code> to determine the mass balance. Accepts a reaction dictionary, a reaction string id or a <code>Reaction</code> as an argument for <code>rxn</code>.</p><p>See also: <a href="#COBREXA.reaction_mass_balanced-Tuple{StandardModel, String}"><code>reaction_mass_balanced</code></a></p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/lcsb-biocore/COBREXA.jl/blob/77603c3b626a5edd84a1fbd03d11477955788b00/src/base/utils/Reaction.jl#L59-L67">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.reaction_mass_balanced-Tuple{StandardModel, String}" href="#COBREXA.reaction_mass_balanced-Tuple{StandardModel, String}"><code>COBREXA.reaction_mass_balanced</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">reaction_mass_balanced(model::StandardModel, rxn)</code></pre><p>Checks if <code>rxn</code> is atom balanced. Returns a boolean for whether the reaction is balanced, and the associated balance of atoms for convenience (useful if not balanced). Calls <code>reaction_atom_balance</code> internally.</p><p>See also: <a href="#COBREXA.check_duplicate_reaction-Tuple{Reaction, OrderedCollections.OrderedDict{String, Reaction}}"><code>check_duplicate_reaction</code></a>, <a href="#COBREXA.reaction_atom_balance-Tuple{StandardModel, Dict{String, Float64}}"><code>reaction_atom_balance</code></a></p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/lcsb-biocore/COBREXA.jl/blob/77603c3b626a5edd84a1fbd03d11477955788b00/src/base/utils/Reaction.jl#L89-L97">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.stoichiometry_string-Tuple{Any}" href="#COBREXA.stoichiometry_string-Tuple{Any}"><code>COBREXA.stoichiometry_string</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">stoichiometry_string(rxn_dict::Dict{String, Float64}; format_id = x -&gt; x)</code></pre><p>Return the reaction equation as a string. The metabolite strings can be manipulated by setting <code>format_id</code>.</p><p><strong>Example</strong></p><pre><code class="language-none">julia&gt; req = Dict(&quot;coa_c&quot; =&gt; -1, &quot;for_c&quot; =&gt; 1, &quot;accoa_c&quot; =&gt; 1, &quot;pyr_c&quot; =&gt; -1)
julia&gt; stoichiometry_string(req)