[7.47738193404817, 1.8840414375838503e-8, 4.860861010127701, -16.023526104614593, … ]</code></pre></article><navclass="docs-footer"><aclass="docs-footer-prevpage"href="../">« All advanced tutorials</a><aclass="docs-footer-nextpage"href="../2_custom_model/">Working with custom models »</a><divclass="flexbox-break"></div><pclass="footer-message">Powered by <ahref="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <ahref="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><divclass="modal"id="documenter-settings"><divclass="modal-background"></div><divclass="modal-card"><headerclass="modal-card-head"><pclass="modal-card-title">Settings</p><buttonclass="delete"></button></header><sectionclass="modal-card-body"><p><labelclass="label">Theme</label><divclass="select"><selectid="documenter-themepicker"><optionvalue="documenter-light">documenter-light</option><optionvalue="documenter-dark">documenter-dark</option></select></div></p><hr/><p>This document was generated with <ahref="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> on <spanclass="colophon-date"title="Monday 16 May 2022 13:40">Monday 16 May 2022</span>. Using Julia version 1.7.0.</p></section><footerclass="modal-card-foot"></footer></div></div></div></body></html>
[7.47738193404817, 1.8840414375838503e-8, 4.860861010127701, -16.023526104614593, … ]</code></pre></article><navclass="docs-footer"><aclass="docs-footer-prevpage"href="../">« All advanced tutorials</a><aclass="docs-footer-nextpage"href="../2_custom_model/">Working with custom models »</a><divclass="flexbox-break"></div><pclass="footer-message">Powered by <ahref="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <ahref="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><divclass="modal"id="documenter-settings"><divclass="modal-background"></div><divclass="modal-card"><headerclass="modal-card-head"><pclass="modal-card-title">Settings</p><buttonclass="delete"></button></header><sectionclass="modal-card-body"><p><labelclass="label">Theme</label><divclass="select"><selectid="documenter-themepicker"><optionvalue="documenter-light">documenter-light</option><optionvalue="documenter-dark">documenter-dark</option></select></div></p><hr/><p>This document was generated with <ahref="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> on <spanclass="colophon-date"title="Monday 16 May 2022 19:38">Monday 16 May 2022</span>. Using Julia version 1.7.0.</p></section><footerclass="modal-card-foot"></footer></div></div></div></body></html>
@@ -43,4 +43,4 @@ Dict{String, Float64} with 5 entries:
"rxn4" => 1.0
</code></pre><h2id="Writing-generic-model-modifications"><aclass="docs-heading-anchor"href="#Writing-generic-model-modifications">Writing generic model modifications</a><aid="Writing-generic-model-modifications-1"></a><aclass="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 "variants" in <ahref="../../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,<ahref="../../functions/reconstruction/#COBREXA.with_removed_metabolites-Tuple"><code>with_removed_metabolites</code></a> is implemented very generically by reducing the problem to some specific <ahref="../../functions/reconstruction/#COBREXA.remove_metabolites-Tuple{CoreModel, AbstractVector{Int64}}"><code>remove_metabolites</code></a> functions selected by the dispatch, as follows:</p><pre><codeclass="language-julia">with_removed_metabolites(args...; kwargs...) =
m -> remove_metabolites(m, args...; kwargs...)</code></pre><p>To be able to use <ahref="../../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><codeclass="language-julia">COBREXA.remove_metabolites(m::CircularModel, n::Int) =
return CircularModel(m.size - n)</code></pre><divclass="admonition is-danger"><headerclass="admonition-header">Functions that generate model variants must be pure</header><divclass="admonition-body"><p>Notice that the function is "pure", i.e., does not make any in-place modifications to the original model structure. That property is required for <ahref="../../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 "bang" counterpart of remove metabolites, called <ahref="../../functions/reconstruction/#COBREXA.remove_metabolites!-Tuple{CoreModel, AbstractVector{Int64}}"><code>remove_metabolites!</code></a>.</p></div></div></article><navclass="docs-footer"><aclass="docs-footer-prevpage"href="../1_variants/">« Exploring many model variants</a><aclass="docs-footer-nextpage"href="../../notebooks/">All notebooks »</a><divclass="flexbox-break"></div><pclass="footer-message">Powered by <ahref="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <ahref="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><divclass="modal"id="documenter-settings"><divclass="modal-background"></div><divclass="modal-card"><headerclass="modal-card-head"><pclass="modal-card-title">Settings</p><buttonclass="delete"></button></header><sectionclass="modal-card-body"><p><labelclass="label">Theme</label><divclass="select"><selectid="documenter-themepicker"><optionvalue="documenter-light">documenter-light</option><optionvalue="documenter-dark">documenter-dark</option></select></div></p><hr/><p>This document was generated with <ahref="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> on <spanclass="colophon-date"title="Monday 16 May 2022 13:40">Monday 16 May 2022</span>. Using Julia version 1.7.0.</p></section><footerclass="modal-card-foot"></footer></div></div></div></body></html>
return CircularModel(m.size - n)</code></pre><divclass="admonition is-danger"><headerclass="admonition-header">Functions that generate model variants must be pure</header><divclass="admonition-body"><p>Notice that the function is "pure", i.e., does not make any in-place modifications to the original model structure. That property is required for <ahref="../../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 "bang" counterpart of remove metabolites, called <ahref="../../functions/reconstruction/#COBREXA.remove_metabolites!-Tuple{CoreModel, AbstractVector{Int64}}"><code>remove_metabolites!</code></a>.</p></div></div></article><navclass="docs-footer"><aclass="docs-footer-prevpage"href="../1_variants/">« Exploring many model variants</a><aclass="docs-footer-nextpage"href="../../notebooks/">All notebooks »</a><divclass="flexbox-break"></div><pclass="footer-message">Powered by <ahref="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <ahref="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><divclass="modal"id="documenter-settings"><divclass="modal-background"></div><divclass="modal-card"><headerclass="modal-card-head"><pclass="modal-card-title">Settings</p><buttonclass="delete"></button></header><sectionclass="modal-card-body"><p><labelclass="label">Theme</label><divclass="select"><selectid="documenter-themepicker"><optionvalue="documenter-light">documenter-light</option><optionvalue="documenter-dark">documenter-dark</option></select></div></p><hr/><p>This document was generated with <ahref="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> on <spanclass="colophon-date"title="Monday 16 May 2022 19:38">Monday 16 May 2022</span>. Using Julia version 1.7.0.</p></section><footerclass="modal-card-foot"></footer></div></div></div></body></html>
<htmllang="en"><head><metacharset="UTF-8"/><metaname="viewport"content="width=device-width, initial-scale=1.0"/><title>All advanced tutorials · COBREXA.jl</title><linkhref="https://fonts.googleapis.com/css?family=Lato|Roboto+Mono"rel="stylesheet"type="text/css"/><linkhref="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.0/css/fontawesome.min.css"rel="stylesheet"type="text/css"/><linkhref="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.0/css/solid.min.css"rel="stylesheet"type="text/css"/><linkhref="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.0/css/brands.min.css"rel="stylesheet"type="text/css"/><linkhref="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><linkclass="docs-theme-link"rel="stylesheet"type="text/css"href="../assets/themes/documenter-dark.css"data-theme-name="documenter-dark"data-theme-primary-dark/><linkclass="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><linkhref="../assets/favicon.ico"rel="icon"type="image/x-icon"/></head><body><divid="documenter"><navclass="docs-sidebar"><aclass="docs-logo"href="../"><imgclass="docs-light-only"src="../assets/logo.svg"alt="COBREXA.jl logo"/><imgclass="docs-dark-only"src="../assets/logo-dark.svg"alt="COBREXA.jl logo"/></a><divclass="docs-package-name"><spanclass="docs-autofit">COBREXA.jl</span></div><formclass="docs-search"action="../search/"><inputclass="docs-search-query"id="documenter-search-query"name="q"type="text"placeholder="Search docs"/></form><ulclass="docs-menu"><li><aclass="tocitem"href="../">Home</a></li><li><spanclass="tocitem">User guide</span><ul><li><inputclass="collapse-toggle"id="menuitem-2-1"type="checkbox"/><labelclass="tocitem"for="menuitem-2-1"><spanclass="docs-label">Quickstart tutorials</span><iclass="docs-chevron"></i></label><ulclass="collapsed"><li><aclass="tocitem"href="../tutorials/">All tutorials</a></li><li><aclass="tocitem"href="../tutorials/1_loading/">Loading and converting model data</a></li><li><aclass="tocitem"href="../tutorials/2_analysis/">Basic analysis of constraint-based models</a></li><li><aclass="tocitem"href="../tutorials/3_hpc/">Distributed processing and HPC environments</a></li><li><aclass="tocitem"href="../tutorials/4_modifying/">Modifying and saving the models</a></li></ul></li><li><inputclass="collapse-toggle"id="menuitem-2-2"type="checkbox"checked/><labelclass="tocitem"for="menuitem-2-2"><spanclass="docs-label">Advanced tutorials</span><iclass="docs-chevron"></i></label><ulclass="collapsed"><liclass="is-active"><aclass="tocitem"href>All advanced tutorials</a></li><li><aclass="tocitem"href="1_variants/">Exploring many model variants</a></li><li><aclass="tocitem"href="2_custom_model/">Working with custom models</a></li></ul></li><li><inputclass="collapse-toggle"id="menuitem-2-3"type="checkbox"/><labelclass="tocitem"for="menuitem-2-3"><spanclass="docs-label">Examples and notebooks</span><iclass="docs-chevron"></i></label><ulclass="collapsed"><li><aclass="tocitem"href="../notebooks/">All notebooks</a></li><li><aclass="tocitem"href="../notebooks/1_loading_converting_saving/">Loading, converting, and saving models</a></li><li><aclass="tocitem"href="../notebooks/2_finding_balance/">Finding balance and variability of constraint-based models</a></li><li><aclass="tocitem"href="../notebooks/3_basic_stdmodel_usage/">Basic usage of <code>StandardModel</code></a></li><li><aclass="tocitem"href="../notebooks/4_basic_core_coupled_usage/">Basic usage of <code>CoreModel</code> and <code>CoreModelCoupled</code></a></li><li><aclass="tocitem"href="../notebooks/5_basic_stdmodel_construction/">Model construction and modification</a></li><li><aclass="tocitem"href="../notebooks/6_screening/">Exploring model variants with <code>screen</code></a></li><li><aclass="tocitem"href="../notebooks/7_community_model/">Building and analysing a small community model</a></li><li><aclass="tocitem"href="../notebooks/8_custom_model/">Using a custom model data structure</a></li><li><aclass="tocitem"href="../notebooks/9_max_min_driving_force_analysis/">Maximum-minimum driving force analysis</a></li></ul></li></ul></li><li><spanclass="tocitem">Types and functions</span><ul><li><aclass="tocitem"href="../functions/">Contents</a></li><li><aclass="tocitem"href="../functions/analysis/">Analysis functions</a></li><li><aclass="tocitem"href="../functions/base/">Base functions</a></li><li><aclass="tocitem"href="../functions/io/">Input and output</a></li><li><aclass="tocitem"href="../functions/reconstruction/">Model construction functions</a></li><li><aclass="tocitem"href="../functions/types/">Types</a></li><li><aclass="tocitem"href="../functions/utils/">Utilities</a></li></ul></li><li><aclass="tocitem"href="../howToContribute/">How to contribute</a></li></ul><divclass="docs-version-selector field has-addons"><divclass="control"><spanclass="docs-label button is-static is-size-7">Version</span></div><divclass="docs-selector control is-expanded"><divclass="select is-fullwidth is-size-7"><selectid="documenter-version-selector"></select></div></div></div></nav><divclass="docs-main"><headerclass="docs-navbar"><navclass="breadcrumb"><ulclass="is-hidden-mobile"><li><aclass="is-disabled">User guide</a></li><li><aclass="is-disabled">Advanced tutorials</a></li><liclass="is-active"><ahref>All advanced tutorials</a></li></ul><ulclass="is-hidden-tablet"><liclass="is-active"><ahref>All advanced tutorials</a></li></ul></nav><divclass="docs-right"><aclass="docs-edit-link"href="https://github.com/lcsb-biocore/COBREXA.jl/blob/master/docs/src/advanced.md"title="Edit on GitHub"><spanclass="docs-icon fab"></span><spanclass="docs-label is-hidden-touch">Edit on GitHub</span></a><aclass="docs-settings-button fas fa-cog"id="documenter-settings-button"href="#"title="Settings"></a><aclass="docs-sidebar-button fa fa-bars is-hidden-desktop"id="documenter-sidebar-button"href="#"></a></div></header><articleclass="content"id="documenter-page"><h1id="COBREXA-Advanced-tutorials"><aclass="docs-heading-anchor"href="#COBREXA-Advanced-tutorials">COBREXA Advanced tutorials</a><aid="COBREXA-Advanced-tutorials-1"></a><aclass="docs-heading-anchor-permalink"href="#COBREXA-Advanced-tutorials"title="Permalink"></a></h1><ul><li><ahref="1_variants/#Exploring-many-model-variants">Exploring many model variants</a></li><ul><li><ahref="1_variants/#Variant-specification">Variant specification</a></li><li><ahref="1_variants/#Writing-custom-variant-functions">Writing custom variant functions</a></li><li><ahref="1_variants/#Passing-extra-arguments-to-the-analysis-function">Passing extra arguments to the analysis function</a></li></ul><li><ahref="2_custom_model/#Working-with-custom-models">Working with custom models</a></li><ul><li><ahref="2_custom_model/#Writing-the-generic-accessors">Writing the generic accessors</a></li><li><ahref="2_custom_model/#Writing-generic-model-modifications">Writing generic model modifications</a></li></ul></ul></article><navclass="docs-footer"><aclass="docs-footer-prevpage"href="../tutorials/4_modifying/">« Modifying and saving the models</a><aclass="docs-footer-nextpage"href="1_variants/">Exploring many model variants »</a><divclass="flexbox-break"></div><pclass="footer-message">Powered by <ahref="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <ahref="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><divclass="modal"id="documenter-settings"><divclass="modal-background"></div><divclass="modal-card"><headerclass="modal-card-head"><pclass="modal-card-title">Settings</p><buttonclass="delete"></button></header><sectionclass="modal-card-body"><p><labelclass="label">Theme</label><divclass="select"><selectid="documenter-themepicker"><optionvalue="documenter-light">documenter-light</option><optionvalue="documenter-dark">documenter-dark</option></select></div></p><hr/><p>This document was generated with <ahref="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> on <spanclass="colophon-date"title="Monday 16 May 2022 13:40">Monday 16 May 2022</span>. Using Julia version 1.7.0.</p></section><footerclass="modal-card-foot"></footer></div></div></div></body></html>
<htmllang="en"><head><metacharset="UTF-8"/><metaname="viewport"content="width=device-width, initial-scale=1.0"/><title>All advanced tutorials · COBREXA.jl</title><linkhref="https://fonts.googleapis.com/css?family=Lato|Roboto+Mono"rel="stylesheet"type="text/css"/><linkhref="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.0/css/fontawesome.min.css"rel="stylesheet"type="text/css"/><linkhref="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.0/css/solid.min.css"rel="stylesheet"type="text/css"/><linkhref="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.0/css/brands.min.css"rel="stylesheet"type="text/css"/><linkhref="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><linkclass="docs-theme-link"rel="stylesheet"type="text/css"href="../assets/themes/documenter-dark.css"data-theme-name="documenter-dark"data-theme-primary-dark/><linkclass="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><linkhref="../assets/favicon.ico"rel="icon"type="image/x-icon"/></head><body><divid="documenter"><navclass="docs-sidebar"><aclass="docs-logo"href="../"><imgclass="docs-light-only"src="../assets/logo.svg"alt="COBREXA.jl logo"/><imgclass="docs-dark-only"src="../assets/logo-dark.svg"alt="COBREXA.jl logo"/></a><divclass="docs-package-name"><spanclass="docs-autofit">COBREXA.jl</span></div><formclass="docs-search"action="../search/"><inputclass="docs-search-query"id="documenter-search-query"name="q"type="text"placeholder="Search docs"/></form><ulclass="docs-menu"><li><aclass="tocitem"href="../">Home</a></li><li><spanclass="tocitem">User guide</span><ul><li><inputclass="collapse-toggle"id="menuitem-2-1"type="checkbox"/><labelclass="tocitem"for="menuitem-2-1"><spanclass="docs-label">Quickstart tutorials</span><iclass="docs-chevron"></i></label><ulclass="collapsed"><li><aclass="tocitem"href="../tutorials/">All tutorials</a></li><li><aclass="tocitem"href="../tutorials/1_loading/">Loading and converting model data</a></li><li><aclass="tocitem"href="../tutorials/2_analysis/">Basic analysis of constraint-based models</a></li><li><aclass="tocitem"href="../tutorials/3_hpc/">Distributed processing and HPC environments</a></li><li><aclass="tocitem"href="../tutorials/4_modifying/">Modifying and saving the models</a></li></ul></li><li><inputclass="collapse-toggle"id="menuitem-2-2"type="checkbox"checked/><labelclass="tocitem"for="menuitem-2-2"><spanclass="docs-label">Advanced tutorials</span><iclass="docs-chevron"></i></label><ulclass="collapsed"><liclass="is-active"><aclass="tocitem"href>All advanced tutorials</a></li><li><aclass="tocitem"href="1_variants/">Exploring many model variants</a></li><li><aclass="tocitem"href="2_custom_model/">Working with custom models</a></li></ul></li><li><inputclass="collapse-toggle"id="menuitem-2-3"type="checkbox"/><labelclass="tocitem"for="menuitem-2-3"><spanclass="docs-label">Examples and notebooks</span><iclass="docs-chevron"></i></label><ulclass="collapsed"><li><aclass="tocitem"href="../notebooks/">All notebooks</a></li><li><aclass="tocitem"href="../notebooks/1_loading_converting_saving/">Loading, converting, and saving models</a></li><li><aclass="tocitem"href="../notebooks/2_finding_balance/">Finding balance and variability of constraint-based models</a></li><li><aclass="tocitem"href="../notebooks/3_basic_stdmodel_usage/">Basic usage of <code>StandardModel</code></a></li><li><aclass="tocitem"href="../notebooks/4_basic_core_coupled_usage/">Basic usage of <code>CoreModel</code> and <code>CoreModelCoupled</code></a></li><li><aclass="tocitem"href="../notebooks/5_basic_stdmodel_construction/">Model construction and modification</a></li><li><aclass="tocitem"href="../notebooks/6_screening/">Exploring model variants with <code>screen</code></a></li><li><aclass="tocitem"href="../notebooks/7_community_model/">Building and analysing a small community model</a></li><li><aclass="tocitem"href="../notebooks/8_custom_model/">Using a custom model data structure</a></li><li><aclass="tocitem"href="../notebooks/9_max_min_driving_force_analysis/">Maximum-minimum driving force analysis</a></li></ul></li></ul></li><li><spanclass="tocitem">Types and functions</span><ul><li><aclass="tocitem"href="../functions/">Contents</a></li><li><aclass="tocitem"href="../functions/analysis/">Analysis functions</a></li><li><aclass="tocitem"href="../functions/base/">Base functions</a></li><li><aclass="tocitem"href="../functions/io/">Input and output</a></li><li><aclass="tocitem"href="../functions/reconstruction/">Model construction functions</a></li><li><aclass="tocitem"href="../functions/types/">Types</a></li><li><aclass="tocitem"href="../functions/utils/">Utilities</a></li></ul></li><li><aclass="tocitem"href="../howToContribute/">How to contribute</a></li></ul><divclass="docs-version-selector field has-addons"><divclass="control"><spanclass="docs-label button is-static is-size-7">Version</span></div><divclass="docs-selector control is-expanded"><divclass="select is-fullwidth is-size-7"><selectid="documenter-version-selector"></select></div></div></div></nav><divclass="docs-main"><headerclass="docs-navbar"><navclass="breadcrumb"><ulclass="is-hidden-mobile"><li><aclass="is-disabled">User guide</a></li><li><aclass="is-disabled">Advanced tutorials</a></li><liclass="is-active"><ahref>All advanced tutorials</a></li></ul><ulclass="is-hidden-tablet"><liclass="is-active"><ahref>All advanced tutorials</a></li></ul></nav><divclass="docs-right"><aclass="docs-edit-link"href="https://github.com/lcsb-biocore/COBREXA.jl/blob/master/docs/src/advanced.md"title="Edit on GitHub"><spanclass="docs-icon fab"></span><spanclass="docs-label is-hidden-touch">Edit on GitHub</span></a><aclass="docs-settings-button fas fa-cog"id="documenter-settings-button"href="#"title="Settings"></a><aclass="docs-sidebar-button fa fa-bars is-hidden-desktop"id="documenter-sidebar-button"href="#"></a></div></header><articleclass="content"id="documenter-page"><h1id="COBREXA-Advanced-tutorials"><aclass="docs-heading-anchor"href="#COBREXA-Advanced-tutorials">COBREXA Advanced tutorials</a><aid="COBREXA-Advanced-tutorials-1"></a><aclass="docs-heading-anchor-permalink"href="#COBREXA-Advanced-tutorials"title="Permalink"></a></h1><ul><li><ahref="1_variants/#Exploring-many-model-variants">Exploring many model variants</a></li><ul><li><ahref="1_variants/#Variant-specification">Variant specification</a></li><li><ahref="1_variants/#Writing-custom-variant-functions">Writing custom variant functions</a></li><li><ahref="1_variants/#Passing-extra-arguments-to-the-analysis-function">Passing extra arguments to the analysis function</a></li></ul><li><ahref="2_custom_model/#Working-with-custom-models">Working with custom models</a></li><ul><li><ahref="2_custom_model/#Writing-the-generic-accessors">Writing the generic accessors</a></li><li><ahref="2_custom_model/#Writing-generic-model-modifications">Writing generic model modifications</a></li></ul></ul></article><navclass="docs-footer"><aclass="docs-footer-prevpage"href="../tutorials/4_modifying/">« Modifying and saving the models</a><aclass="docs-footer-nextpage"href="1_variants/">Exploring many model variants »</a><divclass="flexbox-break"></div><pclass="footer-message">Powered by <ahref="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <ahref="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><divclass="modal"id="documenter-settings"><divclass="modal-background"></div><divclass="modal-card"><headerclass="modal-card-head"><pclass="modal-card-title">Settings</p><buttonclass="delete"></button></header><sectionclass="modal-card-body"><p><labelclass="label">Theme</label><divclass="select"><selectid="documenter-themepicker"><optionvalue="documenter-light">documenter-light</option><optionvalue="documenter-dark">documenter-dark</option></select></div></p><hr/><p>This document was generated with <ahref="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> on <spanclass="colophon-date"title="Monday 16 May 2022 19:38">Monday 16 May 2022</span>. Using Julia version 1.7.0.</p></section><footerclass="modal-card-foot"></footer></div></div></div></body></html>
)</code></pre><p>Create a lattice (list of "tick" 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><aclass="docs-sourcelink"target="_blank"href="https://github.com/lcsb-biocore/COBREXA.jl/blob/6d0e83c79c7269889049f6bc22eafe09365ddbe2/src/analysis/envelopes.jl#L11-L23">source</a></section></article><articleclass="docstring"><header><aclass="docstring-binding"id="COBREXA.envelope_lattice-Tuple{MetabolicModel, Vector{String}}"href="#COBREXA.envelope_lattice-Tuple{MetabolicModel, Vector{String}}"><code>COBREXA.envelope_lattice</code></a> — <spanclass="docstring-category">Method</span></header><section><div><pre><codeclass="language-julia">envelope_lattice(model::MetabolicModel, rids::Vector{String}; kwargs...)</code></pre><p>Version of <ahref="#COBREXA.envelope_lattice-Tuple{MetabolicModel, Vector{Int64}}"><code>envelope_lattice</code></a> that works on string reaction IDs instead of integer indexes.</p></div><aclass="docs-sourcelink"target="_blank"href="https://github.com/lcsb-biocore/COBREXA.jl/blob/6d0e83c79c7269889049f6bc22eafe09365ddbe2/src/analysis/envelopes.jl#L2-L7">source</a></section></article><articleclass="docstring"><header><aclass="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> — <spanclass="docstring-category">Method</span></header><section><div><pre><codeclass="language-julia">objective_envelope(
)</code></pre><p>Create a lattice (list of "tick" 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><aclass="docs-sourcelink"target="_blank"href="https://github.com/lcsb-biocore/COBREXA.jl/blob/77603c3b626a5edd84a1fbd03d11477955788b00/src/analysis/envelopes.jl#L11-L23">source</a></section></article><articleclass="docstring"><header><aclass="docstring-binding"id="COBREXA.envelope_lattice-Tuple{MetabolicModel, Vector{String}}"href="#COBREXA.envelope_lattice-Tuple{MetabolicModel, Vector{String}}"><code>COBREXA.envelope_lattice</code></a> — <spanclass="docstring-category">Method</span></header><section><div><pre><codeclass="language-julia">envelope_lattice(model::MetabolicModel, rids::Vector{String}; kwargs...)</code></pre><p>Version of <ahref="#COBREXA.envelope_lattice-Tuple{MetabolicModel, Vector{Int64}}"><code>envelope_lattice</code></a> that works on string reaction IDs instead of integer indexes.</p></div><aclass="docs-sourcelink"target="_blank"href="https://github.com/lcsb-biocore/COBREXA.jl/blob/77603c3b626a5edd84a1fbd03d11477955788b00/src/analysis/envelopes.jl#L2-L7">source</a></section></article><articleclass="docstring"><header><aclass="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> — <spanclass="docstring-category">Method</span></header><section><div><pre><codeclass="language-julia">objective_envelope(
model::MetabolicModel,
ridxs::Vector{Int},
optimizer;
...
...
@@ -32,7 +32,7 @@ julia> 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><aclass="docs-sourcelink"target="_blank"href="https://github.com/lcsb-biocore/COBREXA.jl/blob/6d0e83c79c7269889049f6bc22eafe09365ddbe2/src/analysis/envelopes.jl#L49-L109">source</a></section></article><articleclass="docstring"><header><aclass="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> — <spanclass="docstring-category">Method</span></header><section><div><pre><codeclass="language-julia">objective_envelope(model::MetabolicModel, rids::Vector{String}, args...; kwargs...)</code></pre><p>Version of <ahref="#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><aclass="docs-sourcelink"target="_blank"href="https://github.com/lcsb-biocore/COBREXA.jl/blob/6d0e83c79c7269889049f6bc22eafe09365ddbe2/src/analysis/envelopes.jl#L35-L40">source</a></section></article><articleclass="docstring"><header><aclass="docstring-binding"id="COBREXA.flux_balance_analysis-Union{Tuple{M}, Tuple{M, Any}} where M<:MetabolicModel"href="#COBREXA.flux_balance_analysis-Union{Tuple{M}, Tuple{M, Any}} where M<:MetabolicModel"><code>COBREXA.flux_balance_analysis</code></a> — <spanclass="docstring-category">Method</span></header><section><div><pre><codeclass="language-julia">flux_balance_analysis(
16.6666 18.6097 20.2847 21.894 22.6825 22.6825</code></pre></div><aclass="docs-sourcelink"target="_blank"href="https://github.com/lcsb-biocore/COBREXA.jl/blob/77603c3b626a5edd84a1fbd03d11477955788b00/src/analysis/envelopes.jl#L49-L109">source</a></section></article><articleclass="docstring"><header><aclass="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> — <spanclass="docstring-category">Method</span></header><section><div><pre><codeclass="language-julia">objective_envelope(model::MetabolicModel, rids::Vector{String}, args...; kwargs...)</code></pre><p>Version of <ahref="#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><aclass="docs-sourcelink"target="_blank"href="https://github.com/lcsb-biocore/COBREXA.jl/blob/77603c3b626a5edd84a1fbd03d11477955788b00/src/analysis/envelopes.jl#L35-L40">source</a></section></article><articleclass="docstring"><header><aclass="docstring-binding"id="COBREXA.flux_balance_analysis-Union{Tuple{M}, Tuple{M, Any}} where M<:MetabolicModel"href="#COBREXA.flux_balance_analysis-Union{Tuple{M}, Tuple{M, Any}} where M<:MetabolicModel"><code>COBREXA.flux_balance_analysis</code></a> — <spanclass="docstring-category">Method</span></header><section><div><pre><codeclass="language-julia">flux_balance_analysis(
model::M,
optimizer;
modifications = [],
...
...
@@ -45,11 +45,11 @@ value.(solution[:x]) # extract flux steady state from the optimizer
modifications=[change_objective(biomass_reaction_id)])</code></pre></div><aclass="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><articleclass="docstring"><header><aclass="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> — <spanclass="docstring-category">Method</span></header><section><div><pre><codeclass="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 <ahref="#COBREXA.flux_balance_analysis-Union{Tuple{M}, Tuple{M, Any}} where M<:MetabolicModel"><code>flux_balance_analysis</code></a>.</p><p>This function is kept for backwards compatibility, use <ahref="../base/#COBREXA.flux_dict-Tuple{MetabolicModel, Any}"><code>flux_dict</code></a> instead.</p></div><aclass="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><articleclass="docstring"><header><aclass="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> — <spanclass="docstring-category">Method</span></header><section><div><pre><codeclass="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 <ahref="#COBREXA.flux_balance_analysis-Union{Tuple{M}, Tuple{M, Any}} where M<:MetabolicModel"><code>flux_balance_analysis</code></a>.</p><p>This function is kept for backwards compatibility, use <ahref="../base/#COBREXA.flux_vector-Tuple{MetabolicModel, Any}"><code>flux_vector</code></a> instead.</p></div><aclass="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><articleclass="docstring"><header><aclass="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> — <spanclass="docstring-category">Method</span></header><section><div><pre><codeclass="language-julia">_max_variability_flux(opt_model, flux, sense, ret)</code></pre><p>Internal helper for maximizing reactions in optimization model.</p></div><aclass="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><articleclass="docstring"><header><aclass="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> — <spanclass="docstring-category">Method</span></header><section><div><pre><codeclass="language-julia">flux_variability_analysis(
modifications=[change_objective(biomass_reaction_id)])</code></pre></div><aclass="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><articleclass="docstring"><header><aclass="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> — <spanclass="docstring-category">Method</span></header><section><div><pre><codeclass="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 <ahref="#COBREXA.flux_balance_analysis-Union{Tuple{M}, Tuple{M, Any}} where M<:MetabolicModel"><code>flux_balance_analysis</code></a>.</p><p>This function is kept for backwards compatibility, use <ahref="../base/#COBREXA.flux_dict-Tuple{MetabolicModel, Any}"><code>flux_dict</code></a> instead.</p></div><aclass="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><articleclass="docstring"><header><aclass="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> — <spanclass="docstring-category">Method</span></header><section><div><pre><codeclass="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 <ahref="#COBREXA.flux_balance_analysis-Union{Tuple{M}, Tuple{M, Any}} where M<:MetabolicModel"><code>flux_balance_analysis</code></a>.</p><p>This function is kept for backwards compatibility, use <ahref="../base/#COBREXA.flux_vector-Tuple{MetabolicModel, Any}"><code>flux_vector</code></a> instead.</p></div><aclass="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><articleclass="docstring"><header><aclass="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> — <spanclass="docstring-category">Method</span></header><section><div><pre><codeclass="language-julia">_max_variability_flux(opt_model, flux, sense, ret)</code></pre><p>Internal helper for maximizing reactions in optimization model.</p></div><aclass="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><articleclass="docstring"><header><aclass="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> — <spanclass="docstring-category">Method</span></header><section><div><pre><codeclass="language-julia">flux_variability_analysis(
model::MetabolicModel,
optimizer;
kwargs...
)</code></pre><p>A simpler version of <ahref="#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><aclass="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><articleclass="docstring"><header><aclass="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> — <spanclass="docstring-category">Method</span></header><section><div><pre><codeclass="language-julia">flux_variability_analysis(
)</code></pre><p>A simpler version of <ahref="#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><aclass="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><articleclass="docstring"><header><aclass="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> — <spanclass="docstring-category">Method</span></header><section><div><pre><codeclass="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 <ahref="#COBREXA.flux_balance_analysis-Union{Tuple{M}, Tuple{M, Any}} where M<: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 <ahref="../utils/#COBREXA.gamma_bounds-Tuple{Any}"><code>gamma_bounds</code></a> and <ahref="../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 -> (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 <ahref="../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><codeclass="language-none">model = load_model("e_coli_core.json")
flux_variability_analysis(model, [1, 2, 3, 42], GLPK.optimizer)</code></pre></div><aclass="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><articleclass="docstring"><header><aclass="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> — <spanclass="docstring-category">Method</span></header><section><div><pre><codeclass="language-julia">flux_variability_analysis(model::MetabolicModel, flux_indexes::Vector{Int}, optimizer; kwargs...)</code></pre><p>An overload of <ahref="#COBREXA.flux_variability_analysis-Tuple{MetabolicModel, Any}"><code>flux_variability_analysis</code></a> that explores the fluxes specified by integer indexes</p></div><aclass="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><articleclass="docstring"><header><aclass="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> — <spanclass="docstring-category">Method</span></header><section><div><pre><codeclass="language-julia">flux_variability_analysis_dict(
flux_variability_analysis(model, [1, 2, 3, 42], GLPK.optimizer)</code></pre></div><aclass="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><articleclass="docstring"><header><aclass="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> — <spanclass="docstring-category">Method</span></header><section><div><pre><codeclass="language-julia">flux_variability_analysis(model::MetabolicModel, flux_indexes::Vector{Int}, optimizer; kwargs...)</code></pre><p>An overload of <ahref="#COBREXA.flux_variability_analysis-Tuple{MetabolicModel, Any}"><code>flux_variability_analysis</code></a> that explores the fluxes specified by integer indexes</p></div><aclass="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><articleclass="docstring"><header><aclass="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> — <spanclass="docstring-category">Method</span></header><section><div><pre><codeclass="language-julia">flux_variability_analysis_dict(
)</code></pre></div><aclass="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><articleclass="docstring"><header><aclass="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> — <spanclass="docstring-category">Method</span></header><section><div><pre><codeclass="language-julia">reaction_variability_analysis( model::MetabolicModel, optimizer; kwargs...)</code></pre><p>Shortcut for <ahref="#COBREXA.reaction_variability_analysis-Tuple{MetabolicModel, Any}"><code>reaction_variability_analysis</code></a> that examines all reactions.</p></div><aclass="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><articleclass="docstring"><header><aclass="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> — <spanclass="docstring-category">Method</span></header><section><div><pre><codeclass="language-julia">reaction_variability_analysis(model::MetabolicModel, reaction_indexes::Vector{Int}, optimizer; kwargs...)</code></pre><p>A variant for <ahref="#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><aclass="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><articleclass="docstring"><header><aclass="docstring-binding"id="COBREXA.make_gecko_model-Tuple{MetabolicModel}"href="#COBREXA.make_gecko_model-Tuple{MetabolicModel}"><code>COBREXA.make_gecko_model</code></a> — <spanclass="docstring-category">Method</span></header><section><div><pre><codeclass="language-julia">make_gecko_model(
)</code></pre></div><aclass="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><articleclass="docstring"><header><aclass="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> — <spanclass="docstring-category">Method</span></header><section><div><pre><codeclass="language-julia">reaction_variability_analysis( model::MetabolicModel, optimizer; kwargs...)</code></pre><p>Shortcut for <ahref="#COBREXA.reaction_variability_analysis-Tuple{MetabolicModel, Any}"><code>reaction_variability_analysis</code></a> that examines all reactions.</p></div><aclass="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><articleclass="docstring"><header><aclass="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> — <spanclass="docstring-category">Method</span></header><section><div><pre><codeclass="language-julia">reaction_variability_analysis(model::MetabolicModel, reaction_indexes::Vector{Int}, optimizer; kwargs...)</code></pre><p>A variant for <ahref="#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><aclass="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><articleclass="docstring"><header><aclass="docstring-binding"id="COBREXA.make_gecko_model-Tuple{MetabolicModel}"href="#COBREXA.make_gecko_model-Tuple{MetabolicModel}"><code>COBREXA.make_gecko_model</code></a> — <spanclass="docstring-category">Method</span></header><section><div><pre><codeclass="language-julia">make_gecko_model(
)</code></pre><p>Wrap a model into a <ahref="../types/#COBREXA.GeckoModel"><code>GeckoModel</code></a>, following the structure given by GECKO algorithm (see <ahref="../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 <ahref="../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>"uncategorized"</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><aclass="docs-sourcelink"target="_blank"href="https://github.com/lcsb-biocore/COBREXA.jl/blob/6d0e83c79c7269889049f6bc22eafe09365ddbe2/src/analysis/gecko.jl#L1-L32">source</a></section></article><articleclass="docstring"><header><aclass="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> — <spanclass="docstring-category">Method</span></header><section><div><p>Helper function to add a new constraint on the driving force.</p></div><aclass="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><articleclass="docstring"><header><aclass="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> — <spanclass="docstring-category">Method</span></header><section><div><p>Helper function to change the objective to optimizing some concentration.</p></div><aclass="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><articleclass="docstring"><header><aclass="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> — <spanclass="docstring-category">Method</span></header><section><div><p>Helper function to change the objective to optimizing some dG.</p></div><aclass="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><articleclass="docstring"><header><aclass="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> — <spanclass="docstring-category">Method</span></header><section><div><pre><codeclass="language-julia">max_min_driving_force(
)</code></pre><p>Wrap a model into a <ahref="../types/#COBREXA.GeckoModel"><code>GeckoModel</code></a>, following the structure given by GECKO algorithm (see <ahref="../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 <ahref="../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>"uncategorized"</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><aclass="docs-sourcelink"target="_blank"href="https://github.com/lcsb-biocore/COBREXA.jl/blob/77603c3b626a5edd84a1fbd03d11477955788b00/src/analysis/gecko.jl#L1-L32">source</a></section></article><articleclass="docstring"><header><aclass="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> — <spanclass="docstring-category">Method</span></header><section><div><p>Helper function to add a new constraint on the driving force.</p></div><aclass="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><articleclass="docstring"><header><aclass="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> — <spanclass="docstring-category">Method</span></header><section><div><p>Helper function to change the objective to optimizing some concentration.</p></div><aclass="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><articleclass="docstring"><header><aclass="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> — <spanclass="docstring-category">Method</span></header><section><div><p>Helper function to change the objective to optimizing some dG.</p></div><aclass="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><articleclass="docstring"><header><aclass="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> — <spanclass="docstring-category">Method</span></header><section><div><pre><codeclass="language-julia">max_min_driving_force(
)</code></pre><p>Perform a max-min driving force analysis on the <code>model</code>, as defined by Noor, et al., "Pathway thermodynamics highlights kinetic obstacles in central metabolism.", 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><codeclass="language-none">max min -ΔᵣG
s.t. ΔᵣG = ΔrG⁰ + R T S' 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(("ATP","ADP") => 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><aclass="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><articleclass="docstring"><header><aclass="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> — <spanclass="docstring-category">Method</span></header><section><div><pre><codeclass="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(("ATP","ADP") => 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><aclass="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><articleclass="docstring"><header><aclass="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> — <spanclass="docstring-category">Method</span></header><section><div><pre><codeclass="language-julia">max_min_driving_force_variability(
@@ -127,7 +127,7 @@ s.t. ΔᵣG = ΔrG⁰ + R T S' 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 <ahref="#COBREXA.max_min_driving_force-Tuple{MetabolicModel, Dict{String, Float64}, Any}"><code>max_min_driving_force</code></a>. Calls <ahref="#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 <ahref="../utils/#COBREXA.gamma_bounds-Tuple{Any}"><code>gamma_bounds</code></a> and <ahref="../utils/#COBREXA.objective_bounds-Tuple{Any}"><code>objective_bounds</code></a> for simple bounds.</p><p>Returns a matrix of solutions to <ahref="#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><aclass="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><articleclass="docstring"><header><aclass="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> — <spanclass="docstring-category">Method</span></header><section><div><pre><codeclass="language-julia">minimize_metabolic_adjustment(flux_ref_dict::Dict{String, Float64})</code></pre><p>Overload of <ahref="#COBREXA.minimize_metabolic_adjustment-Tuple{Dict{String, Float64}}"><code>minimize_metabolic_adjustment</code></a> that works with a dictionary of fluxes.</p></div><aclass="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><articleclass="docstring"><header><aclass="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> — <spanclass="docstring-category">Method</span></header><section><div><pre><codeclass="language-julia">minimize_metabolic_adjustment(flux_ref::Vector{Float64})</code></pre><p>An optimization model modification that implements the MOMA in <ahref="#COBREXA.minimize_metabolic_adjustment_analysis-Tuple{MetabolicModel, Union{Dict{String, Float64}, Vector{Float64}}, Any}"><code>minimize_metabolic_adjustment_analysis</code></a>.</p></div><aclass="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><articleclass="docstring"><header><aclass="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> — <spanclass="docstring-category">Method</span></header><section><div><pre><codeclass="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 <ahref="#COBREXA.max_min_driving_force-Tuple{MetabolicModel, Dict{String, Float64}, Any}"><code>max_min_driving_force</code></a>. Calls <ahref="#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 <ahref="../utils/#COBREXA.gamma_bounds-Tuple{Any}"><code>gamma_bounds</code></a> and <ahref="../utils/#COBREXA.objective_bounds-Tuple{Any}"><code>objective_bounds</code></a> for simple bounds.</p><p>Returns a matrix of solutions to <ahref="#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><aclass="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><articleclass="docstring"><header><aclass="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> — <spanclass="docstring-category">Method</span></header><section><div><pre><codeclass="language-julia">minimize_metabolic_adjustment(flux_ref_dict::Dict{String, Float64})</code></pre><p>Overload of <ahref="#COBREXA.minimize_metabolic_adjustment-Tuple{Dict{String, Float64}}"><code>minimize_metabolic_adjustment</code></a> that works with a dictionary of fluxes.</p></div><aclass="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><articleclass="docstring"><header><aclass="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> — <spanclass="docstring-category">Method</span></header><section><div><pre><codeclass="language-julia">minimize_metabolic_adjustment(flux_ref::Vector{Float64})</code></pre><p>An optimization model modification that implements the MOMA in <ahref="#COBREXA.minimize_metabolic_adjustment_analysis-Tuple{MetabolicModel, Union{Dict{String, Float64}, Vector{Float64}}, Any}"><code>minimize_metabolic_adjustment_analysis</code></a>.</p></div><aclass="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><articleclass="docstring"><header><aclass="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> — <spanclass="docstring-category">Method</span></header><section><div><pre><codeclass="language-julia">minimize_metabolic_adjustment_analysis(
modifications = [change_constraint("PFL"; 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><aclass="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><articleclass="docstring"><header><aclass="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> — <spanclass="docstring-category">Method</span></header><section><div><pre><codeclass="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 <ahref="#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 <ahref="../base/#COBREXA.flux_vector-Tuple{MetabolicModel, Any}"><code>flux_vector</code></a> instead.</p></div><aclass="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><articleclass="docstring"><header><aclass="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> — <spanclass="docstring-category">Method</span></header><section><div><pre><codeclass="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 <ahref="#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 <ahref="../base/#COBREXA.flux_vector-Tuple{MetabolicModel, Any}"><code>flux_vector</code></a> instead.</p></div><aclass="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><articleclass="docstring"><header><aclass="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> — <spanclass="docstring-category">Method</span></header><section><div><pre><codeclass="language-julia">parsimonious_flux_balance_analysis(
value.(solution[:x]) # extract the flux from the optimizer</code></pre></div><aclass="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><articleclass="docstring"><header><aclass="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> — <spanclass="docstring-category">Method</span></header><section><div><pre><codeclass="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 <ahref="#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 <ahref="../base/#COBREXA.flux_vector-Tuple{MetabolicModel, Any}"><code>flux_vector</code></a> instead.</p></div><aclass="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><articleclass="docstring"><header><aclass="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> — <spanclass="docstring-category">Method</span></header><section><div><pre><codeclass="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 <ahref="#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 <ahref="../base/#COBREXA.flux_vector-Tuple{MetabolicModel, Any}"><code>flux_vector</code></a> instead.</p></div><aclass="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><articleclass="docstring"><header><aclass="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> — <spanclass="docstring-category">Method</span></header><section><div><pre><codeclass="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 "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" for more details.</p><p>pFBA gets the model optimum by standard FBA (using <ahref="#COBREXA.flux_balance_analysis-Union{Tuple{M}, Tuple{M, Any}} where M<: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 <ahref="#COBREXA.flux_balance_analysis-Union{Tuple{M}, Tuple{M, Any}} where M<: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><codeclass="language-none">model = load_model("e_coli_core.json")
value.(solution[:x]) # extract the flux from the optimizer</code></pre></div><aclass="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><articleclass="docstring"><header><aclass="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> — <spanclass="docstring-category">Method</span></header><section><div><pre><codeclass="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 <ahref="#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 <ahref="../base/#COBREXA.flux_dict-Tuple{MetabolicModel, Any}"><code>flux_dict</code></a> instead.</p></div><aclass="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><articleclass="docstring"><header><aclass="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> — <spanclass="docstring-category">Method</span></header><section><div><pre><codeclass="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 <ahref="#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 <ahref="../base/#COBREXA.flux_vector-Tuple{MetabolicModel, Any}"><code>flux_vector</code></a> instead.</p></div><aclass="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><articleclass="docstring"><header><aclass="docstring-binding"id="COBREXA._screen_args-Tuple{Any, Any, Any}"href="#COBREXA._screen_args-Tuple{Any, Any, Any}"><code>COBREXA._screen_args</code></a> — <spanclass="docstring-category">Method</span></header><section><div><pre><codeclass="language-julia">_screen_args(argtuple, kwargtuple, modsname)</code></pre><p>Internal helper to check the presence and shape of modification and argument arrays in <ahref="#COBREXA.screen-Tuple"><code>screen</code></a> and pals.</p></div><aclass="docs-sourcelink"target="_blank"href="https://github.com/lcsb-biocore/COBREXA.jl/blob/6d0e83c79c7269889049f6bc22eafe09365ddbe2/src/analysis/screening.jl#L2-L7">source</a></section></article><articleclass="docstring"><header><aclass="docstring-binding"id="COBREXA._screen_impl-Union{Tuple{MetabolicModel}, Tuple{N}, Tuple{A}, Tuple{V}} where {V<:(AbstractVector), A, N}"href="#COBREXA._screen_impl-Union{Tuple{MetabolicModel}, Tuple{N}, Tuple{A}, Tuple{V}} where {V<:(AbstractVector), A, N}"><code>COBREXA._screen_impl</code></a> — <spanclass="docstring-category">Method</span></header><section><div><pre><codeclass="language-julia">_screen_impl(
value.(solution[:x]) # extract the flux from the optimizer</code></pre></div><aclass="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><articleclass="docstring"><header><aclass="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> — <spanclass="docstring-category">Method</span></header><section><div><pre><codeclass="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 <ahref="#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 <ahref="../base/#COBREXA.flux_dict-Tuple{MetabolicModel, Any}"><code>flux_dict</code></a> instead.</p></div><aclass="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><articleclass="docstring"><header><aclass="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> — <spanclass="docstring-category">Method</span></header><section><div><pre><codeclass="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 <ahref="#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 <ahref="../base/#COBREXA.flux_vector-Tuple{MetabolicModel, Any}"><code>flux_vector</code></a> instead.</p></div><aclass="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><articleclass="docstring"><header><aclass="docstring-binding"id="COBREXA._screen_args-Tuple{Any, Any, Any}"href="#COBREXA._screen_args-Tuple{Any, Any, Any}"><code>COBREXA._screen_args</code></a> — <spanclass="docstring-category">Method</span></header><section><div><pre><codeclass="language-julia">_screen_args(argtuple, kwargtuple, modsname)</code></pre><p>Internal helper to check the presence and shape of modification and argument arrays in <ahref="#COBREXA.screen-Tuple"><code>screen</code></a> and pals.</p></div><aclass="docs-sourcelink"target="_blank"href="https://github.com/lcsb-biocore/COBREXA.jl/blob/77603c3b626a5edd84a1fbd03d11477955788b00/src/analysis/screening.jl#L2-L7">source</a></section></article><articleclass="docstring"><header><aclass="docstring-binding"id="COBREXA._screen_impl-Union{Tuple{MetabolicModel}, Tuple{N}, Tuple{A}, Tuple{V}} where {V<:(AbstractVector), A, N}"href="#COBREXA._screen_impl-Union{Tuple{MetabolicModel}, Tuple{N}, Tuple{A}, Tuple{V}} where {V<:(AbstractVector), A, N}"><code>COBREXA._screen_impl</code></a> — <spanclass="docstring-category">Method</span></header><section><div><pre><codeclass="language-julia">_screen_impl(
model::MetabolicModel;
variants::Array{V,N},
analysis,
args::Array{A,N},
workers = [myid()],
)::Array where {V<:AbstractVector,A,N}</code></pre><p>The actual implementation of <ahref="#COBREXA.screen-Tuple"><code>screen</code></a>.</p></div><aclass="docs-sourcelink"target="_blank"href="https://github.com/lcsb-biocore/COBREXA.jl/blob/6d0e83c79c7269889049f6bc22eafe09365ddbe2/src/analysis/screening.jl#L113-L123">source</a></section></article><articleclass="docstring"><header><aclass="docstring-binding"id="COBREXA._screen_optmodel_item-Tuple{Any}"href="#COBREXA._screen_optmodel_item-Tuple{Any}"><code>COBREXA._screen_optmodel_item</code></a> — <spanclass="docstring-category">Method</span></header><section><div><pre><codeclass="language-julia">_screen_optmodel_item((mods, args))</code></pre><p>Internal helper for <ahref="#COBREXA.screen_optmodel_modifications-Tuple"><code>screen_optmodel_modifications</code></a> that computes one item of the screening task.</p></div><aclass="docs-sourcelink"target="_blank"href="https://github.com/lcsb-biocore/COBREXA.jl/blob/6d0e83c79c7269889049f6bc22eafe09365ddbe2/src/analysis/screening.jl#L200-L205">source</a></section></article><articleclass="docstring"><header><aclass="docstring-binding"id="COBREXA._screen_optmodel_modifications_impl-Union{Tuple{N}, Tuple{A}, Tuple{VF}, Tuple{V}, Tuple{MetabolicModel, Any}} where {V<:(AbstractVector), VF<:(AbstractVector), A, N}"href="#COBREXA._screen_optmodel_modifications_impl-Union{Tuple{N}, Tuple{A}, Tuple{VF}, Tuple{V}, Tuple{MetabolicModel, Any}} where {V<:(AbstractVector), VF<:(AbstractVector), A, N}"><code>COBREXA._screen_optmodel_modifications_impl</code></a> — <spanclass="docstring-category">Method</span></header><section><div><pre><codeclass="language-julia">_screen_optmodel_modifications_impl(
)::Array where {V<:AbstractVector,A,N}</code></pre><p>The actual implementation of <ahref="#COBREXA.screen-Tuple"><code>screen</code></a>.</p></div><aclass="docs-sourcelink"target="_blank"href="https://github.com/lcsb-biocore/COBREXA.jl/blob/77603c3b626a5edd84a1fbd03d11477955788b00/src/analysis/screening.jl#L113-L123">source</a></section></article><articleclass="docstring"><header><aclass="docstring-binding"id="COBREXA._screen_optmodel_item-Tuple{Any}"href="#COBREXA._screen_optmodel_item-Tuple{Any}"><code>COBREXA._screen_optmodel_item</code></a> — <spanclass="docstring-category">Method</span></header><section><div><pre><codeclass="language-julia">_screen_optmodel_item((mods, args))</code></pre><p>Internal helper for <ahref="#COBREXA.screen_optmodel_modifications-Tuple"><code>screen_optmodel_modifications</code></a> that computes one item of the screening task.</p></div><aclass="docs-sourcelink"target="_blank"href="https://github.com/lcsb-biocore/COBREXA.jl/blob/77603c3b626a5edd84a1fbd03d11477955788b00/src/analysis/screening.jl#L200-L205">source</a></section></article><articleclass="docstring"><header><aclass="docstring-binding"id="COBREXA._screen_optmodel_modifications_impl-Union{Tuple{N}, Tuple{A}, Tuple{VF}, Tuple{V}, Tuple{MetabolicModel, Any}} where {V<:(AbstractVector), VF<:(AbstractVector), A, N}"href="#COBREXA._screen_optmodel_modifications_impl-Union{Tuple{N}, Tuple{A}, Tuple{VF}, Tuple{V}, Tuple{MetabolicModel, Any}} where {V<:(AbstractVector), VF<:(AbstractVector), A, N}"><code>COBREXA._screen_optmodel_modifications_impl</code></a> — <spanclass="docstring-category">Method</span></header><section><div><pre><codeclass="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<:AbstractVector,VF<:AbstractVector,A,N}</code></pre><p>The actual implementation of <ahref="#COBREXA.screen_optmodel_modifications-Tuple"><code>screen_optmodel_modifications</code></a>.</p></div><aclass="docs-sourcelink"target="_blank"href="https://github.com/lcsb-biocore/COBREXA.jl/blob/6d0e83c79c7269889049f6bc22eafe09365ddbe2/src/analysis/screening.jl#L256-L268">source</a></section></article><articleclass="docstring"><header><aclass="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> — <spanclass="docstring-category">Method</span></header><section><div><pre><codeclass="language-julia">_screen_optmodel_prepare(model, optimizer, common_modifications)</code></pre><p>Internal helper for <ahref="#COBREXA.screen_optmodel_modifications-Tuple"><code>screen_optmodel_modifications</code></a> that creates the model and applies the modifications.</p></div><aclass="docs-sourcelink"target="_blank"href="https://github.com/lcsb-biocore/COBREXA.jl/blob/6d0e83c79c7269889049f6bc22eafe09365ddbe2/src/analysis/screening.jl#L185-L190">source</a></section></article><articleclass="docstring"><header><aclass="docstring-binding"id="COBREXA.screen-Tuple"href="#COBREXA.screen-Tuple"><code>COBREXA.screen</code></a> — <spanclass="docstring-category">Method</span></header><section><div><pre><codeclass="language-julia">screen(
)::Array where {V<:AbstractVector,VF<:AbstractVector,A,N}</code></pre><p>The actual implementation of <ahref="#COBREXA.screen_optmodel_modifications-Tuple"><code>screen_optmodel_modifications</code></a>.</p></div><aclass="docs-sourcelink"target="_blank"href="https://github.com/lcsb-biocore/COBREXA.jl/blob/77603c3b626a5edd84a1fbd03d11477955788b00/src/analysis/screening.jl#L256-L268">source</a></section></article><articleclass="docstring"><header><aclass="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> — <spanclass="docstring-category">Method</span></header><section><div><pre><codeclass="language-julia">_screen_optmodel_prepare(model, optimizer, common_modifications)</code></pre><p>Internal helper for <ahref="#COBREXA.screen_optmodel_modifications-Tuple"><code>screen_optmodel_modifications</code></a> that creates the model and applies the modifications.</p></div><aclass="docs-sourcelink"target="_blank"href="https://github.com/lcsb-biocore/COBREXA.jl/blob/77603c3b626a5edd84a1fbd03d11477955788b00/src/analysis/screening.jl#L185-L190">source</a></section></article><articleclass="docstring"><header><aclass="docstring-binding"id="COBREXA.screen-Tuple"href="#COBREXA.screen-Tuple"><code>COBREXA.screen</code></a> — <spanclass="docstring-category">Method</span></header><section><div><pre><codeclass="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 -> flux_balance_analysis_vec(mod, GLPK.Optimizer))</code></pre></div><aclass="docs-sourcelink"target="_blank"href="https://github.com/lcsb-biocore/COBREXA.jl/blob/6d0e83c79c7269889049f6bc22eafe09365ddbe2/src/analysis/screening.jl#L35-L109">source</a></section></article><articleclass="docstring"><header><aclass="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> — <spanclass="docstring-category">Method</span></header><section><div><pre><codeclass="language-julia">screen_optimize_objective(_, optmodel)::Maybe{Float64}</code></pre><p>A variant of <ahref="../base/#COBREXA.optimize_objective-Tuple{Any}"><code>optimize_objective</code></a> directly usable in <ahref="#COBREXA.screen_optmodel_modifications-Tuple"><code>screen_optmodel_modifications</code></a>.</p></div><aclass="docs-sourcelink"target="_blank"href="https://github.com/lcsb-biocore/COBREXA.jl/blob/6d0e83c79c7269889049f6bc22eafe09365ddbe2/src/analysis/screening.jl#L177-L182">source</a></section></article><articleclass="docstring"><header><aclass="docstring-binding"id="COBREXA.screen_optmodel_modifications-Tuple"href="#COBREXA.screen_optmodel_modifications-Tuple"><code>COBREXA.screen_optmodel_modifications</code></a> — <spanclass="docstring-category">Method</span></header><section><div><pre><codeclass="language-julia">screen_optmodel_modifications(
analysis = mod -> flux_balance_analysis_vec(mod, GLPK.Optimizer))</code></pre></div><aclass="docs-sourcelink"target="_blank"href="https://github.com/lcsb-biocore/COBREXA.jl/blob/77603c3b626a5edd84a1fbd03d11477955788b00/src/analysis/screening.jl#L35-L109">source</a></section></article><articleclass="docstring"><header><aclass="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> — <spanclass="docstring-category">Method</span></header><section><div><pre><codeclass="language-julia">screen_optimize_objective(_, optmodel)::Maybe{Float64}</code></pre><p>A variant of <ahref="../base/#COBREXA.optimize_objective-Tuple{Any}"><code>optimize_objective</code></a> directly usable in <ahref="#COBREXA.screen_optmodel_modifications-Tuple"><code>screen_optmodel_modifications</code></a>.</p></div><aclass="docs-sourcelink"target="_blank"href="https://github.com/lcsb-biocore/COBREXA.jl/blob/77603c3b626a5edd84a1fbd03d11477955788b00/src/analysis/screening.jl#L177-L182">source</a></section></article><articleclass="docstring"><header><aclass="docstring-binding"id="COBREXA.screen_optmodel_modifications-Tuple"href="#COBREXA.screen_optmodel_modifications-Tuple"><code>COBREXA.screen_optmodel_modifications</code></a> — <spanclass="docstring-category">Method</span></header><section><div><pre><codeclass="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<:AbstractVector,VF<:AbstractVector,A,N}</code></pre><p>Screen multiple modifications of the same optimization model.</p><p>This function is potentially more efficient than <ahref="#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 <ahref="../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 <ahref="#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 <ahref="#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 <ahref="#COBREXA.change_constraint-Tuple{String}"><code>change_constraint</code></a> and analysis <ahref="#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 <ahref="#COBREXA._screen_optmodel_modifications_impl-Union{Tuple{N}, Tuple{A}, Tuple{VF}, Tuple{V}, Tuple{MetabolicModel, Any}} where {V<:(AbstractVector), VF<:(AbstractVector), A, N}"><code>_screen_optmodel_modifications_impl</code></a>.</p></div><aclass="docs-sourcelink"target="_blank"href="https://github.com/lcsb-biocore/COBREXA.jl/blob/6d0e83c79c7269889049f6bc22eafe09365ddbe2/src/analysis/screening.jl#L214-L249">source</a></section></article><articleclass="docstring"><header><aclass="docstring-binding"id="COBREXA.screen_variant"href="#COBREXA.screen_variant"><code>COBREXA.screen_variant</code></a> — <spanclass="docstring-category">Function</span></header><section><div><pre><codeclass="language-julia">screen_variant(model::MetabolicModel, variant::Vector, analysis, args = ())</code></pre><p>Helper function for <ahref="#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 "first" to "last"), and executes <code>analysis</code> on the result.</p><p>Can be used to test model variants locally.</p></div><aclass="docs-sourcelink"target="_blank"href="https://github.com/lcsb-biocore/COBREXA.jl/blob/6d0e83c79c7269889049f6bc22eafe09365ddbe2/src/analysis/screening.jl#L153-L161">source</a></section></article><articleclass="docstring"><header><aclass="docstring-binding"id="COBREXA.screen_variants-Tuple{Any, Any, Any}"href="#COBREXA.screen_variants-Tuple{Any, Any, Any}"><code>COBREXA.screen_variants</code></a> — <spanclass="docstring-category">Method</span></header><section><div><pre><codeclass="language-julia">screen_variants(model, variants, analysis; workers=[myid()])</code></pre><p>A shortcut for <ahref="#COBREXA.screen-Tuple"><code>screen</code></a> that only works with model variants.</p></div><aclass="docs-sourcelink"target="_blank"href="https://github.com/lcsb-biocore/COBREXA.jl/blob/6d0e83c79c7269889049f6bc22eafe09365ddbe2/src/analysis/screening.jl#L169-L173">source</a></section></article><articleclass="docstring"><header><aclass="docstring-binding"id="COBREXA.make_smoment_model-Tuple{MetabolicModel}"href="#COBREXA.make_smoment_model-Tuple{MetabolicModel}"><code>COBREXA.make_smoment_model</code></a> — <spanclass="docstring-category">Method</span></header><section><div><pre><codeclass="language-julia">make_smoment_model(
)::Array where {V<:AbstractVector,VF<:AbstractVector,A,N}</code></pre><p>Screen multiple modifications of the same optimization model.</p><p>This function is potentially more efficient than <ahref="#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 <ahref="../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 <ahref="#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 <ahref="#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 <ahref="#COBREXA.change_constraint-Tuple{String}"><code>change_constraint</code></a> and analysis <ahref="#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 <ahref="#COBREXA._screen_optmodel_modifications_impl-Union{Tuple{N}, Tuple{A}, Tuple{VF}, Tuple{V}, Tuple{MetabolicModel, Any}} where {V<:(AbstractVector), VF<:(AbstractVector), A, N}"><code>_screen_optmodel_modifications_impl</code></a>.</p></div><aclass="docs-sourcelink"target="_blank"href="https://github.com/lcsb-biocore/COBREXA.jl/blob/77603c3b626a5edd84a1fbd03d11477955788b00/src/analysis/screening.jl#L214-L249">source</a></section></article><articleclass="docstring"><header><aclass="docstring-binding"id="COBREXA.screen_variant"href="#COBREXA.screen_variant"><code>COBREXA.screen_variant</code></a> — <spanclass="docstring-category">Function</span></header><section><div><pre><codeclass="language-julia">screen_variant(model::MetabolicModel, variant::Vector, analysis, args = ())</code></pre><p>Helper function for <ahref="#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 "first" to "last"), and executes <code>analysis</code> on the result.</p><p>Can be used to test model variants locally.</p></div><aclass="docs-sourcelink"target="_blank"href="https://github.com/lcsb-biocore/COBREXA.jl/blob/77603c3b626a5edd84a1fbd03d11477955788b00/src/analysis/screening.jl#L153-L161">source</a></section></article><articleclass="docstring"><header><aclass="docstring-binding"id="COBREXA.screen_variants-Tuple{Any, Any, Any}"href="#COBREXA.screen_variants-Tuple{Any, Any, Any}"><code>COBREXA.screen_variants</code></a> — <spanclass="docstring-category">Method</span></header><section><div><pre><codeclass="language-julia">screen_variants(model, variants, analysis; workers=[myid()])</code></pre><p>A shortcut for <ahref="#COBREXA.screen-Tuple"><code>screen</code></a> that only works with model variants.</p></div><aclass="docs-sourcelink"target="_blank"href="https://github.com/lcsb-biocore/COBREXA.jl/blob/77603c3b626a5edd84a1fbd03d11477955788b00/src/analysis/screening.jl#L169-L173">source</a></section></article><articleclass="docstring"><header><aclass="docstring-binding"id="COBREXA.make_smoment_model-Tuple{MetabolicModel}"href="#COBREXA.make_smoment_model-Tuple{MetabolicModel}"><code>COBREXA.make_smoment_model</code></a> — <spanclass="docstring-category">Method</span></header><section><div><pre><codeclass="language-julia">make_smoment_model(
)</code></pre><p>Construct a model with a structure given by sMOMENT algorithm; returns a <ahref="../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 <ahref="../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 <ahref="../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 "enzyme capacity" in the model.</li></ul><p>Alternatively, all function arguments also accept dictionaries that are used to provide the same data lookup.</p></div><aclass="docs-sourcelink"target="_blank"href="https://github.com/lcsb-biocore/COBREXA.jl/blob/6d0e83c79c7269889049f6bc22eafe09365ddbe2/src/analysis/smoment.jl#L2-L26">source</a></section></article><h2id="Sampling"><aclass="docs-heading-anchor"href="#Sampling">Sampling</a><aid="Sampling-1"></a><aclass="docs-heading-anchor-permalink"href="#Sampling"title="Permalink"></a></h2><articleclass="docstring"><header><aclass="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> — <spanclass="docstring-category">Method</span></header><section><div><pre><codeclass="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><aclass="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><articleclass="docstring"><header><aclass="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> — <spanclass="docstring-category">Method</span></header><section><div><pre><codeclass="language-julia">function affine_hit_and_run(
)</code></pre><p>Construct a model with a structure given by sMOMENT algorithm; returns a <ahref="../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 <ahref="../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 <ahref="../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 "enzyme capacity" in the model.</li></ul><p>Alternatively, all function arguments also accept dictionaries that are used to provide the same data lookup.</p></div><aclass="docs-sourcelink"target="_blank"href="https://github.com/lcsb-biocore/COBREXA.jl/blob/77603c3b626a5edd84a1fbd03d11477955788b00/src/analysis/smoment.jl#L2-L26">source</a></section></article><h2id="Sampling"><aclass="docs-heading-anchor"href="#Sampling">Sampling</a><aid="Sampling-1"></a><aclass="docs-heading-anchor-permalink"href="#Sampling"title="Permalink"></a></h2><articleclass="docstring"><header><aclass="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> — <spanclass="docstring-category">Method</span></header><section><div><pre><codeclass="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><aclass="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><articleclass="docstring"><header><aclass="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> — <spanclass="docstring-category">Method</span></header><section><div><pre><codeclass="language-julia">function affine_hit_and_run(
# convert the result to flux (for models where the distinction matters):
fluxes = reaction_flux(model)' * samples</code></pre></div><aclass="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><articleclass="docstring"><header><aclass="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> — <spanclass="docstring-category">Method</span></header><section><div><pre><codeclass="language-julia">_maximize_warmup_reaction(opt_model, rid, ret)</code></pre><p>A helper function for finding warmup points from reaction variability.</p></div><aclass="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><articleclass="docstring"><header><aclass="docstring-binding"id="COBREXA.warmup_from_variability"href="#COBREXA.warmup_from_variability"><code>COBREXA.warmup_from_variability</code></a> — <spanclass="docstring-category">Function</span></header><section><div><pre><codeclass="language-julia">function warmup_from_variability(
fluxes = reaction_flux(model)' * samples</code></pre></div><aclass="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><articleclass="docstring"><header><aclass="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> — <spanclass="docstring-category">Method</span></header><section><div><pre><codeclass="language-julia">_maximize_warmup_reaction(opt_model, rid, ret)</code></pre><p>A helper function for finding warmup points from reaction variability.</p></div><aclass="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><articleclass="docstring"><header><aclass="docstring-binding"id="COBREXA.warmup_from_variability"href="#COBREXA.warmup_from_variability"><code>COBREXA.warmup_from_variability</code></a> — <spanclass="docstring-category">Function</span></header><section><div><pre><codeclass="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><aclass="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><articleclass="docstring"><header><aclass="docstring-binding"id="COBREXA.warmup_from_variability"href="#COBREXA.warmup_from_variability"><code>COBREXA.warmup_from_variability</code></a> — <spanclass="docstring-category">Function</span></header><section><div><pre><codeclass="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><aclass="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><articleclass="docstring"><header><aclass="docstring-binding"id="COBREXA.warmup_from_variability"href="#COBREXA.warmup_from_variability"><code>COBREXA.warmup_from_variability</code></a> — <spanclass="docstring-category">Function</span></header><section><div><pre><codeclass="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><aclass="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><h2id="Analysis-modifiers"><aclass="docs-heading-anchor"href="#Analysis-modifiers">Analysis modifiers</a><aid="Analysis-modifiers-1"></a><aclass="docs-heading-anchor-permalink"href="#Analysis-modifiers"title="Permalink"></a></h2><articleclass="docstring"><header><aclass="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> — <spanclass="docstring-category">Method</span></header><section><div><pre><codeclass="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's reactions specified in <code>weights</code> as <code>vᵢ => wᵢ</code> pairs.</p><p>See Beg, Qasim K., et al. "Intracellular crowding defines the mode and sequence of substrate uptake by Escherichia coli and constrains its metabolic activity." Proceedings of the National Academy of Sciences 104.31 (2007) for more details.</p></div><aclass="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><articleclass="docstring"><header><aclass="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> — <spanclass="docstring-category">Method</span></header><section><div><pre><codeclass="language-julia">add_crowding_constraints(weights::Dict{String, Float64})</code></pre><p>Variant of <ahref="#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><aclass="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><articleclass="docstring"><header><aclass="docstring-binding"id="COBREXA.change_constraint-Tuple{String}"href="#COBREXA.change_constraint-Tuple{String}"><code>COBREXA.change_constraint</code></a> — <spanclass="docstring-category">Method</span></header><section><div><pre><codeclass="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><aclass="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><articleclass="docstring"><header><aclass="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> — <spanclass="docstring-category">Method</span></header><section><div><pre><codeclass="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><aclass="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><articleclass="docstring"><header><aclass="docstring-binding"id="COBREXA.constrain_objective_value-Tuple{Any}"href="#COBREXA.constrain_objective_value-Tuple{Any}"><code>COBREXA.constrain_objective_value</code></a> — <spanclass="docstring-category">Method</span></header><section><div><pre><codeclass="language-julia">constrain_objective_value(tolerance)</code></pre><p>Limit the objective value to <code>tolerance</code>-times the current objective value, as with <ahref="../utils/#COBREXA.objective_bounds-Tuple{Any}"><code>objective_bounds</code></a>.</p></div><aclass="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><articleclass="docstring"><header><aclass="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> — <spanclass="docstring-category">Method</span></header><section><div><pre><codeclass="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><aclass="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><articleclass="docstring"><header><aclass="docstring-binding"id="COBREXA.knockout-Tuple{String}"href="#COBREXA.knockout-Tuple{String}"><code>COBREXA.knockout</code></a> — <spanclass="docstring-category">Method</span></header><section><div><pre><codeclass="language-julia">knockout(gene_id::String)</code></pre><p>A helper variant of <ahref="#COBREXA.knockout-Tuple{String}"><code>knockout</code></a> for a single gene.</p></div><aclass="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><articleclass="docstring"><header><aclass="docstring-binding"id="COBREXA.knockout-Tuple{Vector{String}}"href="#COBREXA.knockout-Tuple{Vector{String}}"><code>COBREXA.knockout</code></a> — <spanclass="docstring-category">Method</span></header><section><div><pre><codeclass="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 <ahref="#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(["Gene1", "Gene2"])]</code> does indeed disable the reaction, but <code>modifications = [knockout("Gene1"), knockout("Gene2")]</code> does <em>not</em> disable the reaction (although reactions that depend either only on Gene1 or only on Gene2 are disabled).</p></div><aclass="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><articleclass="docstring"><header><aclass="docstring-binding"id="COBREXA.add_loopless_constraints-Tuple{}"href="#COBREXA.add_loopless_constraints-Tuple{}"><code>COBREXA.add_loopless_constraints</code></a> — <spanclass="docstring-category">Method</span></header><section><div><pre><codeclass="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><aclass="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><h2id="Analysis-modifiers"><aclass="docs-heading-anchor"href="#Analysis-modifiers">Analysis modifiers</a><aid="Analysis-modifiers-1"></a><aclass="docs-heading-anchor-permalink"href="#Analysis-modifiers"title="Permalink"></a></h2><articleclass="docstring"><header><aclass="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> — <spanclass="docstring-category">Method</span></header><section><div><pre><codeclass="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's reactions specified in <code>weights</code> as <code>vᵢ => wᵢ</code> pairs.</p><p>See Beg, Qasim K., et al. "Intracellular crowding defines the mode and sequence of substrate uptake by Escherichia coli and constrains its metabolic activity." Proceedings of the National Academy of Sciences 104.31 (2007) for more details.</p></div><aclass="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><articleclass="docstring"><header><aclass="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> — <spanclass="docstring-category">Method</span></header><section><div><pre><codeclass="language-julia">add_crowding_constraints(weights::Dict{String, Float64})</code></pre><p>Variant of <ahref="#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><aclass="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><articleclass="docstring"><header><aclass="docstring-binding"id="COBREXA.change_constraint-Tuple{String}"href="#COBREXA.change_constraint-Tuple{String}"><code>COBREXA.change_constraint</code></a> — <spanclass="docstring-category">Method</span></header><section><div><pre><codeclass="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><aclass="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><articleclass="docstring"><header><aclass="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> — <spanclass="docstring-category">Method</span></header><section><div><pre><codeclass="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><aclass="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><articleclass="docstring"><header><aclass="docstring-binding"id="COBREXA.constrain_objective_value-Tuple{Any}"href="#COBREXA.constrain_objective_value-Tuple{Any}"><code>COBREXA.constrain_objective_value</code></a> — <spanclass="docstring-category">Method</span></header><section><div><pre><codeclass="language-julia">constrain_objective_value(tolerance)</code></pre><p>Limit the objective value to <code>tolerance</code>-times the current objective value, as with <ahref="../utils/#COBREXA.objective_bounds-Tuple{Any}"><code>objective_bounds</code></a>.</p></div><aclass="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><articleclass="docstring"><header><aclass="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> — <spanclass="docstring-category">Method</span></header><section><div><pre><codeclass="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><aclass="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><articleclass="docstring"><header><aclass="docstring-binding"id="COBREXA.knockout-Tuple{String}"href="#COBREXA.knockout-Tuple{String}"><code>COBREXA.knockout</code></a> — <spanclass="docstring-category">Method</span></header><section><div><pre><codeclass="language-julia">knockout(gene_id::String)</code></pre><p>A helper variant of <ahref="#COBREXA.knockout-Tuple{String}"><code>knockout</code></a> for a single gene.</p></div><aclass="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><articleclass="docstring"><header><aclass="docstring-binding"id="COBREXA.knockout-Tuple{Vector{String}}"href="#COBREXA.knockout-Tuple{Vector{String}}"><code>COBREXA.knockout</code></a> — <spanclass="docstring-category">Method</span></header><section><div><pre><codeclass="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 <ahref="#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(["Gene1", "Gene2"])]</code> does indeed disable the reaction, but <code>modifications = [knockout("Gene1"), knockout("Gene2")]</code> does <em>not</em> disable the reaction (although reactions that depend either only on Gene1 or only on Gene2 are disabled).</p></div><aclass="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><articleclass="docstring"><header><aclass="docstring-binding"id="COBREXA.add_loopless_constraints-Tuple{}"href="#COBREXA.add_loopless_constraints-Tuple{}"><code>COBREXA.add_loopless_constraints</code></a> — <spanclass="docstring-category">Method</span></header><section><div><pre><codeclass="language-julia">add_loopless_constraints(;
)</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><codeclass="language-none">-max_flux_bound × (1 - yᵢ) ≤ xᵢ ≤ max_flux_bound × yᵢ
...
...
@@ -250,7 +250,7 @@ Nᵢₙₜ' × 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 "big-M" method of indicator constraints.</p><p>For more details about the algorithm, see <code>Schellenberger, Lewis, and, Palsson. "Elimination of thermodynamically infeasible loops in steady-state metabolic models.", Biophysical journal, 2011</code>.</p></div><aclass="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><articleclass="docstring"><header><aclass="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> — <spanclass="docstring-category">Method</span></header><section><div><pre><codeclass="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 "big-M" method of indicator constraints.</p><p>For more details about the algorithm, see <code>Schellenberger, Lewis, and, Palsson. "Elimination of thermodynamically infeasible loops in steady-state metabolic models.", Biophysical journal, 2011</code>.</p></div><aclass="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><articleclass="docstring"><header><aclass="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> — <spanclass="docstring-category">Method</span></header><section><div><pre><codeclass="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. "Prediction of microbial growth rate versus biomass yield by a metabolic network with kinetic parameters." 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] <= ksas[i] * y[a]</code>. If isozymes <code>a</code> or <code>b</code> catalyse the reaction, then <code>x[i] <= 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] <= 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><aclass="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><articleclass="docstring"><header><aclass="docstring-binding"id="COBREXA.change_optimizer-Tuple{Any}"href="#COBREXA.change_optimizer-Tuple{Any}"><code>COBREXA.change_optimizer</code></a> — <spanclass="docstring-category">Method</span></header><section><div><pre><codeclass="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 <ahref="#COBREXA.parsimonious_flux_balance_analysis-Tuple{MetabolicModel, Any}"><code>parsimonious_flux_balance_analysis</code></a>.</p></div><aclass="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><articleclass="docstring"><header><aclass="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> — <spanclass="docstring-category">Method</span></header><section><div><pre><codeclass="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><aclass="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><articleclass="docstring"><header><aclass="docstring-binding"id="COBREXA.change_sense-Tuple{Any}"href="#COBREXA.change_sense-Tuple{Any}"><code>COBREXA.change_sense</code></a> — <spanclass="docstring-category">Method</span></header><section><div><pre><codeclass="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 <ahref="#COBREXA.change_objective-Tuple{Union{String, Vector{String}}}"><code>change_objective</code></a> instead to do both at once.</p></div><aclass="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><articleclass="docstring"><header><aclass="docstring-binding"id="COBREXA.silence"href="#COBREXA.silence"><code>COBREXA.silence</code></a> — <spanclass="docstring-category">Function</span></header><section><div><pre><codeclass="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><aclass="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><navclass="docs-footer"><aclass="docs-footer-prevpage"href="../">« Contents</a><aclass="docs-footer-nextpage"href="../base/">Base functions »</a><divclass="flexbox-break"></div><pclass="footer-message">Powered by <ahref="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <ahref="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><divclass="modal"id="documenter-settings"><divclass="modal-background"></div><divclass="modal-card"><headerclass="modal-card-head"><pclass="modal-card-title">Settings</p><buttonclass="delete"></button></header><sectionclass="modal-card-body"><p><labelclass="label">Theme</label><divclass="select"><selectid="documenter-themepicker"><optionvalue="documenter-light">documenter-light</option><optionvalue="documenter-dark">documenter-dark</option></select></div></p><hr/><p>This document was generated with <ahref="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> on <spanclass="colophon-date"title="Monday 16 May 2022 13:40">Monday 16 May 2022</span>. Using Julia version 1.7.0.</p></section><footerclass="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. "Prediction of microbial growth rate versus biomass yield by a metabolic network with kinetic parameters." 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] <= ksas[i] * y[a]</code>. If isozymes <code>a</code> or <code>b</code> catalyse the reaction, then <code>x[i] <= 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] <= 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><aclass="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><articleclass="docstring"><header><aclass="docstring-binding"id="COBREXA.change_optimizer-Tuple{Any}"href="#COBREXA.change_optimizer-Tuple{Any}"><code>COBREXA.change_optimizer</code></a> — <spanclass="docstring-category">Method</span></header><section><div><pre><codeclass="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 <ahref="#COBREXA.parsimonious_flux_balance_analysis-Tuple{MetabolicModel, Any}"><code>parsimonious_flux_balance_analysis</code></a>.</p></div><aclass="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><articleclass="docstring"><header><aclass="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> — <spanclass="docstring-category">Method</span></header><section><div><pre><codeclass="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><aclass="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><articleclass="docstring"><header><aclass="docstring-binding"id="COBREXA.change_sense-Tuple{Any}"href="#COBREXA.change_sense-Tuple{Any}"><code>COBREXA.change_sense</code></a> — <spanclass="docstring-category">Method</span></header><section><div><pre><codeclass="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 <ahref="#COBREXA.change_objective-Tuple{Union{String, Vector{String}}}"><code>change_objective</code></a> instead to do both at once.</p></div><aclass="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><articleclass="docstring"><header><aclass="docstring-binding"id="COBREXA.silence"href="#COBREXA.silence"><code>COBREXA.silence</code></a> — <spanclass="docstring-category">Function</span></header><section><div><pre><codeclass="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><aclass="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><navclass="docs-footer"><aclass="docs-footer-prevpage"href="../">« Contents</a><aclass="docs-footer-nextpage"href="../base/">Base functions »</a><divclass="flexbox-break"></div><pclass="footer-message">Powered by <ahref="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <ahref="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><divclass="modal"id="documenter-settings"><divclass="modal-background"></div><divclass="modal-card"><headerclass="modal-card-head"><pclass="modal-card-title">Settings</p><buttonclass="delete"></button></header><sectionclass="modal-card-body"><p><labelclass="label">Theme</label><divclass="select"><selectid="documenter-themepicker"><optionvalue="documenter-light">documenter-light</option><optionvalue="documenter-dark">documenter-dark</option></select></div></p><hr/><p>This document was generated with <ahref="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> on <spanclass="colophon-date"title="Monday 16 May 2022 19:38">Monday 16 May 2022</span>. Using Julia version 1.7.0.</p></section><footerclass="modal-card-foot"></footer></div></div></div></body></html>
<htmllang="en"><head><metacharset="UTF-8"/><metaname="viewport"content="width=device-width, initial-scale=1.0"/><title>Base functions · COBREXA.jl</title><linkhref="https://fonts.googleapis.com/css?family=Lato|Roboto+Mono"rel="stylesheet"type="text/css"/><linkhref="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.0/css/fontawesome.min.css"rel="stylesheet"type="text/css"/><linkhref="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.0/css/solid.min.css"rel="stylesheet"type="text/css"/><linkhref="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.0/css/brands.min.css"rel="stylesheet"type="text/css"/><linkhref="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><linkclass="docs-theme-link"rel="stylesheet"type="text/css"href="../../assets/themes/documenter-dark.css"data-theme-name="documenter-dark"data-theme-primary-dark/><linkclass="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><linkhref="../../assets/favicon.ico"rel="icon"type="image/x-icon"/></head><body><divid="documenter"><navclass="docs-sidebar"><aclass="docs-logo"href="../../"><imgclass="docs-light-only"src="../../assets/logo.svg"alt="COBREXA.jl logo"/><imgclass="docs-dark-only"src="../../assets/logo-dark.svg"alt="COBREXA.jl logo"/></a><divclass="docs-package-name"><spanclass="docs-autofit">COBREXA.jl</span></div><formclass="docs-search"action="../../search/"><inputclass="docs-search-query"id="documenter-search-query"name="q"type="text"placeholder="Search docs"/></form><ulclass="docs-menu"><li><aclass="tocitem"href="../../">Home</a></li><li><spanclass="tocitem">User guide</span><ul><li><inputclass="collapse-toggle"id="menuitem-2-1"type="checkbox"/><labelclass="tocitem"for="menuitem-2-1"><spanclass="docs-label">Quickstart tutorials</span><iclass="docs-chevron"></i></label><ulclass="collapsed"><li><aclass="tocitem"href="../../tutorials/">All tutorials</a></li><li><aclass="tocitem"href="../../tutorials/1_loading/">Loading and converting model data</a></li><li><aclass="tocitem"href="../../tutorials/2_analysis/">Basic analysis of constraint-based models</a></li><li><aclass="tocitem"href="../../tutorials/3_hpc/">Distributed processing and HPC environments</a></li><li><aclass="tocitem"href="../../tutorials/4_modifying/">Modifying and saving the models</a></li></ul></li><li><inputclass="collapse-toggle"id="menuitem-2-2"type="checkbox"/><labelclass="tocitem"for="menuitem-2-2"><spanclass="docs-label">Advanced tutorials</span><iclass="docs-chevron"></i></label><ulclass="collapsed"><li><aclass="tocitem"href="../../advanced/">All advanced tutorials</a></li><li><aclass="tocitem"href="../../advanced/1_variants/">Exploring many model variants</a></li><li><aclass="tocitem"href="../../advanced/2_custom_model/">Working with custom models</a></li></ul></li><li><inputclass="collapse-toggle"id="menuitem-2-3"type="checkbox"/><labelclass="tocitem"for="menuitem-2-3"><spanclass="docs-label">Examples and notebooks</span><iclass="docs-chevron"></i></label><ulclass="collapsed"><li><aclass="tocitem"href="../../notebooks/">All notebooks</a></li><li><aclass="tocitem"href="../../notebooks/1_loading_converting_saving/">Loading, converting, and saving models</a></li><li><aclass="tocitem"href="../../notebooks/2_finding_balance/">Finding balance and variability of constraint-based models</a></li><li><aclass="tocitem"href="../../notebooks/3_basic_stdmodel_usage/">Basic usage of <code>StandardModel</code></a></li><li><aclass="tocitem"href="../../notebooks/4_basic_core_coupled_usage/">Basic usage of <code>CoreModel</code> and <code>CoreModelCoupled</code></a></li><li><aclass="tocitem"href="../../notebooks/5_basic_stdmodel_construction/">Model construction and modification</a></li><li><aclass="tocitem"href="../../notebooks/6_screening/">Exploring model variants with <code>screen</code></a></li><li><aclass="tocitem"href="../../notebooks/7_community_model/">Building and analysing a small community model</a></li><li><aclass="tocitem"href="../../notebooks/8_custom_model/">Using a custom model data structure</a></li><li><aclass="tocitem"href="../../notebooks/9_max_min_driving_force_analysis/">Maximum-minimum driving force analysis</a></li></ul></li></ul></li><li><spanclass="tocitem">Types and functions</span><ul><li><aclass="tocitem"href="../">Contents</a></li><li><aclass="tocitem"href="../analysis/">Analysis functions</a></li><liclass="is-active"><aclass="tocitem"href>Base functions</a></li><li><aclass="tocitem"href="../io/">Input and output</a></li><li><aclass="tocitem"href="../reconstruction/">Model construction functions</a></li><li><aclass="tocitem"href="../types/">Types</a></li><li><aclass="tocitem"href="../utils/">Utilities</a></li></ul></li><li><aclass="tocitem"href="../../howToContribute/">How to contribute</a></li></ul><divclass="docs-version-selector field has-addons"><divclass="control"><spanclass="docs-label button is-static is-size-7">Version</span></div><divclass="docs-selector control is-expanded"><divclass="select is-fullwidth is-size-7"><selectid="documenter-version-selector"></select></div></div></div></nav><divclass="docs-main"><headerclass="docs-navbar"><navclass="breadcrumb"><ulclass="is-hidden-mobile"><li><aclass="is-disabled">Types and functions</a></li><liclass="is-active"><ahref>Base functions</a></li></ul><ulclass="is-hidden-tablet"><liclass="is-active"><ahref>Base functions</a></li></ul></nav><divclass="docs-right"><aclass="docs-edit-link"href="https://github.com/lcsb-biocore/COBREXA.jl/blob/master/docs/src/functions/base.md"title="Edit on GitHub"><spanclass="docs-icon fab"></span><spanclass="docs-label is-hidden-touch">Edit on GitHub</span></a><aclass="docs-settings-button fas fa-cog"id="documenter-settings-button"href="#"title="Settings"></a><aclass="docs-sidebar-button fa fa-bars is-hidden-desktop"id="documenter-sidebar-button"href="#"></a></div></header><articleclass="content"id="documenter-page"><h1id="Base-functions"><aclass="docs-heading-anchor"href="#Base-functions">Base functions</a><aid="Base-functions-1"></a><aclass="docs-heading-anchor-permalink"href="#Base-functions"title="Permalink"></a></h1><articleclass="docstring"><header><aclass="docstring-binding"id="COBREXA._constants"href="#COBREXA._constants"><code>COBREXA._constants</code></a> — <spanclass="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><aclass="docs-sourcelink"target="_blank"href="https://github.com/lcsb-biocore/COBREXA.jl/blob/6d0e83c79c7269889049f6bc22eafe09365ddbe2/src/base/constants.jl#L2-L5">source</a></section></article><articleclass="docstring"><header><aclass="docstring-binding"id="COBREXA.flux_dict-Tuple{MetabolicModel, Any}"href="#COBREXA.flux_dict-Tuple{MetabolicModel, Any}"><code>COBREXA.flux_dict</code></a> — <spanclass="docstring-category">Method</span></header><section><div><pre><codeclass="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><codeclass="language-none">flux_dict(model, flux_balance_analysis(model, ...))</code></pre></div><aclass="docs-sourcelink"target="_blank"href="https://github.com/lcsb-biocore/COBREXA.jl/blob/6d0e83c79c7269889049f6bc22eafe09365ddbe2/src/base/solver.jl#L116-L125">source</a></section></article><articleclass="docstring"><header><aclass="docstring-binding"id="COBREXA.flux_dict-Tuple{MetabolicModel}"href="#COBREXA.flux_dict-Tuple{MetabolicModel}"><code>COBREXA.flux_dict</code></a> — <spanclass="docstring-category">Method</span></header><section><div><pre><codeclass="language-julia">flux_dict(model::MetabolicModel)</code></pre><p>A pipeable variant of <code>flux_dict</code>.</p><p><strong>Example</strong></p><pre><codeclass="language-none">flux_balance_analysis(model, ...) |> flux_dict(model)</code></pre></div><aclass="docs-sourcelink"target="_blank"href="https://github.com/lcsb-biocore/COBREXA.jl/blob/6d0e83c79c7269889049f6bc22eafe09365ddbe2/src/base/solver.jl#L130-L139">source</a></section></article><articleclass="docstring"><header><aclass="docstring-binding"id="COBREXA.flux_vector-Tuple{MetabolicModel, Any}"href="#COBREXA.flux_vector-Tuple{MetabolicModel, Any}"><code>COBREXA.flux_vector</code></a> — <spanclass="docstring-category">Method</span></header><section><div><pre><codeclass="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><codeclass="language-none">flux_vector(flux_balance_analysis(model, ...))</code></pre></div><aclass="docs-sourcelink"target="_blank"href="https://github.com/lcsb-biocore/COBREXA.jl/blob/6d0e83c79c7269889049f6bc22eafe09365ddbe2/src/base/solver.jl#L103-L112">source</a></section></article><articleclass="docstring"><header><aclass="docstring-binding"id="COBREXA.get_optmodel_bounds-Tuple{Any}"href="#COBREXA.get_optmodel_bounds-Tuple{Any}"><code>COBREXA.get_optmodel_bounds</code></a> — <spanclass="docstring-category">Method</span></header><section><div><pre><codeclass="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. <ahref="#COBREXA.make_optimization_model-Tuple{MetabolicModel, Any}"><code>make_optimization_model</code></a> or <ahref="../analysis/#COBREXA.flux_balance_analysis-Union{Tuple{M}, Tuple{M, Any}} where M<:MetabolicModel"><code>flux_balance_analysis</code></a>.</p></div><aclass="docs-sourcelink"target="_blank"href="https://github.com/lcsb-biocore/COBREXA.jl/blob/6d0e83c79c7269889049f6bc22eafe09365ddbe2/src/base/solver.jl#L58-L64">source</a></section></article><articleclass="docstring"><header><aclass="docstring-binding"id="COBREXA.is_solved-Tuple{Any}"href="#COBREXA.is_solved-Tuple{Any}"><code>COBREXA.is_solved</code></a> — <spanclass="docstring-category">Method</span></header><section><div><pre><codeclass="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><aclass="docs-sourcelink"target="_blank"href="https://github.com/lcsb-biocore/COBREXA.jl/blob/6d0e83c79c7269889049f6bc22eafe09365ddbe2/src/base/solver.jl#L38-L44">source</a></section></article><articleclass="docstring"><header><aclass="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> — <spanclass="docstring-category">Method</span></header><section><div><pre><codeclass="language-julia">make_optimization_model(
<htmllang="en"><head><metacharset="UTF-8"/><metaname="viewport"content="width=device-width, initial-scale=1.0"/><title>Base functions · COBREXA.jl</title><linkhref="https://fonts.googleapis.com/css?family=Lato|Roboto+Mono"rel="stylesheet"type="text/css"/><linkhref="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.0/css/fontawesome.min.css"rel="stylesheet"type="text/css"/><linkhref="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.0/css/solid.min.css"rel="stylesheet"type="text/css"/><linkhref="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.0/css/brands.min.css"rel="stylesheet"type="text/css"/><linkhref="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><linkclass="docs-theme-link"rel="stylesheet"type="text/css"href="../../assets/themes/documenter-dark.css"data-theme-name="documenter-dark"data-theme-primary-dark/><linkclass="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><linkhref="../../assets/favicon.ico"rel="icon"type="image/x-icon"/></head><body><divid="documenter"><navclass="docs-sidebar"><aclass="docs-logo"href="../../"><imgclass="docs-light-only"src="../../assets/logo.svg"alt="COBREXA.jl logo"/><imgclass="docs-dark-only"src="../../assets/logo-dark.svg"alt="COBREXA.jl logo"/></a><divclass="docs-package-name"><spanclass="docs-autofit">COBREXA.jl</span></div><formclass="docs-search"action="../../search/"><inputclass="docs-search-query"id="documenter-search-query"name="q"type="text"placeholder="Search docs"/></form><ulclass="docs-menu"><li><aclass="tocitem"href="../../">Home</a></li><li><spanclass="tocitem">User guide</span><ul><li><inputclass="collapse-toggle"id="menuitem-2-1"type="checkbox"/><labelclass="tocitem"for="menuitem-2-1"><spanclass="docs-label">Quickstart tutorials</span><iclass="docs-chevron"></i></label><ulclass="collapsed"><li><aclass="tocitem"href="../../tutorials/">All tutorials</a></li><li><aclass="tocitem"href="../../tutorials/1_loading/">Loading and converting model data</a></li><li><aclass="tocitem"href="../../tutorials/2_analysis/">Basic analysis of constraint-based models</a></li><li><aclass="tocitem"href="../../tutorials/3_hpc/">Distributed processing and HPC environments</a></li><li><aclass="tocitem"href="../../tutorials/4_modifying/">Modifying and saving the models</a></li></ul></li><li><inputclass="collapse-toggle"id="menuitem-2-2"type="checkbox"/><labelclass="tocitem"for="menuitem-2-2"><spanclass="docs-label">Advanced tutorials</span><iclass="docs-chevron"></i></label><ulclass="collapsed"><li><aclass="tocitem"href="../../advanced/">All advanced tutorials</a></li><li><aclass="tocitem"href="../../advanced/1_variants/">Exploring many model variants</a></li><li><aclass="tocitem"href="../../advanced/2_custom_model/">Working with custom models</a></li></ul></li><li><inputclass="collapse-toggle"id="menuitem-2-3"type="checkbox"/><labelclass="tocitem"for="menuitem-2-3"><spanclass="docs-label">Examples and notebooks</span><iclass="docs-chevron"></i></label><ulclass="collapsed"><li><aclass="tocitem"href="../../notebooks/">All notebooks</a></li><li><aclass="tocitem"href="../../notebooks/1_loading_converting_saving/">Loading, converting, and saving models</a></li><li><aclass="tocitem"href="../../notebooks/2_finding_balance/">Finding balance and variability of constraint-based models</a></li><li><aclass="tocitem"href="../../notebooks/3_basic_stdmodel_usage/">Basic usage of <code>StandardModel</code></a></li><li><aclass="tocitem"href="../../notebooks/4_basic_core_coupled_usage/">Basic usage of <code>CoreModel</code> and <code>CoreModelCoupled</code></a></li><li><aclass="tocitem"href="../../notebooks/5_basic_stdmodel_construction/">Model construction and modification</a></li><li><aclass="tocitem"href="../../notebooks/6_screening/">Exploring model variants with <code>screen</code></a></li><li><aclass="tocitem"href="../../notebooks/7_community_model/">Building and analysing a small community model</a></li><li><aclass="tocitem"href="../../notebooks/8_custom_model/">Using a custom model data structure</a></li><li><aclass="tocitem"href="../../notebooks/9_max_min_driving_force_analysis/">Maximum-minimum driving force analysis</a></li></ul></li></ul></li><li><spanclass="tocitem">Types and functions</span><ul><li><aclass="tocitem"href="../">Contents</a></li><li><aclass="tocitem"href="../analysis/">Analysis functions</a></li><liclass="is-active"><aclass="tocitem"href>Base functions</a></li><li><aclass="tocitem"href="../io/">Input and output</a></li><li><aclass="tocitem"href="../reconstruction/">Model construction functions</a></li><li><aclass="tocitem"href="../types/">Types</a></li><li><aclass="tocitem"href="../utils/">Utilities</a></li></ul></li><li><aclass="tocitem"href="../../howToContribute/">How to contribute</a></li></ul><divclass="docs-version-selector field has-addons"><divclass="control"><spanclass="docs-label button is-static is-size-7">Version</span></div><divclass="docs-selector control is-expanded"><divclass="select is-fullwidth is-size-7"><selectid="documenter-version-selector"></select></div></div></div></nav><divclass="docs-main"><headerclass="docs-navbar"><navclass="breadcrumb"><ulclass="is-hidden-mobile"><li><aclass="is-disabled">Types and functions</a></li><liclass="is-active"><ahref>Base functions</a></li></ul><ulclass="is-hidden-tablet"><liclass="is-active"><ahref>Base functions</a></li></ul></nav><divclass="docs-right"><aclass="docs-edit-link"href="https://github.com/lcsb-biocore/COBREXA.jl/blob/master/docs/src/functions/base.md"title="Edit on GitHub"><spanclass="docs-icon fab"></span><spanclass="docs-label is-hidden-touch">Edit on GitHub</span></a><aclass="docs-settings-button fas fa-cog"id="documenter-settings-button"href="#"title="Settings"></a><aclass="docs-sidebar-button fa fa-bars is-hidden-desktop"id="documenter-sidebar-button"href="#"></a></div></header><articleclass="content"id="documenter-page"><h1id="Base-functions"><aclass="docs-heading-anchor"href="#Base-functions">Base functions</a><aid="Base-functions-1"></a><aclass="docs-heading-anchor-permalink"href="#Base-functions"title="Permalink"></a></h1><articleclass="docstring"><header><aclass="docstring-binding"id="COBREXA._constants"href="#COBREXA._constants"><code>COBREXA._constants</code></a> — <spanclass="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><aclass="docs-sourcelink"target="_blank"href="https://github.com/lcsb-biocore/COBREXA.jl/blob/77603c3b626a5edd84a1fbd03d11477955788b00/src/base/constants.jl#L2-L5">source</a></section></article><articleclass="docstring"><header><aclass="docstring-binding"id="COBREXA.flux_dict-Tuple{MetabolicModel, Any}"href="#COBREXA.flux_dict-Tuple{MetabolicModel, Any}"><code>COBREXA.flux_dict</code></a> — <spanclass="docstring-category">Method</span></header><section><div><pre><codeclass="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><codeclass="language-none">flux_dict(model, flux_balance_analysis(model, ...))</code></pre></div><aclass="docs-sourcelink"target="_blank"href="https://github.com/lcsb-biocore/COBREXA.jl/blob/77603c3b626a5edd84a1fbd03d11477955788b00/src/base/solver.jl#L116-L125">source</a></section></article><articleclass="docstring"><header><aclass="docstring-binding"id="COBREXA.flux_dict-Tuple{MetabolicModel}"href="#COBREXA.flux_dict-Tuple{MetabolicModel}"><code>COBREXA.flux_dict</code></a> — <spanclass="docstring-category">Method</span></header><section><div><pre><codeclass="language-julia">flux_dict(model::MetabolicModel)</code></pre><p>A pipeable variant of <code>flux_dict</code>.</p><p><strong>Example</strong></p><pre><codeclass="language-none">flux_balance_analysis(model, ...) |> flux_dict(model)</code></pre></div><aclass="docs-sourcelink"target="_blank"href="https://github.com/lcsb-biocore/COBREXA.jl/blob/77603c3b626a5edd84a1fbd03d11477955788b00/src/base/solver.jl#L130-L139">source</a></section></article><articleclass="docstring"><header><aclass="docstring-binding"id="COBREXA.flux_vector-Tuple{MetabolicModel, Any}"href="#COBREXA.flux_vector-Tuple{MetabolicModel, Any}"><code>COBREXA.flux_vector</code></a> — <spanclass="docstring-category">Method</span></header><section><div><pre><codeclass="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><codeclass="language-none">flux_vector(flux_balance_analysis(model, ...))</code></pre></div><aclass="docs-sourcelink"target="_blank"href="https://github.com/lcsb-biocore/COBREXA.jl/blob/77603c3b626a5edd84a1fbd03d11477955788b00/src/base/solver.jl#L103-L112">source</a></section></article><articleclass="docstring"><header><aclass="docstring-binding"id="COBREXA.get_optmodel_bounds-Tuple{Any}"href="#COBREXA.get_optmodel_bounds-Tuple{Any}"><code>COBREXA.get_optmodel_bounds</code></a> — <spanclass="docstring-category">Method</span></header><section><div><pre><codeclass="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. <ahref="#COBREXA.make_optimization_model-Tuple{MetabolicModel, Any}"><code>make_optimization_model</code></a> or <ahref="../analysis/#COBREXA.flux_balance_analysis-Union{Tuple{M}, Tuple{M, Any}} where M<:MetabolicModel"><code>flux_balance_analysis</code></a>.</p></div><aclass="docs-sourcelink"target="_blank"href="https://github.com/lcsb-biocore/COBREXA.jl/blob/77603c3b626a5edd84a1fbd03d11477955788b00/src/base/solver.jl#L58-L64">source</a></section></article><articleclass="docstring"><header><aclass="docstring-binding"id="COBREXA.is_solved-Tuple{Any}"href="#COBREXA.is_solved-Tuple{Any}"><code>COBREXA.is_solved</code></a> — <spanclass="docstring-category">Method</span></header><section><div><pre><codeclass="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><aclass="docs-sourcelink"target="_blank"href="https://github.com/lcsb-biocore/COBREXA.jl/blob/77603c3b626a5edd84a1fbd03d11477955788b00/src/base/solver.jl#L38-L44">source</a></section></article><articleclass="docstring"><header><aclass="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> — <spanclass="docstring-category">Method</span></header><section><div><pre><codeclass="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><aclass="docs-sourcelink"target="_blank"href="https://github.com/lcsb-biocore/COBREXA.jl/blob/6d0e83c79c7269889049f6bc22eafe09365ddbe2/src/base/solver.jl#L2-L13">source</a></section></article><articleclass="docstring"><header><aclass="docstring-binding"id="COBREXA.optimize_objective-Tuple{Any}"href="#COBREXA.optimize_objective-Tuple{Any}"><code>COBREXA.optimize_objective</code></a> — <spanclass="docstring-category">Method</span></header><section><div><pre><codeclass="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><aclass="docs-sourcelink"target="_blank"href="https://github.com/lcsb-biocore/COBREXA.jl/blob/6d0e83c79c7269889049f6bc22eafe09365ddbe2/src/base/solver.jl#L47-L52">source</a></section></article><articleclass="docstring"><header><aclass="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> — <spanclass="docstring-category">Method</span></header><section><div><pre><codeclass="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><aclass="docs-sourcelink"target="_blank"href="https://github.com/lcsb-biocore/COBREXA.jl/blob/77603c3b626a5edd84a1fbd03d11477955788b00/src/base/solver.jl#L2-L13">source</a></section></article><articleclass="docstring"><header><aclass="docstring-binding"id="COBREXA.optimize_objective-Tuple{Any}"href="#COBREXA.optimize_objective-Tuple{Any}"><code>COBREXA.optimize_objective</code></a> — <spanclass="docstring-category">Method</span></header><section><div><pre><codeclass="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><aclass="docs-sourcelink"target="_blank"href="https://github.com/lcsb-biocore/COBREXA.jl/blob/77603c3b626a5edd84a1fbd03d11477955788b00/src/base/solver.jl#L47-L52">source</a></section></article><articleclass="docstring"><header><aclass="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> — <spanclass="docstring-category">Method</span></header><section><div><pre><codeclass="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><aclass="docs-sourcelink"target="_blank"href="https://github.com/lcsb-biocore/COBREXA.jl/blob/6d0e83c79c7269889049f6bc22eafe09365ddbe2/src/base/solver.jl#L70-L79">source</a></section></article><articleclass="docstring"><header><aclass="docstring-binding"id="COBREXA.solved_objective_value-Tuple{Any}"href="#COBREXA.solved_objective_value-Tuple{Any}"><code>COBREXA.solved_objective_value</code></a> — <spanclass="docstring-category">Method</span></header><section><div><pre><codeclass="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><codeclass="language-none">solved_objective_value(flux_balance_analysis(model, ...))</code></pre></div><aclass="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><navclass="docs-footer"><aclass="docs-footer-prevpage"href="../analysis/">« Analysis functions</a><aclass="docs-footer-nextpage"href="../io/">Input and output »</a><divclass="flexbox-break"></div><pclass="footer-message">Powered by <ahref="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <ahref="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><divclass="modal"id="documenter-settings"><divclass="modal-background"></div><divclass="modal-card"><headerclass="modal-card-head"><pclass="modal-card-title">Settings</p><buttonclass="delete"></button></header><sectionclass="modal-card-body"><p><labelclass="label">Theme</label><divclass="select"><selectid="documenter-themepicker"><optionvalue="documenter-light">documenter-light</option><optionvalue="documenter-dark">documenter-dark</option></select></div></p><hr/><p>This document was generated with <ahref="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> on <spanclass="colophon-date"title="Monday 16 May 2022 13:40">Monday 16 May 2022</span>. Using Julia version 1.7.0.</p></section><footerclass="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><aclass="docs-sourcelink"target="_blank"href="https://github.com/lcsb-biocore/COBREXA.jl/blob/77603c3b626a5edd84a1fbd03d11477955788b00/src/base/solver.jl#L70-L79">source</a></section></article><articleclass="docstring"><header><aclass="docstring-binding"id="COBREXA.solved_objective_value-Tuple{Any}"href="#COBREXA.solved_objective_value-Tuple{Any}"><code>COBREXA.solved_objective_value</code></a> — <spanclass="docstring-category">Method</span></header><section><div><pre><codeclass="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><codeclass="language-none">solved_objective_value(flux_balance_analysis(model, ...))</code></pre></div><aclass="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><navclass="docs-footer"><aclass="docs-footer-prevpage"href="../analysis/">« Analysis functions</a><aclass="docs-footer-nextpage"href="../io/">Input and output »</a><divclass="flexbox-break"></div><pclass="footer-message">Powered by <ahref="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <ahref="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><divclass="modal"id="documenter-settings"><divclass="modal-background"></div><divclass="modal-card"><headerclass="modal-card-head"><pclass="modal-card-title">Settings</p><buttonclass="delete"></button></header><sectionclass="modal-card-body"><p><labelclass="label">Theme</label><divclass="select"><selectid="documenter-themepicker"><optionvalue="documenter-light">documenter-light</option><optionvalue="documenter-dark">documenter-dark</option></select></div></p><hr/><p>This document was generated with <ahref="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> on <spanclass="colophon-date"title="Monday 16 May 2022 19:38">Monday 16 May 2022</span>. Using Julia version 1.7.0.</p></section><footerclass="modal-card-foot"></footer></div></div></div></body></html>
<htmllang="en"><head><metacharset="UTF-8"/><metaname="viewport"content="width=device-width, initial-scale=1.0"/><title>Contents · COBREXA.jl</title><linkhref="https://fonts.googleapis.com/css?family=Lato|Roboto+Mono"rel="stylesheet"type="text/css"/><linkhref="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.0/css/fontawesome.min.css"rel="stylesheet"type="text/css"/><linkhref="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.0/css/solid.min.css"rel="stylesheet"type="text/css"/><linkhref="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.0/css/brands.min.css"rel="stylesheet"type="text/css"/><linkhref="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><linkclass="docs-theme-link"rel="stylesheet"type="text/css"href="../assets/themes/documenter-dark.css"data-theme-name="documenter-dark"data-theme-primary-dark/><linkclass="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><linkhref="../assets/favicon.ico"rel="icon"type="image/x-icon"/></head><body><divid="documenter"><navclass="docs-sidebar"><aclass="docs-logo"href="../"><imgclass="docs-light-only"src="../assets/logo.svg"alt="COBREXA.jl logo"/><imgclass="docs-dark-only"src="../assets/logo-dark.svg"alt="COBREXA.jl logo"/></a><divclass="docs-package-name"><spanclass="docs-autofit">COBREXA.jl</span></div><formclass="docs-search"action="../search/"><inputclass="docs-search-query"id="documenter-search-query"name="q"type="text"placeholder="Search docs"/></form><ulclass="docs-menu"><li><aclass="tocitem"href="../">Home</a></li><li><spanclass="tocitem">User guide</span><ul><li><inputclass="collapse-toggle"id="menuitem-2-1"type="checkbox"/><labelclass="tocitem"for="menuitem-2-1"><spanclass="docs-label">Quickstart tutorials</span><iclass="docs-chevron"></i></label><ulclass="collapsed"><li><aclass="tocitem"href="../tutorials/">All tutorials</a></li><li><aclass="tocitem"href="../tutorials/1_loading/">Loading and converting model data</a></li><li><aclass="tocitem"href="../tutorials/2_analysis/">Basic analysis of constraint-based models</a></li><li><aclass="tocitem"href="../tutorials/3_hpc/">Distributed processing and HPC environments</a></li><li><aclass="tocitem"href="../tutorials/4_modifying/">Modifying and saving the models</a></li></ul></li><li><inputclass="collapse-toggle"id="menuitem-2-2"type="checkbox"/><labelclass="tocitem"for="menuitem-2-2"><spanclass="docs-label">Advanced tutorials</span><iclass="docs-chevron"></i></label><ulclass="collapsed"><li><aclass="tocitem"href="../advanced/">All advanced tutorials</a></li><li><aclass="tocitem"href="../advanced/1_variants/">Exploring many model variants</a></li><li><aclass="tocitem"href="../advanced/2_custom_model/">Working with custom models</a></li></ul></li><li><inputclass="collapse-toggle"id="menuitem-2-3"type="checkbox"/><labelclass="tocitem"for="menuitem-2-3"><spanclass="docs-label">Examples and notebooks</span><iclass="docs-chevron"></i></label><ulclass="collapsed"><li><aclass="tocitem"href="../notebooks/">All notebooks</a></li><li><aclass="tocitem"href="../notebooks/1_loading_converting_saving/">Loading, converting, and saving models</a></li><li><aclass="tocitem"href="../notebooks/2_finding_balance/">Finding balance and variability of constraint-based models</a></li><li><aclass="tocitem"href="../notebooks/3_basic_stdmodel_usage/">Basic usage of <code>StandardModel</code></a></li><li><aclass="tocitem"href="../notebooks/4_basic_core_coupled_usage/">Basic usage of <code>CoreModel</code> and <code>CoreModelCoupled</code></a></li><li><aclass="tocitem"href="../notebooks/5_basic_stdmodel_construction/">Model construction and modification</a></li><li><aclass="tocitem"href="../notebooks/6_screening/">Exploring model variants with <code>screen</code></a></li><li><aclass="tocitem"href="../notebooks/7_community_model/">Building and analysing a small community model</a></li><li><aclass="tocitem"href="../notebooks/8_custom_model/">Using a custom model data structure</a></li><li><aclass="tocitem"href="../notebooks/9_max_min_driving_force_analysis/">Maximum-minimum driving force analysis</a></li></ul></li></ul></li><li><spanclass="tocitem">Types and functions</span><ul><liclass="is-active"><aclass="tocitem"href>Contents</a></li><li><aclass="tocitem"href="analysis/">Analysis functions</a></li><li><aclass="tocitem"href="base/">Base functions</a></li><li><aclass="tocitem"href="io/">Input and output</a></li><li><aclass="tocitem"href="reconstruction/">Model construction functions</a></li><li><aclass="tocitem"href="types/">Types</a></li><li><aclass="tocitem"href="utils/">Utilities</a></li></ul></li><li><aclass="tocitem"href="../howToContribute/">How to contribute</a></li></ul><divclass="docs-version-selector field has-addons"><divclass="control"><spanclass="docs-label button is-static is-size-7">Version</span></div><divclass="docs-selector control is-expanded"><divclass="select is-fullwidth is-size-7"><selectid="documenter-version-selector"></select></div></div></div></nav><divclass="docs-main"><headerclass="docs-navbar"><navclass="breadcrumb"><ulclass="is-hidden-mobile"><li><aclass="is-disabled">Types and functions</a></li><liclass="is-active"><ahref>Contents</a></li></ul><ulclass="is-hidden-tablet"><liclass="is-active"><ahref>Contents</a></li></ul></nav><divclass="docs-right"><aclass="docs-edit-link"href="https://github.com/lcsb-biocore/COBREXA.jl/blob/master/docs/src/functions.md"title="Edit on GitHub"><spanclass="docs-icon fab"></span><spanclass="docs-label is-hidden-touch">Edit on GitHub</span></a><aclass="docs-settings-button fas fa-cog"id="documenter-settings-button"href="#"title="Settings"></a><aclass="docs-sidebar-button fa fa-bars is-hidden-desktop"id="documenter-sidebar-button"href="#"></a></div></header><articleclass="content"id="documenter-page"><h1id="Types-and-functions"><aclass="docs-heading-anchor"href="#Types-and-functions">Types and functions</a><aid="Types-and-functions-1"></a><aclass="docs-heading-anchor-permalink"href="#Types-and-functions"title="Permalink"></a></h1><ul><li><ahref="analysis/#Analysis-functions">Analysis functions</a></li><ul><li><ahref="analysis/#Common-analysis-functions">Common analysis functions</a></li><li><ahref="analysis/#Sampling">Sampling</a></li><li><ahref="analysis/#Analysis-modifiers">Analysis modifiers</a></li></ul><li><ahref="base/#Base-functions">Base functions</a></li><li><ahref="io/#Input-and-output">Input and output</a></li><ul><li><ahref="io/#File-I/O-and-serialization">File I/O and serialization</a></li><li><ahref="io/#Pretty-printing">Pretty printing</a></li></ul><li><ahref="reconstruction/#Model-construction-functions">Model construction functions</a></li><ul><li><ahref="reconstruction/#Functions-for-changing-the-models">Functions for changing the models</a></li><li><ahref="reconstruction/#Variant-specifiers">Variant specifiers</a></li></ul><li><ahref="types/#Types">Types</a></li><ul><li><ahref="types/#Base-types">Base types</a></li><li><ahref="types/#Model-types-and-contents">Model types and contents</a></li><li><ahref="types/#Model-type-wrappers">Model type wrappers</a></li></ul><li><ahref="utils/#Utilities">Utilities</a></li><ul><li><ahref="utils/#Helper-functions">Helper functions</a></li><li><ahref="utils/#Macro-generated-functions-and-internal-helpers">Macro-generated functions and internal helpers</a></li><li><ahref="utils/#Logging-and-debugging-helpers">Logging and debugging helpers</a></li></ul></ul></article><navclass="docs-footer"><aclass="docs-footer-prevpage"href="../notebooks/9_max_min_driving_force_analysis/">« Maximum-minimum driving force analysis</a><aclass="docs-footer-nextpage"href="analysis/">Analysis functions »</a><divclass="flexbox-break"></div><pclass="footer-message">Powered by <ahref="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <ahref="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><divclass="modal"id="documenter-settings"><divclass="modal-background"></div><divclass="modal-card"><headerclass="modal-card-head"><pclass="modal-card-title">Settings</p><buttonclass="delete"></button></header><sectionclass="modal-card-body"><p><labelclass="label">Theme</label><divclass="select"><selectid="documenter-themepicker"><optionvalue="documenter-light">documenter-light</option><optionvalue="documenter-dark">documenter-dark</option></select></div></p><hr/><p>This document was generated with <ahref="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> on <spanclass="colophon-date"title="Monday 16 May 2022 13:40">Monday 16 May 2022</span>. Using Julia version 1.7.0.</p></section><footerclass="modal-card-foot"></footer></div></div></div></body></html>
<htmllang="en"><head><metacharset="UTF-8"/><metaname="viewport"content="width=device-width, initial-scale=1.0"/><title>Contents · COBREXA.jl</title><linkhref="https://fonts.googleapis.com/css?family=Lato|Roboto+Mono"rel="stylesheet"type="text/css"/><linkhref="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.0/css/fontawesome.min.css"rel="stylesheet"type="text/css"/><linkhref="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.0/css/solid.min.css"rel="stylesheet"type="text/css"/><linkhref="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.0/css/brands.min.css"rel="stylesheet"type="text/css"/><linkhref="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><linkclass="docs-theme-link"rel="stylesheet"type="text/css"href="../assets/themes/documenter-dark.css"data-theme-name="documenter-dark"data-theme-primary-dark/><linkclass="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><linkhref="../assets/favicon.ico"rel="icon"type="image/x-icon"/></head><body><divid="documenter"><navclass="docs-sidebar"><aclass="docs-logo"href="../"><imgclass="docs-light-only"src="../assets/logo.svg"alt="COBREXA.jl logo"/><imgclass="docs-dark-only"src="../assets/logo-dark.svg"alt="COBREXA.jl logo"/></a><divclass="docs-package-name"><spanclass="docs-autofit">COBREXA.jl</span></div><formclass="docs-search"action="../search/"><inputclass="docs-search-query"id="documenter-search-query"name="q"type="text"placeholder="Search docs"/></form><ulclass="docs-menu"><li><aclass="tocitem"href="../">Home</a></li><li><spanclass="tocitem">User guide</span><ul><li><inputclass="collapse-toggle"id="menuitem-2-1"type="checkbox"/><labelclass="tocitem"for="menuitem-2-1"><spanclass="docs-label">Quickstart tutorials</span><iclass="docs-chevron"></i></label><ulclass="collapsed"><li><aclass="tocitem"href="../tutorials/">All tutorials</a></li><li><aclass="tocitem"href="../tutorials/1_loading/">Loading and converting model data</a></li><li><aclass="tocitem"href="../tutorials/2_analysis/">Basic analysis of constraint-based models</a></li><li><aclass="tocitem"href="../tutorials/3_hpc/">Distributed processing and HPC environments</a></li><li><aclass="tocitem"href="../tutorials/4_modifying/">Modifying and saving the models</a></li></ul></li><li><inputclass="collapse-toggle"id="menuitem-2-2"type="checkbox"/><labelclass="tocitem"for="menuitem-2-2"><spanclass="docs-label">Advanced tutorials</span><iclass="docs-chevron"></i></label><ulclass="collapsed"><li><aclass="tocitem"href="../advanced/">All advanced tutorials</a></li><li><aclass="tocitem"href="../advanced/1_variants/">Exploring many model variants</a></li><li><aclass="tocitem"href="../advanced/2_custom_model/">Working with custom models</a></li></ul></li><li><inputclass="collapse-toggle"id="menuitem-2-3"type="checkbox"/><labelclass="tocitem"for="menuitem-2-3"><spanclass="docs-label">Examples and notebooks</span><iclass="docs-chevron"></i></label><ulclass="collapsed"><li><aclass="tocitem"href="../notebooks/">All notebooks</a></li><li><aclass="tocitem"href="../notebooks/1_loading_converting_saving/">Loading, converting, and saving models</a></li><li><aclass="tocitem"href="../notebooks/2_finding_balance/">Finding balance and variability of constraint-based models</a></li><li><aclass="tocitem"href="../notebooks/3_basic_stdmodel_usage/">Basic usage of <code>StandardModel</code></a></li><li><aclass="tocitem"href="../notebooks/4_basic_core_coupled_usage/">Basic usage of <code>CoreModel</code> and <code>CoreModelCoupled</code></a></li><li><aclass="tocitem"href="../notebooks/5_basic_stdmodel_construction/">Model construction and modification</a></li><li><aclass="tocitem"href="../notebooks/6_screening/">Exploring model variants with <code>screen</code></a></li><li><aclass="tocitem"href="../notebooks/7_community_model/">Building and analysing a small community model</a></li><li><aclass="tocitem"href="../notebooks/8_custom_model/">Using a custom model data structure</a></li><li><aclass="tocitem"href="../notebooks/9_max_min_driving_force_analysis/">Maximum-minimum driving force analysis</a></li></ul></li></ul></li><li><spanclass="tocitem">Types and functions</span><ul><liclass="is-active"><aclass="tocitem"href>Contents</a></li><li><aclass="tocitem"href="analysis/">Analysis functions</a></li><li><aclass="tocitem"href="base/">Base functions</a></li><li><aclass="tocitem"href="io/">Input and output</a></li><li><aclass="tocitem"href="reconstruction/">Model construction functions</a></li><li><aclass="tocitem"href="types/">Types</a></li><li><aclass="tocitem"href="utils/">Utilities</a></li></ul></li><li><aclass="tocitem"href="../howToContribute/">How to contribute</a></li></ul><divclass="docs-version-selector field has-addons"><divclass="control"><spanclass="docs-label button is-static is-size-7">Version</span></div><divclass="docs-selector control is-expanded"><divclass="select is-fullwidth is-size-7"><selectid="documenter-version-selector"></select></div></div></div></nav><divclass="docs-main"><headerclass="docs-navbar"><navclass="breadcrumb"><ulclass="is-hidden-mobile"><li><aclass="is-disabled">Types and functions</a></li><liclass="is-active"><ahref>Contents</a></li></ul><ulclass="is-hidden-tablet"><liclass="is-active"><ahref>Contents</a></li></ul></nav><divclass="docs-right"><aclass="docs-edit-link"href="https://github.com/lcsb-biocore/COBREXA.jl/blob/master/docs/src/functions.md"title="Edit on GitHub"><spanclass="docs-icon fab"></span><spanclass="docs-label is-hidden-touch">Edit on GitHub</span></a><aclass="docs-settings-button fas fa-cog"id="documenter-settings-button"href="#"title="Settings"></a><aclass="docs-sidebar-button fa fa-bars is-hidden-desktop"id="documenter-sidebar-button"href="#"></a></div></header><articleclass="content"id="documenter-page"><h1id="Types-and-functions"><aclass="docs-heading-anchor"href="#Types-and-functions">Types and functions</a><aid="Types-and-functions-1"></a><aclass="docs-heading-anchor-permalink"href="#Types-and-functions"title="Permalink"></a></h1><ul><li><ahref="analysis/#Analysis-functions">Analysis functions</a></li><ul><li><ahref="analysis/#Common-analysis-functions">Common analysis functions</a></li><li><ahref="analysis/#Sampling">Sampling</a></li><li><ahref="analysis/#Analysis-modifiers">Analysis modifiers</a></li></ul><li><ahref="base/#Base-functions">Base functions</a></li><li><ahref="io/#Input-and-output">Input and output</a></li><ul><li><ahref="io/#File-I/O-and-serialization">File I/O and serialization</a></li><li><ahref="io/#Pretty-printing">Pretty printing</a></li></ul><li><ahref="reconstruction/#Model-construction-functions">Model construction functions</a></li><ul><li><ahref="reconstruction/#Functions-for-changing-the-models">Functions for changing the models</a></li><li><ahref="reconstruction/#Variant-specifiers">Variant specifiers</a></li></ul><li><ahref="types/#Types">Types</a></li><ul><li><ahref="types/#Base-types">Base types</a></li><li><ahref="types/#Model-types-and-contents">Model types and contents</a></li><li><ahref="types/#Model-type-wrappers">Model type wrappers</a></li></ul><li><ahref="utils/#Utilities">Utilities</a></li><ul><li><ahref="utils/#Helper-functions">Helper functions</a></li><li><ahref="utils/#Macro-generated-functions-and-internal-helpers">Macro-generated functions and internal helpers</a></li><li><ahref="utils/#Logging-and-debugging-helpers">Logging and debugging helpers</a></li></ul></ul></article><navclass="docs-footer"><aclass="docs-footer-prevpage"href="../notebooks/9_max_min_driving_force_analysis/">« Maximum-minimum driving force analysis</a><aclass="docs-footer-nextpage"href="analysis/">Analysis functions »</a><divclass="flexbox-break"></div><pclass="footer-message">Powered by <ahref="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <ahref="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><divclass="modal"id="documenter-settings"><divclass="modal-background"></div><divclass="modal-card"><headerclass="modal-card-head"><pclass="modal-card-title">Settings</p><buttonclass="delete"></button></header><sectionclass="modal-card-body"><p><labelclass="label">Theme</label><divclass="select"><selectid="documenter-themepicker"><optionvalue="documenter-light">documenter-light</option><optionvalue="documenter-dark">documenter-dark</option></select></div></p><hr/><p>This document was generated with <ahref="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> on <spanclass="colophon-date"title="Monday 16 May 2022 19:38">Monday 16 May 2022</span>. Using Julia version 1.7.0.</p></section><footerclass="modal-card-foot"></footer></div></div></div></body></html>
<htmllang="en"><head><metacharset="UTF-8"/><metaname="viewport"content="width=device-width, initial-scale=1.0"/><title>Input and output · COBREXA.jl</title><linkhref="https://fonts.googleapis.com/css?family=Lato|Roboto+Mono"rel="stylesheet"type="text/css"/><linkhref="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.0/css/fontawesome.min.css"rel="stylesheet"type="text/css"/><linkhref="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.0/css/solid.min.css"rel="stylesheet"type="text/css"/><linkhref="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.0/css/brands.min.css"rel="stylesheet"type="text/css"/><linkhref="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><linkclass="docs-theme-link"rel="stylesheet"type="text/css"href="../../assets/themes/documenter-dark.css"data-theme-name="documenter-dark"data-theme-primary-dark/><linkclass="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><linkhref="../../assets/favicon.ico"rel="icon"type="image/x-icon"/></head><body><divid="documenter"><navclass="docs-sidebar"><aclass="docs-logo"href="../../"><imgclass="docs-light-only"src="../../assets/logo.svg"alt="COBREXA.jl logo"/><imgclass="docs-dark-only"src="../../assets/logo-dark.svg"alt="COBREXA.jl logo"/></a><divclass="docs-package-name"><spanclass="docs-autofit">COBREXA.jl</span></div><formclass="docs-search"action="../../search/"><inputclass="docs-search-query"id="documenter-search-query"name="q"type="text"placeholder="Search docs"/></form><ulclass="docs-menu"><li><aclass="tocitem"href="../../">Home</a></li><li><spanclass="tocitem">User guide</span><ul><li><inputclass="collapse-toggle"id="menuitem-2-1"type="checkbox"/><labelclass="tocitem"for="menuitem-2-1"><spanclass="docs-label">Quickstart tutorials</span><iclass="docs-chevron"></i></label><ulclass="collapsed"><li><aclass="tocitem"href="../../tutorials/">All tutorials</a></li><li><aclass="tocitem"href="../../tutorials/1_loading/">Loading and converting model data</a></li><li><aclass="tocitem"href="../../tutorials/2_analysis/">Basic analysis of constraint-based models</a></li><li><aclass="tocitem"href="../../tutorials/3_hpc/">Distributed processing and HPC environments</a></li><li><aclass="tocitem"href="../../tutorials/4_modifying/">Modifying and saving the models</a></li></ul></li><li><inputclass="collapse-toggle"id="menuitem-2-2"type="checkbox"/><labelclass="tocitem"for="menuitem-2-2"><spanclass="docs-label">Advanced tutorials</span><iclass="docs-chevron"></i></label><ulclass="collapsed"><li><aclass="tocitem"href="../../advanced/">All advanced tutorials</a></li><li><aclass="tocitem"href="../../advanced/1_variants/">Exploring many model variants</a></li><li><aclass="tocitem"href="../../advanced/2_custom_model/">Working with custom models</a></li></ul></li><li><inputclass="collapse-toggle"id="menuitem-2-3"type="checkbox"/><labelclass="tocitem"for="menuitem-2-3"><spanclass="docs-label">Examples and notebooks</span><iclass="docs-chevron"></i></label><ulclass="collapsed"><li><aclass="tocitem"href="../../notebooks/">All notebooks</a></li><li><aclass="tocitem"href="../../notebooks/1_loading_converting_saving/">Loading, converting, and saving models</a></li><li><aclass="tocitem"href="../../notebooks/2_finding_balance/">Finding balance and variability of constraint-based models</a></li><li><aclass="tocitem"href="../../notebooks/3_basic_stdmodel_usage/">Basic usage of <code>StandardModel</code></a></li><li><aclass="tocitem"href="../../notebooks/4_basic_core_coupled_usage/">Basic usage of <code>CoreModel</code> and <code>CoreModelCoupled</code></a></li><li><aclass="tocitem"href="../../notebooks/5_basic_stdmodel_construction/">Model construction and modification</a></li><li><aclass="tocitem"href="../../notebooks/6_screening/">Exploring model variants with <code>screen</code></a></li><li><aclass="tocitem"href="../../notebooks/7_community_model/">Building and analysing a small community model</a></li><li><aclass="tocitem"href="../../notebooks/8_custom_model/">Using a custom model data structure</a></li><li><aclass="tocitem"href="../../notebooks/9_max_min_driving_force_analysis/">Maximum-minimum driving force analysis</a></li></ul></li></ul></li><li><spanclass="tocitem">Types and functions</span><ul><li><aclass="tocitem"href="../">Contents</a></li><li><aclass="tocitem"href="../analysis/">Analysis functions</a></li><li><aclass="tocitem"href="../base/">Base functions</a></li><liclass="is-active"><aclass="tocitem"href>Input and output</a><ulclass="internal"><li><aclass="tocitem"href="#File-I/O-and-serialization"><span>File I/O and serialization</span></a></li><li><aclass="tocitem"href="#Pretty-printing"><span>Pretty printing</span></a></li></ul></li><li><aclass="tocitem"href="../reconstruction/">Model construction functions</a></li><li><aclass="tocitem"href="../types/">Types</a></li><li><aclass="tocitem"href="../utils/">Utilities</a></li></ul></li><li><aclass="tocitem"href="../../howToContribute/">How to contribute</a></li></ul><divclass="docs-version-selector field has-addons"><divclass="control"><spanclass="docs-label button is-static is-size-7">Version</span></div><divclass="docs-selector control is-expanded"><divclass="select is-fullwidth is-size-7"><selectid="documenter-version-selector"></select></div></div></div></nav><divclass="docs-main"><headerclass="docs-navbar"><navclass="breadcrumb"><ulclass="is-hidden-mobile"><li><aclass="is-disabled">Types and functions</a></li><liclass="is-active"><ahref>Input and output</a></li></ul><ulclass="is-hidden-tablet"><liclass="is-active"><ahref>Input and output</a></li></ul></nav><divclass="docs-right"><aclass="docs-edit-link"href="https://github.com/lcsb-biocore/COBREXA.jl/blob/master/docs/src/functions/io.md"title="Edit on GitHub"><spanclass="docs-icon fab"></span><spanclass="docs-label is-hidden-touch">Edit on GitHub</span></a><aclass="docs-settings-button fas fa-cog"id="documenter-settings-button"href="#"title="Settings"></a><aclass="docs-sidebar-button fa fa-bars is-hidden-desktop"id="documenter-sidebar-button"href="#"></a></div></header><articleclass="content"id="documenter-page"><h1id="Input-and-output"><aclass="docs-heading-anchor"href="#Input-and-output">Input and output</a><aid="Input-and-output-1"></a><aclass="docs-heading-anchor-permalink"href="#Input-and-output"title="Permalink"></a></h1><h2id="File-I/O-and-serialization"><aclass="docs-heading-anchor"href="#File-I/O-and-serialization">File I/O and serialization</a><aid="File-I/O-and-serialization-1"></a><aclass="docs-heading-anchor-permalink"href="#File-I/O-and-serialization"title="Permalink"></a></h2><articleclass="docstring"><header><aclass="docstring-binding"id="COBREXA.load_model-Tuple{String}"href="#COBREXA.load_model-Tuple{String}"><code>COBREXA.load_model</code></a> — <spanclass="docstring-category">Method</span></header><section><div><pre><codeclass="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 <ahref="#COBREXA.load_sbml_model-Tuple{String}"><code>load_sbml_model</code></a>)</li><li>JSON models (<code>*.json</code>, loaded with <ahref="#COBREXA.load_json_model-Tuple{String}"><code>load_json_model</code></a>)</li><li>MATLAB models (<code>*.mat</code>, loaded with <ahref="#COBREXA.load_mat_model-Tuple{String}"><code>load_mat_model</code></a>)</li></ul></div><aclass="docs-sourcelink"target="_blank"href="https://github.com/lcsb-biocore/COBREXA.jl/blob/6d0e83c79c7269889049f6bc22eafe09365ddbe2/src/io/io.jl#L2-L13">source</a></section></article><articleclass="docstring"><header><aclass="docstring-binding"id="COBREXA.load_model-Union{Tuple{T}, Tuple{Type{T}, String}} where T<:MetabolicModel"href="#COBREXA.load_model-Union{Tuple{T}, Tuple{Type{T}, String}} where T<:MetabolicModel"><code>COBREXA.load_model</code></a> — <spanclass="docstring-category">Method</span></header><section><div><pre><codeclass="language-julia">load_model(type::Type{T}, file_name::String)::T where T</code></pre><p>Helper function tht loads the model using <ahref="#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><codeclass="language-none">load_model(CoreModel, "mySBMLModel.xml")</code></pre></div><aclass="docs-sourcelink"target="_blank"href="https://github.com/lcsb-biocore/COBREXA.jl/blob/6d0e83c79c7269889049f6bc22eafe09365ddbe2/src/io/io.jl#L27-L36">source</a></section></article><articleclass="docstring"><header><aclass="docstring-binding"id="COBREXA.save_model-Tuple{MetabolicModel, String}"href="#COBREXA.save_model-Tuple{MetabolicModel, String}"><code>COBREXA.save_model</code></a> — <spanclass="docstring-category">Method</span></header><section><div><pre><codeclass="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 <ahref="#COBREXA.save_json_model-Tuple{MetabolicModel, String}"><code>save_json_model</code></a>)</li><li>MATLAB models (<code>*.mat</code>, loaded with <ahref="#COBREXA.save_mat_model-Tuple{MetabolicModel, String}"><code>save_mat_model</code></a>)</li></ul></div><aclass="docs-sourcelink"target="_blank"href="https://github.com/lcsb-biocore/COBREXA.jl/blob/6d0e83c79c7269889049f6bc22eafe09365ddbe2/src/io/io.jl#L41-L51">source</a></section></article><articleclass="docstring"><header><aclass="docstring-binding"id="COBREXA.load_json_model-Tuple{String}"href="#COBREXA.load_json_model-Tuple{String}"><code>COBREXA.load_json_model</code></a> — <spanclass="docstring-category">Method</span></header><section><div><pre><codeclass="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><aclass="docs-sourcelink"target="_blank"href="https://github.com/lcsb-biocore/COBREXA.jl/blob/6d0e83c79c7269889049f6bc22eafe09365ddbe2/src/io/json.jl#L1-L5">source</a></section></article><articleclass="docstring"><header><aclass="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> — <spanclass="docstring-category">Method</span></header><section><div><pre><codeclass="language-julia">save_json_model(model::MetabolicModel, file_name::String)</code></pre><p>Save a <ahref="../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><aclass="docs-sourcelink"target="_blank"href="https://github.com/lcsb-biocore/COBREXA.jl/blob/6d0e83c79c7269889049f6bc22eafe09365ddbe2/src/io/json.jl#L10-L16">source</a></section></article><articleclass="docstring"><header><aclass="docstring-binding"id="COBREXA.load_mat_model-Tuple{String}"href="#COBREXA.load_mat_model-Tuple{String}"><code>COBREXA.load_mat_model</code></a> — <spanclass="docstring-category">Method</span></header><section><div><pre><codeclass="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><aclass="docs-sourcelink"target="_blank"href="https://github.com/lcsb-biocore/COBREXA.jl/blob/6d0e83c79c7269889049f6bc22eafe09365ddbe2/src/io/mat.jl#L2-L7">source</a></section></article><articleclass="docstring"><header><aclass="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> — <spanclass="docstring-category">Method</span></header><section><div><pre><codeclass="language-julia">save_mat_model(model::MetabolicModel, file_name::String; model_name::String="model")</code></pre><p>Save a <ahref="../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 "model".</p></div><aclass="docs-sourcelink"target="_blank"href="https://github.com/lcsb-biocore/COBREXA.jl/blob/6d0e83c79c7269889049f6bc22eafe09365ddbe2/src/io/mat.jl#L14-L24">source</a></section></article><articleclass="docstring"><header><aclass="docstring-binding"id="COBREXA.load_sbml_model-Tuple{String}"href="#COBREXA.load_sbml_model-Tuple{String}"><code>COBREXA.load_sbml_model</code></a> — <spanclass="docstring-category">Method</span></header><section><div><pre><codeclass="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><aclass="docs-sourcelink"target="_blank"href="https://github.com/lcsb-biocore/COBREXA.jl/blob/6d0e83c79c7269889049f6bc22eafe09365ddbe2/src/io/sbml.jl#L2-L6">source</a></section></article><h2id="Pretty-printing"><aclass="docs-heading-anchor"href="#Pretty-printing">Pretty printing</a><aid="Pretty-printing-1"></a><aclass="docs-heading-anchor-permalink"href="#Pretty-printing"title="Permalink"></a></h2><articleclass="docstring"><header><aclass="docstring-binding"id="Base.show-Tuple{IO, MIME{Symbol("text/plain")}, MetabolicModel}"href="#Base.show-Tuple{IO, MIME{Symbol("text/plain")}, MetabolicModel}"><code>Base.show</code></a> — <spanclass="docstring-category">Method</span></header><section><div><p>Pretty printing of everything metabolic-modelish.</p></div><aclass="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><articleclass="docstring"><header><aclass="docstring-binding"id="COBREXA._pretty_substances-Tuple{Vector{String}}"href="#COBREXA._pretty_substances-Tuple{Vector{String}}"><code>COBREXA._pretty_substances</code></a> — <spanclass="docstring-category">Method</span></header><section><div><pre><codeclass="language-julia">_pretty_substances(ss::Vector{String})::String</code></pre><p>Nicely format a substance list.</p></div><aclass="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><articleclass="docstring"><header><aclass="docstring-binding"id="Base.show-Union{Tuple{M}, Tuple{IO, MIME{Symbol("text/plain")}, Serialized{M}}} where M"href="#Base.show-Union{Tuple{M}, Tuple{IO, MIME{Symbol("text/plain")}, Serialized{M}}} where M"><code>Base.show</code></a> — <spanclass="docstring-category">Method</span></header><section><div><pre><codeclass="language-julia">Base.show(io::IO, ::MIME"text/plain", m::Serialized{M}) where {M}</code></pre><p>Show the <ahref="../types/#COBREXA.Serialized"><code>Serialized</code></a> model without unnecessarily loading it.</p></div><aclass="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><articleclass="docstring"><header><aclass="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> — <spanclass="docstring-category">Method</span></header><section><div><pre><codeclass="language-julia">_pretty_print_keyvals(io, def::String, payload; kwargs...)</code></pre><p>Nicely prints keys and values.</p></div><aclass="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><articleclass="docstring"><header><aclass="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> — <spanclass="docstring-category">Method</span></header><section><div><pre><codeclass="language-julia">_pretty_print_keyvals(
<htmllang="en"><head><metacharset="UTF-8"/><metaname="viewport"content="width=device-width, initial-scale=1.0"/><title>Input and output · COBREXA.jl</title><linkhref="https://fonts.googleapis.com/css?family=Lato|Roboto+Mono"rel="stylesheet"type="text/css"/><linkhref="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.0/css/fontawesome.min.css"rel="stylesheet"type="text/css"/><linkhref="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.0/css/solid.min.css"rel="stylesheet"type="text/css"/><linkhref="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.0/css/brands.min.css"rel="stylesheet"type="text/css"/><linkhref="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><linkclass="docs-theme-link"rel="stylesheet"type="text/css"href="../../assets/themes/documenter-dark.css"data-theme-name="documenter-dark"data-theme-primary-dark/><linkclass="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><linkhref="../../assets/favicon.ico"rel="icon"type="image/x-icon"/></head><body><divid="documenter"><navclass="docs-sidebar"><aclass="docs-logo"href="../../"><imgclass="docs-light-only"src="../../assets/logo.svg"alt="COBREXA.jl logo"/><imgclass="docs-dark-only"src="../../assets/logo-dark.svg"alt="COBREXA.jl logo"/></a><divclass="docs-package-name"><spanclass="docs-autofit">COBREXA.jl</span></div><formclass="docs-search"action="../../search/"><inputclass="docs-search-query"id="documenter-search-query"name="q"type="text"placeholder="Search docs"/></form><ulclass="docs-menu"><li><aclass="tocitem"href="../../">Home</a></li><li><spanclass="tocitem">User guide</span><ul><li><inputclass="collapse-toggle"id="menuitem-2-1"type="checkbox"/><labelclass="tocitem"for="menuitem-2-1"><spanclass="docs-label">Quickstart tutorials</span><iclass="docs-chevron"></i></label><ulclass="collapsed"><li><aclass="tocitem"href="../../tutorials/">All tutorials</a></li><li><aclass="tocitem"href="../../tutorials/1_loading/">Loading and converting model data</a></li><li><aclass="tocitem"href="../../tutorials/2_analysis/">Basic analysis of constraint-based models</a></li><li><aclass="tocitem"href="../../tutorials/3_hpc/">Distributed processing and HPC environments</a></li><li><aclass="tocitem"href="../../tutorials/4_modifying/">Modifying and saving the models</a></li></ul></li><li><inputclass="collapse-toggle"id="menuitem-2-2"type="checkbox"/><labelclass="tocitem"for="menuitem-2-2"><spanclass="docs-label">Advanced tutorials</span><iclass="docs-chevron"></i></label><ulclass="collapsed"><li><aclass="tocitem"href="../../advanced/">All advanced tutorials</a></li><li><aclass="tocitem"href="../../advanced/1_variants/">Exploring many model variants</a></li><li><aclass="tocitem"href="../../advanced/2_custom_model/">Working with custom models</a></li></ul></li><li><inputclass="collapse-toggle"id="menuitem-2-3"type="checkbox"/><labelclass="tocitem"for="menuitem-2-3"><spanclass="docs-label">Examples and notebooks</span><iclass="docs-chevron"></i></label><ulclass="collapsed"><li><aclass="tocitem"href="../../notebooks/">All notebooks</a></li><li><aclass="tocitem"href="../../notebooks/1_loading_converting_saving/">Loading, converting, and saving models</a></li><li><aclass="tocitem"href="../../notebooks/2_finding_balance/">Finding balance and variability of constraint-based models</a></li><li><aclass="tocitem"href="../../notebooks/3_basic_stdmodel_usage/">Basic usage of <code>StandardModel</code></a></li><li><aclass="tocitem"href="../../notebooks/4_basic_core_coupled_usage/">Basic usage of <code>CoreModel</code> and <code>CoreModelCoupled</code></a></li><li><aclass="tocitem"href="../../notebooks/5_basic_stdmodel_construction/">Model construction and modification</a></li><li><aclass="tocitem"href="../../notebooks/6_screening/">Exploring model variants with <code>screen</code></a></li><li><aclass="tocitem"href="../../notebooks/7_community_model/">Building and analysing a small community model</a></li><li><aclass="tocitem"href="../../notebooks/8_custom_model/">Using a custom model data structure</a></li><li><aclass="tocitem"href="../../notebooks/9_max_min_driving_force_analysis/">Maximum-minimum driving force analysis</a></li></ul></li></ul></li><li><spanclass="tocitem">Types and functions</span><ul><li><aclass="tocitem"href="../">Contents</a></li><li><aclass="tocitem"href="../analysis/">Analysis functions</a></li><li><aclass="tocitem"href="../base/">Base functions</a></li><liclass="is-active"><aclass="tocitem"href>Input and output</a><ulclass="internal"><li><aclass="tocitem"href="#File-I/O-and-serialization"><span>File I/O and serialization</span></a></li><li><aclass="tocitem"href="#Pretty-printing"><span>Pretty printing</span></a></li></ul></li><li><aclass="tocitem"href="../reconstruction/">Model construction functions</a></li><li><aclass="tocitem"href="../types/">Types</a></li><li><aclass="tocitem"href="../utils/">Utilities</a></li></ul></li><li><aclass="tocitem"href="../../howToContribute/">How to contribute</a></li></ul><divclass="docs-version-selector field has-addons"><divclass="control"><spanclass="docs-label button is-static is-size-7">Version</span></div><divclass="docs-selector control is-expanded"><divclass="select is-fullwidth is-size-7"><selectid="documenter-version-selector"></select></div></div></div></nav><divclass="docs-main"><headerclass="docs-navbar"><navclass="breadcrumb"><ulclass="is-hidden-mobile"><li><aclass="is-disabled">Types and functions</a></li><liclass="is-active"><ahref>Input and output</a></li></ul><ulclass="is-hidden-tablet"><liclass="is-active"><ahref>Input and output</a></li></ul></nav><divclass="docs-right"><aclass="docs-edit-link"href="https://github.com/lcsb-biocore/COBREXA.jl/blob/master/docs/src/functions/io.md"title="Edit on GitHub"><spanclass="docs-icon fab"></span><spanclass="docs-label is-hidden-touch">Edit on GitHub</span></a><aclass="docs-settings-button fas fa-cog"id="documenter-settings-button"href="#"title="Settings"></a><aclass="docs-sidebar-button fa fa-bars is-hidden-desktop"id="documenter-sidebar-button"href="#"></a></div></header><articleclass="content"id="documenter-page"><h1id="Input-and-output"><aclass="docs-heading-anchor"href="#Input-and-output">Input and output</a><aid="Input-and-output-1"></a><aclass="docs-heading-anchor-permalink"href="#Input-and-output"title="Permalink"></a></h1><h2id="File-I/O-and-serialization"><aclass="docs-heading-anchor"href="#File-I/O-and-serialization">File I/O and serialization</a><aid="File-I/O-and-serialization-1"></a><aclass="docs-heading-anchor-permalink"href="#File-I/O-and-serialization"title="Permalink"></a></h2><articleclass="docstring"><header><aclass="docstring-binding"id="COBREXA.load_model-Tuple{String}"href="#COBREXA.load_model-Tuple{String}"><code>COBREXA.load_model</code></a> — <spanclass="docstring-category">Method</span></header><section><div><pre><codeclass="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 <ahref="#COBREXA.load_sbml_model-Tuple{String}"><code>load_sbml_model</code></a>)</li><li>JSON models (<code>*.json</code>, loaded with <ahref="#COBREXA.load_json_model-Tuple{String}"><code>load_json_model</code></a>)</li><li>MATLAB models (<code>*.mat</code>, loaded with <ahref="#COBREXA.load_mat_model-Tuple{String}"><code>load_mat_model</code></a>)</li></ul></div><aclass="docs-sourcelink"target="_blank"href="https://github.com/lcsb-biocore/COBREXA.jl/blob/77603c3b626a5edd84a1fbd03d11477955788b00/src/io/io.jl#L2-L13">source</a></section></article><articleclass="docstring"><header><aclass="docstring-binding"id="COBREXA.load_model-Union{Tuple{T}, Tuple{Type{T}, String}} where T<:MetabolicModel"href="#COBREXA.load_model-Union{Tuple{T}, Tuple{Type{T}, String}} where T<:MetabolicModel"><code>COBREXA.load_model</code></a> — <spanclass="docstring-category">Method</span></header><section><div><pre><codeclass="language-julia">load_model(type::Type{T}, file_name::String)::T where T</code></pre><p>Helper function tht loads the model using <ahref="#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><codeclass="language-none">load_model(CoreModel, "mySBMLModel.xml")</code></pre></div><aclass="docs-sourcelink"target="_blank"href="https://github.com/lcsb-biocore/COBREXA.jl/blob/77603c3b626a5edd84a1fbd03d11477955788b00/src/io/io.jl#L27-L36">source</a></section></article><articleclass="docstring"><header><aclass="docstring-binding"id="COBREXA.save_model-Tuple{MetabolicModel, String}"href="#COBREXA.save_model-Tuple{MetabolicModel, String}"><code>COBREXA.save_model</code></a> — <spanclass="docstring-category">Method</span></header><section><div><pre><codeclass="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 <ahref="#COBREXA.save_json_model-Tuple{MetabolicModel, String}"><code>save_json_model</code></a>)</li><li>MATLAB models (<code>*.mat</code>, loaded with <ahref="#COBREXA.save_mat_model-Tuple{MetabolicModel, String}"><code>save_mat_model</code></a>)</li></ul></div><aclass="docs-sourcelink"target="_blank"href="https://github.com/lcsb-biocore/COBREXA.jl/blob/77603c3b626a5edd84a1fbd03d11477955788b00/src/io/io.jl#L41-L51">source</a></section></article><articleclass="docstring"><header><aclass="docstring-binding"id="COBREXA.load_json_model-Tuple{String}"href="#COBREXA.load_json_model-Tuple{String}"><code>COBREXA.load_json_model</code></a> — <spanclass="docstring-category">Method</span></header><section><div><pre><codeclass="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><aclass="docs-sourcelink"target="_blank"href="https://github.com/lcsb-biocore/COBREXA.jl/blob/77603c3b626a5edd84a1fbd03d11477955788b00/src/io/json.jl#L1-L5">source</a></section></article><articleclass="docstring"><header><aclass="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> — <spanclass="docstring-category">Method</span></header><section><div><pre><codeclass="language-julia">save_json_model(model::MetabolicModel, file_name::String)</code></pre><p>Save a <ahref="../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><aclass="docs-sourcelink"target="_blank"href="https://github.com/lcsb-biocore/COBREXA.jl/blob/77603c3b626a5edd84a1fbd03d11477955788b00/src/io/json.jl#L10-L16">source</a></section></article><articleclass="docstring"><header><aclass="docstring-binding"id="COBREXA.load_mat_model-Tuple{String}"href="#COBREXA.load_mat_model-Tuple{String}"><code>COBREXA.load_mat_model</code></a> — <spanclass="docstring-category">Method</span></header><section><div><pre><codeclass="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><aclass="docs-sourcelink"target="_blank"href="https://github.com/lcsb-biocore/COBREXA.jl/blob/77603c3b626a5edd84a1fbd03d11477955788b00/src/io/mat.jl#L2-L7">source</a></section></article><articleclass="docstring"><header><aclass="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> — <spanclass="docstring-category">Method</span></header><section><div><pre><codeclass="language-julia">save_mat_model(model::MetabolicModel, file_name::String; model_name::String="model")</code></pre><p>Save a <ahref="../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 "model".</p></div><aclass="docs-sourcelink"target="_blank"href="https://github.com/lcsb-biocore/COBREXA.jl/blob/77603c3b626a5edd84a1fbd03d11477955788b00/src/io/mat.jl#L14-L24">source</a></section></article><articleclass="docstring"><header><aclass="docstring-binding"id="COBREXA.load_sbml_model-Tuple{String}"href="#COBREXA.load_sbml_model-Tuple{String}"><code>COBREXA.load_sbml_model</code></a> — <spanclass="docstring-category">Method</span></header><section><div><pre><codeclass="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><aclass="docs-sourcelink"target="_blank"href="https://github.com/lcsb-biocore/COBREXA.jl/blob/77603c3b626a5edd84a1fbd03d11477955788b00/src/io/sbml.jl#L2-L6">source</a></section></article><h2id="Pretty-printing"><aclass="docs-heading-anchor"href="#Pretty-printing">Pretty printing</a><aid="Pretty-printing-1"></a><aclass="docs-heading-anchor-permalink"href="#Pretty-printing"title="Permalink"></a></h2><articleclass="docstring"><header><aclass="docstring-binding"id="Base.show-Tuple{IO, MIME{Symbol("text/plain")}, MetabolicModel}"href="#Base.show-Tuple{IO, MIME{Symbol("text/plain")}, MetabolicModel}"><code>Base.show</code></a> — <spanclass="docstring-category">Method</span></header><section><div><p>Pretty printing of everything metabolic-modelish.</p></div><aclass="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><articleclass="docstring"><header><aclass="docstring-binding"id="COBREXA._pretty_substances-Tuple{Vector{String}}"href="#COBREXA._pretty_substances-Tuple{Vector{String}}"><code>COBREXA._pretty_substances</code></a> — <spanclass="docstring-category">Method</span></header><section><div><pre><codeclass="language-julia">_pretty_substances(ss::Vector{String})::String</code></pre><p>Nicely format a substance list.</p></div><aclass="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><articleclass="docstring"><header><aclass="docstring-binding"id="Base.show-Union{Tuple{M}, Tuple{IO, MIME{Symbol("text/plain")}, Serialized{M}}} where M"href="#Base.show-Union{Tuple{M}, Tuple{IO, MIME{Symbol("text/plain")}, Serialized{M}}} where M"><code>Base.show</code></a> — <spanclass="docstring-category">Method</span></header><section><div><pre><codeclass="language-julia">Base.show(io::IO, ::MIME"text/plain", m::Serialized{M}) where {M}</code></pre><p>Show the <ahref="../types/#COBREXA.Serialized"><code>Serialized</code></a> model without unnecessarily loading it.</p></div><aclass="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><articleclass="docstring"><header><aclass="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> — <spanclass="docstring-category">Method</span></header><section><div><pre><codeclass="language-julia">_pretty_print_keyvals(io, def::String, payload; kwargs...)</code></pre><p>Nicely prints keys and values.</p></div><aclass="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><articleclass="docstring"><header><aclass="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> — <spanclass="docstring-category">Method</span></header><section><div><pre><codeclass="language-julia">_pretty_print_keyvals(
io,
def::String,
payload::Dict
)</code></pre><p>Specialization of <code>_pretty_print_keyvals</code> for dictionaries.</p></div><aclass="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><articleclass="docstring"><header><aclass="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> — <spanclass="docstring-category">Method</span></header><section><div><pre><codeclass="language-julia">_pretty_print_keyvals(
)</code></pre><p>Specialization of <code>_pretty_print_keyvals</code> for dictionaries.</p></div><aclass="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><articleclass="docstring"><header><aclass="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> — <spanclass="docstring-category">Method</span></header><section><div><pre><codeclass="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><aclass="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><navclass="docs-footer"><aclass="docs-footer-prevpage"href="../base/">« Base functions</a><aclass="docs-footer-nextpage"href="../reconstruction/">Model construction functions »</a><divclass="flexbox-break"></div><pclass="footer-message">Powered by <ahref="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <ahref="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><divclass="modal"id="documenter-settings"><divclass="modal-background"></div><divclass="modal-card"><headerclass="modal-card-head"><pclass="modal-card-title">Settings</p><buttonclass="delete"></button></header><sectionclass="modal-card-body"><p><labelclass="label">Theme</label><divclass="select"><selectid="documenter-themepicker"><optionvalue="documenter-light">documenter-light</option><optionvalue="documenter-dark">documenter-dark</option></select></div></p><hr/><p>This document was generated with <ahref="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> on <spanclass="colophon-date"title="Monday 16 May 2022 13:40">Monday 16 May 2022</span>. Using Julia version 1.7.0.</p></section><footerclass="modal-card-foot"></footer></div></div></div></body></html>
)</code></pre><p>Specialization of <code>_pretty_print_keyvals</code> for plain strings.</p></div><aclass="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><navclass="docs-footer"><aclass="docs-footer-prevpage"href="../base/">« Base functions</a><aclass="docs-footer-nextpage"href="../reconstruction/">Model construction functions »</a><divclass="flexbox-break"></div><pclass="footer-message">Powered by <ahref="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <ahref="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><divclass="modal"id="documenter-settings"><divclass="modal-background"></div><divclass="modal-card"><headerclass="modal-card-head"><pclass="modal-card-title">Settings</p><buttonclass="delete"></button></header><sectionclass="modal-card-body"><p><labelclass="label">Theme</label><divclass="select"><selectid="documenter-themepicker"><optionvalue="documenter-light">documenter-light</option><optionvalue="documenter-dark">documenter-dark</option></select></div></p><hr/><p>This document was generated with <ahref="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> on <spanclass="colophon-date"title="Monday 16 May 2022 19:38">Monday 16 May 2022</span>. Using Julia version 1.7.0.</p></section><footerclass="modal-card-foot"></footer></div></div></div></body></html>
<htmllang="en"><head><metacharset="UTF-8"/><metaname="viewport"content="width=device-width, initial-scale=1.0"/><title>Utilities · COBREXA.jl</title><linkhref="https://fonts.googleapis.com/css?family=Lato|Roboto+Mono"rel="stylesheet"type="text/css"/><linkhref="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.0/css/fontawesome.min.css"rel="stylesheet"type="text/css"/><linkhref="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.0/css/solid.min.css"rel="stylesheet"type="text/css"/><linkhref="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.0/css/brands.min.css"rel="stylesheet"type="text/css"/><linkhref="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><linkclass="docs-theme-link"rel="stylesheet"type="text/css"href="../../assets/themes/documenter-dark.css"data-theme-name="documenter-dark"data-theme-primary-dark/><linkclass="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><linkhref="../../assets/favicon.ico"rel="icon"type="image/x-icon"/></head><body><divid="documenter"><navclass="docs-sidebar"><aclass="docs-logo"href="../../"><imgclass="docs-light-only"src="../../assets/logo.svg"alt="COBREXA.jl logo"/><imgclass="docs-dark-only"src="../../assets/logo-dark.svg"alt="COBREXA.jl logo"/></a><divclass="docs-package-name"><spanclass="docs-autofit">COBREXA.jl</span></div><formclass="docs-search"action="../../search/"><inputclass="docs-search-query"id="documenter-search-query"name="q"type="text"placeholder="Search docs"/></form><ulclass="docs-menu"><li><aclass="tocitem"href="../../">Home</a></li><li><spanclass="tocitem">User guide</span><ul><li><inputclass="collapse-toggle"id="menuitem-2-1"type="checkbox"/><labelclass="tocitem"for="menuitem-2-1"><spanclass="docs-label">Quickstart tutorials</span><iclass="docs-chevron"></i></label><ulclass="collapsed"><li><aclass="tocitem"href="../../tutorials/">All tutorials</a></li><li><aclass="tocitem"href="../../tutorials/1_loading/">Loading and converting model data</a></li><li><aclass="tocitem"href="../../tutorials/2_analysis/">Basic analysis of constraint-based models</a></li><li><aclass="tocitem"href="../../tutorials/3_hpc/">Distributed processing and HPC environments</a></li><li><aclass="tocitem"href="../../tutorials/4_modifying/">Modifying and saving the models</a></li></ul></li><li><inputclass="collapse-toggle"id="menuitem-2-2"type="checkbox"/><labelclass="tocitem"for="menuitem-2-2"><spanclass="docs-label">Advanced tutorials</span><iclass="docs-chevron"></i></label><ulclass="collapsed"><li><aclass="tocitem"href="../../advanced/">All advanced tutorials</a></li><li><aclass="tocitem"href="../../advanced/1_variants/">Exploring many model variants</a></li><li><aclass="tocitem"href="../../advanced/2_custom_model/">Working with custom models</a></li></ul></li><li><inputclass="collapse-toggle"id="menuitem-2-3"type="checkbox"/><labelclass="tocitem"for="menuitem-2-3"><spanclass="docs-label">Examples and notebooks</span><iclass="docs-chevron"></i></label><ulclass="collapsed"><li><aclass="tocitem"href="../../notebooks/">All notebooks</a></li><li><aclass="tocitem"href="../../notebooks/1_loading_converting_saving/">Loading, converting, and saving models</a></li><li><aclass="tocitem"href="../../notebooks/2_finding_balance/">Finding balance and variability of constraint-based models</a></li><li><aclass="tocitem"href="../../notebooks/3_basic_stdmodel_usage/">Basic usage of <code>StandardModel</code></a></li><li><aclass="tocitem"href="../../notebooks/4_basic_core_coupled_usage/">Basic usage of <code>CoreModel</code> and <code>CoreModelCoupled</code></a></li><li><aclass="tocitem"href="../../notebooks/5_basic_stdmodel_construction/">Model construction and modification</a></li><li><aclass="tocitem"href="../../notebooks/6_screening/">Exploring model variants with <code>screen</code></a></li><li><aclass="tocitem"href="../../notebooks/7_community_model/">Building and analysing a small community model</a></li><li><aclass="tocitem"href="../../notebooks/8_custom_model/">Using a custom model data structure</a></li><li><aclass="tocitem"href="../../notebooks/9_max_min_driving_force_analysis/">Maximum-minimum driving force analysis</a></li></ul></li></ul></li><li><spanclass="tocitem">Types and functions</span><ul><li><aclass="tocitem"href="../">Contents</a></li><li><aclass="tocitem"href="../analysis/">Analysis functions</a></li><li><aclass="tocitem"href="../base/">Base functions</a></li><li><aclass="tocitem"href="../io/">Input and output</a></li><li><aclass="tocitem"href="../reconstruction/">Model construction functions</a></li><li><aclass="tocitem"href="../types/">Types</a></li><liclass="is-active"><aclass="tocitem"href>Utilities</a><ulclass="internal"><li><aclass="tocitem"href="#Helper-functions"><span>Helper functions</span></a></li><li><aclass="tocitem"href="#Macro-generated-functions-and-internal-helpers"><span>Macro-generated functions and internal helpers</span></a></li><li><aclass="tocitem"href="#Logging-and-debugging-helpers"><span>Logging and debugging helpers</span></a></li></ul></li></ul></li><li><aclass="tocitem"href="../../howToContribute/">How to contribute</a></li></ul><divclass="docs-version-selector field has-addons"><divclass="control"><spanclass="docs-label button is-static is-size-7">Version</span></div><divclass="docs-selector control is-expanded"><divclass="select is-fullwidth is-size-7"><selectid="documenter-version-selector"></select></div></div></div></nav><divclass="docs-main"><headerclass="docs-navbar"><navclass="breadcrumb"><ulclass="is-hidden-mobile"><li><aclass="is-disabled">Types and functions</a></li><liclass="is-active"><ahref>Utilities</a></li></ul><ulclass="is-hidden-tablet"><liclass="is-active"><ahref>Utilities</a></li></ul></nav><divclass="docs-right"><aclass="docs-edit-link"href="https://github.com/lcsb-biocore/COBREXA.jl/blob/master/docs/src/functions/utils.md"title="Edit on GitHub"><spanclass="docs-icon fab"></span><spanclass="docs-label is-hidden-touch">Edit on GitHub</span></a><aclass="docs-settings-button fas fa-cog"id="documenter-settings-button"href="#"title="Settings"></a><aclass="docs-sidebar-button fa fa-bars is-hidden-desktop"id="documenter-sidebar-button"href="#"></a></div></header><articleclass="content"id="documenter-page"><h1id="Utilities"><aclass="docs-heading-anchor"href="#Utilities">Utilities</a><aid="Utilities-1"></a><aclass="docs-heading-anchor-permalink"href="#Utilities"title="Permalink"></a></h1><h2id="Helper-functions"><aclass="docs-heading-anchor"href="#Helper-functions">Helper functions</a><aid="Helper-functions-1"></a><aclass="docs-heading-anchor-permalink"href="#Helper-functions"title="Permalink"></a></h2><articleclass="docstring"><header><aclass="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> — <spanclass="docstring-category">Method</span></header><section><div><pre><codeclass="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><aclass="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><articleclass="docstring"><header><aclass="docstring-binding"id="COBREXA.annotation_index-Tuple{AbstractDict{String}}"href="#COBREXA.annotation_index-Tuple{AbstractDict{String}}"><code>COBREXA.annotation_index</code></a> — <spanclass="docstring-category">Method</span></header><section><div><pre><codeclass="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><aclass="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><articleclass="docstring"><header><aclass="docstring-binding"id="COBREXA.annotation_index-Tuple{AbstractDict{String}}"href="#COBREXA.annotation_index-Tuple{AbstractDict{String}}"><code>COBREXA.annotation_index</code></a> — <spanclass="docstring-category">Method</span></header><section><div><pre><codeclass="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 "kinds" (e.g. <code>"PubChem"</code>) to the mapping from the annotations (e.g. <code>"COMPOUND_12345"</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><aclass="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><articleclass="docstring"><header><aclass="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> — <spanclass="docstring-category">Method</span></header><section><div><pre><codeclass="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: <ahref="#COBREXA.reaction_mass_balanced-Tuple{StandardModel, String}"><code>reaction_mass_balanced</code></a></p></div><aclass="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><articleclass="docstring"><header><aclass="docstring-binding"id="COBREXA.is_boundary-Tuple{Dict{String, Float64}}"href="#COBREXA.is_boundary-Tuple{Dict{String, Float64}}"><code>COBREXA.is_boundary</code></a> — <spanclass="docstring-category">Method</span></header><section><div><pre><codeclass="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><aclass="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><articleclass="docstring"><header><aclass="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> — <spanclass="docstring-category">Method</span></header><section><div><pre><codeclass="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: <ahref="#COBREXA.reaction_mass_balanced-Tuple{StandardModel, String}"><code>reaction_mass_balanced</code></a></p></div><aclass="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><articleclass="docstring"><header><aclass="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> — <spanclass="docstring-category">Method</span></header><section><div><pre><codeclass="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: <ahref="#COBREXA.check_duplicate_reaction-Tuple{Reaction, OrderedCollections.OrderedDict{String, Reaction}}"><code>check_duplicate_reaction</code></a>, <ahref="#COBREXA.reaction_atom_balance-Tuple{StandardModel, Dict{String, Float64}}"><code>reaction_atom_balance</code></a></p></div><aclass="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><articleclass="docstring"><header><aclass="docstring-binding"id="COBREXA.stoichiometry_string-Tuple{Any}"href="#COBREXA.stoichiometry_string-Tuple{Any}"><code>COBREXA.stoichiometry_string</code></a> — <spanclass="docstring-category">Method</span></header><section><div><pre><codeclass="language-julia">stoichiometry_string(rxn_dict::Dict{String, Float64}; format_id = x -> 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><codeclass="language-none">julia> req = Dict("coa_c" => -1, "for_c" => 1, "accoa_c" => 1, "pyr_c" => -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 "kinds" (e.g. <code>"PubChem"</code>) to the mapping from the annotations (e.g. <code>"COMPOUND_12345"</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><aclass="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><articleclass="docstring"><header><aclass="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> — <spanclass="docstring-category">Method</span></header><section><div><pre><codeclass="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: <ahref="#COBREXA.reaction_mass_balanced-Tuple{StandardModel, String}"><code>reaction_mass_balanced</code></a></p></div><aclass="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><articleclass="docstring"><header><aclass="docstring-binding"id="COBREXA.is_boundary-Tuple{Dict{String, Float64}}"href="#COBREXA.is_boundary-Tuple{Dict{String, Float64}}"><code>COBREXA.is_boundary</code></a> — <spanclass="docstring-category">Method</span></header><section><div><pre><codeclass="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><aclass="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><articleclass="docstring"><header><aclass="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> — <spanclass="docstring-category">Method</span></header><section><div><pre><codeclass="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: <ahref="#COBREXA.reaction_mass_balanced-Tuple{StandardModel, String}"><code>reaction_mass_balanced</code></a></p></div><aclass="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><articleclass="docstring"><header><aclass="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> — <spanclass="docstring-category">Method</span></header><section><div><pre><codeclass="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: <ahref="#COBREXA.check_duplicate_reaction-Tuple{Reaction, OrderedCollections.OrderedDict{String, Reaction}}"><code>check_duplicate_reaction</code></a>, <ahref="#COBREXA.reaction_atom_balance-Tuple{StandardModel, Dict{String, Float64}}"><code>reaction_atom_balance</code></a></p></div><aclass="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><articleclass="docstring"><header><aclass="docstring-binding"id="COBREXA.stoichiometry_string-Tuple{Any}"href="#COBREXA.stoichiometry_string-Tuple{Any}"><code>COBREXA.stoichiometry_string</code></a> — <spanclass="docstring-category">Method</span></header><section><div><pre><codeclass="language-julia">stoichiometry_string(rxn_dict::Dict{String, Float64}; format_id = x -> 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><codeclass="language-none">julia> req = Dict("coa_c" => -1, "for_c" => 1, "accoa_c" => 1, "pyr_c" => -1)