diff --git a/dev/advanced/1_modifications/index.html b/dev/advanced/1_modifications/index.html index 1a4514c6994c12603d9a7cb85f9e26f0cfb74cd8..e9ea6f46ad86e9f52bbb65052ff660c3878757ee 100644 --- a/dev/advanced/1_modifications/index.html +++ b/dev/advanced/1_modifications/index.html @@ -1,2 +1,2 @@ <!DOCTYPE html> -<html lang="en"><head><meta charset="UTF-8"/><meta name="viewport" content="width=device-width, initial-scale=1.0"/><title>Screening with modifications · COBREXA.jl</title><link href="https://fonts.googleapis.com/css?family=Lato|Roboto+Mono" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.0/css/fontawesome.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.0/css/solid.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.0/css/brands.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.11.1/katex.min.css" rel="stylesheet" type="text/css"/><script>documenterBaseURL="../.."</script><script src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.6/require.min.js" data-main="../../assets/documenter.js"></script><script src="../../siteinfo.js"></script><script src="../../../versions.js"></script><link class="docs-theme-link" rel="stylesheet" type="text/css" href="../../assets/themes/documenter-dark.css" data-theme-name="documenter-dark" data-theme-primary-dark/><link class="docs-theme-link" rel="stylesheet" type="text/css" href="../../assets/themes/documenter-light.css" data-theme-name="documenter-light" data-theme-primary/><script src="../../assets/themeswap.js"></script><link href="../../assets/favicon.ico" rel="icon" type="image/x-icon"/></head><body><div id="documenter"><nav class="docs-sidebar"><a class="docs-logo" href="../../"><img class="docs-light-only" src="../../assets/logo.svg" alt="COBREXA.jl logo"/><img class="docs-dark-only" src="../../assets/logo-dark.svg" alt="COBREXA.jl logo"/></a><div class="docs-package-name"><span class="docs-autofit">COBREXA.jl</span></div><form class="docs-search" action="../../search/"><input class="docs-search-query" id="documenter-search-query" name="q" type="text" placeholder="Search docs"/></form><ul class="docs-menu"><li><a class="tocitem" href="../../">Home</a></li><li><a class="tocitem" href="../../tutorials/">Tutorials</a></li><li><a class="tocitem" href="../../notebooks/">Examples and notebooks</a></li><li><a class="tocitem" href="../../functions/">Function reference</a></li><li><a class="tocitem" href="../../howToContribute/">How to contribute</a></li></ul><div class="docs-version-selector field has-addons"><div class="control"><span class="docs-label button is-static is-size-7">Version</span></div><div class="docs-selector control is-expanded"><div class="select is-fullwidth is-size-7"><select id="documenter-version-selector"></select></div></div></div></nav><div class="docs-main"><header class="docs-navbar"><nav class="breadcrumb"><ul class="is-hidden-mobile"><li class="is-active"><a href>Screening with modifications</a></li></ul><ul class="is-hidden-tablet"><li class="is-active"><a href>Screening with modifications</a></li></ul></nav><div class="docs-right"><a class="docs-edit-link" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/master/docs/src/advanced/1_modifications.md" title="Edit on GitHub"><span class="docs-icon fab">ï‚›</span><span class="docs-label is-hidden-touch">Edit on GitHub</span></a><a class="docs-settings-button fas fa-cog" id="documenter-settings-button" href="#" title="Settings"></a><a class="docs-sidebar-button fa fa-bars is-hidden-desktop" id="documenter-sidebar-button" href="#"></a></div></header><article class="content" id="documenter-page"><h1 id="Screening-with-modifications"><a class="docs-heading-anchor" href="#Screening-with-modifications">Screening with modifications</a><a id="Screening-with-modifications-1"></a><a class="docs-heading-anchor-permalink" href="#Screening-with-modifications" title="Permalink"></a></h1></article><nav class="docs-footer"><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> on <span class="colophon-date" title="Tuesday 8 June 2021 15:38">Tuesday 8 June 2021</span>. Using Julia version 1.6.0.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html> +<html lang="en"><head><meta charset="UTF-8"/><meta name="viewport" content="width=device-width, initial-scale=1.0"/><title>Screening with modifications · COBREXA.jl</title><link href="https://fonts.googleapis.com/css?family=Lato|Roboto+Mono" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.0/css/fontawesome.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.0/css/solid.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.0/css/brands.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.11.1/katex.min.css" rel="stylesheet" type="text/css"/><script>documenterBaseURL="../.."</script><script src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.6/require.min.js" data-main="../../assets/documenter.js"></script><script src="../../siteinfo.js"></script><script src="../../../versions.js"></script><link class="docs-theme-link" rel="stylesheet" type="text/css" href="../../assets/themes/documenter-dark.css" data-theme-name="documenter-dark" data-theme-primary-dark/><link class="docs-theme-link" rel="stylesheet" type="text/css" href="../../assets/themes/documenter-light.css" data-theme-name="documenter-light" data-theme-primary/><script src="../../assets/themeswap.js"></script><link href="../../assets/favicon.ico" rel="icon" type="image/x-icon"/></head><body><div id="documenter"><nav class="docs-sidebar"><a class="docs-logo" href="../../"><img class="docs-light-only" src="../../assets/logo.svg" alt="COBREXA.jl logo"/><img class="docs-dark-only" src="../../assets/logo-dark.svg" alt="COBREXA.jl logo"/></a><div class="docs-package-name"><span class="docs-autofit">COBREXA.jl</span></div><form class="docs-search" action="../../search/"><input class="docs-search-query" id="documenter-search-query" name="q" type="text" placeholder="Search docs"/></form><ul class="docs-menu"><li><a class="tocitem" href="../../">Home</a></li><li><a class="tocitem" href="../../tutorials/">Tutorials</a></li><li><a class="tocitem" href="../../notebooks/">Examples and notebooks</a></li><li><a class="tocitem" href="../../functions/">Function reference</a></li><li><a class="tocitem" href="../../howToContribute/">How to contribute</a></li></ul><div class="docs-version-selector field has-addons"><div class="control"><span class="docs-label button is-static is-size-7">Version</span></div><div class="docs-selector control is-expanded"><div class="select is-fullwidth is-size-7"><select id="documenter-version-selector"></select></div></div></div></nav><div class="docs-main"><header class="docs-navbar"><nav class="breadcrumb"><ul class="is-hidden-mobile"><li class="is-active"><a href>Screening with modifications</a></li></ul><ul class="is-hidden-tablet"><li class="is-active"><a href>Screening with modifications</a></li></ul></nav><div class="docs-right"><a class="docs-edit-link" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/master/docs/src/advanced/1_modifications.md" title="Edit on GitHub"><span class="docs-icon fab">ï‚›</span><span class="docs-label is-hidden-touch">Edit on GitHub</span></a><a class="docs-settings-button fas fa-cog" id="documenter-settings-button" href="#" title="Settings"></a><a class="docs-sidebar-button fa fa-bars is-hidden-desktop" id="documenter-sidebar-button" href="#"></a></div></header><article class="content" id="documenter-page"><h1 id="Screening-with-modifications"><a class="docs-heading-anchor" href="#Screening-with-modifications">Screening with modifications</a><a id="Screening-with-modifications-1"></a><a class="docs-heading-anchor-permalink" href="#Screening-with-modifications" title="Permalink"></a></h1></article><nav class="docs-footer"><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> on <span class="colophon-date" title="Tuesday 8 June 2021 16:00">Tuesday 8 June 2021</span>. Using Julia version 1.6.0.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html> diff --git a/dev/advanced/2_custom_model/index.html b/dev/advanced/2_custom_model/index.html index 5573fc89fe830193c27291497de8110173218ba0..4c607a72bee850ce6a566442f22b6d3a59175691 100644 --- a/dev/advanced/2_custom_model/index.html +++ b/dev/advanced/2_custom_model/index.html @@ -1,2 +1,2 @@ <!DOCTYPE html> -<html lang="en"><head><meta charset="UTF-8"/><meta name="viewport" content="width=device-width, initial-scale=1.0"/><title>Custom models · COBREXA.jl</title><link href="https://fonts.googleapis.com/css?family=Lato|Roboto+Mono" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.0/css/fontawesome.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.0/css/solid.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.0/css/brands.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.11.1/katex.min.css" rel="stylesheet" type="text/css"/><script>documenterBaseURL="../.."</script><script src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.6/require.min.js" data-main="../../assets/documenter.js"></script><script src="../../siteinfo.js"></script><script src="../../../versions.js"></script><link class="docs-theme-link" rel="stylesheet" type="text/css" href="../../assets/themes/documenter-dark.css" data-theme-name="documenter-dark" data-theme-primary-dark/><link class="docs-theme-link" rel="stylesheet" type="text/css" href="../../assets/themes/documenter-light.css" data-theme-name="documenter-light" data-theme-primary/><script src="../../assets/themeswap.js"></script><link href="../../assets/favicon.ico" rel="icon" type="image/x-icon"/></head><body><div id="documenter"><nav class="docs-sidebar"><a class="docs-logo" href="../../"><img class="docs-light-only" src="../../assets/logo.svg" alt="COBREXA.jl logo"/><img class="docs-dark-only" src="../../assets/logo-dark.svg" alt="COBREXA.jl logo"/></a><div class="docs-package-name"><span class="docs-autofit">COBREXA.jl</span></div><form class="docs-search" action="../../search/"><input class="docs-search-query" id="documenter-search-query" name="q" type="text" placeholder="Search docs"/></form><ul class="docs-menu"><li><a class="tocitem" href="../../">Home</a></li><li><a class="tocitem" href="../../tutorials/">Tutorials</a></li><li><a class="tocitem" href="../../notebooks/">Examples and notebooks</a></li><li><a class="tocitem" href="../../functions/">Function reference</a></li><li><a class="tocitem" href="../../howToContribute/">How to contribute</a></li></ul><div class="docs-version-selector field has-addons"><div class="control"><span class="docs-label button is-static is-size-7">Version</span></div><div class="docs-selector control is-expanded"><div class="select is-fullwidth is-size-7"><select id="documenter-version-selector"></select></div></div></div></nav><div class="docs-main"><header class="docs-navbar"><nav class="breadcrumb"><ul class="is-hidden-mobile"><li class="is-active"><a href>Custom models</a></li></ul><ul class="is-hidden-tablet"><li class="is-active"><a href>Custom models</a></li></ul></nav><div class="docs-right"><a class="docs-edit-link" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/master/docs/src/advanced/2_custom_model.md" title="Edit on GitHub"><span class="docs-icon fab">ï‚›</span><span class="docs-label is-hidden-touch">Edit on GitHub</span></a><a class="docs-settings-button fas fa-cog" id="documenter-settings-button" href="#" title="Settings"></a><a class="docs-sidebar-button fa fa-bars is-hidden-desktop" id="documenter-sidebar-button" href="#"></a></div></header><article class="content" id="documenter-page"><h1 id="Custom-models"><a class="docs-heading-anchor" href="#Custom-models">Custom models</a><a id="Custom-models-1"></a><a class="docs-heading-anchor-permalink" href="#Custom-models" title="Permalink"></a></h1></article><nav class="docs-footer"><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> on <span class="colophon-date" title="Tuesday 8 June 2021 15:38">Tuesday 8 June 2021</span>. Using Julia version 1.6.0.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html> +<html lang="en"><head><meta charset="UTF-8"/><meta name="viewport" content="width=device-width, initial-scale=1.0"/><title>Custom models · COBREXA.jl</title><link href="https://fonts.googleapis.com/css?family=Lato|Roboto+Mono" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.0/css/fontawesome.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.0/css/solid.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.0/css/brands.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.11.1/katex.min.css" rel="stylesheet" type="text/css"/><script>documenterBaseURL="../.."</script><script src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.6/require.min.js" data-main="../../assets/documenter.js"></script><script src="../../siteinfo.js"></script><script src="../../../versions.js"></script><link class="docs-theme-link" rel="stylesheet" type="text/css" href="../../assets/themes/documenter-dark.css" data-theme-name="documenter-dark" data-theme-primary-dark/><link class="docs-theme-link" rel="stylesheet" type="text/css" href="../../assets/themes/documenter-light.css" data-theme-name="documenter-light" data-theme-primary/><script src="../../assets/themeswap.js"></script><link href="../../assets/favicon.ico" rel="icon" type="image/x-icon"/></head><body><div id="documenter"><nav class="docs-sidebar"><a class="docs-logo" href="../../"><img class="docs-light-only" src="../../assets/logo.svg" alt="COBREXA.jl logo"/><img class="docs-dark-only" src="../../assets/logo-dark.svg" alt="COBREXA.jl logo"/></a><div class="docs-package-name"><span class="docs-autofit">COBREXA.jl</span></div><form class="docs-search" action="../../search/"><input class="docs-search-query" id="documenter-search-query" name="q" type="text" placeholder="Search docs"/></form><ul class="docs-menu"><li><a class="tocitem" href="../../">Home</a></li><li><a class="tocitem" href="../../tutorials/">Tutorials</a></li><li><a class="tocitem" href="../../notebooks/">Examples and notebooks</a></li><li><a class="tocitem" href="../../functions/">Function reference</a></li><li><a class="tocitem" href="../../howToContribute/">How to contribute</a></li></ul><div class="docs-version-selector field has-addons"><div class="control"><span class="docs-label button is-static is-size-7">Version</span></div><div class="docs-selector control is-expanded"><div class="select is-fullwidth is-size-7"><select id="documenter-version-selector"></select></div></div></div></nav><div class="docs-main"><header class="docs-navbar"><nav class="breadcrumb"><ul class="is-hidden-mobile"><li class="is-active"><a href>Custom models</a></li></ul><ul class="is-hidden-tablet"><li class="is-active"><a href>Custom models</a></li></ul></nav><div class="docs-right"><a class="docs-edit-link" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/master/docs/src/advanced/2_custom_model.md" title="Edit on GitHub"><span class="docs-icon fab">ï‚›</span><span class="docs-label is-hidden-touch">Edit on GitHub</span></a><a class="docs-settings-button fas fa-cog" id="documenter-settings-button" href="#" title="Settings"></a><a class="docs-sidebar-button fa fa-bars is-hidden-desktop" id="documenter-sidebar-button" href="#"></a></div></header><article class="content" id="documenter-page"><h1 id="Custom-models"><a class="docs-heading-anchor" href="#Custom-models">Custom models</a><a id="Custom-models-1"></a><a class="docs-heading-anchor-permalink" href="#Custom-models" title="Permalink"></a></h1></article><nav class="docs-footer"><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> on <span class="colophon-date" title="Tuesday 8 June 2021 16:00">Tuesday 8 June 2021</span>. Using Julia version 1.6.0.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html> diff --git a/dev/advanced/3_custom_models_on_hpc/index.html b/dev/advanced/3_custom_models_on_hpc/index.html index c3f9a16ea0ae60c8ec8c7e7dc91c8034efa004f3..fb2e654199d37cda79dee317568c5820e40f68de 100644 --- a/dev/advanced/3_custom_models_on_hpc/index.html +++ b/dev/advanced/3_custom_models_on_hpc/index.html @@ -1,2 +1,2 @@ <!DOCTYPE html> -<html lang="en"><head><meta charset="UTF-8"/><meta name="viewport" content="width=device-width, initial-scale=1.0"/><title>Using customized models on HPC · COBREXA.jl</title><link href="https://fonts.googleapis.com/css?family=Lato|Roboto+Mono" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.0/css/fontawesome.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.0/css/solid.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.0/css/brands.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.11.1/katex.min.css" rel="stylesheet" type="text/css"/><script>documenterBaseURL="../.."</script><script src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.6/require.min.js" data-main="../../assets/documenter.js"></script><script src="../../siteinfo.js"></script><script src="../../../versions.js"></script><link class="docs-theme-link" rel="stylesheet" type="text/css" href="../../assets/themes/documenter-dark.css" data-theme-name="documenter-dark" data-theme-primary-dark/><link class="docs-theme-link" rel="stylesheet" type="text/css" href="../../assets/themes/documenter-light.css" data-theme-name="documenter-light" data-theme-primary/><script src="../../assets/themeswap.js"></script><link href="../../assets/favicon.ico" rel="icon" type="image/x-icon"/></head><body><div id="documenter"><nav class="docs-sidebar"><a class="docs-logo" href="../../"><img class="docs-light-only" src="../../assets/logo.svg" alt="COBREXA.jl logo"/><img class="docs-dark-only" src="../../assets/logo-dark.svg" alt="COBREXA.jl logo"/></a><div class="docs-package-name"><span class="docs-autofit">COBREXA.jl</span></div><form class="docs-search" action="../../search/"><input class="docs-search-query" id="documenter-search-query" name="q" type="text" placeholder="Search docs"/></form><ul class="docs-menu"><li><a class="tocitem" href="../../">Home</a></li><li><a class="tocitem" href="../../tutorials/">Tutorials</a></li><li><a class="tocitem" href="../../notebooks/">Examples and notebooks</a></li><li><a class="tocitem" href="../../functions/">Function reference</a></li><li><a class="tocitem" href="../../howToContribute/">How to contribute</a></li></ul><div class="docs-version-selector field has-addons"><div class="control"><span class="docs-label button is-static is-size-7">Version</span></div><div class="docs-selector control is-expanded"><div class="select is-fullwidth is-size-7"><select id="documenter-version-selector"></select></div></div></div></nav><div class="docs-main"><header class="docs-navbar"><nav class="breadcrumb"><ul class="is-hidden-mobile"><li class="is-active"><a href>Using customized models on HPC</a></li></ul><ul class="is-hidden-tablet"><li class="is-active"><a href>Using customized models on HPC</a></li></ul></nav><div class="docs-right"><a class="docs-edit-link" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/master/docs/src/advanced/3_custom_models_on_hpc.md" title="Edit on GitHub"><span class="docs-icon fab">ï‚›</span><span class="docs-label is-hidden-touch">Edit on GitHub</span></a><a class="docs-settings-button fas fa-cog" id="documenter-settings-button" href="#" title="Settings"></a><a class="docs-sidebar-button fa fa-bars is-hidden-desktop" id="documenter-sidebar-button" href="#"></a></div></header><article class="content" id="documenter-page"><h1 id="Using-customized-models-on-HPC"><a class="docs-heading-anchor" href="#Using-customized-models-on-HPC">Using customized models on HPC</a><a id="Using-customized-models-on-HPC-1"></a><a class="docs-heading-anchor-permalink" href="#Using-customized-models-on-HPC" title="Permalink"></a></h1></article><nav class="docs-footer"><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> on <span class="colophon-date" title="Tuesday 8 June 2021 15:38">Tuesday 8 June 2021</span>. Using Julia version 1.6.0.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html> +<html lang="en"><head><meta charset="UTF-8"/><meta name="viewport" content="width=device-width, initial-scale=1.0"/><title>Using customized models on HPC · COBREXA.jl</title><link href="https://fonts.googleapis.com/css?family=Lato|Roboto+Mono" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.0/css/fontawesome.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.0/css/solid.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.0/css/brands.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.11.1/katex.min.css" rel="stylesheet" type="text/css"/><script>documenterBaseURL="../.."</script><script src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.6/require.min.js" data-main="../../assets/documenter.js"></script><script src="../../siteinfo.js"></script><script src="../../../versions.js"></script><link class="docs-theme-link" rel="stylesheet" type="text/css" href="../../assets/themes/documenter-dark.css" data-theme-name="documenter-dark" data-theme-primary-dark/><link class="docs-theme-link" rel="stylesheet" type="text/css" href="../../assets/themes/documenter-light.css" data-theme-name="documenter-light" data-theme-primary/><script src="../../assets/themeswap.js"></script><link href="../../assets/favicon.ico" rel="icon" type="image/x-icon"/></head><body><div id="documenter"><nav class="docs-sidebar"><a class="docs-logo" href="../../"><img class="docs-light-only" src="../../assets/logo.svg" alt="COBREXA.jl logo"/><img class="docs-dark-only" src="../../assets/logo-dark.svg" alt="COBREXA.jl logo"/></a><div class="docs-package-name"><span class="docs-autofit">COBREXA.jl</span></div><form class="docs-search" action="../../search/"><input class="docs-search-query" id="documenter-search-query" name="q" type="text" placeholder="Search docs"/></form><ul class="docs-menu"><li><a class="tocitem" href="../../">Home</a></li><li><a class="tocitem" href="../../tutorials/">Tutorials</a></li><li><a class="tocitem" href="../../notebooks/">Examples and notebooks</a></li><li><a class="tocitem" href="../../functions/">Function reference</a></li><li><a class="tocitem" href="../../howToContribute/">How to contribute</a></li></ul><div class="docs-version-selector field has-addons"><div class="control"><span class="docs-label button is-static is-size-7">Version</span></div><div class="docs-selector control is-expanded"><div class="select is-fullwidth is-size-7"><select id="documenter-version-selector"></select></div></div></div></nav><div class="docs-main"><header class="docs-navbar"><nav class="breadcrumb"><ul class="is-hidden-mobile"><li class="is-active"><a href>Using customized models on HPC</a></li></ul><ul class="is-hidden-tablet"><li class="is-active"><a href>Using customized models on HPC</a></li></ul></nav><div class="docs-right"><a class="docs-edit-link" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/master/docs/src/advanced/3_custom_models_on_hpc.md" title="Edit on GitHub"><span class="docs-icon fab">ï‚›</span><span class="docs-label is-hidden-touch">Edit on GitHub</span></a><a class="docs-settings-button fas fa-cog" id="documenter-settings-button" href="#" title="Settings"></a><a class="docs-sidebar-button fa fa-bars is-hidden-desktop" id="documenter-sidebar-button" href="#"></a></div></header><article class="content" id="documenter-page"><h1 id="Using-customized-models-on-HPC"><a class="docs-heading-anchor" href="#Using-customized-models-on-HPC">Using customized models on HPC</a><a id="Using-customized-models-on-HPC-1"></a><a class="docs-heading-anchor-permalink" href="#Using-customized-models-on-HPC" title="Permalink"></a></h1></article><nav class="docs-footer"><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> on <span class="colophon-date" title="Tuesday 8 June 2021 16:00">Tuesday 8 June 2021</span>. Using Julia version 1.6.0.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html> diff --git a/dev/advanced/4_advanced_screening/index.html b/dev/advanced/4_advanced_screening/index.html index 55d2972abd081d181f28e78efe4e0263033a583b..41cdbcb08f7bb1838126e526323ec700f8d90e8d 100644 --- a/dev/advanced/4_advanced_screening/index.html +++ b/dev/advanced/4_advanced_screening/index.html @@ -1,2 +1,2 @@ <!DOCTYPE html> -<html lang="en"><head><meta charset="UTF-8"/><meta name="viewport" content="width=device-width, initial-scale=1.0"/><title>Advanced model screening · COBREXA.jl</title><link href="https://fonts.googleapis.com/css?family=Lato|Roboto+Mono" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.0/css/fontawesome.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.0/css/solid.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.0/css/brands.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.11.1/katex.min.css" rel="stylesheet" type="text/css"/><script>documenterBaseURL="../.."</script><script src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.6/require.min.js" data-main="../../assets/documenter.js"></script><script src="../../siteinfo.js"></script><script src="../../../versions.js"></script><link class="docs-theme-link" rel="stylesheet" type="text/css" href="../../assets/themes/documenter-dark.css" data-theme-name="documenter-dark" data-theme-primary-dark/><link class="docs-theme-link" rel="stylesheet" type="text/css" href="../../assets/themes/documenter-light.css" data-theme-name="documenter-light" data-theme-primary/><script src="../../assets/themeswap.js"></script><link href="../../assets/favicon.ico" rel="icon" type="image/x-icon"/></head><body><div id="documenter"><nav class="docs-sidebar"><a class="docs-logo" href="../../"><img class="docs-light-only" src="../../assets/logo.svg" alt="COBREXA.jl logo"/><img class="docs-dark-only" src="../../assets/logo-dark.svg" alt="COBREXA.jl logo"/></a><div class="docs-package-name"><span class="docs-autofit">COBREXA.jl</span></div><form class="docs-search" action="../../search/"><input class="docs-search-query" id="documenter-search-query" name="q" type="text" placeholder="Search docs"/></form><ul class="docs-menu"><li><a class="tocitem" href="../../">Home</a></li><li><a class="tocitem" href="../../tutorials/">Tutorials</a></li><li><a class="tocitem" href="../../notebooks/">Examples and notebooks</a></li><li><a class="tocitem" href="../../functions/">Function reference</a></li><li><a class="tocitem" href="../../howToContribute/">How to contribute</a></li></ul><div class="docs-version-selector field has-addons"><div class="control"><span class="docs-label button is-static is-size-7">Version</span></div><div class="docs-selector control is-expanded"><div class="select is-fullwidth is-size-7"><select id="documenter-version-selector"></select></div></div></div></nav><div class="docs-main"><header class="docs-navbar"><nav class="breadcrumb"><ul class="is-hidden-mobile"><li class="is-active"><a href>Advanced model screening</a></li></ul><ul class="is-hidden-tablet"><li class="is-active"><a href>Advanced model screening</a></li></ul></nav><div class="docs-right"><a class="docs-edit-link" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/master/docs/src/advanced/4_advanced_screening.md" title="Edit on GitHub"><span class="docs-icon fab">ï‚›</span><span class="docs-label is-hidden-touch">Edit on GitHub</span></a><a class="docs-settings-button fas fa-cog" id="documenter-settings-button" href="#" title="Settings"></a><a class="docs-sidebar-button fa fa-bars is-hidden-desktop" id="documenter-sidebar-button" href="#"></a></div></header><article class="content" id="documenter-page"><h1 id="Advanced-model-screening"><a class="docs-heading-anchor" href="#Advanced-model-screening">Advanced model screening</a><a id="Advanced-model-screening-1"></a><a class="docs-heading-anchor-permalink" href="#Advanced-model-screening" title="Permalink"></a></h1><h2 id="Example:-Gene-knockouts"><a class="docs-heading-anchor" href="#Example:-Gene-knockouts">Example: Gene knockouts</a><a id="Example:-Gene-knockouts-1"></a><a class="docs-heading-anchor-permalink" href="#Example:-Gene-knockouts" title="Permalink"></a></h2></article><nav class="docs-footer"><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> on <span class="colophon-date" title="Tuesday 8 June 2021 15:38">Tuesday 8 June 2021</span>. Using Julia version 1.6.0.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html> +<html lang="en"><head><meta charset="UTF-8"/><meta name="viewport" content="width=device-width, initial-scale=1.0"/><title>Advanced model screening · COBREXA.jl</title><link href="https://fonts.googleapis.com/css?family=Lato|Roboto+Mono" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.0/css/fontawesome.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.0/css/solid.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.0/css/brands.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.11.1/katex.min.css" rel="stylesheet" type="text/css"/><script>documenterBaseURL="../.."</script><script src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.6/require.min.js" data-main="../../assets/documenter.js"></script><script src="../../siteinfo.js"></script><script src="../../../versions.js"></script><link class="docs-theme-link" rel="stylesheet" type="text/css" href="../../assets/themes/documenter-dark.css" data-theme-name="documenter-dark" data-theme-primary-dark/><link class="docs-theme-link" rel="stylesheet" type="text/css" href="../../assets/themes/documenter-light.css" data-theme-name="documenter-light" data-theme-primary/><script src="../../assets/themeswap.js"></script><link href="../../assets/favicon.ico" rel="icon" type="image/x-icon"/></head><body><div id="documenter"><nav class="docs-sidebar"><a class="docs-logo" href="../../"><img class="docs-light-only" src="../../assets/logo.svg" alt="COBREXA.jl logo"/><img class="docs-dark-only" src="../../assets/logo-dark.svg" alt="COBREXA.jl logo"/></a><div class="docs-package-name"><span class="docs-autofit">COBREXA.jl</span></div><form class="docs-search" action="../../search/"><input class="docs-search-query" id="documenter-search-query" name="q" type="text" placeholder="Search docs"/></form><ul class="docs-menu"><li><a class="tocitem" href="../../">Home</a></li><li><a class="tocitem" href="../../tutorials/">Tutorials</a></li><li><a class="tocitem" href="../../notebooks/">Examples and notebooks</a></li><li><a class="tocitem" href="../../functions/">Function reference</a></li><li><a class="tocitem" href="../../howToContribute/">How to contribute</a></li></ul><div class="docs-version-selector field has-addons"><div class="control"><span class="docs-label button is-static is-size-7">Version</span></div><div class="docs-selector control is-expanded"><div class="select is-fullwidth is-size-7"><select id="documenter-version-selector"></select></div></div></div></nav><div class="docs-main"><header class="docs-navbar"><nav class="breadcrumb"><ul class="is-hidden-mobile"><li class="is-active"><a href>Advanced model screening</a></li></ul><ul class="is-hidden-tablet"><li class="is-active"><a href>Advanced model screening</a></li></ul></nav><div class="docs-right"><a class="docs-edit-link" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/master/docs/src/advanced/4_advanced_screening.md" title="Edit on GitHub"><span class="docs-icon fab">ï‚›</span><span class="docs-label is-hidden-touch">Edit on GitHub</span></a><a class="docs-settings-button fas fa-cog" id="documenter-settings-button" href="#" title="Settings"></a><a class="docs-sidebar-button fa fa-bars is-hidden-desktop" id="documenter-sidebar-button" href="#"></a></div></header><article class="content" id="documenter-page"><h1 id="Advanced-model-screening"><a class="docs-heading-anchor" href="#Advanced-model-screening">Advanced model screening</a><a id="Advanced-model-screening-1"></a><a class="docs-heading-anchor-permalink" href="#Advanced-model-screening" title="Permalink"></a></h1><h2 id="Example:-Gene-knockouts"><a class="docs-heading-anchor" href="#Example:-Gene-knockouts">Example: Gene knockouts</a><a id="Example:-Gene-knockouts-1"></a><a class="docs-heading-anchor-permalink" href="#Example:-Gene-knockouts" title="Permalink"></a></h2></article><nav class="docs-footer"><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> on <span class="colophon-date" title="Tuesday 8 June 2021 16:00">Tuesday 8 June 2021</span>. Using Julia version 1.6.0.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html> diff --git a/dev/advanced/5_debugging/index.html b/dev/advanced/5_debugging/index.html index e9657255fd0cdbb7b22e83f389863247e95ea379..0865520fa222f19b360d37596da09f7683744e92 100644 --- a/dev/advanced/5_debugging/index.html +++ b/dev/advanced/5_debugging/index.html @@ -1,2 +1,2 @@ <!DOCTYPE html> -<html lang="en"><head><meta charset="UTF-8"/><meta name="viewport" content="width=device-width, initial-scale=1.0"/><title>Tracing and debugging · COBREXA.jl</title><link href="https://fonts.googleapis.com/css?family=Lato|Roboto+Mono" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.0/css/fontawesome.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.0/css/solid.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.0/css/brands.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.11.1/katex.min.css" rel="stylesheet" type="text/css"/><script>documenterBaseURL="../.."</script><script src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.6/require.min.js" data-main="../../assets/documenter.js"></script><script src="../../siteinfo.js"></script><script src="../../../versions.js"></script><link class="docs-theme-link" rel="stylesheet" type="text/css" href="../../assets/themes/documenter-dark.css" data-theme-name="documenter-dark" data-theme-primary-dark/><link class="docs-theme-link" rel="stylesheet" type="text/css" href="../../assets/themes/documenter-light.css" data-theme-name="documenter-light" data-theme-primary/><script src="../../assets/themeswap.js"></script><link href="../../assets/favicon.ico" rel="icon" type="image/x-icon"/></head><body><div id="documenter"><nav class="docs-sidebar"><a class="docs-logo" href="../../"><img class="docs-light-only" src="../../assets/logo.svg" alt="COBREXA.jl logo"/><img class="docs-dark-only" src="../../assets/logo-dark.svg" alt="COBREXA.jl logo"/></a><div class="docs-package-name"><span class="docs-autofit">COBREXA.jl</span></div><form class="docs-search" action="../../search/"><input class="docs-search-query" id="documenter-search-query" name="q" type="text" placeholder="Search docs"/></form><ul class="docs-menu"><li><a class="tocitem" href="../../">Home</a></li><li><a class="tocitem" href="../../tutorials/">Tutorials</a></li><li><a class="tocitem" href="../../notebooks/">Examples and notebooks</a></li><li><a class="tocitem" href="../../functions/">Function reference</a></li><li><a class="tocitem" href="../../howToContribute/">How to contribute</a></li></ul><div class="docs-version-selector field has-addons"><div class="control"><span class="docs-label button is-static is-size-7">Version</span></div><div class="docs-selector control is-expanded"><div class="select is-fullwidth is-size-7"><select id="documenter-version-selector"></select></div></div></div></nav><div class="docs-main"><header class="docs-navbar"><nav class="breadcrumb"><ul class="is-hidden-mobile"><li class="is-active"><a href>Tracing and debugging</a></li></ul><ul class="is-hidden-tablet"><li class="is-active"><a href>Tracing and debugging</a></li></ul></nav><div class="docs-right"><a class="docs-edit-link" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/master/docs/src/advanced/5_debugging.md" title="Edit on GitHub"><span class="docs-icon fab">ï‚›</span><span class="docs-label is-hidden-touch">Edit on GitHub</span></a><a class="docs-settings-button fas fa-cog" id="documenter-settings-button" href="#" title="Settings"></a><a class="docs-sidebar-button fa fa-bars is-hidden-desktop" id="documenter-sidebar-button" href="#"></a></div></header><article class="content" id="documenter-page"><h1 id="Tracing-and-debugging"><a class="docs-heading-anchor" href="#Tracing-and-debugging">Tracing and debugging</a><a id="Tracing-and-debugging-1"></a><a class="docs-heading-anchor-permalink" href="#Tracing-and-debugging" title="Permalink"></a></h1></article><nav class="docs-footer"><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> on <span class="colophon-date" title="Tuesday 8 June 2021 15:38">Tuesday 8 June 2021</span>. Using Julia version 1.6.0.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html> +<html lang="en"><head><meta charset="UTF-8"/><meta name="viewport" content="width=device-width, initial-scale=1.0"/><title>Tracing and debugging · COBREXA.jl</title><link href="https://fonts.googleapis.com/css?family=Lato|Roboto+Mono" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.0/css/fontawesome.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.0/css/solid.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.0/css/brands.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.11.1/katex.min.css" rel="stylesheet" type="text/css"/><script>documenterBaseURL="../.."</script><script src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.6/require.min.js" data-main="../../assets/documenter.js"></script><script src="../../siteinfo.js"></script><script src="../../../versions.js"></script><link class="docs-theme-link" rel="stylesheet" type="text/css" href="../../assets/themes/documenter-dark.css" data-theme-name="documenter-dark" data-theme-primary-dark/><link class="docs-theme-link" rel="stylesheet" type="text/css" href="../../assets/themes/documenter-light.css" data-theme-name="documenter-light" data-theme-primary/><script src="../../assets/themeswap.js"></script><link href="../../assets/favicon.ico" rel="icon" type="image/x-icon"/></head><body><div id="documenter"><nav class="docs-sidebar"><a class="docs-logo" href="../../"><img class="docs-light-only" src="../../assets/logo.svg" alt="COBREXA.jl logo"/><img class="docs-dark-only" src="../../assets/logo-dark.svg" alt="COBREXA.jl logo"/></a><div class="docs-package-name"><span class="docs-autofit">COBREXA.jl</span></div><form class="docs-search" action="../../search/"><input class="docs-search-query" id="documenter-search-query" name="q" type="text" placeholder="Search docs"/></form><ul class="docs-menu"><li><a class="tocitem" href="../../">Home</a></li><li><a class="tocitem" href="../../tutorials/">Tutorials</a></li><li><a class="tocitem" href="../../notebooks/">Examples and notebooks</a></li><li><a class="tocitem" href="../../functions/">Function reference</a></li><li><a class="tocitem" href="../../howToContribute/">How to contribute</a></li></ul><div class="docs-version-selector field has-addons"><div class="control"><span class="docs-label button is-static is-size-7">Version</span></div><div class="docs-selector control is-expanded"><div class="select is-fullwidth is-size-7"><select id="documenter-version-selector"></select></div></div></div></nav><div class="docs-main"><header class="docs-navbar"><nav class="breadcrumb"><ul class="is-hidden-mobile"><li class="is-active"><a href>Tracing and debugging</a></li></ul><ul class="is-hidden-tablet"><li class="is-active"><a href>Tracing and debugging</a></li></ul></nav><div class="docs-right"><a class="docs-edit-link" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/master/docs/src/advanced/5_debugging.md" title="Edit on GitHub"><span class="docs-icon fab">ï‚›</span><span class="docs-label is-hidden-touch">Edit on GitHub</span></a><a class="docs-settings-button fas fa-cog" id="documenter-settings-button" href="#" title="Settings"></a><a class="docs-sidebar-button fa fa-bars is-hidden-desktop" id="documenter-sidebar-button" href="#"></a></div></header><article class="content" id="documenter-page"><h1 id="Tracing-and-debugging"><a class="docs-heading-anchor" href="#Tracing-and-debugging">Tracing and debugging</a><a id="Tracing-and-debugging-1"></a><a class="docs-heading-anchor-permalink" href="#Tracing-and-debugging" title="Permalink"></a></h1></article><nav class="docs-footer"><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> on <span class="colophon-date" title="Tuesday 8 June 2021 16:00">Tuesday 8 June 2021</span>. Using Julia version 1.6.0.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html> diff --git a/dev/functions/index.html b/dev/functions/index.html index c42f12ed71f1ebc87b9a69f1ee7dc6e9403dc8f2..d7f96bb3b16fbbc587e8ef4f6068e3a5f48bc840 100644 --- a/dev/functions/index.html +++ b/dev/functions/index.html @@ -1,23 +1,23 @@ <!DOCTYPE html> -<html lang="en"><head><meta charset="UTF-8"/><meta name="viewport" content="width=device-width, initial-scale=1.0"/><title>Function reference · COBREXA.jl</title><link href="https://fonts.googleapis.com/css?family=Lato|Roboto+Mono" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.0/css/fontawesome.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.0/css/solid.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.0/css/brands.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.11.1/katex.min.css" rel="stylesheet" type="text/css"/><script>documenterBaseURL=".."</script><script src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.6/require.min.js" data-main="../assets/documenter.js"></script><script src="../siteinfo.js"></script><script src="../../versions.js"></script><link class="docs-theme-link" rel="stylesheet" type="text/css" href="../assets/themes/documenter-dark.css" data-theme-name="documenter-dark" data-theme-primary-dark/><link class="docs-theme-link" rel="stylesheet" type="text/css" href="../assets/themes/documenter-light.css" data-theme-name="documenter-light" data-theme-primary/><script src="../assets/themeswap.js"></script><link href="../assets/favicon.ico" rel="icon" type="image/x-icon"/></head><body><div id="documenter"><nav class="docs-sidebar"><a class="docs-logo" href="../"><img class="docs-light-only" src="../assets/logo.svg" alt="COBREXA.jl logo"/><img class="docs-dark-only" src="../assets/logo-dark.svg" alt="COBREXA.jl logo"/></a><div class="docs-package-name"><span class="docs-autofit">COBREXA.jl</span></div><form class="docs-search" action="../search/"><input class="docs-search-query" id="documenter-search-query" name="q" type="text" placeholder="Search docs"/></form><ul class="docs-menu"><li><a class="tocitem" href="../">Home</a></li><li><a class="tocitem" href="../tutorials/">Tutorials</a></li><li><a class="tocitem" href="../notebooks/">Examples and notebooks</a></li><li class="is-active"><a class="tocitem" href>Function reference</a><ul class="internal"><li><a class="tocitem" href="#Base-Types"><span>Base Types</span></a></li><li><a class="tocitem" href="#Model-types-and-contents"><span>Model types and contents</span></a></li><li><a class="tocitem" href="#Base-functions"><span>Base functions</span></a></li><li><a class="tocitem" href="#File-I/O-and-serialization"><span>File I/O and serialization</span></a></li><li><a class="tocitem" href="#Model-reconstruction"><span>Model reconstruction</span></a></li><li><a class="tocitem" href="#Analysis-functions"><span>Analysis functions</span></a></li><li><a class="tocitem" href="#Miscellaneous-utilities"><span>Miscellaneous utilities</span></a></li></ul></li><li><a class="tocitem" href="../howToContribute/">How to contribute</a></li></ul><div class="docs-version-selector field has-addons"><div class="control"><span class="docs-label button is-static is-size-7">Version</span></div><div class="docs-selector control is-expanded"><div class="select is-fullwidth is-size-7"><select id="documenter-version-selector"></select></div></div></div></nav><div class="docs-main"><header class="docs-navbar"><nav class="breadcrumb"><ul class="is-hidden-mobile"><li class="is-active"><a href>Function reference</a></li></ul><ul class="is-hidden-tablet"><li class="is-active"><a href>Function reference</a></li></ul></nav><div class="docs-right"><a class="docs-edit-link" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/master/docs/src/functions.md" title="Edit on GitHub"><span class="docs-icon fab">ï‚›</span><span class="docs-label is-hidden-touch">Edit on GitHub</span></a><a class="docs-settings-button fas fa-cog" id="documenter-settings-button" href="#" title="Settings"></a><a class="docs-sidebar-button fa fa-bars is-hidden-desktop" id="documenter-sidebar-button" href="#"></a></div></header><article class="content" id="documenter-page"><h1 id="Functions"><a class="docs-heading-anchor" href="#Functions">Functions</a><a id="Functions-1"></a><a class="docs-heading-anchor-permalink" href="#Functions" title="Permalink"></a></h1><h2 id="Base-Types"><a class="docs-heading-anchor" href="#Base-Types">Base Types</a><a id="Base-Types-1"></a><a class="docs-heading-anchor-permalink" href="#Base-Types" title="Permalink"></a></h2><article class="docstring"><header><a class="docstring-binding" id="COBREXA.Maybe" href="#COBREXA.Maybe"><code>COBREXA.Maybe</code></a> — <span class="docstring-category">Type</span></header><section><div><pre><code class="language-julia">Maybe{T} = Union{Nothing, T}</code></pre><p>A nice name for "nullable" type.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/1011dcb5948951fc380713022f1ecf5b37961981/src/base/types/abstract/Maybe.jl#L2-L6">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA._default-Union{Tuple{T}, Tuple{T, Union{Nothing, T}}} where T" href="#COBREXA._default-Union{Tuple{T}, Tuple{T, Union{Nothing, T}}} where T"><code>COBREXA._default</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">_default(d::T, x::Maybe{T})::T where {T}</code></pre><p>Fold the <code>Maybe{T}</code> down to <code>T</code> by defaulting.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/1011dcb5948951fc380713022f1ecf5b37961981/src/base/types/abstract/Maybe.jl#L9-L13">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA._maybemap-Tuple{Any, Union{Nothing, T} where T}" href="#COBREXA._maybemap-Tuple{Any, Union{Nothing, T} where T}"><code>COBREXA._maybemap</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">_maybemap(f, x::Maybe)::Maybe</code></pre><p>Apply a function to <code>x</code> only if it is not <code>nothing</code>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/1011dcb5948951fc380713022f1ecf5b37961981/src/base/types/abstract/Maybe.jl#L18-L22">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.Annotations" href="#COBREXA.Annotations"><code>COBREXA.Annotations</code></a> — <span class="docstring-category">Type</span></header><section><div><pre><code class="language-julia">Annotations = Dict{String,Vector{String}}</code></pre><p>Dictionary used to store (possible multiple) standardized annotations of something, such as a <a href="#COBREXA.Metabolite"><code>Metabolite</code></a> and a <a href="#COBREXA.Reaction"><code>Reaction</code></a>.</p><p><strong>Example</strong></p><pre><code class="language-none">Annotations("PubChem" => ["CID12345", "CID54321"])</code></pre></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/1011dcb5948951fc380713022f1ecf5b37961981/src/base/types/abstract/MetabolicModel.jl#L39-L49">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.GeneAssociation" href="#COBREXA.GeneAssociation"><code>COBREXA.GeneAssociation</code></a> — <span class="docstring-category">Type</span></header><section><div><pre><code class="language-julia">GeneAssociation = Vector{Vector{String}}</code></pre><p>An association to genes, represented as a logical formula in a positive disjunctive normal form (DNF). (The 2nd-level vectors of strings are connected by "and" to form conjunctions, and the 1st-level vectors of these conjunctions are connected by "or" to form the DNF.)</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/1011dcb5948951fc380713022f1ecf5b37961981/src/base/types/abstract/MetabolicModel.jl#L22-L29">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.MetabolicModel" href="#COBREXA.MetabolicModel"><code>COBREXA.MetabolicModel</code></a> — <span class="docstring-category">Type</span></header><section><div><pre><code class="language-julia">abstract type MetabolicModel end</code></pre><p>A helper supertype that wraps everything usable as a linear-like model for COBREXA functions.</p><p>If you want your model type to work with COBREXA, add the <code>MetabolicModel</code> as its supertype, and implement the accessor functions. Accessors <a href="#COBREXA.reactions-Tuple{MetabolicModel}"><code>reactions</code></a>, <a href="#COBREXA.metabolites-Tuple{MetabolicModel}"><code>metabolites</code></a>, <a href="#COBREXA.stoichiometry-Tuple{MetabolicModel}"><code>stoichiometry</code></a>, <a href="#COBREXA.bounds-Tuple{MetabolicModel}"><code>bounds</code></a> and <a href="#COBREXA.objective-Tuple{MetabolicModel}"><code>objective</code></a> must be implemented; others are not mandatory and default to safe "empty" values.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/1011dcb5948951fc380713022f1ecf5b37961981/src/base/types/abstract/MetabolicModel.jl#L2-L13">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.MetaboliteFormula" href="#COBREXA.MetaboliteFormula"><code>COBREXA.MetaboliteFormula</code></a> — <span class="docstring-category">Type</span></header><section><div><pre><code class="language-julia">MetaboliteFormula = Dict{String,Int}</code></pre><p>Dictionary of atoms and their abundances in a molecule.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/1011dcb5948951fc380713022f1ecf5b37961981/src/base/types/abstract/MetabolicModel.jl#L32-L36">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.Notes" href="#COBREXA.Notes"><code>COBREXA.Notes</code></a> — <span class="docstring-category">Type</span></header><section><div><pre><code class="language-julia">Notes = Dict{String,Vector{String}}</code></pre><p>Free-form notes about something (e.g. a <a href="#COBREXA.Gene"><code>Gene</code></a>), categorized by "topic".</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/1011dcb5948951fc380713022f1ecf5b37961981/src/base/types/abstract/MetabolicModel.jl#L52-L57">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.balance-Tuple{MetabolicModel}" href="#COBREXA.balance-Tuple{MetabolicModel}"><code>COBREXA.balance</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">balance(a::MetabolicModel)::SparseVec</code></pre><p>Get the sparse balance vector of a model (ie. the <code>b</code> from <code>S x = b</code>).</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/1011dcb5948951fc380713022f1ecf5b37961981/src/base/types/abstract/MetabolicModel.jl#L116-L120">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.bounds-Tuple{MetabolicModel}" href="#COBREXA.bounds-Tuple{MetabolicModel}"><code>COBREXA.bounds</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">bounds(a::MetabolicModel)::Tuple{SparseVec,SparseVec}</code></pre><p>Get the lower and upper flux bounds of a model.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/1011dcb5948951fc380713022f1ecf5b37961981/src/base/types/abstract/MetabolicModel.jl#L107-L111">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.coupling-Tuple{MetabolicModel}" href="#COBREXA.coupling-Tuple{MetabolicModel}"><code>COBREXA.coupling</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">coupling(a::MetabolicModel)::SparseMat</code></pre><p>Get a matrix of coupling constraint definitions of a model. By default, there is no coupling in the models.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/1011dcb5948951fc380713022f1ecf5b37961981/src/base/types/abstract/MetabolicModel.jl#L134-L139">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.coupling_bounds-Tuple{MetabolicModel}" href="#COBREXA.coupling_bounds-Tuple{MetabolicModel}"><code>COBREXA.coupling_bounds</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">coupling_bounds(a::MetabolicModel)::Tuple{SparseVec,SparseVec}</code></pre><p>Get the lower and upper bounds for each coupling bound in a model, as specified by <code>coupling</code>. By default, the model does not have any coupling bounds.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/1011dcb5948951fc380713022f1ecf5b37961981/src/base/types/abstract/MetabolicModel.jl#L153-L158">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.gene_annotations-Tuple{MetabolicModel, String}" href="#COBREXA.gene_annotations-Tuple{MetabolicModel, String}"><code>COBREXA.gene_annotations</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">gene_annotations(a::MetabolicModel, gene_id::String)::Annotations</code></pre><p>Return standardized names that identify the corresponding gene or product. The dictionary assigns vectors of possible identifiers to identifier system names, e.g. <code>"PDB" => ["PROT01"]</code>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/1011dcb5948951fc380713022f1ecf5b37961981/src/base/types/abstract/MetabolicModel.jl#L251-L257">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.gene_notes-Tuple{MetabolicModel, String}" href="#COBREXA.gene_notes-Tuple{MetabolicModel, String}"><code>COBREXA.gene_notes</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">gene_notes(model::MetabolicModel, gene_id::String)::Notes</code></pre><p>Return the notes associated with the gene <code>gene_id</code> in <code>model</code>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/1011dcb5948951fc380713022f1ecf5b37961981/src/base/types/abstract/MetabolicModel.jl#L280-L284">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.genes-Tuple{MetabolicModel}" href="#COBREXA.genes-Tuple{MetabolicModel}"><code>COBREXA.genes</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">genes(a::MetabolicModel)::Vector{String}</code></pre><p>Return identifiers of all genes contained in the model. By default, there are no genes.</p><p>In SBML, these are usually called "gene products" but we write <code>genes</code> for simplicity.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/1011dcb5948951fc380713022f1ecf5b37961981/src/base/types/abstract/MetabolicModel.jl#L163-L171">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.metabolite_annotations-Tuple{MetabolicModel, String}" href="#COBREXA.metabolite_annotations-Tuple{MetabolicModel, String}"><code>COBREXA.metabolite_annotations</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">metabolite_annotations(a::MetabolicModel, metabolite_id::String)::Annotations</code></pre><p>Return standardized names that may help to reliably identify the metabolite. The dictionary assigns vectors of possible identifiers to identifier system names, e.g. <code>"ChEMBL" => ["123"]</code> or <code>"PubChem" => ["CID123", "CID654645645"]</code>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/1011dcb5948951fc380713022f1ecf5b37961981/src/base/types/abstract/MetabolicModel.jl#L240-L246">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.metabolite_charge-Tuple{MetabolicModel, String}" href="#COBREXA.metabolite_charge-Tuple{MetabolicModel, String}"><code>COBREXA.metabolite_charge</code></a> — <span class="docstring-category">Method</span></header><section><div><p>metabolite<em>charge(model::MetabolicModel, metabolite</em>id::String)::Maybe{Int}</p><p>Return the charge associated with metabolite <code>metabolite_id</code> in <code>model</code>. Returns <code>nothing</code> if charge not present.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/1011dcb5948951fc380713022f1ecf5b37961981/src/base/types/abstract/MetabolicModel.jl#L219-L224">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.metabolite_compartment-Tuple{MetabolicModel, String}" href="#COBREXA.metabolite_compartment-Tuple{MetabolicModel, String}"><code>COBREXA.metabolite_compartment</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">metabolite_compartment(model::MetabolicModel, metabolite_id::String)::Maybe{String}</code></pre><p>Return the compartment of metabolite <code>metabolite_id</code> in <code>model</code> if it is assigned. If not, return <code>nothing</code>. </p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/1011dcb5948951fc380713022f1ecf5b37961981/src/base/types/abstract/MetabolicModel.jl#L289-L294">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.metabolite_formula-Tuple{MetabolicModel, String}" href="#COBREXA.metabolite_formula-Tuple{MetabolicModel, String}"><code>COBREXA.metabolite_formula</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">metabolite_formula( +<html lang="en"><head><meta charset="UTF-8"/><meta name="viewport" content="width=device-width, initial-scale=1.0"/><title>Function reference · COBREXA.jl</title><link href="https://fonts.googleapis.com/css?family=Lato|Roboto+Mono" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.0/css/fontawesome.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.0/css/solid.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.0/css/brands.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.11.1/katex.min.css" rel="stylesheet" type="text/css"/><script>documenterBaseURL=".."</script><script src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.6/require.min.js" data-main="../assets/documenter.js"></script><script src="../siteinfo.js"></script><script src="../../versions.js"></script><link class="docs-theme-link" rel="stylesheet" type="text/css" href="../assets/themes/documenter-dark.css" data-theme-name="documenter-dark" data-theme-primary-dark/><link class="docs-theme-link" rel="stylesheet" type="text/css" href="../assets/themes/documenter-light.css" data-theme-name="documenter-light" data-theme-primary/><script src="../assets/themeswap.js"></script><link href="../assets/favicon.ico" rel="icon" type="image/x-icon"/></head><body><div id="documenter"><nav class="docs-sidebar"><a class="docs-logo" href="../"><img class="docs-light-only" src="../assets/logo.svg" alt="COBREXA.jl logo"/><img class="docs-dark-only" src="../assets/logo-dark.svg" alt="COBREXA.jl logo"/></a><div class="docs-package-name"><span class="docs-autofit">COBREXA.jl</span></div><form class="docs-search" action="../search/"><input class="docs-search-query" id="documenter-search-query" name="q" type="text" placeholder="Search docs"/></form><ul class="docs-menu"><li><a class="tocitem" href="../">Home</a></li><li><a class="tocitem" href="../tutorials/">Tutorials</a></li><li><a class="tocitem" href="../notebooks/">Examples and notebooks</a></li><li class="is-active"><a class="tocitem" href>Function reference</a><ul class="internal"><li><a class="tocitem" href="#Base-Types"><span>Base Types</span></a></li><li><a class="tocitem" href="#Model-types-and-contents"><span>Model types and contents</span></a></li><li><a class="tocitem" href="#Base-functions"><span>Base functions</span></a></li><li><a class="tocitem" href="#File-I/O-and-serialization"><span>File I/O and serialization</span></a></li><li><a class="tocitem" href="#Model-reconstruction"><span>Model reconstruction</span></a></li><li><a class="tocitem" href="#Analysis-functions"><span>Analysis functions</span></a></li><li><a class="tocitem" href="#Miscellaneous-utilities"><span>Miscellaneous utilities</span></a></li></ul></li><li><a class="tocitem" href="../howToContribute/">How to contribute</a></li></ul><div class="docs-version-selector field has-addons"><div class="control"><span class="docs-label button is-static is-size-7">Version</span></div><div class="docs-selector control is-expanded"><div class="select is-fullwidth is-size-7"><select id="documenter-version-selector"></select></div></div></div></nav><div class="docs-main"><header class="docs-navbar"><nav class="breadcrumb"><ul class="is-hidden-mobile"><li class="is-active"><a href>Function reference</a></li></ul><ul class="is-hidden-tablet"><li class="is-active"><a href>Function reference</a></li></ul></nav><div class="docs-right"><a class="docs-edit-link" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/master/docs/src/functions.md" title="Edit on GitHub"><span class="docs-icon fab">ï‚›</span><span class="docs-label is-hidden-touch">Edit on GitHub</span></a><a class="docs-settings-button fas fa-cog" id="documenter-settings-button" href="#" title="Settings"></a><a class="docs-sidebar-button fa fa-bars is-hidden-desktop" id="documenter-sidebar-button" href="#"></a></div></header><article class="content" id="documenter-page"><h1 id="Functions"><a class="docs-heading-anchor" href="#Functions">Functions</a><a id="Functions-1"></a><a class="docs-heading-anchor-permalink" href="#Functions" title="Permalink"></a></h1><h2 id="Base-Types"><a class="docs-heading-anchor" href="#Base-Types">Base Types</a><a id="Base-Types-1"></a><a class="docs-heading-anchor-permalink" href="#Base-Types" title="Permalink"></a></h2><article class="docstring"><header><a class="docstring-binding" id="COBREXA.Maybe" href="#COBREXA.Maybe"><code>COBREXA.Maybe</code></a> — <span class="docstring-category">Type</span></header><section><div><pre><code class="language-julia">Maybe{T} = Union{Nothing, T}</code></pre><p>A nice name for "nullable" type.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/d4509bae4f4df01fe7d9479069af6510c69ad99e/src/base/types/abstract/Maybe.jl#L2-L6">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA._default-Union{Tuple{T}, Tuple{T, Union{Nothing, T}}} where T" href="#COBREXA._default-Union{Tuple{T}, Tuple{T, Union{Nothing, T}}} where T"><code>COBREXA._default</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">_default(d::T, x::Maybe{T})::T where {T}</code></pre><p>Fold the <code>Maybe{T}</code> down to <code>T</code> by defaulting.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/d4509bae4f4df01fe7d9479069af6510c69ad99e/src/base/types/abstract/Maybe.jl#L9-L13">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA._maybemap-Tuple{Any, Union{Nothing, T} where T}" href="#COBREXA._maybemap-Tuple{Any, Union{Nothing, T} where T}"><code>COBREXA._maybemap</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">_maybemap(f, x::Maybe)::Maybe</code></pre><p>Apply a function to <code>x</code> only if it is not <code>nothing</code>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/d4509bae4f4df01fe7d9479069af6510c69ad99e/src/base/types/abstract/Maybe.jl#L18-L22">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.Annotations" href="#COBREXA.Annotations"><code>COBREXA.Annotations</code></a> — <span class="docstring-category">Type</span></header><section><div><pre><code class="language-julia">Annotations = Dict{String,Vector{String}}</code></pre><p>Dictionary used to store (possible multiple) standardized annotations of something, such as a <a href="#COBREXA.Metabolite"><code>Metabolite</code></a> and a <a href="#COBREXA.Reaction"><code>Reaction</code></a>.</p><p><strong>Example</strong></p><pre><code class="language-none">Annotations("PubChem" => ["CID12345", "CID54321"])</code></pre></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/d4509bae4f4df01fe7d9479069af6510c69ad99e/src/base/types/abstract/MetabolicModel.jl#L39-L49">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.GeneAssociation" href="#COBREXA.GeneAssociation"><code>COBREXA.GeneAssociation</code></a> — <span class="docstring-category">Type</span></header><section><div><pre><code class="language-julia">GeneAssociation = Vector{Vector{String}}</code></pre><p>An association to genes, represented as a logical formula in a positive disjunctive normal form (DNF). (The 2nd-level vectors of strings are connected by "and" to form conjunctions, and the 1st-level vectors of these conjunctions are connected by "or" to form the DNF.)</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/d4509bae4f4df01fe7d9479069af6510c69ad99e/src/base/types/abstract/MetabolicModel.jl#L22-L29">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.MetabolicModel" href="#COBREXA.MetabolicModel"><code>COBREXA.MetabolicModel</code></a> — <span class="docstring-category">Type</span></header><section><div><pre><code class="language-julia">abstract type MetabolicModel end</code></pre><p>A helper supertype that wraps everything usable as a linear-like model for COBREXA functions.</p><p>If you want your model type to work with COBREXA, add the <code>MetabolicModel</code> as its supertype, and implement the accessor functions. Accessors <a href="#COBREXA.reactions-Tuple{MetabolicModel}"><code>reactions</code></a>, <a href="#COBREXA.metabolites-Tuple{MetabolicModel}"><code>metabolites</code></a>, <a href="#COBREXA.stoichiometry-Tuple{MetabolicModel}"><code>stoichiometry</code></a>, <a href="#COBREXA.bounds-Tuple{MetabolicModel}"><code>bounds</code></a> and <a href="#COBREXA.objective-Tuple{MetabolicModel}"><code>objective</code></a> must be implemented; others are not mandatory and default to safe "empty" values.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/d4509bae4f4df01fe7d9479069af6510c69ad99e/src/base/types/abstract/MetabolicModel.jl#L2-L13">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.MetaboliteFormula" href="#COBREXA.MetaboliteFormula"><code>COBREXA.MetaboliteFormula</code></a> — <span class="docstring-category">Type</span></header><section><div><pre><code class="language-julia">MetaboliteFormula = Dict{String,Int}</code></pre><p>Dictionary of atoms and their abundances in a molecule.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/d4509bae4f4df01fe7d9479069af6510c69ad99e/src/base/types/abstract/MetabolicModel.jl#L32-L36">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.Notes" href="#COBREXA.Notes"><code>COBREXA.Notes</code></a> — <span class="docstring-category">Type</span></header><section><div><pre><code class="language-julia">Notes = Dict{String,Vector{String}}</code></pre><p>Free-form notes about something (e.g. a <a href="#COBREXA.Gene"><code>Gene</code></a>), categorized by "topic".</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/d4509bae4f4df01fe7d9479069af6510c69ad99e/src/base/types/abstract/MetabolicModel.jl#L52-L57">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.balance-Tuple{MetabolicModel}" href="#COBREXA.balance-Tuple{MetabolicModel}"><code>COBREXA.balance</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">balance(a::MetabolicModel)::SparseVec</code></pre><p>Get the sparse balance vector of a model (ie. the <code>b</code> from <code>S x = b</code>).</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/d4509bae4f4df01fe7d9479069af6510c69ad99e/src/base/types/abstract/MetabolicModel.jl#L116-L120">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.bounds-Tuple{MetabolicModel}" href="#COBREXA.bounds-Tuple{MetabolicModel}"><code>COBREXA.bounds</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">bounds(a::MetabolicModel)::Tuple{SparseVec,SparseVec}</code></pre><p>Get the lower and upper flux bounds of a model.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/d4509bae4f4df01fe7d9479069af6510c69ad99e/src/base/types/abstract/MetabolicModel.jl#L107-L111">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.coupling-Tuple{MetabolicModel}" href="#COBREXA.coupling-Tuple{MetabolicModel}"><code>COBREXA.coupling</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">coupling(a::MetabolicModel)::SparseMat</code></pre><p>Get a matrix of coupling constraint definitions of a model. By default, there is no coupling in the models.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/d4509bae4f4df01fe7d9479069af6510c69ad99e/src/base/types/abstract/MetabolicModel.jl#L134-L139">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.coupling_bounds-Tuple{MetabolicModel}" href="#COBREXA.coupling_bounds-Tuple{MetabolicModel}"><code>COBREXA.coupling_bounds</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">coupling_bounds(a::MetabolicModel)::Tuple{SparseVec,SparseVec}</code></pre><p>Get the lower and upper bounds for each coupling bound in a model, as specified by <code>coupling</code>. By default, the model does not have any coupling bounds.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/d4509bae4f4df01fe7d9479069af6510c69ad99e/src/base/types/abstract/MetabolicModel.jl#L153-L158">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.gene_annotations-Tuple{MetabolicModel, String}" href="#COBREXA.gene_annotations-Tuple{MetabolicModel, String}"><code>COBREXA.gene_annotations</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">gene_annotations(a::MetabolicModel, gene_id::String)::Annotations</code></pre><p>Return standardized names that identify the corresponding gene or product. The dictionary assigns vectors of possible identifiers to identifier system names, e.g. <code>"PDB" => ["PROT01"]</code>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/d4509bae4f4df01fe7d9479069af6510c69ad99e/src/base/types/abstract/MetabolicModel.jl#L251-L257">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.gene_notes-Tuple{MetabolicModel, String}" href="#COBREXA.gene_notes-Tuple{MetabolicModel, String}"><code>COBREXA.gene_notes</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">gene_notes(model::MetabolicModel, gene_id::String)::Notes</code></pre><p>Return the notes associated with the gene <code>gene_id</code> in <code>model</code>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/d4509bae4f4df01fe7d9479069af6510c69ad99e/src/base/types/abstract/MetabolicModel.jl#L280-L284">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.genes-Tuple{MetabolicModel}" href="#COBREXA.genes-Tuple{MetabolicModel}"><code>COBREXA.genes</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">genes(a::MetabolicModel)::Vector{String}</code></pre><p>Return identifiers of all genes contained in the model. By default, there are no genes.</p><p>In SBML, these are usually called "gene products" but we write <code>genes</code> for simplicity.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/d4509bae4f4df01fe7d9479069af6510c69ad99e/src/base/types/abstract/MetabolicModel.jl#L163-L171">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.metabolite_annotations-Tuple{MetabolicModel, String}" href="#COBREXA.metabolite_annotations-Tuple{MetabolicModel, String}"><code>COBREXA.metabolite_annotations</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">metabolite_annotations(a::MetabolicModel, metabolite_id::String)::Annotations</code></pre><p>Return standardized names that may help to reliably identify the metabolite. The dictionary assigns vectors of possible identifiers to identifier system names, e.g. <code>"ChEMBL" => ["123"]</code> or <code>"PubChem" => ["CID123", "CID654645645"]</code>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/d4509bae4f4df01fe7d9479069af6510c69ad99e/src/base/types/abstract/MetabolicModel.jl#L240-L246">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.metabolite_charge-Tuple{MetabolicModel, String}" href="#COBREXA.metabolite_charge-Tuple{MetabolicModel, String}"><code>COBREXA.metabolite_charge</code></a> — <span class="docstring-category">Method</span></header><section><div><p>metabolite<em>charge(model::MetabolicModel, metabolite</em>id::String)::Maybe{Int}</p><p>Return the charge associated with metabolite <code>metabolite_id</code> in <code>model</code>. Returns <code>nothing</code> if charge not present.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/d4509bae4f4df01fe7d9479069af6510c69ad99e/src/base/types/abstract/MetabolicModel.jl#L219-L224">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.metabolite_compartment-Tuple{MetabolicModel, String}" href="#COBREXA.metabolite_compartment-Tuple{MetabolicModel, String}"><code>COBREXA.metabolite_compartment</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">metabolite_compartment(model::MetabolicModel, metabolite_id::String)::Maybe{String}</code></pre><p>Return the compartment of metabolite <code>metabolite_id</code> in <code>model</code> if it is assigned. If not, return <code>nothing</code>. </p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/d4509bae4f4df01fe7d9479069af6510c69ad99e/src/base/types/abstract/MetabolicModel.jl#L289-L294">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.metabolite_formula-Tuple{MetabolicModel, String}" href="#COBREXA.metabolite_formula-Tuple{MetabolicModel, String}"><code>COBREXA.metabolite_formula</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">metabolite_formula( a::MetabolicModel, metabolite_id::String, -)::Maybe{MetaboliteFormula}</code></pre><p>Return the formula of metabolite <code>metabolite_id</code> in <code>model</code>. Return <code>nothing</code> in case the formula is not known or irrelevant.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/1011dcb5948951fc380713022f1ecf5b37961981/src/base/types/abstract/MetabolicModel.jl#L203-L211">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.metabolite_notes-Tuple{MetabolicModel, String}" href="#COBREXA.metabolite_notes-Tuple{MetabolicModel, String}"><code>COBREXA.metabolite_notes</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">metabolite_notes(model::MetabolicModel, metabolite_id::String)::Notes</code></pre><p>Return the notes associated with metabolite <code>reaction_id</code> in <code>model</code>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/1011dcb5948951fc380713022f1ecf5b37961981/src/base/types/abstract/MetabolicModel.jl#L271-L275">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.metabolites-Tuple{MetabolicModel}" href="#COBREXA.metabolites-Tuple{MetabolicModel}"><code>COBREXA.metabolites</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">metabolites(a::MetabolicModel)::Vector{String}</code></pre><p>Return a vector of metabolite identifiers in a model.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/1011dcb5948951fc380713022f1ecf5b37961981/src/base/types/abstract/MetabolicModel.jl#L71-L75">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.n_coupling_constraints-Tuple{MetabolicModel}" href="#COBREXA.n_coupling_constraints-Tuple{MetabolicModel}"><code>COBREXA.n_coupling_constraints</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">n_coupling_constraints(a::MetabolicModel)::Int</code></pre><p>Get the number of coupling constraints in a model.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/1011dcb5948951fc380713022f1ecf5b37961981/src/base/types/abstract/MetabolicModel.jl#L144-L148">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.n_genes-Tuple{MetabolicModel}" href="#COBREXA.n_genes-Tuple{MetabolicModel}"><code>COBREXA.n_genes</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">n_genes(a::MetabolicModel)::Int</code></pre><p>Return the number of genes in the model (as returned by <a href="#COBREXA.genes-Tuple{MetabolicModel}"><code>genes</code></a>). If you just need the number of the genes, this may be much more efficient than calling <a href="#COBREXA.genes-Tuple{MetabolicModel}"><code>genes</code></a> and measuring the array.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/1011dcb5948951fc380713022f1ecf5b37961981/src/base/types/abstract/MetabolicModel.jl#L176-L182">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.n_metabolites-Tuple{MetabolicModel}" href="#COBREXA.n_metabolites-Tuple{MetabolicModel}"><code>COBREXA.n_metabolites</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">n_metabolites(a::MetabolicModel)::Int</code></pre><p>Get the number of metabolites in a model.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/1011dcb5948951fc380713022f1ecf5b37961981/src/base/types/abstract/MetabolicModel.jl#L89-L93">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.n_reactions-Tuple{MetabolicModel}" href="#COBREXA.n_reactions-Tuple{MetabolicModel}"><code>COBREXA.n_reactions</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">n_reactions(a::MetabolicModel)::Int</code></pre><p>Get the number of reactions in a model.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/1011dcb5948951fc380713022f1ecf5b37961981/src/base/types/abstract/MetabolicModel.jl#L80-L84">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.objective-Tuple{MetabolicModel}" href="#COBREXA.objective-Tuple{MetabolicModel}"><code>COBREXA.objective</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">objective(a::MetabolicModel)::SparseVec</code></pre><p>Get the objective vector of a model.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/1011dcb5948951fc380713022f1ecf5b37961981/src/base/types/abstract/MetabolicModel.jl#L125-L129">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.precache!-Tuple{MetabolicModel}" href="#COBREXA.precache!-Tuple{MetabolicModel}"><code>COBREXA.precache!</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">precache!(a::MetabolicModel)::Nothing</code></pre><p>Do whatever is feasible to get the model into a state that can be read from as-quickly-as-possible. This may include e.g. generating helper index structures and loading delayed parts of the model from disk. The model should be modified "transparently" in-place. Analysis functions call this right before applying modifications or converting the model to the optimization model using <a href="#COBREXA.make_optimization_model-Tuple{MetabolicModel, Any}"><code>make_optimization_model</code></a>; usually on the same machine where the optimizers (and, generally, the core analysis algorithms) will run. The calls are done in a good hope that the performance will be improved.</p><p>By default, it should be safe to do nothing.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/1011dcb5948951fc380713022f1ecf5b37961981/src/base/types/abstract/MetabolicModel.jl#L320-L333">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.reaction_annotations-Tuple{MetabolicModel, String}" href="#COBREXA.reaction_annotations-Tuple{MetabolicModel, String}"><code>COBREXA.reaction_annotations</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">reaction_annotations(a::MetabolicModel, reaction_id::String)::Annotations</code></pre><p>Return standardized names that may help identifying the reaction. The dictionary assigns vectors of possible identifiers to identifier system names, e.g. <code>"Reactome" => ["reactomeID123"]</code>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/1011dcb5948951fc380713022f1ecf5b37961981/src/base/types/abstract/MetabolicModel.jl#L229-L235">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.reaction_gene_association-Tuple{MetabolicModel, String}" href="#COBREXA.reaction_gene_association-Tuple{MetabolicModel, String}"><code>COBREXA.reaction_gene_association</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">reaction_gene_association(a::MetabolicModel, gene_id::String)::Maybe{GeneAssociation}</code></pre><p>Returns the sets of genes that need to be present so that the reaction can work (technically, a DNF on gene availability, with positive atoms only).</p><p>For simplicity, <code>nothing</code> may be returned, meaning that the reaction always takes place. (in DNF, that would be equivalent to returning <code>[[]]</code>.)</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/1011dcb5948951fc380713022f1ecf5b37961981/src/base/types/abstract/MetabolicModel.jl#L187-L195">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.reaction_notes-Tuple{MetabolicModel, String}" href="#COBREXA.reaction_notes-Tuple{MetabolicModel, String}"><code>COBREXA.reaction_notes</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">reaction_notes(model::MetabolicModel, reaction_id::String)::Notes</code></pre><p>Return the notes associated with reaction <code>reaction_id</code> in <code>model</code>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/1011dcb5948951fc380713022f1ecf5b37961981/src/base/types/abstract/MetabolicModel.jl#L262-L266">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.reaction_stoichiometry-Tuple{MetabolicModel, String}" href="#COBREXA.reaction_stoichiometry-Tuple{MetabolicModel, String}"><code>COBREXA.reaction_stoichiometry</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">reaction_stoichiometry(model::MetaboliteModel, rxn_id::String)::Dict{String, Float64}</code></pre><p>Return the reaction equation of reaction with id <code>rxn_id</code> in model. The reaction equation maps metabolite ids to their stoichiometric coefficients.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/1011dcb5948951fc380713022f1ecf5b37961981/src/base/types/abstract/MetabolicModel.jl#L309-L314">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.reaction_subsystem-Tuple{MetabolicModel, String}" href="#COBREXA.reaction_subsystem-Tuple{MetabolicModel, String}"><code>COBREXA.reaction_subsystem</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">reaction_subsystem(model::MetabolicModel, reaction_id::String)::Maybe{String}</code></pre><p>Return the subsystem of reaction <code>reaction_id</code> in <code>model</code> if it is assigned. If not, return <code>nothing</code>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/1011dcb5948951fc380713022f1ecf5b37961981/src/base/types/abstract/MetabolicModel.jl#L299-L304">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.reactions-Tuple{MetabolicModel}" href="#COBREXA.reactions-Tuple{MetabolicModel}"><code>COBREXA.reactions</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">reactions(a::MetabolicModel)::Vector{String}</code></pre><p>Return a vector of reaction identifiers in a model.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/1011dcb5948951fc380713022f1ecf5b37961981/src/base/types/abstract/MetabolicModel.jl#L62-L66">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.stoichiometry-Tuple{MetabolicModel}" href="#COBREXA.stoichiometry-Tuple{MetabolicModel}"><code>COBREXA.stoichiometry</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">stoichiometry(a::MetabolicModel)::SparseMat</code></pre><p>Get the sparse stoichiometry matrix of a model.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/1011dcb5948951fc380713022f1ecf5b37961981/src/base/types/abstract/MetabolicModel.jl#L98-L102">source</a></section></article><h2 id="Model-types-and-contents"><a class="docs-heading-anchor" href="#Model-types-and-contents">Model types and contents</a><a id="Model-types-and-contents-1"></a><a class="docs-heading-anchor-permalink" href="#Model-types-and-contents" title="Permalink"></a></h2><article class="docstring"><header><a class="docstring-binding" id="COBREXA.CoreModel" href="#COBREXA.CoreModel"><code>COBREXA.CoreModel</code></a> — <span class="docstring-category">Type</span></header><section><div><pre><code class="language-julia">struct CoreModel <: MetabolicModel</code></pre><p>A "bare bones" core linear optimization problem of the form, with reaction and metabolite names.</p><pre><code class="language-none">min c^T x +)::Maybe{MetaboliteFormula}</code></pre><p>Return the formula of metabolite <code>metabolite_id</code> in <code>model</code>. Return <code>nothing</code> in case the formula is not known or irrelevant.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/d4509bae4f4df01fe7d9479069af6510c69ad99e/src/base/types/abstract/MetabolicModel.jl#L203-L211">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.metabolite_notes-Tuple{MetabolicModel, String}" href="#COBREXA.metabolite_notes-Tuple{MetabolicModel, String}"><code>COBREXA.metabolite_notes</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">metabolite_notes(model::MetabolicModel, metabolite_id::String)::Notes</code></pre><p>Return the notes associated with metabolite <code>reaction_id</code> in <code>model</code>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/d4509bae4f4df01fe7d9479069af6510c69ad99e/src/base/types/abstract/MetabolicModel.jl#L271-L275">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.metabolites-Tuple{MetabolicModel}" href="#COBREXA.metabolites-Tuple{MetabolicModel}"><code>COBREXA.metabolites</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">metabolites(a::MetabolicModel)::Vector{String}</code></pre><p>Return a vector of metabolite identifiers in a model.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/d4509bae4f4df01fe7d9479069af6510c69ad99e/src/base/types/abstract/MetabolicModel.jl#L71-L75">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.n_coupling_constraints-Tuple{MetabolicModel}" href="#COBREXA.n_coupling_constraints-Tuple{MetabolicModel}"><code>COBREXA.n_coupling_constraints</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">n_coupling_constraints(a::MetabolicModel)::Int</code></pre><p>Get the number of coupling constraints in a model.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/d4509bae4f4df01fe7d9479069af6510c69ad99e/src/base/types/abstract/MetabolicModel.jl#L144-L148">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.n_genes-Tuple{MetabolicModel}" href="#COBREXA.n_genes-Tuple{MetabolicModel}"><code>COBREXA.n_genes</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">n_genes(a::MetabolicModel)::Int</code></pre><p>Return the number of genes in the model (as returned by <a href="#COBREXA.genes-Tuple{MetabolicModel}"><code>genes</code></a>). If you just need the number of the genes, this may be much more efficient than calling <a href="#COBREXA.genes-Tuple{MetabolicModel}"><code>genes</code></a> and measuring the array.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/d4509bae4f4df01fe7d9479069af6510c69ad99e/src/base/types/abstract/MetabolicModel.jl#L176-L182">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.n_metabolites-Tuple{MetabolicModel}" href="#COBREXA.n_metabolites-Tuple{MetabolicModel}"><code>COBREXA.n_metabolites</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">n_metabolites(a::MetabolicModel)::Int</code></pre><p>Get the number of metabolites in a model.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/d4509bae4f4df01fe7d9479069af6510c69ad99e/src/base/types/abstract/MetabolicModel.jl#L89-L93">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.n_reactions-Tuple{MetabolicModel}" href="#COBREXA.n_reactions-Tuple{MetabolicModel}"><code>COBREXA.n_reactions</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">n_reactions(a::MetabolicModel)::Int</code></pre><p>Get the number of reactions in a model.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/d4509bae4f4df01fe7d9479069af6510c69ad99e/src/base/types/abstract/MetabolicModel.jl#L80-L84">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.objective-Tuple{MetabolicModel}" href="#COBREXA.objective-Tuple{MetabolicModel}"><code>COBREXA.objective</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">objective(a::MetabolicModel)::SparseVec</code></pre><p>Get the objective vector of a model.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/d4509bae4f4df01fe7d9479069af6510c69ad99e/src/base/types/abstract/MetabolicModel.jl#L125-L129">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.precache!-Tuple{MetabolicModel}" href="#COBREXA.precache!-Tuple{MetabolicModel}"><code>COBREXA.precache!</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">precache!(a::MetabolicModel)::Nothing</code></pre><p>Do whatever is feasible to get the model into a state that can be read from as-quickly-as-possible. This may include e.g. generating helper index structures and loading delayed parts of the model from disk. The model should be modified "transparently" in-place. Analysis functions call this right before applying modifications or converting the model to the optimization model using <a href="#COBREXA.make_optimization_model-Tuple{MetabolicModel, Any}"><code>make_optimization_model</code></a>; usually on the same machine where the optimizers (and, generally, the core analysis algorithms) will run. The calls are done in a good hope that the performance will be improved.</p><p>By default, it should be safe to do nothing.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/d4509bae4f4df01fe7d9479069af6510c69ad99e/src/base/types/abstract/MetabolicModel.jl#L320-L333">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.reaction_annotations-Tuple{MetabolicModel, String}" href="#COBREXA.reaction_annotations-Tuple{MetabolicModel, String}"><code>COBREXA.reaction_annotations</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">reaction_annotations(a::MetabolicModel, reaction_id::String)::Annotations</code></pre><p>Return standardized names that may help identifying the reaction. The dictionary assigns vectors of possible identifiers to identifier system names, e.g. <code>"Reactome" => ["reactomeID123"]</code>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/d4509bae4f4df01fe7d9479069af6510c69ad99e/src/base/types/abstract/MetabolicModel.jl#L229-L235">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.reaction_gene_association-Tuple{MetabolicModel, String}" href="#COBREXA.reaction_gene_association-Tuple{MetabolicModel, String}"><code>COBREXA.reaction_gene_association</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">reaction_gene_association(a::MetabolicModel, gene_id::String)::Maybe{GeneAssociation}</code></pre><p>Returns the sets of genes that need to be present so that the reaction can work (technically, a DNF on gene availability, with positive atoms only).</p><p>For simplicity, <code>nothing</code> may be returned, meaning that the reaction always takes place. (in DNF, that would be equivalent to returning <code>[[]]</code>.)</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/d4509bae4f4df01fe7d9479069af6510c69ad99e/src/base/types/abstract/MetabolicModel.jl#L187-L195">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.reaction_notes-Tuple{MetabolicModel, String}" href="#COBREXA.reaction_notes-Tuple{MetabolicModel, String}"><code>COBREXA.reaction_notes</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">reaction_notes(model::MetabolicModel, reaction_id::String)::Notes</code></pre><p>Return the notes associated with reaction <code>reaction_id</code> in <code>model</code>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/d4509bae4f4df01fe7d9479069af6510c69ad99e/src/base/types/abstract/MetabolicModel.jl#L262-L266">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.reaction_stoichiometry-Tuple{MetabolicModel, String}" href="#COBREXA.reaction_stoichiometry-Tuple{MetabolicModel, String}"><code>COBREXA.reaction_stoichiometry</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">reaction_stoichiometry(model::MetaboliteModel, rxn_id::String)::Dict{String, Float64}</code></pre><p>Return the reaction equation of reaction with id <code>rxn_id</code> in model. The reaction equation maps metabolite ids to their stoichiometric coefficients.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/d4509bae4f4df01fe7d9479069af6510c69ad99e/src/base/types/abstract/MetabolicModel.jl#L309-L314">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.reaction_subsystem-Tuple{MetabolicModel, String}" href="#COBREXA.reaction_subsystem-Tuple{MetabolicModel, String}"><code>COBREXA.reaction_subsystem</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">reaction_subsystem(model::MetabolicModel, reaction_id::String)::Maybe{String}</code></pre><p>Return the subsystem of reaction <code>reaction_id</code> in <code>model</code> if it is assigned. If not, return <code>nothing</code>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/d4509bae4f4df01fe7d9479069af6510c69ad99e/src/base/types/abstract/MetabolicModel.jl#L299-L304">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.reactions-Tuple{MetabolicModel}" href="#COBREXA.reactions-Tuple{MetabolicModel}"><code>COBREXA.reactions</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">reactions(a::MetabolicModel)::Vector{String}</code></pre><p>Return a vector of reaction identifiers in a model.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/d4509bae4f4df01fe7d9479069af6510c69ad99e/src/base/types/abstract/MetabolicModel.jl#L62-L66">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.stoichiometry-Tuple{MetabolicModel}" href="#COBREXA.stoichiometry-Tuple{MetabolicModel}"><code>COBREXA.stoichiometry</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">stoichiometry(a::MetabolicModel)::SparseMat</code></pre><p>Get the sparse stoichiometry matrix of a model.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/d4509bae4f4df01fe7d9479069af6510c69ad99e/src/base/types/abstract/MetabolicModel.jl#L98-L102">source</a></section></article><h2 id="Model-types-and-contents"><a class="docs-heading-anchor" href="#Model-types-and-contents">Model types and contents</a><a id="Model-types-and-contents-1"></a><a class="docs-heading-anchor-permalink" href="#Model-types-and-contents" title="Permalink"></a></h2><article class="docstring"><header><a class="docstring-binding" id="COBREXA.CoreModel" href="#COBREXA.CoreModel"><code>COBREXA.CoreModel</code></a> — <span class="docstring-category">Type</span></header><section><div><pre><code class="language-julia">struct CoreModel <: MetabolicModel</code></pre><p>A "bare bones" core linear optimization problem of the form, with reaction and metabolite names.</p><pre><code class="language-none">min c^T x s.t. S x = b - xâ‚— ≤ x ≤ xᵤ</code></pre></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/1011dcb5948951fc380713022f1ecf5b37961981/src/base/types/CoreModel.jl#L2-L12">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="Base.convert-Union{Tuple{M}, Tuple{Type{CoreModel}, M}} where M<:MetabolicModel" href="#Base.convert-Union{Tuple{M}, Tuple{Type{CoreModel}, M}} where M<:MetabolicModel"><code>Base.convert</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">Base.convert(::Type{CoreModel}, m::M) where {M <: MetabolicModel}</code></pre><p>Make a <code>CoreModel</code> out of any compatible model type.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/1011dcb5948951fc380713022f1ecf5b37961981/src/base/types/CoreModel.jl#L116-L120">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.balance-Tuple{CoreModel}" href="#COBREXA.balance-Tuple{CoreModel}"><code>COBREXA.balance</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">balance(a::CoreModel)::SparseVec</code></pre><p><code>CoreModel</code> target flux balance.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/1011dcb5948951fc380713022f1ecf5b37961981/src/base/types/CoreModel.jl#L78-L82">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.bounds-Tuple{CoreModel}" href="#COBREXA.bounds-Tuple{CoreModel}"><code>COBREXA.bounds</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">bounds(a::CoreModel)::Tuple{SparseVec,SparseVec}</code></pre><p><code>CoreModel</code> flux bounds.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/1011dcb5948951fc380713022f1ecf5b37961981/src/base/types/CoreModel.jl#L69-L73">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.metabolites-Tuple{CoreModel}" href="#COBREXA.metabolites-Tuple{CoreModel}"><code>COBREXA.metabolites</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">metabolites(a::CoreModel)::Vector{String}</code></pre><p>Metabolites in a <code>CoreModel</code>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/1011dcb5948951fc380713022f1ecf5b37961981/src/base/types/CoreModel.jl#L51-L55">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.objective-Tuple{CoreModel}" href="#COBREXA.objective-Tuple{CoreModel}"><code>COBREXA.objective</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">objective(a::CoreModel)::SparseVec</code></pre><p><code>CoreModel</code> objective vector.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/1011dcb5948951fc380713022f1ecf5b37961981/src/base/types/CoreModel.jl#L87-L91">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.reaction_stoichiometry-Tuple{CoreModel, Int64}" href="#COBREXA.reaction_stoichiometry-Tuple{CoreModel, Int64}"><code>COBREXA.reaction_stoichiometry</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">reaction_stoichiometry(model::CoreModel, rxn_id::String)::Dict{String, Float64}</code></pre><p>Return the reaction equation of reaction with id <code>rxn_ind</code> in model. The reaction equation maps metabolite ids to their stoichiometric coefficients.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/1011dcb5948951fc380713022f1ecf5b37961981/src/base/types/CoreModel.jl#L106-L111">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.reaction_stoichiometry-Tuple{CoreModel, String}" href="#COBREXA.reaction_stoichiometry-Tuple{CoreModel, String}"><code>COBREXA.reaction_stoichiometry</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">reaction_stoichiometry(model::CoreModel, rxn_id::String)::Dict{String, Float64}</code></pre><p>Return the reaction equation of reaction with id <code>rxn_id</code> in model. The reaction equation maps metabolite ids to their stoichiometric coefficients.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/1011dcb5948951fc380713022f1ecf5b37961981/src/base/types/CoreModel.jl#L96-L101">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.reactions-Tuple{CoreModel}" href="#COBREXA.reactions-Tuple{CoreModel}"><code>COBREXA.reactions</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">reactions(a::CoreModel)::Vector{String}</code></pre><p>Get the reactions in a <code>CoreModel</code>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/1011dcb5948951fc380713022f1ecf5b37961981/src/base/types/CoreModel.jl#L42-L46">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.stoichiometry-Tuple{CoreModel}" href="#COBREXA.stoichiometry-Tuple{CoreModel}"><code>COBREXA.stoichiometry</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">stoichiometry(a::CoreModel)::SparseMat</code></pre><p><code>CoreModel</code> stoichiometry matrix.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/1011dcb5948951fc380713022f1ecf5b37961981/src/base/types/CoreModel.jl#L60-L64">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.CoreModelCoupled" href="#COBREXA.CoreModelCoupled"><code>COBREXA.CoreModelCoupled</code></a> — <span class="docstring-category">Type</span></header><section><div><pre><code class="language-julia">struct CoreModelCoupled <: MetabolicModel</code></pre><p>The linear model with additional coupling constraints in the form</p><pre><code class="language-none"> câ‚— ≤ C x ≤ cᵤ</code></pre></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/1011dcb5948951fc380713022f1ecf5b37961981/src/base/types/CoreModelCoupled.jl#L2-L9">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="Base.convert-Tuple{Type{CoreModelCoupled}, MetabolicModel}" href="#Base.convert-Tuple{Type{CoreModelCoupled}, MetabolicModel}"><code>Base.convert</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">Base.convert(::Type{CoreModelCoupled}, mm::MetabolicModel)</code></pre><p>Make a <code>CoreModelCoupled</code> out of any compatible model type.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/1011dcb5948951fc380713022f1ecf5b37961981/src/base/types/CoreModelCoupled.jl#L127-L131">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.balance-Tuple{CoreModelCoupled}" href="#COBREXA.balance-Tuple{CoreModelCoupled}"><code>COBREXA.balance</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">balance(a::CoreModelCoupled)</code></pre><p>Extract balance from <a href="#COBREXA.CoreModelCoupled"><code>CoreModelCoupled</code></a> (uses the internal <a href="#COBREXA.CoreModel"><code>CoreModel</code></a>).</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/1011dcb5948951fc380713022f1ecf5b37961981/src/base/types/CoreModelCoupled.jl#L64-L69">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.bounds-Tuple{CoreModelCoupled}" href="#COBREXA.bounds-Tuple{CoreModelCoupled}"><code>COBREXA.bounds</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">bounds(a::CoreModelCoupled)</code></pre><p>Extract bounds from <a href="#COBREXA.CoreModelCoupled"><code>CoreModelCoupled</code></a> (uses the internal <a href="#COBREXA.CoreModel"><code>CoreModel</code></a>).</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/1011dcb5948951fc380713022f1ecf5b37961981/src/base/types/CoreModelCoupled.jl#L56-L61">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.coupling-Tuple{CoreModelCoupled}" href="#COBREXA.coupling-Tuple{CoreModelCoupled}"><code>COBREXA.coupling</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">coupling(a::CoreModelCoupled)::SparseMat</code></pre><p>Coupling constraint matrix for a <code>CoreModelCoupled</code>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/1011dcb5948951fc380713022f1ecf5b37961981/src/base/types/CoreModelCoupled.jl#L80-L84">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.coupling_bounds-Tuple{CoreModelCoupled}" href="#COBREXA.coupling_bounds-Tuple{CoreModelCoupled}"><code>COBREXA.coupling_bounds</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">coupling_bounds(a::CoreModelCoupled)::Tuple{SparseVec,SparseVec}</code></pre><p>Coupling bounds for a <code>CoreModelCoupled</code>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/1011dcb5948951fc380713022f1ecf5b37961981/src/base/types/CoreModelCoupled.jl#L98-L102">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.metabolites-Tuple{CoreModelCoupled}" href="#COBREXA.metabolites-Tuple{CoreModelCoupled}"><code>COBREXA.metabolites</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">metabolites(a::CoreModelCoupled)</code></pre><p>Extract metabolites from <a href="#COBREXA.CoreModelCoupled"><code>CoreModelCoupled</code></a> (uses the internal <a href="#COBREXA.CoreModel"><code>CoreModel</code></a>).</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/1011dcb5948951fc380713022f1ecf5b37961981/src/base/types/CoreModelCoupled.jl#L40-L45">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.n_coupling_constraints-Tuple{CoreModelCoupled}" href="#COBREXA.n_coupling_constraints-Tuple{CoreModelCoupled}"><code>COBREXA.n_coupling_constraints</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">n_coupling_constraints(a::CoreModelCoupled)::Int</code></pre><p>The number of coupling constraints in a <code>CoreModelCoupled</code>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/1011dcb5948951fc380713022f1ecf5b37961981/src/base/types/CoreModelCoupled.jl#L89-L93">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.objective-Tuple{CoreModelCoupled}" href="#COBREXA.objective-Tuple{CoreModelCoupled}"><code>COBREXA.objective</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">objective(a::CoreModelCoupled)</code></pre><p>Extract objective from <a href="#COBREXA.CoreModelCoupled"><code>CoreModelCoupled</code></a> (uses the internal <a href="#COBREXA.CoreModel"><code>CoreModel</code></a>).</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/1011dcb5948951fc380713022f1ecf5b37961981/src/base/types/CoreModelCoupled.jl#L72-L77">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.reaction_stoichiometry-Tuple{CoreModelCoupled, Int64}" href="#COBREXA.reaction_stoichiometry-Tuple{CoreModelCoupled, Int64}"><code>COBREXA.reaction_stoichiometry</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">reaction_stoichiometry(model::CoreModelCoupled, rxn_ind::Int)::Dict{String, Float64}</code></pre><p>Return the reaction equation of reaction with id <code>rxn_ind</code> in model. The reaction equation maps metabolite ids to their stoichiometric coefficients.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/1011dcb5948951fc380713022f1ecf5b37961981/src/base/types/CoreModelCoupled.jl#L117-L122">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.reaction_stoichiometry-Tuple{CoreModelCoupled, String}" href="#COBREXA.reaction_stoichiometry-Tuple{CoreModelCoupled, String}"><code>COBREXA.reaction_stoichiometry</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">reaction_stoichiometry(model::CoreModelCoupled, rxn_id::String)::Dict{String, Float64}</code></pre><p>Return the reaction equation of reaction with id <code>rxn_id</code> in model. The reaction equation maps metabolite ids to their stoichiometric coefficients.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/1011dcb5948951fc380713022f1ecf5b37961981/src/base/types/CoreModelCoupled.jl#L107-L112">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.reactions-Tuple{CoreModelCoupled}" href="#COBREXA.reactions-Tuple{CoreModelCoupled}"><code>COBREXA.reactions</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">reactions(a::CoreModelCoupled)</code></pre><p>Extract reactions from <a href="#COBREXA.CoreModelCoupled"><code>CoreModelCoupled</code></a> (uses the internal <a href="#COBREXA.CoreModel"><code>CoreModel</code></a>).</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/1011dcb5948951fc380713022f1ecf5b37961981/src/base/types/CoreModelCoupled.jl#L32-L37">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.stoichiometry-Tuple{CoreModelCoupled}" href="#COBREXA.stoichiometry-Tuple{CoreModelCoupled}"><code>COBREXA.stoichiometry</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">stoichiometry(a::CoreModelCoupled)</code></pre><p>Extract stoichiometry from <a href="#COBREXA.CoreModelCoupled"><code>CoreModelCoupled</code></a> (uses the internal <a href="#COBREXA.CoreModel"><code>CoreModel</code></a>).</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/1011dcb5948951fc380713022f1ecf5b37961981/src/base/types/CoreModelCoupled.jl#L48-L53">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.Gene" href="#COBREXA.Gene"><code>COBREXA.Gene</code></a> — <span class="docstring-category">Type</span></header><section><div><p>Gene struct.</p><p><strong>Fields</strong></p><pre><code class="language-none">id :: String + xâ‚— ≤ x ≤ xᵤ</code></pre></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/d4509bae4f4df01fe7d9479069af6510c69ad99e/src/base/types/CoreModel.jl#L2-L12">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="Base.convert-Union{Tuple{M}, Tuple{Type{CoreModel}, M}} where M<:MetabolicModel" href="#Base.convert-Union{Tuple{M}, Tuple{Type{CoreModel}, M}} where M<:MetabolicModel"><code>Base.convert</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">Base.convert(::Type{CoreModel}, m::M) where {M <: MetabolicModel}</code></pre><p>Make a <code>CoreModel</code> out of any compatible model type.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/d4509bae4f4df01fe7d9479069af6510c69ad99e/src/base/types/CoreModel.jl#L116-L120">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.balance-Tuple{CoreModel}" href="#COBREXA.balance-Tuple{CoreModel}"><code>COBREXA.balance</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">balance(a::CoreModel)::SparseVec</code></pre><p><code>CoreModel</code> target flux balance.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/d4509bae4f4df01fe7d9479069af6510c69ad99e/src/base/types/CoreModel.jl#L78-L82">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.bounds-Tuple{CoreModel}" href="#COBREXA.bounds-Tuple{CoreModel}"><code>COBREXA.bounds</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">bounds(a::CoreModel)::Tuple{SparseVec,SparseVec}</code></pre><p><code>CoreModel</code> flux bounds.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/d4509bae4f4df01fe7d9479069af6510c69ad99e/src/base/types/CoreModel.jl#L69-L73">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.metabolites-Tuple{CoreModel}" href="#COBREXA.metabolites-Tuple{CoreModel}"><code>COBREXA.metabolites</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">metabolites(a::CoreModel)::Vector{String}</code></pre><p>Metabolites in a <code>CoreModel</code>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/d4509bae4f4df01fe7d9479069af6510c69ad99e/src/base/types/CoreModel.jl#L51-L55">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.objective-Tuple{CoreModel}" href="#COBREXA.objective-Tuple{CoreModel}"><code>COBREXA.objective</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">objective(a::CoreModel)::SparseVec</code></pre><p><code>CoreModel</code> objective vector.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/d4509bae4f4df01fe7d9479069af6510c69ad99e/src/base/types/CoreModel.jl#L87-L91">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.reaction_stoichiometry-Tuple{CoreModel, Int64}" href="#COBREXA.reaction_stoichiometry-Tuple{CoreModel, Int64}"><code>COBREXA.reaction_stoichiometry</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">reaction_stoichiometry(model::CoreModel, rxn_id::String)::Dict{String, Float64}</code></pre><p>Return the reaction equation of reaction with id <code>rxn_ind</code> in model. The reaction equation maps metabolite ids to their stoichiometric coefficients.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/d4509bae4f4df01fe7d9479069af6510c69ad99e/src/base/types/CoreModel.jl#L106-L111">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.reaction_stoichiometry-Tuple{CoreModel, String}" href="#COBREXA.reaction_stoichiometry-Tuple{CoreModel, String}"><code>COBREXA.reaction_stoichiometry</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">reaction_stoichiometry(model::CoreModel, rxn_id::String)::Dict{String, Float64}</code></pre><p>Return the reaction equation of reaction with id <code>rxn_id</code> in model. The reaction equation maps metabolite ids to their stoichiometric coefficients.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/d4509bae4f4df01fe7d9479069af6510c69ad99e/src/base/types/CoreModel.jl#L96-L101">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.reactions-Tuple{CoreModel}" href="#COBREXA.reactions-Tuple{CoreModel}"><code>COBREXA.reactions</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">reactions(a::CoreModel)::Vector{String}</code></pre><p>Get the reactions in a <code>CoreModel</code>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/d4509bae4f4df01fe7d9479069af6510c69ad99e/src/base/types/CoreModel.jl#L42-L46">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.stoichiometry-Tuple{CoreModel}" href="#COBREXA.stoichiometry-Tuple{CoreModel}"><code>COBREXA.stoichiometry</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">stoichiometry(a::CoreModel)::SparseMat</code></pre><p><code>CoreModel</code> stoichiometry matrix.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/d4509bae4f4df01fe7d9479069af6510c69ad99e/src/base/types/CoreModel.jl#L60-L64">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.CoreModelCoupled" href="#COBREXA.CoreModelCoupled"><code>COBREXA.CoreModelCoupled</code></a> — <span class="docstring-category">Type</span></header><section><div><pre><code class="language-julia">struct CoreModelCoupled <: MetabolicModel</code></pre><p>The linear model with additional coupling constraints in the form</p><pre><code class="language-none"> câ‚— ≤ C x ≤ cᵤ</code></pre></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/d4509bae4f4df01fe7d9479069af6510c69ad99e/src/base/types/CoreModelCoupled.jl#L2-L9">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="Base.convert-Tuple{Type{CoreModelCoupled}, MetabolicModel}" href="#Base.convert-Tuple{Type{CoreModelCoupled}, MetabolicModel}"><code>Base.convert</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">Base.convert(::Type{CoreModelCoupled}, mm::MetabolicModel)</code></pre><p>Make a <code>CoreModelCoupled</code> out of any compatible model type.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/d4509bae4f4df01fe7d9479069af6510c69ad99e/src/base/types/CoreModelCoupled.jl#L127-L131">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.balance-Tuple{CoreModelCoupled}" href="#COBREXA.balance-Tuple{CoreModelCoupled}"><code>COBREXA.balance</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">balance(a::CoreModelCoupled)</code></pre><p>Extract balance from <a href="#COBREXA.CoreModelCoupled"><code>CoreModelCoupled</code></a> (uses the internal <a href="#COBREXA.CoreModel"><code>CoreModel</code></a>).</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/d4509bae4f4df01fe7d9479069af6510c69ad99e/src/base/types/CoreModelCoupled.jl#L64-L69">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.bounds-Tuple{CoreModelCoupled}" href="#COBREXA.bounds-Tuple{CoreModelCoupled}"><code>COBREXA.bounds</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">bounds(a::CoreModelCoupled)</code></pre><p>Extract bounds from <a href="#COBREXA.CoreModelCoupled"><code>CoreModelCoupled</code></a> (uses the internal <a href="#COBREXA.CoreModel"><code>CoreModel</code></a>).</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/d4509bae4f4df01fe7d9479069af6510c69ad99e/src/base/types/CoreModelCoupled.jl#L56-L61">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.coupling-Tuple{CoreModelCoupled}" href="#COBREXA.coupling-Tuple{CoreModelCoupled}"><code>COBREXA.coupling</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">coupling(a::CoreModelCoupled)::SparseMat</code></pre><p>Coupling constraint matrix for a <code>CoreModelCoupled</code>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/d4509bae4f4df01fe7d9479069af6510c69ad99e/src/base/types/CoreModelCoupled.jl#L80-L84">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.coupling_bounds-Tuple{CoreModelCoupled}" href="#COBREXA.coupling_bounds-Tuple{CoreModelCoupled}"><code>COBREXA.coupling_bounds</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">coupling_bounds(a::CoreModelCoupled)::Tuple{SparseVec,SparseVec}</code></pre><p>Coupling bounds for a <code>CoreModelCoupled</code>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/d4509bae4f4df01fe7d9479069af6510c69ad99e/src/base/types/CoreModelCoupled.jl#L98-L102">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.metabolites-Tuple{CoreModelCoupled}" href="#COBREXA.metabolites-Tuple{CoreModelCoupled}"><code>COBREXA.metabolites</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">metabolites(a::CoreModelCoupled)</code></pre><p>Extract metabolites from <a href="#COBREXA.CoreModelCoupled"><code>CoreModelCoupled</code></a> (uses the internal <a href="#COBREXA.CoreModel"><code>CoreModel</code></a>).</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/d4509bae4f4df01fe7d9479069af6510c69ad99e/src/base/types/CoreModelCoupled.jl#L40-L45">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.n_coupling_constraints-Tuple{CoreModelCoupled}" href="#COBREXA.n_coupling_constraints-Tuple{CoreModelCoupled}"><code>COBREXA.n_coupling_constraints</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">n_coupling_constraints(a::CoreModelCoupled)::Int</code></pre><p>The number of coupling constraints in a <code>CoreModelCoupled</code>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/d4509bae4f4df01fe7d9479069af6510c69ad99e/src/base/types/CoreModelCoupled.jl#L89-L93">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.objective-Tuple{CoreModelCoupled}" href="#COBREXA.objective-Tuple{CoreModelCoupled}"><code>COBREXA.objective</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">objective(a::CoreModelCoupled)</code></pre><p>Extract objective from <a href="#COBREXA.CoreModelCoupled"><code>CoreModelCoupled</code></a> (uses the internal <a href="#COBREXA.CoreModel"><code>CoreModel</code></a>).</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/d4509bae4f4df01fe7d9479069af6510c69ad99e/src/base/types/CoreModelCoupled.jl#L72-L77">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.reaction_stoichiometry-Tuple{CoreModelCoupled, Int64}" href="#COBREXA.reaction_stoichiometry-Tuple{CoreModelCoupled, Int64}"><code>COBREXA.reaction_stoichiometry</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">reaction_stoichiometry(model::CoreModelCoupled, rxn_ind::Int)::Dict{String, Float64}</code></pre><p>Return the reaction equation of reaction with id <code>rxn_ind</code> in model. The reaction equation maps metabolite ids to their stoichiometric coefficients.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/d4509bae4f4df01fe7d9479069af6510c69ad99e/src/base/types/CoreModelCoupled.jl#L117-L122">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.reaction_stoichiometry-Tuple{CoreModelCoupled, String}" href="#COBREXA.reaction_stoichiometry-Tuple{CoreModelCoupled, String}"><code>COBREXA.reaction_stoichiometry</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">reaction_stoichiometry(model::CoreModelCoupled, rxn_id::String)::Dict{String, Float64}</code></pre><p>Return the reaction equation of reaction with id <code>rxn_id</code> in model. The reaction equation maps metabolite ids to their stoichiometric coefficients.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/d4509bae4f4df01fe7d9479069af6510c69ad99e/src/base/types/CoreModelCoupled.jl#L107-L112">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.reactions-Tuple{CoreModelCoupled}" href="#COBREXA.reactions-Tuple{CoreModelCoupled}"><code>COBREXA.reactions</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">reactions(a::CoreModelCoupled)</code></pre><p>Extract reactions from <a href="#COBREXA.CoreModelCoupled"><code>CoreModelCoupled</code></a> (uses the internal <a href="#COBREXA.CoreModel"><code>CoreModel</code></a>).</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/d4509bae4f4df01fe7d9479069af6510c69ad99e/src/base/types/CoreModelCoupled.jl#L32-L37">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.stoichiometry-Tuple{CoreModelCoupled}" href="#COBREXA.stoichiometry-Tuple{CoreModelCoupled}"><code>COBREXA.stoichiometry</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">stoichiometry(a::CoreModelCoupled)</code></pre><p>Extract stoichiometry from <a href="#COBREXA.CoreModelCoupled"><code>CoreModelCoupled</code></a> (uses the internal <a href="#COBREXA.CoreModel"><code>CoreModel</code></a>).</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/d4509bae4f4df01fe7d9479069af6510c69ad99e/src/base/types/CoreModelCoupled.jl#L48-L53">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.Gene" href="#COBREXA.Gene"><code>COBREXA.Gene</code></a> — <span class="docstring-category">Type</span></header><section><div><p>Gene struct.</p><p><strong>Fields</strong></p><pre><code class="language-none">id :: String name :: Union{String, Nothing} notes :: Dict{String, Vector{String}} -annotation :: Dict{String, Union{Vector{String}, String}}</code></pre></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/1011dcb5948951fc380713022f1ecf5b37961981/src/base/types/Gene.jl#L1-L11">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.JSONModel" href="#COBREXA.JSONModel"><code>COBREXA.JSONModel</code></a> — <span class="docstring-category">Type</span></header><section><div><pre><code class="language-julia">struct JSONModel <: MetabolicModel +annotation :: Dict{String, Union{Vector{String}, String}}</code></pre></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/d4509bae4f4df01fe7d9479069af6510c69ad99e/src/base/types/Gene.jl#L1-L11">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.JSONModel" href="#COBREXA.JSONModel"><code>COBREXA.JSONModel</code></a> — <span class="docstring-category">Type</span></header><section><div><pre><code class="language-julia">struct JSONModel <: MetabolicModel json::Dict{String,Any} end</code></pre><p>A struct used to store the contents of a JSON model, i.e. a model read from a file ending with <code>.json</code>. These model files typically store all the model parameters in arrays of JSON objects (i.e. Julia dictionaries).</p><p>Usually, not all of the fields of the input JSON can be easily represented when converting to other models, care should be taken to avoid losing information.</p><p>Direct work on this precise model type is not very efficient, as the accessor functions need to repeatedly find the information in the JSON tree. This gets very slow especially if calling many accessor functions sequentially. To avoid that, convert to e.g. <a href="#COBREXA.StandardModel"><code>StandardModel</code></a> as soon as possible.</p><p><strong>Example</strong></p><pre><code class="language-none">model = load_json_model("some_model.json") model.json # see the actual underlying JSON -reactions(model) # see the list of reactions</code></pre></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/1011dcb5948951fc380713022f1ecf5b37961981/src/base/types/JSONModel.jl#L1-L24">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="Base.convert-Tuple{Type{JSONModel}, MetabolicModel}" href="#Base.convert-Tuple{Type{JSONModel}, MetabolicModel}"><code>Base.convert</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">Base.convert(::Type{JSONModel}, mm::MetabolicModel)</code></pre><p>Convert any <a href="#COBREXA.MetabolicModel"><code>MetabolicModel</code></a> to <a href="#COBREXA.JSONModel"><code>JSONModel</code></a>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/1011dcb5948951fc380713022f1ecf5b37961981/src/base/types/JSONModel.jl#L290-L294">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.bounds-Tuple{JSONModel}" href="#COBREXA.bounds-Tuple{JSONModel}"><code>COBREXA.bounds</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">bounds(model::JSONModel)</code></pre><p>Get the bounds for reactions, assuming the information is stored in <code>.lower_bound</code> and <code>.upper_bound</code>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/1011dcb5948951fc380713022f1ecf5b37961981/src/base/types/JSONModel.jl#L141-L146">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.gene_annotations-Tuple{JSONModel, String}" href="#COBREXA.gene_annotations-Tuple{JSONModel, String}"><code>COBREXA.gene_annotations</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">gene_annotations(model::JSONModel, gid::String)::Annotations</code></pre><p>Gene annotations from the <a href="#COBREXA.JSONModel"><code>JSONModel</code></a>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/1011dcb5948951fc380713022f1ecf5b37961981/src/base/types/JSONModel.jl#L219-L223">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.gene_notes-Tuple{JSONModel, String}" href="#COBREXA.gene_notes-Tuple{JSONModel, String}"><code>COBREXA.gene_notes</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">gene_notes(model::JSONModel, gid::String)::Notes</code></pre><p>Gene notes from the <a href="#COBREXA.JSONModel"><code>JSONModel</code></a>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/1011dcb5948951fc380713022f1ecf5b37961981/src/base/types/JSONModel.jl#L229-L233">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.genes-Tuple{JSONModel}" href="#COBREXA.genes-Tuple{JSONModel}"><code>COBREXA.genes</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">genes(model::JSONModel)</code></pre><p>Extract gene names from a JSON model.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/1011dcb5948951fc380713022f1ecf5b37961981/src/base/types/JSONModel.jl#L97-L101">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.metabolite_annotations-Tuple{JSONModel, String}" href="#COBREXA.metabolite_annotations-Tuple{JSONModel, String}"><code>COBREXA.metabolite_annotations</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">metabolite_annotations(model::JSONModel, mid::String)::Annotations</code></pre><p>Metabolite annotations from the <a href="#COBREXA.JSONModel"><code>JSONModel</code></a>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/1011dcb5948951fc380713022f1ecf5b37961981/src/base/types/JSONModel.jl#L259-L263">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.metabolite_charge-Tuple{JSONModel, String}" href="#COBREXA.metabolite_charge-Tuple{JSONModel, String}"><code>COBREXA.metabolite_charge</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">metabolite_charge(model::JSONModel, mid::String)</code></pre><p>Return the metabolite <code>.charge</code></p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/1011dcb5948951fc380713022f1ecf5b37961981/src/base/types/JSONModel.jl#L199-L203">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.metabolite_compartment-Tuple{JSONModel, String}" href="#COBREXA.metabolite_compartment-Tuple{JSONModel, String}"><code>COBREXA.metabolite_compartment</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">metabolite_compartment(model::JSONModel, mid::String)</code></pre><p>Return the metabolite <code>.compartment</code></p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/1011dcb5948951fc380713022f1ecf5b37961981/src/base/types/JSONModel.jl#L209-L213">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.metabolite_formula-Tuple{JSONModel, String}" href="#COBREXA.metabolite_formula-Tuple{JSONModel, String}"><code>COBREXA.metabolite_formula</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">metabolite_formula(model::JSONModel, mid::String)</code></pre><p>Parse and return the metabolite <code>.formula</code></p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/1011dcb5948951fc380713022f1ecf5b37961981/src/base/types/JSONModel.jl#L189-L193">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.metabolite_notes-Tuple{JSONModel, String}" href="#COBREXA.metabolite_notes-Tuple{JSONModel, String}"><code>COBREXA.metabolite_notes</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">metabolite_notes(model::JSONModel, mid::String)::Notes</code></pre><p>Metabolite notes from the <a href="#COBREXA.JSONModel"><code>JSONModel</code></a>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/1011dcb5948951fc380713022f1ecf5b37961981/src/base/types/JSONModel.jl#L269-L273">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.metabolites-Tuple{JSONModel}" href="#COBREXA.metabolites-Tuple{JSONModel}"><code>COBREXA.metabolites</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">metabolites(model::JSONModel)</code></pre><p>Extract metabolite names (stored as <code>.id</code>) from JSON model.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/1011dcb5948951fc380713022f1ecf5b37961981/src/base/types/JSONModel.jl#L84-L88">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.objective-Tuple{JSONModel}" href="#COBREXA.objective-Tuple{JSONModel}"><code>COBREXA.objective</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">objective(model::JSONModel)</code></pre><p>Collect <code>.objective_coefficient</code> keys from model reactions.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/1011dcb5948951fc380713022f1ecf5b37961981/src/base/types/JSONModel.jl#L158-L162">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.reaction_annotations-Tuple{JSONModel, String}" href="#COBREXA.reaction_annotations-Tuple{JSONModel, String}"><code>COBREXA.reaction_annotations</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">reaction_annotations(model::JSONModel, rid::String)::Annotations</code></pre><p>Reaction annotations from the <a href="#COBREXA.JSONModel"><code>JSONModel</code></a>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/1011dcb5948951fc380713022f1ecf5b37961981/src/base/types/JSONModel.jl#L239-L243">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.reaction_gene_association-Tuple{JSONModel, String}" href="#COBREXA.reaction_gene_association-Tuple{JSONModel, String}"><code>COBREXA.reaction_gene_association</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">reaction_gene_associaton(model::JSONModel, rid::String)</code></pre><p>Parses the <code>.gene_reaction_rule</code> from reactions.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/1011dcb5948951fc380713022f1ecf5b37961981/src/base/types/JSONModel.jl#L169-L173">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.reaction_notes-Tuple{JSONModel, String}" href="#COBREXA.reaction_notes-Tuple{JSONModel, String}"><code>COBREXA.reaction_notes</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">reaction_notes(model::JSONModel, rid::String)::Notes</code></pre><p>Reaction notes from the <a href="#COBREXA.JSONModel"><code>JSONModel</code></a>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/1011dcb5948951fc380713022f1ecf5b37961981/src/base/types/JSONModel.jl#L249-L253">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.reaction_stoichiometry-Tuple{JSONModel, String}" href="#COBREXA.reaction_stoichiometry-Tuple{JSONModel, String}"><code>COBREXA.reaction_stoichiometry</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">reaction_stoichiometry(model::JSONModel, rxn_id::String)::Dict{String, Float64}</code></pre><p>Return the reaction equation of reaction with id <code>rxn_id</code> in model. The reaction equation maps metabolite ids to their stoichiometric coefficients.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/1011dcb5948951fc380713022f1ecf5b37961981/src/base/types/JSONModel.jl#L279-L284">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.reaction_subsystem-Tuple{JSONModel, String}" href="#COBREXA.reaction_subsystem-Tuple{JSONModel, String}"><code>COBREXA.reaction_subsystem</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">reaction_subsystem(model::JSONModel, rid::String)</code></pre><p>Parses the <code>.subsystem</code> out from reactions.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/1011dcb5948951fc380713022f1ecf5b37961981/src/base/types/JSONModel.jl#L179-L183">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.reactions-Tuple{JSONModel}" href="#COBREXA.reactions-Tuple{JSONModel}"><code>COBREXA.reactions</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">reactions(model::JSONModel)</code></pre><p>Extract reaction names (stored as <code>.id</code>) from JSON model.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/1011dcb5948951fc380713022f1ecf5b37961981/src/base/types/JSONModel.jl#L71-L75">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.stoichiometry-Tuple{JSONModel}" href="#COBREXA.stoichiometry-Tuple{JSONModel}"><code>COBREXA.stoichiometry</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">stoichiometry(model::JSONModel)</code></pre><p>Get the stoichiometry. Assuming the information is stored in reaction object under key <code>.metabolites</code>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/1011dcb5948951fc380713022f1ecf5b37961981/src/base/types/JSONModel.jl#L108-L113">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.MATModel" href="#COBREXA.MATModel"><code>COBREXA.MATModel</code></a> — <span class="docstring-category">Type</span></header><section><div><pre><code class="language-julia">struct MATModel</code></pre><p>Wrapper around the models loaded in dictionaries from the MATLAB representation.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/1011dcb5948951fc380713022f1ecf5b37961981/src/base/types/MATModel.jl#L1-L5">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="Base.convert-Tuple{Type{MATModel}, MetabolicModel}" href="#Base.convert-Tuple{Type{MATModel}, MetabolicModel}"><code>Base.convert</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">Base.convert(::Type{MATModel}, m::MetabolicModel)</code></pre><p>Convert any metabolic model to <code>MATModel</code>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/1011dcb5948951fc380713022f1ecf5b37961981/src/base/types/MATModel.jl#L201-L205">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA._mat_has_squashed_coupling-Tuple{Any}" href="#COBREXA._mat_has_squashed_coupling-Tuple{Any}"><code>COBREXA._mat_has_squashed_coupling</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">_mat_has_squashed_coupling(mat)</code></pre><p>Guesses whether C in the MAT file is stored in A=[S;C].</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/1011dcb5948951fc380713022f1ecf5b37961981/src/base/types/MATModel.jl#L26-L30">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.balance-Tuple{MATModel}" href="#COBREXA.balance-Tuple{MATModel}"><code>COBREXA.balance</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">balance(m::MATModel)</code></pre><p>Extracts balance from the MAT model, defaulting to zeroes if not present.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/1011dcb5948951fc380713022f1ecf5b37961981/src/base/types/MATModel.jl#L66-L70">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.bounds-Tuple{MATModel}" href="#COBREXA.bounds-Tuple{MATModel}"><code>COBREXA.bounds</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">bounds(m::MATModel)</code></pre><p>Extracts bounds from the MAT file, saved under <code>lb</code> and <code>ub</code>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/1011dcb5948951fc380713022f1ecf5b37961981/src/base/types/MATModel.jl#L56-L60">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.coupling-Tuple{MATModel}" href="#COBREXA.coupling-Tuple{MATModel}"><code>COBREXA.coupling</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">coupling(m::MATModel)</code></pre><p>Extract coupling matrix stored, in <code>C</code> key.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/1011dcb5948951fc380713022f1ecf5b37961981/src/base/types/MATModel.jl#L87-L91">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.coupling_bounds-Tuple{MATModel}" href="#COBREXA.coupling_bounds-Tuple{MATModel}"><code>COBREXA.coupling_bounds</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">coupling_bounds(m::MATModel)</code></pre><p>Extracts the coupling constraints. Currently, there are several accepted ways to store these in MATLAB models; this takes the constraints from vectors <code>cl</code> and <code>cu</code>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/1011dcb5948951fc380713022f1ecf5b37961981/src/base/types/MATModel.jl#L96-L100">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.genes-Tuple{MATModel}" href="#COBREXA.genes-Tuple{MATModel}"><code>COBREXA.genes</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">genes(m::MATModel)</code></pre><p>Extracts the possible gene list from <code>genes</code> key.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/1011dcb5948951fc380713022f1ecf5b37961981/src/base/types/MATModel.jl#L116-L120">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.metabolite_charge-Tuple{MATModel, String}" href="#COBREXA.metabolite_charge-Tuple{MATModel, String}"><code>COBREXA.metabolite_charge</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">metabolite_charge(m::MATModel, mid::String)</code></pre><p>Extract metabolite charge from <code>metCharge</code> or <code>metCharges</code>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/1011dcb5948951fc380713022f1ecf5b37961981/src/base/types/MATModel.jl#L150-L154">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.metabolite_compartment-Tuple{MATModel, String}" href="#COBREXA.metabolite_compartment-Tuple{MATModel, String}"><code>COBREXA.metabolite_compartment</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">metabolite_compartment(m::MATModel, mid::String)</code></pre><p>Extract metabolite compartment from <code>metCompartment</code> or <code>metCompartments</code>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/1011dcb5948951fc380713022f1ecf5b37961981/src/base/types/MATModel.jl#L160-L164">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.metabolite_formula-Tuple{MATModel, String}" href="#COBREXA.metabolite_formula-Tuple{MATModel, String}"><code>COBREXA.metabolite_formula</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">metabolite_formula(m::MATModel, mid::String)</code></pre><p>Extract metabolite formula from key <code>metFormula</code> or <code>metFormulas</code>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/1011dcb5948951fc380713022f1ecf5b37961981/src/base/types/MATModel.jl#L140-L144">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.metabolites-Tuple{MATModel}" href="#COBREXA.metabolites-Tuple{MATModel}"><code>COBREXA.metabolites</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">metabolites(m::MATModel)::Vector{String}</code></pre><p>Extracts metabolite names from <code>mets</code> key in the MAT file.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/1011dcb5948951fc380713022f1ecf5b37961981/src/base/types/MATModel.jl#L35-L39">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.objective-Tuple{MATModel}" href="#COBREXA.objective-Tuple{MATModel}"><code>COBREXA.objective</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">objective(m::MATModel)</code></pre><p>Extracts the objective from the MAT model (defaults to zeroes).</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/1011dcb5948951fc380713022f1ecf5b37961981/src/base/types/MATModel.jl#L79-L83">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.reaction_gene_association-Tuple{MATModel, String}" href="#COBREXA.reaction_gene_association-Tuple{MATModel, String}"><code>COBREXA.reaction_gene_association</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">reaction_gene_association(m::MATModel, rid::String)</code></pre><p>Extracts the associations from <code>grRules</code> key, if present.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/1011dcb5948951fc380713022f1ecf5b37961981/src/base/types/MATModel.jl#L126-L130">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.reaction_stoichiometry-Tuple{MATModel, Any}" href="#COBREXA.reaction_stoichiometry-Tuple{MATModel, Any}"><code>COBREXA.reaction_stoichiometry</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">reaction_stoichiometry(model::MATModel, rxn_index)::Dict{String, Float64}</code></pre><p>Return the reaction equation of reaction with index <code>rxn_index</code> in model. The reaction equation maps metabolite ids to their stoichiometric coefficients. Note, <code>rxn_index</code> can be any suitable type that can index into an array.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/1011dcb5948951fc380713022f1ecf5b37961981/src/base/types/MATModel.jl#L182-L188">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.reaction_stoichiometry-Tuple{MATModel, String}" href="#COBREXA.reaction_stoichiometry-Tuple{MATModel, String}"><code>COBREXA.reaction_stoichiometry</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">reaction_stoichiometry(model::MATModel, rxn_id::String)::Dict{String, Float64}</code></pre><p>Return the reaction equation of reaction with id <code>rxn_id</code> in model. The reaction equation maps metabolite ids to their stoichiometric coefficients.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/1011dcb5948951fc380713022f1ecf5b37961981/src/base/types/MATModel.jl#L171-L176">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.reactions-Tuple{MATModel}" href="#COBREXA.reactions-Tuple{MATModel}"><code>COBREXA.reactions</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">reactions(m::MATModel)::Vector{String}</code></pre><p>Extracts reaction names from <code>rxns</code> key in the MAT file.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/1011dcb5948951fc380713022f1ecf5b37961981/src/base/types/MATModel.jl#L13-L17">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.stoichiometry-Tuple{MATModel}" href="#COBREXA.stoichiometry-Tuple{MATModel}"><code>COBREXA.stoichiometry</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">stoichiometry(m::MATModel)</code></pre><p>Extract the stoichiometry matrix, stored under key <code>S</code>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/1011dcb5948951fc380713022f1ecf5b37961981/src/base/types/MATModel.jl#L49-L53">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.Metabolite" href="#COBREXA.Metabolite"><code>COBREXA.Metabolite</code></a> — <span class="docstring-category">Type</span></header><section><div><p>Metabolite structure.</p><p><strong>Fields</strong></p><pre><code class="language-none">id :: String +reactions(model) # see the list of reactions</code></pre></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/d4509bae4f4df01fe7d9479069af6510c69ad99e/src/base/types/JSONModel.jl#L1-L24">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="Base.convert-Tuple{Type{JSONModel}, MetabolicModel}" href="#Base.convert-Tuple{Type{JSONModel}, MetabolicModel}"><code>Base.convert</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">Base.convert(::Type{JSONModel}, mm::MetabolicModel)</code></pre><p>Convert any <a href="#COBREXA.MetabolicModel"><code>MetabolicModel</code></a> to <a href="#COBREXA.JSONModel"><code>JSONModel</code></a>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/d4509bae4f4df01fe7d9479069af6510c69ad99e/src/base/types/JSONModel.jl#L290-L294">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.bounds-Tuple{JSONModel}" href="#COBREXA.bounds-Tuple{JSONModel}"><code>COBREXA.bounds</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">bounds(model::JSONModel)</code></pre><p>Get the bounds for reactions, assuming the information is stored in <code>.lower_bound</code> and <code>.upper_bound</code>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/d4509bae4f4df01fe7d9479069af6510c69ad99e/src/base/types/JSONModel.jl#L141-L146">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.gene_annotations-Tuple{JSONModel, String}" href="#COBREXA.gene_annotations-Tuple{JSONModel, String}"><code>COBREXA.gene_annotations</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">gene_annotations(model::JSONModel, gid::String)::Annotations</code></pre><p>Gene annotations from the <a href="#COBREXA.JSONModel"><code>JSONModel</code></a>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/d4509bae4f4df01fe7d9479069af6510c69ad99e/src/base/types/JSONModel.jl#L219-L223">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.gene_notes-Tuple{JSONModel, String}" href="#COBREXA.gene_notes-Tuple{JSONModel, String}"><code>COBREXA.gene_notes</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">gene_notes(model::JSONModel, gid::String)::Notes</code></pre><p>Gene notes from the <a href="#COBREXA.JSONModel"><code>JSONModel</code></a>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/d4509bae4f4df01fe7d9479069af6510c69ad99e/src/base/types/JSONModel.jl#L229-L233">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.genes-Tuple{JSONModel}" href="#COBREXA.genes-Tuple{JSONModel}"><code>COBREXA.genes</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">genes(model::JSONModel)</code></pre><p>Extract gene names from a JSON model.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/d4509bae4f4df01fe7d9479069af6510c69ad99e/src/base/types/JSONModel.jl#L97-L101">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.metabolite_annotations-Tuple{JSONModel, String}" href="#COBREXA.metabolite_annotations-Tuple{JSONModel, String}"><code>COBREXA.metabolite_annotations</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">metabolite_annotations(model::JSONModel, mid::String)::Annotations</code></pre><p>Metabolite annotations from the <a href="#COBREXA.JSONModel"><code>JSONModel</code></a>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/d4509bae4f4df01fe7d9479069af6510c69ad99e/src/base/types/JSONModel.jl#L259-L263">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.metabolite_charge-Tuple{JSONModel, String}" href="#COBREXA.metabolite_charge-Tuple{JSONModel, String}"><code>COBREXA.metabolite_charge</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">metabolite_charge(model::JSONModel, mid::String)</code></pre><p>Return the metabolite <code>.charge</code></p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/d4509bae4f4df01fe7d9479069af6510c69ad99e/src/base/types/JSONModel.jl#L199-L203">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.metabolite_compartment-Tuple{JSONModel, String}" href="#COBREXA.metabolite_compartment-Tuple{JSONModel, String}"><code>COBREXA.metabolite_compartment</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">metabolite_compartment(model::JSONModel, mid::String)</code></pre><p>Return the metabolite <code>.compartment</code></p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/d4509bae4f4df01fe7d9479069af6510c69ad99e/src/base/types/JSONModel.jl#L209-L213">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.metabolite_formula-Tuple{JSONModel, String}" href="#COBREXA.metabolite_formula-Tuple{JSONModel, String}"><code>COBREXA.metabolite_formula</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">metabolite_formula(model::JSONModel, mid::String)</code></pre><p>Parse and return the metabolite <code>.formula</code></p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/d4509bae4f4df01fe7d9479069af6510c69ad99e/src/base/types/JSONModel.jl#L189-L193">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.metabolite_notes-Tuple{JSONModel, String}" href="#COBREXA.metabolite_notes-Tuple{JSONModel, String}"><code>COBREXA.metabolite_notes</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">metabolite_notes(model::JSONModel, mid::String)::Notes</code></pre><p>Metabolite notes from the <a href="#COBREXA.JSONModel"><code>JSONModel</code></a>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/d4509bae4f4df01fe7d9479069af6510c69ad99e/src/base/types/JSONModel.jl#L269-L273">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.metabolites-Tuple{JSONModel}" href="#COBREXA.metabolites-Tuple{JSONModel}"><code>COBREXA.metabolites</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">metabolites(model::JSONModel)</code></pre><p>Extract metabolite names (stored as <code>.id</code>) from JSON model.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/d4509bae4f4df01fe7d9479069af6510c69ad99e/src/base/types/JSONModel.jl#L84-L88">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.objective-Tuple{JSONModel}" href="#COBREXA.objective-Tuple{JSONModel}"><code>COBREXA.objective</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">objective(model::JSONModel)</code></pre><p>Collect <code>.objective_coefficient</code> keys from model reactions.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/d4509bae4f4df01fe7d9479069af6510c69ad99e/src/base/types/JSONModel.jl#L158-L162">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.reaction_annotations-Tuple{JSONModel, String}" href="#COBREXA.reaction_annotations-Tuple{JSONModel, String}"><code>COBREXA.reaction_annotations</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">reaction_annotations(model::JSONModel, rid::String)::Annotations</code></pre><p>Reaction annotations from the <a href="#COBREXA.JSONModel"><code>JSONModel</code></a>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/d4509bae4f4df01fe7d9479069af6510c69ad99e/src/base/types/JSONModel.jl#L239-L243">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.reaction_gene_association-Tuple{JSONModel, String}" href="#COBREXA.reaction_gene_association-Tuple{JSONModel, String}"><code>COBREXA.reaction_gene_association</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">reaction_gene_associaton(model::JSONModel, rid::String)</code></pre><p>Parses the <code>.gene_reaction_rule</code> from reactions.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/d4509bae4f4df01fe7d9479069af6510c69ad99e/src/base/types/JSONModel.jl#L169-L173">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.reaction_notes-Tuple{JSONModel, String}" href="#COBREXA.reaction_notes-Tuple{JSONModel, String}"><code>COBREXA.reaction_notes</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">reaction_notes(model::JSONModel, rid::String)::Notes</code></pre><p>Reaction notes from the <a href="#COBREXA.JSONModel"><code>JSONModel</code></a>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/d4509bae4f4df01fe7d9479069af6510c69ad99e/src/base/types/JSONModel.jl#L249-L253">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.reaction_stoichiometry-Tuple{JSONModel, String}" href="#COBREXA.reaction_stoichiometry-Tuple{JSONModel, String}"><code>COBREXA.reaction_stoichiometry</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">reaction_stoichiometry(model::JSONModel, rxn_id::String)::Dict{String, Float64}</code></pre><p>Return the reaction equation of reaction with id <code>rxn_id</code> in model. The reaction equation maps metabolite ids to their stoichiometric coefficients.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/d4509bae4f4df01fe7d9479069af6510c69ad99e/src/base/types/JSONModel.jl#L279-L284">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.reaction_subsystem-Tuple{JSONModel, String}" href="#COBREXA.reaction_subsystem-Tuple{JSONModel, String}"><code>COBREXA.reaction_subsystem</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">reaction_subsystem(model::JSONModel, rid::String)</code></pre><p>Parses the <code>.subsystem</code> out from reactions.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/d4509bae4f4df01fe7d9479069af6510c69ad99e/src/base/types/JSONModel.jl#L179-L183">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.reactions-Tuple{JSONModel}" href="#COBREXA.reactions-Tuple{JSONModel}"><code>COBREXA.reactions</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">reactions(model::JSONModel)</code></pre><p>Extract reaction names (stored as <code>.id</code>) from JSON model.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/d4509bae4f4df01fe7d9479069af6510c69ad99e/src/base/types/JSONModel.jl#L71-L75">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.stoichiometry-Tuple{JSONModel}" href="#COBREXA.stoichiometry-Tuple{JSONModel}"><code>COBREXA.stoichiometry</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">stoichiometry(model::JSONModel)</code></pre><p>Get the stoichiometry. Assuming the information is stored in reaction object under key <code>.metabolites</code>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/d4509bae4f4df01fe7d9479069af6510c69ad99e/src/base/types/JSONModel.jl#L108-L113">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.MATModel" href="#COBREXA.MATModel"><code>COBREXA.MATModel</code></a> — <span class="docstring-category">Type</span></header><section><div><pre><code class="language-julia">struct MATModel</code></pre><p>Wrapper around the models loaded in dictionaries from the MATLAB representation.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/d4509bae4f4df01fe7d9479069af6510c69ad99e/src/base/types/MATModel.jl#L1-L5">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="Base.convert-Tuple{Type{MATModel}, MetabolicModel}" href="#Base.convert-Tuple{Type{MATModel}, MetabolicModel}"><code>Base.convert</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">Base.convert(::Type{MATModel}, m::MetabolicModel)</code></pre><p>Convert any metabolic model to <code>MATModel</code>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/d4509bae4f4df01fe7d9479069af6510c69ad99e/src/base/types/MATModel.jl#L201-L205">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA._mat_has_squashed_coupling-Tuple{Any}" href="#COBREXA._mat_has_squashed_coupling-Tuple{Any}"><code>COBREXA._mat_has_squashed_coupling</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">_mat_has_squashed_coupling(mat)</code></pre><p>Guesses whether C in the MAT file is stored in A=[S;C].</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/d4509bae4f4df01fe7d9479069af6510c69ad99e/src/base/types/MATModel.jl#L26-L30">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.balance-Tuple{MATModel}" href="#COBREXA.balance-Tuple{MATModel}"><code>COBREXA.balance</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">balance(m::MATModel)</code></pre><p>Extracts balance from the MAT model, defaulting to zeroes if not present.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/d4509bae4f4df01fe7d9479069af6510c69ad99e/src/base/types/MATModel.jl#L66-L70">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.bounds-Tuple{MATModel}" href="#COBREXA.bounds-Tuple{MATModel}"><code>COBREXA.bounds</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">bounds(m::MATModel)</code></pre><p>Extracts bounds from the MAT file, saved under <code>lb</code> and <code>ub</code>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/d4509bae4f4df01fe7d9479069af6510c69ad99e/src/base/types/MATModel.jl#L56-L60">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.coupling-Tuple{MATModel}" href="#COBREXA.coupling-Tuple{MATModel}"><code>COBREXA.coupling</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">coupling(m::MATModel)</code></pre><p>Extract coupling matrix stored, in <code>C</code> key.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/d4509bae4f4df01fe7d9479069af6510c69ad99e/src/base/types/MATModel.jl#L87-L91">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.coupling_bounds-Tuple{MATModel}" href="#COBREXA.coupling_bounds-Tuple{MATModel}"><code>COBREXA.coupling_bounds</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">coupling_bounds(m::MATModel)</code></pre><p>Extracts the coupling constraints. Currently, there are several accepted ways to store these in MATLAB models; this takes the constraints from vectors <code>cl</code> and <code>cu</code>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/d4509bae4f4df01fe7d9479069af6510c69ad99e/src/base/types/MATModel.jl#L96-L100">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.genes-Tuple{MATModel}" href="#COBREXA.genes-Tuple{MATModel}"><code>COBREXA.genes</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">genes(m::MATModel)</code></pre><p>Extracts the possible gene list from <code>genes</code> key.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/d4509bae4f4df01fe7d9479069af6510c69ad99e/src/base/types/MATModel.jl#L116-L120">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.metabolite_charge-Tuple{MATModel, String}" href="#COBREXA.metabolite_charge-Tuple{MATModel, String}"><code>COBREXA.metabolite_charge</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">metabolite_charge(m::MATModel, mid::String)</code></pre><p>Extract metabolite charge from <code>metCharge</code> or <code>metCharges</code>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/d4509bae4f4df01fe7d9479069af6510c69ad99e/src/base/types/MATModel.jl#L150-L154">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.metabolite_compartment-Tuple{MATModel, String}" href="#COBREXA.metabolite_compartment-Tuple{MATModel, String}"><code>COBREXA.metabolite_compartment</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">metabolite_compartment(m::MATModel, mid::String)</code></pre><p>Extract metabolite compartment from <code>metCompartment</code> or <code>metCompartments</code>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/d4509bae4f4df01fe7d9479069af6510c69ad99e/src/base/types/MATModel.jl#L160-L164">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.metabolite_formula-Tuple{MATModel, String}" href="#COBREXA.metabolite_formula-Tuple{MATModel, String}"><code>COBREXA.metabolite_formula</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">metabolite_formula(m::MATModel, mid::String)</code></pre><p>Extract metabolite formula from key <code>metFormula</code> or <code>metFormulas</code>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/d4509bae4f4df01fe7d9479069af6510c69ad99e/src/base/types/MATModel.jl#L140-L144">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.metabolites-Tuple{MATModel}" href="#COBREXA.metabolites-Tuple{MATModel}"><code>COBREXA.metabolites</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">metabolites(m::MATModel)::Vector{String}</code></pre><p>Extracts metabolite names from <code>mets</code> key in the MAT file.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/d4509bae4f4df01fe7d9479069af6510c69ad99e/src/base/types/MATModel.jl#L35-L39">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.objective-Tuple{MATModel}" href="#COBREXA.objective-Tuple{MATModel}"><code>COBREXA.objective</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">objective(m::MATModel)</code></pre><p>Extracts the objective from the MAT model (defaults to zeroes).</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/d4509bae4f4df01fe7d9479069af6510c69ad99e/src/base/types/MATModel.jl#L79-L83">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.reaction_gene_association-Tuple{MATModel, String}" href="#COBREXA.reaction_gene_association-Tuple{MATModel, String}"><code>COBREXA.reaction_gene_association</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">reaction_gene_association(m::MATModel, rid::String)</code></pre><p>Extracts the associations from <code>grRules</code> key, if present.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/d4509bae4f4df01fe7d9479069af6510c69ad99e/src/base/types/MATModel.jl#L126-L130">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.reaction_stoichiometry-Tuple{MATModel, Any}" href="#COBREXA.reaction_stoichiometry-Tuple{MATModel, Any}"><code>COBREXA.reaction_stoichiometry</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">reaction_stoichiometry(model::MATModel, rxn_index)::Dict{String, Float64}</code></pre><p>Return the reaction equation of reaction with index <code>rxn_index</code> in model. The reaction equation maps metabolite ids to their stoichiometric coefficients. Note, <code>rxn_index</code> can be any suitable type that can index into an array.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/d4509bae4f4df01fe7d9479069af6510c69ad99e/src/base/types/MATModel.jl#L182-L188">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.reaction_stoichiometry-Tuple{MATModel, String}" href="#COBREXA.reaction_stoichiometry-Tuple{MATModel, String}"><code>COBREXA.reaction_stoichiometry</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">reaction_stoichiometry(model::MATModel, rxn_id::String)::Dict{String, Float64}</code></pre><p>Return the reaction equation of reaction with id <code>rxn_id</code> in model. The reaction equation maps metabolite ids to their stoichiometric coefficients.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/d4509bae4f4df01fe7d9479069af6510c69ad99e/src/base/types/MATModel.jl#L171-L176">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.reactions-Tuple{MATModel}" href="#COBREXA.reactions-Tuple{MATModel}"><code>COBREXA.reactions</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">reactions(m::MATModel)::Vector{String}</code></pre><p>Extracts reaction names from <code>rxns</code> key in the MAT file.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/d4509bae4f4df01fe7d9479069af6510c69ad99e/src/base/types/MATModel.jl#L13-L17">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.stoichiometry-Tuple{MATModel}" href="#COBREXA.stoichiometry-Tuple{MATModel}"><code>COBREXA.stoichiometry</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">stoichiometry(m::MATModel)</code></pre><p>Extract the stoichiometry matrix, stored under key <code>S</code>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/d4509bae4f4df01fe7d9479069af6510c69ad99e/src/base/types/MATModel.jl#L49-L53">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.Metabolite" href="#COBREXA.Metabolite"><code>COBREXA.Metabolite</code></a> — <span class="docstring-category">Type</span></header><section><div><p>Metabolite structure.</p><p><strong>Fields</strong></p><pre><code class="language-none">id :: String name :: String formula :: String charge :: Int compartment :: String notes :: Dict{String, Vector{String}} -annotation :: Dict{String, Union{Vector{String}, String}}</code></pre></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/1011dcb5948951fc380713022f1ecf5b37961981/src/base/types/Metabolite.jl#L1-L14">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.Reaction" href="#COBREXA.Reaction"><code>COBREXA.Reaction</code></a> — <span class="docstring-category">Type</span></header><section><div><p>Reaction struct.</p><p><strong>Fields</strong></p><pre><code class="language-none">id :: String +annotation :: Dict{String, Union{Vector{String}, String}}</code></pre></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/d4509bae4f4df01fe7d9479069af6510c69ad99e/src/base/types/Metabolite.jl#L1-L14">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.Reaction" href="#COBREXA.Reaction"><code>COBREXA.Reaction</code></a> — <span class="docstring-category">Type</span></header><section><div><p>Reaction struct.</p><p><strong>Fields</strong></p><pre><code class="language-none">id :: String name :: String metabolites :: Dict{Metabolite, Float64} lb :: Float64 @@ -26,31 +26,31 @@ grr :: Vector{Vector{Gene}} subsystem :: String notes :: Dict{String, Vector{String}} annotation :: Dict{String, Union{Vector{String}, String}} -objective_coefficient :: Float64</code></pre></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/1011dcb5948951fc380713022f1ecf5b37961981/src/base/types/Reaction.jl#L1-L17">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.ReactionStatus" href="#COBREXA.ReactionStatus"><code>COBREXA.ReactionStatus</code></a> — <span class="docstring-category">Type</span></header><section><div><p>Used for concise reporting of modeling results.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/1011dcb5948951fc380713022f1ecf5b37961981/src/base/types/ReactionStatus.jl#L1-L3">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.SBMLModel" href="#COBREXA.SBMLModel"><code>COBREXA.SBMLModel</code></a> — <span class="docstring-category">Type</span></header><section><div><pre><code class="language-julia">struct SBMLModel</code></pre><p>Thin wrapper around the model from SBML.jl library. Allows easy conversion from SBML to any other model format.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/1011dcb5948951fc380713022f1ecf5b37961981/src/base/types/SBMLModel.jl#L1-L6">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="Base.convert-Tuple{Type{SBMLModel}, MetabolicModel}" href="#Base.convert-Tuple{Type{SBMLModel}, MetabolicModel}"><code>Base.convert</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">Base.convert(::Type{SBMLModel}, mm::MetabolicModel)</code></pre><p>Convert any metabolic model to <a href="#COBREXA.SBMLModel"><code>SBMLModel</code></a>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/1011dcb5948951fc380713022f1ecf5b37961981/src/base/types/SBMLModel.jl#L150-L154">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.balance-Tuple{SBMLModel}" href="#COBREXA.balance-Tuple{SBMLModel}"><code>COBREXA.balance</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">balance(model::SBMLModel)::SparseVec</code></pre><p>Balance vector of a <a href="#COBREXA.SBMLModel"><code>SBMLModel</code></a>. This is always zero.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/1011dcb5948951fc380713022f1ecf5b37961981/src/base/types/SBMLModel.jl#L74-L78">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.bounds-Tuple{SBMLModel}" href="#COBREXA.bounds-Tuple{SBMLModel}"><code>COBREXA.bounds</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">bounds(model::SBMLModel)::Tuple{SparseVec,SparseVec}</code></pre><p>Get the lower and upper flux bounds of model <a href="#COBREXA.SBMLModel"><code>SBMLModel</code></a>. Throws <code>DomainError</code> in case if the SBML contains mismatching units.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/1011dcb5948951fc380713022f1ecf5b37961981/src/base/types/SBMLModel.jl#L49-L54">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.genes-Tuple{SBMLModel}" href="#COBREXA.genes-Tuple{SBMLModel}"><code>COBREXA.genes</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">genes(model::SBMLModel)::Vector{String}</code></pre><p>Get genes of a <a href="#COBREXA.SBMLModel"><code>SBMLModel</code></a>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/1011dcb5948951fc380713022f1ecf5b37961981/src/base/types/SBMLModel.jl#L88-L92">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.metabolite_charge-Tuple{SBMLModel, String}" href="#COBREXA.metabolite_charge-Tuple{SBMLModel, String}"><code>COBREXA.metabolite_charge</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">metabolite_charge(model::SBMLModel, mid::String)::Maybe{Int}</code></pre><p>Get charge of a chosen metabolite from <a href="#COBREXA.SBMLModel"><code>SBMLModel</code></a>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/1011dcb5948951fc380713022f1ecf5b37961981/src/base/types/SBMLModel.jl#L118-L122">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.metabolite_formula-Tuple{SBMLModel, String}" href="#COBREXA.metabolite_formula-Tuple{SBMLModel, String}"><code>COBREXA.metabolite_formula</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">metabolite_formula(model::SBMLModel, mid::String)::Maybe{MetaboliteFormula}</code></pre><p>Get <a href="#COBREXA.MetaboliteFormula"><code>MetaboliteFormula</code></a> from a chosen metabolite from <a href="#COBREXA.SBMLModel"><code>SBMLModel</code></a>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/1011dcb5948951fc380713022f1ecf5b37961981/src/base/types/SBMLModel.jl#L110-L114">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.metabolites-Tuple{SBMLModel}" href="#COBREXA.metabolites-Tuple{SBMLModel}"><code>COBREXA.metabolites</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">metabolites(model::SBMLModel)::Vector{String}</code></pre><p>Get metabolites from a <a href="#COBREXA.SBMLModel"><code>SBMLModel</code></a>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/1011dcb5948951fc380713022f1ecf5b37961981/src/base/types/SBMLModel.jl#L18-L22">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.n_genes-Tuple{SBMLModel}" href="#COBREXA.n_genes-Tuple{SBMLModel}"><code>COBREXA.n_genes</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">n_genes(model::SBMLModel)::Int</code></pre><p>Get number of genes in <a href="#COBREXA.SBMLModel"><code>SBMLModel</code></a>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/1011dcb5948951fc380713022f1ecf5b37961981/src/base/types/SBMLModel.jl#L95-L99">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.n_metabolites-Tuple{SBMLModel}" href="#COBREXA.n_metabolites-Tuple{SBMLModel}"><code>COBREXA.n_metabolites</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">n_metabolites(model::SBMLModel)::Int</code></pre><p>Efficient counting of metabolites in <a href="#COBREXA.SBMLModel"><code>SBMLModel</code></a>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/1011dcb5948951fc380713022f1ecf5b37961981/src/base/types/SBMLModel.jl#L32-L36">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.n_reactions-Tuple{SBMLModel}" href="#COBREXA.n_reactions-Tuple{SBMLModel}"><code>COBREXA.n_reactions</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">n_reactions(model::SBMLModel)::Int</code></pre><p>Efficient counting of reactions in <a href="#COBREXA.SBMLModel"><code>SBMLModel</code></a>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/1011dcb5948951fc380713022f1ecf5b37961981/src/base/types/SBMLModel.jl#L25-L29">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.objective-Tuple{SBMLModel}" href="#COBREXA.objective-Tuple{SBMLModel}"><code>COBREXA.objective</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">objective(model::SBMLModel)::SparseVec</code></pre><p>Objective of the <a href="#COBREXA.SBMLModel"><code>SBMLModel</code></a>. </p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/1011dcb5948951fc380713022f1ecf5b37961981/src/base/types/SBMLModel.jl#L81-L85">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.reaction_gene_association-Tuple{SBMLModel, String}" href="#COBREXA.reaction_gene_association-Tuple{SBMLModel, String}"><code>COBREXA.reaction_gene_association</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">reaction_gene_association(model::SBMLModel, rid::String)::Maybe{GeneAssociation}</code></pre><p>Retrieve the <a href="#COBREXA.GeneAssociation"><code>GeneAssociation</code></a> from <a href="#COBREXA.SBMLModel"><code>SBMLModel</code></a>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/1011dcb5948951fc380713022f1ecf5b37961981/src/base/types/SBMLModel.jl#L102-L106">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.reaction_stoichiometry-Tuple{SBMLModel, String}" href="#COBREXA.reaction_stoichiometry-Tuple{SBMLModel, String}"><code>COBREXA.reaction_stoichiometry</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">reaction_stoichiometry(model::SBMLModel, rxn_id::String)::Dict{String, Float64}</code></pre><p>Return the reaction equation of reaction with id <code>rxn_id</code> in model. The reaction equation maps metabolite ids to their stoichiometric coefficients.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/1011dcb5948951fc380713022f1ecf5b37961981/src/base/types/SBMLModel.jl#L140-L145">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.reactions-Tuple{SBMLModel}" href="#COBREXA.reactions-Tuple{SBMLModel}"><code>COBREXA.reactions</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">reactions(model::SBMLModel)::Vector{String}</code></pre><p>Get reactions from a <a href="#COBREXA.SBMLModel"><code>SBMLModel</code></a>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/1011dcb5948951fc380713022f1ecf5b37961981/src/base/types/SBMLModel.jl#L11-L15">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.stoichiometry-Tuple{SBMLModel}" href="#COBREXA.stoichiometry-Tuple{SBMLModel}"><code>COBREXA.stoichiometry</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">stoichiometry(model::SBMLModel)::SparseMat</code></pre><p>Recreate the stoichiometry matrix from the <a href="#COBREXA.SBMLModel"><code>SBMLModel</code></a>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/1011dcb5948951fc380713022f1ecf5b37961981/src/base/types/SBMLModel.jl#L39-L43">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.Serialized" href="#COBREXA.Serialized"><code>COBREXA.Serialized</code></a> — <span class="docstring-category">Type</span></header><section><div><pre><code class="language-julia">mutable struct Serialized{M <: MetabolicModel} +objective_coefficient :: Float64</code></pre></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/d4509bae4f4df01fe7d9479069af6510c69ad99e/src/base/types/Reaction.jl#L1-L17">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.ReactionStatus" href="#COBREXA.ReactionStatus"><code>COBREXA.ReactionStatus</code></a> — <span class="docstring-category">Type</span></header><section><div><p>Used for concise reporting of modeling results.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/d4509bae4f4df01fe7d9479069af6510c69ad99e/src/base/types/ReactionStatus.jl#L1-L3">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.SBMLModel" href="#COBREXA.SBMLModel"><code>COBREXA.SBMLModel</code></a> — <span class="docstring-category">Type</span></header><section><div><pre><code class="language-julia">struct SBMLModel</code></pre><p>Thin wrapper around the model from SBML.jl library. Allows easy conversion from SBML to any other model format.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/d4509bae4f4df01fe7d9479069af6510c69ad99e/src/base/types/SBMLModel.jl#L1-L6">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="Base.convert-Tuple{Type{SBMLModel}, MetabolicModel}" href="#Base.convert-Tuple{Type{SBMLModel}, MetabolicModel}"><code>Base.convert</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">Base.convert(::Type{SBMLModel}, mm::MetabolicModel)</code></pre><p>Convert any metabolic model to <a href="#COBREXA.SBMLModel"><code>SBMLModel</code></a>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/d4509bae4f4df01fe7d9479069af6510c69ad99e/src/base/types/SBMLModel.jl#L150-L154">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.balance-Tuple{SBMLModel}" href="#COBREXA.balance-Tuple{SBMLModel}"><code>COBREXA.balance</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">balance(model::SBMLModel)::SparseVec</code></pre><p>Balance vector of a <a href="#COBREXA.SBMLModel"><code>SBMLModel</code></a>. This is always zero.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/d4509bae4f4df01fe7d9479069af6510c69ad99e/src/base/types/SBMLModel.jl#L74-L78">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.bounds-Tuple{SBMLModel}" href="#COBREXA.bounds-Tuple{SBMLModel}"><code>COBREXA.bounds</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">bounds(model::SBMLModel)::Tuple{SparseVec,SparseVec}</code></pre><p>Get the lower and upper flux bounds of model <a href="#COBREXA.SBMLModel"><code>SBMLModel</code></a>. Throws <code>DomainError</code> in case if the SBML contains mismatching units.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/d4509bae4f4df01fe7d9479069af6510c69ad99e/src/base/types/SBMLModel.jl#L49-L54">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.genes-Tuple{SBMLModel}" href="#COBREXA.genes-Tuple{SBMLModel}"><code>COBREXA.genes</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">genes(model::SBMLModel)::Vector{String}</code></pre><p>Get genes of a <a href="#COBREXA.SBMLModel"><code>SBMLModel</code></a>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/d4509bae4f4df01fe7d9479069af6510c69ad99e/src/base/types/SBMLModel.jl#L88-L92">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.metabolite_charge-Tuple{SBMLModel, String}" href="#COBREXA.metabolite_charge-Tuple{SBMLModel, String}"><code>COBREXA.metabolite_charge</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">metabolite_charge(model::SBMLModel, mid::String)::Maybe{Int}</code></pre><p>Get charge of a chosen metabolite from <a href="#COBREXA.SBMLModel"><code>SBMLModel</code></a>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/d4509bae4f4df01fe7d9479069af6510c69ad99e/src/base/types/SBMLModel.jl#L118-L122">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.metabolite_formula-Tuple{SBMLModel, String}" href="#COBREXA.metabolite_formula-Tuple{SBMLModel, String}"><code>COBREXA.metabolite_formula</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">metabolite_formula(model::SBMLModel, mid::String)::Maybe{MetaboliteFormula}</code></pre><p>Get <a href="#COBREXA.MetaboliteFormula"><code>MetaboliteFormula</code></a> from a chosen metabolite from <a href="#COBREXA.SBMLModel"><code>SBMLModel</code></a>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/d4509bae4f4df01fe7d9479069af6510c69ad99e/src/base/types/SBMLModel.jl#L110-L114">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.metabolites-Tuple{SBMLModel}" href="#COBREXA.metabolites-Tuple{SBMLModel}"><code>COBREXA.metabolites</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">metabolites(model::SBMLModel)::Vector{String}</code></pre><p>Get metabolites from a <a href="#COBREXA.SBMLModel"><code>SBMLModel</code></a>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/d4509bae4f4df01fe7d9479069af6510c69ad99e/src/base/types/SBMLModel.jl#L18-L22">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.n_genes-Tuple{SBMLModel}" href="#COBREXA.n_genes-Tuple{SBMLModel}"><code>COBREXA.n_genes</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">n_genes(model::SBMLModel)::Int</code></pre><p>Get number of genes in <a href="#COBREXA.SBMLModel"><code>SBMLModel</code></a>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/d4509bae4f4df01fe7d9479069af6510c69ad99e/src/base/types/SBMLModel.jl#L95-L99">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.n_metabolites-Tuple{SBMLModel}" href="#COBREXA.n_metabolites-Tuple{SBMLModel}"><code>COBREXA.n_metabolites</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">n_metabolites(model::SBMLModel)::Int</code></pre><p>Efficient counting of metabolites in <a href="#COBREXA.SBMLModel"><code>SBMLModel</code></a>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/d4509bae4f4df01fe7d9479069af6510c69ad99e/src/base/types/SBMLModel.jl#L32-L36">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.n_reactions-Tuple{SBMLModel}" href="#COBREXA.n_reactions-Tuple{SBMLModel}"><code>COBREXA.n_reactions</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">n_reactions(model::SBMLModel)::Int</code></pre><p>Efficient counting of reactions in <a href="#COBREXA.SBMLModel"><code>SBMLModel</code></a>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/d4509bae4f4df01fe7d9479069af6510c69ad99e/src/base/types/SBMLModel.jl#L25-L29">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.objective-Tuple{SBMLModel}" href="#COBREXA.objective-Tuple{SBMLModel}"><code>COBREXA.objective</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">objective(model::SBMLModel)::SparseVec</code></pre><p>Objective of the <a href="#COBREXA.SBMLModel"><code>SBMLModel</code></a>. </p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/d4509bae4f4df01fe7d9479069af6510c69ad99e/src/base/types/SBMLModel.jl#L81-L85">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.reaction_gene_association-Tuple{SBMLModel, String}" href="#COBREXA.reaction_gene_association-Tuple{SBMLModel, String}"><code>COBREXA.reaction_gene_association</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">reaction_gene_association(model::SBMLModel, rid::String)::Maybe{GeneAssociation}</code></pre><p>Retrieve the <a href="#COBREXA.GeneAssociation"><code>GeneAssociation</code></a> from <a href="#COBREXA.SBMLModel"><code>SBMLModel</code></a>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/d4509bae4f4df01fe7d9479069af6510c69ad99e/src/base/types/SBMLModel.jl#L102-L106">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.reaction_stoichiometry-Tuple{SBMLModel, String}" href="#COBREXA.reaction_stoichiometry-Tuple{SBMLModel, String}"><code>COBREXA.reaction_stoichiometry</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">reaction_stoichiometry(model::SBMLModel, rxn_id::String)::Dict{String, Float64}</code></pre><p>Return the reaction equation of reaction with id <code>rxn_id</code> in model. The reaction equation maps metabolite ids to their stoichiometric coefficients.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/d4509bae4f4df01fe7d9479069af6510c69ad99e/src/base/types/SBMLModel.jl#L140-L145">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.reactions-Tuple{SBMLModel}" href="#COBREXA.reactions-Tuple{SBMLModel}"><code>COBREXA.reactions</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">reactions(model::SBMLModel)::Vector{String}</code></pre><p>Get reactions from a <a href="#COBREXA.SBMLModel"><code>SBMLModel</code></a>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/d4509bae4f4df01fe7d9479069af6510c69ad99e/src/base/types/SBMLModel.jl#L11-L15">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.stoichiometry-Tuple{SBMLModel}" href="#COBREXA.stoichiometry-Tuple{SBMLModel}"><code>COBREXA.stoichiometry</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">stoichiometry(model::SBMLModel)::SparseMat</code></pre><p>Recreate the stoichiometry matrix from the <a href="#COBREXA.SBMLModel"><code>SBMLModel</code></a>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/d4509bae4f4df01fe7d9479069af6510c69ad99e/src/base/types/SBMLModel.jl#L39-L43">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.Serialized" href="#COBREXA.Serialized"><code>COBREXA.Serialized</code></a> — <span class="docstring-category">Type</span></header><section><div><pre><code class="language-julia">mutable struct Serialized{M <: MetabolicModel} m::Maybe{M} filename::String -end</code></pre><p>A meta-model that represents a model that is serialized on the disk. The internal model will be loaded on-demand by using any accessor, or by calling <a href="#COBREXA.precache!-Tuple{MetabolicModel}"><code>precache!</code></a> directly.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/1011dcb5948951fc380713022f1ecf5b37961981/src/base/types/Serialized.jl#L2-L11">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.precache!-Tuple{Serialized}" href="#COBREXA.precache!-Tuple{Serialized}"><code>COBREXA.precache!</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">precache!(model::Serialized{MetabolicModel})::Nothing</code></pre><p>Load the <code>Serialized</code> model from disk in case it's not alreadly loaded.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/1011dcb5948951fc380713022f1ecf5b37961981/src/base/types/Serialized.jl#L48-L52">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.StandardModel" href="#COBREXA.StandardModel"><code>COBREXA.StandardModel</code></a> — <span class="docstring-category">Type</span></header><section><div><pre><code class="language-julia">mutable struct StandardModel</code></pre><p><code>StandardModel</code> is used to store a constraint based metabolic model with meta-information. Meta-information is defined as annotation details, which include gene-reaction-rules, formulas, etc.</p><p>This model type seeks to keep as much meta-information as possible, as opposed to <code>CoreModel</code> and <code>CoreModelCoupled</code>, which keep the bare neccessities only. When merging models and keeping meta-information is important, use this as the model type. If meta-information is not important, use the more efficient core model types. See <a href="#COBREXA.CoreModel"><code>CoreModel</code></a> and <a href="#COBREXA.CoreModelCoupled"><code>CoreModelCoupled</code></a> for comparison.</p><p>In this model, reactions, metabolites, and genes are stored in ordered dictionaries indexed by each struct's <code>id</code> field. For example, <code>model.reactions["rxn1_id"]</code> returns a <code>Reaction</code> where the field <code>id</code> equals <code>"rxn1_id"</code>. This makes adding and removing reactions efficient. </p><p>Note that the stoichiometric matrix (or any other core data, e.g. flux bounds) is not stored directly as in <code>CoreModel</code>. When this model type is used in analysis functions, these core data structures are built from scratch each time an analysis function is called. This can cause performance issues if you run many small analysis functions sequentially. Consider using the core model types if performance is critical.</p><p>See also: <a href="#COBREXA.Reaction"><code>Reaction</code></a>, <a href="#COBREXA.Metabolite"><code>Metabolite</code></a>, <a href="#COBREXA.Gene"><code>Gene</code></a></p><p><strong>Fields</strong></p><pre><code class="language-none">id :: String +end</code></pre><p>A meta-model that represents a model that is serialized on the disk. The internal model will be loaded on-demand by using any accessor, or by calling <a href="#COBREXA.precache!-Tuple{MetabolicModel}"><code>precache!</code></a> directly.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/d4509bae4f4df01fe7d9479069af6510c69ad99e/src/base/types/Serialized.jl#L2-L11">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.precache!-Tuple{Serialized}" href="#COBREXA.precache!-Tuple{Serialized}"><code>COBREXA.precache!</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">precache!(model::Serialized{MetabolicModel})::Nothing</code></pre><p>Load the <code>Serialized</code> model from disk in case it's not alreadly loaded.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/d4509bae4f4df01fe7d9479069af6510c69ad99e/src/base/types/Serialized.jl#L48-L52">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.StandardModel" href="#COBREXA.StandardModel"><code>COBREXA.StandardModel</code></a> — <span class="docstring-category">Type</span></header><section><div><pre><code class="language-julia">mutable struct StandardModel</code></pre><p><code>StandardModel</code> is used to store a constraint based metabolic model with meta-information. Meta-information is defined as annotation details, which include gene-reaction-rules, formulas, etc.</p><p>This model type seeks to keep as much meta-information as possible, as opposed to <code>CoreModel</code> and <code>CoreModelCoupled</code>, which keep the bare neccessities only. When merging models and keeping meta-information is important, use this as the model type. If meta-information is not important, use the more efficient core model types. See <a href="#COBREXA.CoreModel"><code>CoreModel</code></a> and <a href="#COBREXA.CoreModelCoupled"><code>CoreModelCoupled</code></a> for comparison.</p><p>In this model, reactions, metabolites, and genes are stored in ordered dictionaries indexed by each struct's <code>id</code> field. For example, <code>model.reactions["rxn1_id"]</code> returns a <code>Reaction</code> where the field <code>id</code> equals <code>"rxn1_id"</code>. This makes adding and removing reactions efficient. </p><p>Note that the stoichiometric matrix (or any other core data, e.g. flux bounds) is not stored directly as in <code>CoreModel</code>. When this model type is used in analysis functions, these core data structures are built from scratch each time an analysis function is called. This can cause performance issues if you run many small analysis functions sequentially. Consider using the core model types if performance is critical.</p><p>See also: <a href="#COBREXA.Reaction"><code>Reaction</code></a>, <a href="#COBREXA.Metabolite"><code>Metabolite</code></a>, <a href="#COBREXA.Gene"><code>Gene</code></a></p><p><strong>Fields</strong></p><pre><code class="language-none">id :: String reactions :: OrderedDict{String, Reaction} metabolites :: OrderedDict{String, Metabolite} -genes :: OrderedDict{String, Gene}</code></pre><p><strong>Example</strong></p><pre><code class="language-none">model = load_model(StandardModel, "model_location")</code></pre></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/1011dcb5948951fc380713022f1ecf5b37961981/src/base/types/StandardModel.jl#L1-L36">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="Base.convert-Tuple{Type{StandardModel}, MetabolicModel}" href="#Base.convert-Tuple{Type{StandardModel}, MetabolicModel}"><code>Base.convert</code></a> — <span class="docstring-category">Method</span></header><section><div><p>Base.convert(::Type{StandardModel}, model::MetabolicModel)</p><p>Convert any <code>MetabolicModel</code> into a <code>StandardModel</code>. Note, some data loss may occur since only the generic interface is used during the conversion process.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/1011dcb5948951fc380713022f1ecf5b37961981/src/base/types/StandardModel.jl#L295-L301">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.balance-Tuple{StandardModel}" href="#COBREXA.balance-Tuple{StandardModel}"><code>COBREXA.balance</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">balance(model::StandardModel)</code></pre><p>Return the balance of the linear problem, i.e. b in Sv = 0 where S is the stoichiometric matrix and v is the flux vector.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/1011dcb5948951fc380713022f1ecf5b37961981/src/base/types/StandardModel.jl#L156-L161">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.bounds-Tuple{StandardModel}" href="#COBREXA.bounds-Tuple{StandardModel}"><code>COBREXA.bounds</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">bounds(model::StandardModel)</code></pre><p>Return the lower and upper bounds, respectively, for reactions in <code>model</code>. Order matches that of the reaction ids returned in <code>reactions()</code>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/1011dcb5948951fc380713022f1ecf5b37961981/src/base/types/StandardModel.jl#L144-L149">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.gene_annotations-Tuple{StandardModel, String}" href="#COBREXA.gene_annotations-Tuple{StandardModel, String}"><code>COBREXA.gene_annotations</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">gene_annotations(model::StandardModel, id::String)::Annotations</code></pre><p>Return the annotation associated with gene <code>id</code> in <code>model</code>. Return an empty Dict if not present.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/1011dcb5948951fc380713022f1ecf5b37961981/src/base/types/StandardModel.jl#L255-L260">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.gene_notes-Tuple{StandardModel, String}" href="#COBREXA.gene_notes-Tuple{StandardModel, String}"><code>COBREXA.gene_notes</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">gene_notes(model::StandardModel, id::String)::Notes</code></pre><p>Return the notes associated with gene <code>id</code> in <code>model</code>. Return an empty Dict if not present.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/1011dcb5948951fc380713022f1ecf5b37961981/src/base/types/StandardModel.jl#L245-L250">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.genes-Tuple{StandardModel}" href="#COBREXA.genes-Tuple{StandardModel}"><code>COBREXA.genes</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">genes(model::StandardModel)</code></pre><p>Return a vector of gene id strings in <code>model</code>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/1011dcb5948951fc380713022f1ecf5b37961981/src/base/types/StandardModel.jl#L85-L89">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.lower_bounds-Tuple{StandardModel}" href="#COBREXA.lower_bounds-Tuple{StandardModel}"><code>COBREXA.lower_bounds</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">lower_bounds(model::StandardModel)</code></pre><p>Return the lower bounds for all reactions in <code>model</code> in sparse format.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/1011dcb5948951fc380713022f1ecf5b37961981/src/base/types/StandardModel.jl#L125-L129">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.metabolite_annotations-Tuple{StandardModel, String}" href="#COBREXA.metabolite_annotations-Tuple{StandardModel, String}"><code>COBREXA.metabolite_annotations</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">metabolite_annotations(model::StandardModel, id::String)::Annotations</code></pre><p>Return the annotation associated with metabolite <code>id</code> in <code>model</code>. Return an empty Dict if not present.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/1011dcb5948951fc380713022f1ecf5b37961981/src/base/types/StandardModel.jl#L235-L240">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.metabolite_charge-Tuple{StandardModel, String}" href="#COBREXA.metabolite_charge-Tuple{StandardModel, String}"><code>COBREXA.metabolite_charge</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">metabolite_charge(model::StandardModel, id::String)</code></pre><p>Return the charge associated with metabolite <code>id</code> in <code>model</code>. Return nothing if not present.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/1011dcb5948951fc380713022f1ecf5b37961981/src/base/types/StandardModel.jl#L195-L200">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.metabolite_compartment-Tuple{StandardModel, String}" href="#COBREXA.metabolite_compartment-Tuple{StandardModel, String}"><code>COBREXA.metabolite_compartment</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">metabolite_compartment(model::StandardModel, id::String)</code></pre><p>Return compartment associated with metabolite <code>id</code> in <code>model</code>. Return <code>nothing</code> if not present.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/1011dcb5948951fc380713022f1ecf5b37961981/src/base/types/StandardModel.jl#L205-L210">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.metabolite_formula-Tuple{StandardModel, String}" href="#COBREXA.metabolite_formula-Tuple{StandardModel, String}"><code>COBREXA.metabolite_formula</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">metabolite_formula(model::StandardModel, id::String)</code></pre><p>Return the formula of reaction <code>id</code> in <code>model</code>. Return <code>nothing</code> if not present.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/1011dcb5948951fc380713022f1ecf5b37961981/src/base/types/StandardModel.jl#L185-L190">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.metabolite_notes-Tuple{StandardModel, String}" href="#COBREXA.metabolite_notes-Tuple{StandardModel, String}"><code>COBREXA.metabolite_notes</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">metabolite_notes(model::StandardModel, id::String)::Notes</code></pre><p>Return the notes associated with metabolite <code>id</code> in <code>model</code>. Return an empty Dict if not present.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/1011dcb5948951fc380713022f1ecf5b37961981/src/base/types/StandardModel.jl#L225-L230">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.metabolites-Tuple{StandardModel}" href="#COBREXA.metabolites-Tuple{StandardModel}"><code>COBREXA.metabolites</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">metabolites(model::StandardModel)</code></pre><p>Return a vector of metabolite id strings contained in <code>model</code>. The order of metabolite strings returned here matches the order used to construct the stoichiometric matrix.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/1011dcb5948951fc380713022f1ecf5b37961981/src/base/types/StandardModel.jl#L69-L75">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.n_genes-Tuple{StandardModel}" href="#COBREXA.n_genes-Tuple{StandardModel}"><code>COBREXA.n_genes</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">n_genes(model::StandardModel)</code></pre><p>Return the number of genes in <code>model</code>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/1011dcb5948951fc380713022f1ecf5b37961981/src/base/types/StandardModel.jl#L92-L96">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.n_metabolites-Tuple{StandardModel}" href="#COBREXA.n_metabolites-Tuple{StandardModel}"><code>COBREXA.n_metabolites</code></a> — <span class="docstring-category">Method</span></header><section><div><p>n_metabolites(model::StandardModel)</p><p>Return the number of metabolites in <code>model</code>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/1011dcb5948951fc380713022f1ecf5b37961981/src/base/types/StandardModel.jl#L78-L82">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.n_reactions-Tuple{StandardModel}" href="#COBREXA.n_reactions-Tuple{StandardModel}"><code>COBREXA.n_reactions</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">n_reactions(model::StandardModel)</code></pre><p>Return the number of reactions contained in <code>model</code>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/1011dcb5948951fc380713022f1ecf5b37961981/src/base/types/StandardModel.jl#L61-L65">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.objective-Tuple{StandardModel}" href="#COBREXA.objective-Tuple{StandardModel}"><code>COBREXA.objective</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">objective(model::StandardModel)</code></pre><p>Return sparse objective vector for <code>model</code>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/1011dcb5948951fc380713022f1ecf5b37961981/src/base/types/StandardModel.jl#L164-L168">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.reaction_annotations-Tuple{StandardModel, String}" href="#COBREXA.reaction_annotations-Tuple{StandardModel, String}"><code>COBREXA.reaction_annotations</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">reaction_annotations(model::StandardModel, id::String)::Annotations</code></pre><p>Return the annotation associated with reaction <code>id</code> in <code>model</code>. Return an empty Dict if not present.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/1011dcb5948951fc380713022f1ecf5b37961981/src/base/types/StandardModel.jl#L275-L280">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.reaction_gene_association-Tuple{StandardModel, String}" href="#COBREXA.reaction_gene_association-Tuple{StandardModel, String}"><code>COBREXA.reaction_gene_association</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">reaction_gene_association(model::StandardModel, id::String)</code></pre><p>Return the gene reaction rule in string format for reaction with <code>id</code> in <code>model</code>. Return <code>nothing</code> if not available.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/1011dcb5948951fc380713022f1ecf5b37961981/src/base/types/StandardModel.jl#L175-L180">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.reaction_notes-Tuple{StandardModel, String}" href="#COBREXA.reaction_notes-Tuple{StandardModel, String}"><code>COBREXA.reaction_notes</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">reaction_notes(model::StandardModel, id::String)::Notes</code></pre><p>Return the notes associated with reaction <code>id</code> in <code>model</code>. Return an empty Dict if not present.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/1011dcb5948951fc380713022f1ecf5b37961981/src/base/types/StandardModel.jl#L265-L270">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.reaction_stoichiometry-Tuple{StandardModel, String}" href="#COBREXA.reaction_stoichiometry-Tuple{StandardModel, String}"><code>COBREXA.reaction_stoichiometry</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">reaction_stoichiometry(model::StandardModel, rxn_id::String)::Dict{String, Float64}</code></pre><p>Return the reaction equation of reaction with id <code>rxn_id</code> in model. The reaction equation maps metabolite ids to their stoichiometric coefficients.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/1011dcb5948951fc380713022f1ecf5b37961981/src/base/types/StandardModel.jl#L285-L290">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.reaction_subsystem-Tuple{StandardModel, String}" href="#COBREXA.reaction_subsystem-Tuple{StandardModel, String}"><code>COBREXA.reaction_subsystem</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">reaction_subsystem(id::String, model::StandardModel)</code></pre><p>Return the subsystem associated with reaction <code>id</code> in <code>model</code>. Return <code>nothing</code> if not present.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/1011dcb5948951fc380713022f1ecf5b37961981/src/base/types/StandardModel.jl#L215-L220">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.reactions-Tuple{StandardModel}" href="#COBREXA.reactions-Tuple{StandardModel}"><code>COBREXA.reactions</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">reactions(model::StandardModel)</code></pre><p>Return a vector of reaction id strings contained in <code>model</code>. The order of reaction ids returned here matches the order used to construct the stoichiometric matrix.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/1011dcb5948951fc380713022f1ecf5b37961981/src/base/types/StandardModel.jl#L52-L58">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.stoichiometry-Tuple{StandardModel}" href="#COBREXA.stoichiometry-Tuple{StandardModel}"><code>COBREXA.stoichiometry</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">stoichiometry(model::StandardModel)</code></pre><p>Return the stoichiometric matrix associated with <code>model</code> in sparse format.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/1011dcb5948951fc380713022f1ecf5b37961981/src/base/types/StandardModel.jl#L99-L103">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.upper_bounds-Tuple{StandardModel}" href="#COBREXA.upper_bounds-Tuple{StandardModel}"><code>COBREXA.upper_bounds</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">upper_bounds(model::StandardModel)</code></pre><p>Return the upper bounds for all reactions in <code>model</code> in sparse format. Order matches that of the reaction ids returned in <code>reactions()</code>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/1011dcb5948951fc380713022f1ecf5b37961981/src/base/types/StandardModel.jl#L134-L139">source</a></section></article><h2 id="Base-functions"><a class="docs-heading-anchor" href="#Base-functions">Base functions</a><a id="Base-functions-1"></a><a class="docs-heading-anchor-permalink" href="#Base-functions" title="Permalink"></a></h2><article class="docstring"><header><a class="docstring-binding" id="COBREXA._constants" href="#COBREXA._constants"><code>COBREXA._constants</code></a> — <span class="docstring-category">Constant</span></header><section><div><p>A named tuple that contains the magic values that are used globally for whatever purposes.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/1011dcb5948951fc380713022f1ecf5b37961981/src/base/constants.jl#L2-L5">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.get_bound_vectors-Tuple{Any}" href="#COBREXA.get_bound_vectors-Tuple{Any}"><code>COBREXA.get_bound_vectors</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">get_bound_vectors(opt_model)</code></pre><p>Returns vectors of the lower and upper bounds of <code>opt_model</code> constraints, where <code>opt_model</code> is a JuMP model constructed by e.g. <a href="#COBREXA.make_optimization_model-Tuple{MetabolicModel, Any}"><code>make_optimization_model</code></a> or <a href="#COBREXA.flux_balance_analysis-Union{Tuple{M}, Tuple{M, Any}} where M<:MetabolicModel"><code>flux_balance_analysis</code></a>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/1011dcb5948951fc380713022f1ecf5b37961981/src/base/solver.jl#L62-L68">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.is_solved-Tuple{Any}" href="#COBREXA.is_solved-Tuple{Any}"><code>COBREXA.is_solved</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">is_solved(optmodel)</code></pre><p>Return <code>true</code> if <code>optmodel</code> solved successfully (solution is optimal or locally optimal). Return <code>false</code> if any other termination status is reached. Termination status is defined in the documentation of <code>JuMP</code>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/1011dcb5948951fc380713022f1ecf5b37961981/src/base/solver.jl#L50-L56">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.make_optimization_model-Tuple{MetabolicModel, Any}" href="#COBREXA.make_optimization_model-Tuple{MetabolicModel, Any}"><code>COBREXA.make_optimization_model</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">make_optimization_model( +genes :: OrderedDict{String, Gene}</code></pre><p><strong>Example</strong></p><pre><code class="language-none">model = load_model(StandardModel, "model_location")</code></pre></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/d4509bae4f4df01fe7d9479069af6510c69ad99e/src/base/types/StandardModel.jl#L1-L36">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="Base.convert-Tuple{Type{StandardModel}, MetabolicModel}" href="#Base.convert-Tuple{Type{StandardModel}, MetabolicModel}"><code>Base.convert</code></a> — <span class="docstring-category">Method</span></header><section><div><p>Base.convert(::Type{StandardModel}, model::MetabolicModel)</p><p>Convert any <code>MetabolicModel</code> into a <code>StandardModel</code>. Note, some data loss may occur since only the generic interface is used during the conversion process.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/d4509bae4f4df01fe7d9479069af6510c69ad99e/src/base/types/StandardModel.jl#L295-L301">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.balance-Tuple{StandardModel}" href="#COBREXA.balance-Tuple{StandardModel}"><code>COBREXA.balance</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">balance(model::StandardModel)</code></pre><p>Return the balance of the linear problem, i.e. b in Sv = 0 where S is the stoichiometric matrix and v is the flux vector.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/d4509bae4f4df01fe7d9479069af6510c69ad99e/src/base/types/StandardModel.jl#L156-L161">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.bounds-Tuple{StandardModel}" href="#COBREXA.bounds-Tuple{StandardModel}"><code>COBREXA.bounds</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">bounds(model::StandardModel)</code></pre><p>Return the lower and upper bounds, respectively, for reactions in <code>model</code>. Order matches that of the reaction ids returned in <code>reactions()</code>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/d4509bae4f4df01fe7d9479069af6510c69ad99e/src/base/types/StandardModel.jl#L144-L149">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.gene_annotations-Tuple{StandardModel, String}" href="#COBREXA.gene_annotations-Tuple{StandardModel, String}"><code>COBREXA.gene_annotations</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">gene_annotations(model::StandardModel, id::String)::Annotations</code></pre><p>Return the annotation associated with gene <code>id</code> in <code>model</code>. Return an empty Dict if not present.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/d4509bae4f4df01fe7d9479069af6510c69ad99e/src/base/types/StandardModel.jl#L255-L260">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.gene_notes-Tuple{StandardModel, String}" href="#COBREXA.gene_notes-Tuple{StandardModel, String}"><code>COBREXA.gene_notes</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">gene_notes(model::StandardModel, id::String)::Notes</code></pre><p>Return the notes associated with gene <code>id</code> in <code>model</code>. Return an empty Dict if not present.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/d4509bae4f4df01fe7d9479069af6510c69ad99e/src/base/types/StandardModel.jl#L245-L250">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.genes-Tuple{StandardModel}" href="#COBREXA.genes-Tuple{StandardModel}"><code>COBREXA.genes</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">genes(model::StandardModel)</code></pre><p>Return a vector of gene id strings in <code>model</code>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/d4509bae4f4df01fe7d9479069af6510c69ad99e/src/base/types/StandardModel.jl#L85-L89">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.lower_bounds-Tuple{StandardModel}" href="#COBREXA.lower_bounds-Tuple{StandardModel}"><code>COBREXA.lower_bounds</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">lower_bounds(model::StandardModel)</code></pre><p>Return the lower bounds for all reactions in <code>model</code> in sparse format.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/d4509bae4f4df01fe7d9479069af6510c69ad99e/src/base/types/StandardModel.jl#L125-L129">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.metabolite_annotations-Tuple{StandardModel, String}" href="#COBREXA.metabolite_annotations-Tuple{StandardModel, String}"><code>COBREXA.metabolite_annotations</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">metabolite_annotations(model::StandardModel, id::String)::Annotations</code></pre><p>Return the annotation associated with metabolite <code>id</code> in <code>model</code>. Return an empty Dict if not present.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/d4509bae4f4df01fe7d9479069af6510c69ad99e/src/base/types/StandardModel.jl#L235-L240">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.metabolite_charge-Tuple{StandardModel, String}" href="#COBREXA.metabolite_charge-Tuple{StandardModel, String}"><code>COBREXA.metabolite_charge</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">metabolite_charge(model::StandardModel, id::String)</code></pre><p>Return the charge associated with metabolite <code>id</code> in <code>model</code>. Return nothing if not present.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/d4509bae4f4df01fe7d9479069af6510c69ad99e/src/base/types/StandardModel.jl#L195-L200">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.metabolite_compartment-Tuple{StandardModel, String}" href="#COBREXA.metabolite_compartment-Tuple{StandardModel, String}"><code>COBREXA.metabolite_compartment</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">metabolite_compartment(model::StandardModel, id::String)</code></pre><p>Return compartment associated with metabolite <code>id</code> in <code>model</code>. Return <code>nothing</code> if not present.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/d4509bae4f4df01fe7d9479069af6510c69ad99e/src/base/types/StandardModel.jl#L205-L210">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.metabolite_formula-Tuple{StandardModel, String}" href="#COBREXA.metabolite_formula-Tuple{StandardModel, String}"><code>COBREXA.metabolite_formula</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">metabolite_formula(model::StandardModel, id::String)</code></pre><p>Return the formula of reaction <code>id</code> in <code>model</code>. Return <code>nothing</code> if not present.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/d4509bae4f4df01fe7d9479069af6510c69ad99e/src/base/types/StandardModel.jl#L185-L190">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.metabolite_notes-Tuple{StandardModel, String}" href="#COBREXA.metabolite_notes-Tuple{StandardModel, String}"><code>COBREXA.metabolite_notes</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">metabolite_notes(model::StandardModel, id::String)::Notes</code></pre><p>Return the notes associated with metabolite <code>id</code> in <code>model</code>. Return an empty Dict if not present.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/d4509bae4f4df01fe7d9479069af6510c69ad99e/src/base/types/StandardModel.jl#L225-L230">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.metabolites-Tuple{StandardModel}" href="#COBREXA.metabolites-Tuple{StandardModel}"><code>COBREXA.metabolites</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">metabolites(model::StandardModel)</code></pre><p>Return a vector of metabolite id strings contained in <code>model</code>. The order of metabolite strings returned here matches the order used to construct the stoichiometric matrix.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/d4509bae4f4df01fe7d9479069af6510c69ad99e/src/base/types/StandardModel.jl#L69-L75">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.n_genes-Tuple{StandardModel}" href="#COBREXA.n_genes-Tuple{StandardModel}"><code>COBREXA.n_genes</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">n_genes(model::StandardModel)</code></pre><p>Return the number of genes in <code>model</code>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/d4509bae4f4df01fe7d9479069af6510c69ad99e/src/base/types/StandardModel.jl#L92-L96">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.n_metabolites-Tuple{StandardModel}" href="#COBREXA.n_metabolites-Tuple{StandardModel}"><code>COBREXA.n_metabolites</code></a> — <span class="docstring-category">Method</span></header><section><div><p>n_metabolites(model::StandardModel)</p><p>Return the number of metabolites in <code>model</code>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/d4509bae4f4df01fe7d9479069af6510c69ad99e/src/base/types/StandardModel.jl#L78-L82">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.n_reactions-Tuple{StandardModel}" href="#COBREXA.n_reactions-Tuple{StandardModel}"><code>COBREXA.n_reactions</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">n_reactions(model::StandardModel)</code></pre><p>Return the number of reactions contained in <code>model</code>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/d4509bae4f4df01fe7d9479069af6510c69ad99e/src/base/types/StandardModel.jl#L61-L65">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.objective-Tuple{StandardModel}" href="#COBREXA.objective-Tuple{StandardModel}"><code>COBREXA.objective</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">objective(model::StandardModel)</code></pre><p>Return sparse objective vector for <code>model</code>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/d4509bae4f4df01fe7d9479069af6510c69ad99e/src/base/types/StandardModel.jl#L164-L168">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.reaction_annotations-Tuple{StandardModel, String}" href="#COBREXA.reaction_annotations-Tuple{StandardModel, String}"><code>COBREXA.reaction_annotations</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">reaction_annotations(model::StandardModel, id::String)::Annotations</code></pre><p>Return the annotation associated with reaction <code>id</code> in <code>model</code>. Return an empty Dict if not present.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/d4509bae4f4df01fe7d9479069af6510c69ad99e/src/base/types/StandardModel.jl#L275-L280">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.reaction_gene_association-Tuple{StandardModel, String}" href="#COBREXA.reaction_gene_association-Tuple{StandardModel, String}"><code>COBREXA.reaction_gene_association</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">reaction_gene_association(model::StandardModel, id::String)</code></pre><p>Return the gene reaction rule in string format for reaction with <code>id</code> in <code>model</code>. Return <code>nothing</code> if not available.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/d4509bae4f4df01fe7d9479069af6510c69ad99e/src/base/types/StandardModel.jl#L175-L180">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.reaction_notes-Tuple{StandardModel, String}" href="#COBREXA.reaction_notes-Tuple{StandardModel, String}"><code>COBREXA.reaction_notes</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">reaction_notes(model::StandardModel, id::String)::Notes</code></pre><p>Return the notes associated with reaction <code>id</code> in <code>model</code>. Return an empty Dict if not present.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/d4509bae4f4df01fe7d9479069af6510c69ad99e/src/base/types/StandardModel.jl#L265-L270">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.reaction_stoichiometry-Tuple{StandardModel, String}" href="#COBREXA.reaction_stoichiometry-Tuple{StandardModel, String}"><code>COBREXA.reaction_stoichiometry</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">reaction_stoichiometry(model::StandardModel, rxn_id::String)::Dict{String, Float64}</code></pre><p>Return the reaction equation of reaction with id <code>rxn_id</code> in model. The reaction equation maps metabolite ids to their stoichiometric coefficients.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/d4509bae4f4df01fe7d9479069af6510c69ad99e/src/base/types/StandardModel.jl#L285-L290">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.reaction_subsystem-Tuple{StandardModel, String}" href="#COBREXA.reaction_subsystem-Tuple{StandardModel, String}"><code>COBREXA.reaction_subsystem</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">reaction_subsystem(id::String, model::StandardModel)</code></pre><p>Return the subsystem associated with reaction <code>id</code> in <code>model</code>. Return <code>nothing</code> if not present.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/d4509bae4f4df01fe7d9479069af6510c69ad99e/src/base/types/StandardModel.jl#L215-L220">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.reactions-Tuple{StandardModel}" href="#COBREXA.reactions-Tuple{StandardModel}"><code>COBREXA.reactions</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">reactions(model::StandardModel)</code></pre><p>Return a vector of reaction id strings contained in <code>model</code>. The order of reaction ids returned here matches the order used to construct the stoichiometric matrix.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/d4509bae4f4df01fe7d9479069af6510c69ad99e/src/base/types/StandardModel.jl#L52-L58">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.stoichiometry-Tuple{StandardModel}" href="#COBREXA.stoichiometry-Tuple{StandardModel}"><code>COBREXA.stoichiometry</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">stoichiometry(model::StandardModel)</code></pre><p>Return the stoichiometric matrix associated with <code>model</code> in sparse format.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/d4509bae4f4df01fe7d9479069af6510c69ad99e/src/base/types/StandardModel.jl#L99-L103">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.upper_bounds-Tuple{StandardModel}" href="#COBREXA.upper_bounds-Tuple{StandardModel}"><code>COBREXA.upper_bounds</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">upper_bounds(model::StandardModel)</code></pre><p>Return the upper bounds for all reactions in <code>model</code> in sparse format. Order matches that of the reaction ids returned in <code>reactions()</code>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/d4509bae4f4df01fe7d9479069af6510c69ad99e/src/base/types/StandardModel.jl#L134-L139">source</a></section></article><h2 id="Base-functions"><a class="docs-heading-anchor" href="#Base-functions">Base functions</a><a id="Base-functions-1"></a><a class="docs-heading-anchor-permalink" href="#Base-functions" title="Permalink"></a></h2><article class="docstring"><header><a class="docstring-binding" id="COBREXA._constants" href="#COBREXA._constants"><code>COBREXA._constants</code></a> — <span class="docstring-category">Constant</span></header><section><div><p>A named tuple that contains the magic values that are used globally for whatever purposes.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/d4509bae4f4df01fe7d9479069af6510c69ad99e/src/base/constants.jl#L2-L5">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.get_bound_vectors-Tuple{Any}" href="#COBREXA.get_bound_vectors-Tuple{Any}"><code>COBREXA.get_bound_vectors</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">get_bound_vectors(opt_model)</code></pre><p>Returns vectors of the lower and upper bounds of <code>opt_model</code> constraints, where <code>opt_model</code> is a JuMP model constructed by e.g. <a href="#COBREXA.make_optimization_model-Tuple{MetabolicModel, Any}"><code>make_optimization_model</code></a> or <a href="#COBREXA.flux_balance_analysis-Union{Tuple{M}, Tuple{M, Any}} where M<:MetabolicModel"><code>flux_balance_analysis</code></a>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/d4509bae4f4df01fe7d9479069af6510c69ad99e/src/base/solver.jl#L62-L68">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.is_solved-Tuple{Any}" href="#COBREXA.is_solved-Tuple{Any}"><code>COBREXA.is_solved</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">is_solved(optmodel)</code></pre><p>Return <code>true</code> if <code>optmodel</code> solved successfully (solution is optimal or locally optimal). Return <code>false</code> if any other termination status is reached. Termination status is defined in the documentation of <code>JuMP</code>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/d4509bae4f4df01fe7d9479069af6510c69ad99e/src/base/solver.jl#L50-L56">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.make_optimization_model-Tuple{MetabolicModel, Any}" href="#COBREXA.make_optimization_model-Tuple{MetabolicModel, Any}"><code>COBREXA.make_optimization_model</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">make_optimization_model( model::MetabolicModel, optimizer; sense = MOI.MAX_SENSE, -)</code></pre><p>Convert <code>MetabolicModel</code>s to a JuMP model, place objectives and the equality constraint.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/1011dcb5948951fc380713022f1ecf5b37961981/src/base/solver.jl#L2-L11">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.optimize_model-Tuple{MetabolicModel, Any}" href="#COBREXA.optimize_model-Tuple{MetabolicModel, Any}"><code>COBREXA.optimize_model</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">optimize_model( +)</code></pre><p>Convert <code>MetabolicModel</code>s to a JuMP model, place objectives and the equality constraint.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/d4509bae4f4df01fe7d9479069af6510c69ad99e/src/base/solver.jl#L2-L11">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.optimize_model-Tuple{MetabolicModel, Any}" href="#COBREXA.optimize_model-Tuple{MetabolicModel, Any}"><code>COBREXA.optimize_model</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">optimize_model( model::MetabolicModel, optimizer; sense = MOI.MIN_SENSE, -)</code></pre><p>Use JuMP to solve an instance of CoreModel</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/1011dcb5948951fc380713022f1ecf5b37961981/src/base/solver.jl#L34-L42">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.set_bound-Tuple{Any, Any}" href="#COBREXA.set_bound-Tuple{Any, Any}"><code>COBREXA.set_bound</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">set_bound(index, optimization_model; +)</code></pre><p>Use JuMP to solve an instance of CoreModel</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/d4509bae4f4df01fe7d9479069af6510c69ad99e/src/base/solver.jl#L34-L42">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.set_bound-Tuple{Any, Any}" href="#COBREXA.set_bound-Tuple{Any, Any}"><code>COBREXA.set_bound</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">set_bound(index, optimization_model; ub=_constants.default_reaction_rate, - lb=-_constants.default_reaction_rate)</code></pre><p>Helper function to set the bounds of variables. The JuMP <code>set_normalized_rhs</code> function is a little confusing, so this function simplifies setting constraints. In short, JuMP uses a normalized right hand side representation of constraints, which means that lower bounds have their sign flipped. This function does this for you, so you don't have to remember to do this whenever you change the constraints. </p><p>Just supply the constraint <code>index</code> and the JuMP model (<code>opt_model</code>) that will be solved, and the variable's bounds will be set to <code>ub</code> and <code>lb</code>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/1011dcb5948951fc380713022f1ecf5b37961981/src/base/solver.jl#L74-L89">source</a></section></article><h2 id="File-I/O-and-serialization"><a class="docs-heading-anchor" href="#File-I/O-and-serialization">File I/O and serialization</a><a id="File-I/O-and-serialization-1"></a><a class="docs-heading-anchor-permalink" href="#File-I/O-and-serialization" title="Permalink"></a></h2><article class="docstring"><header><a class="docstring-binding" id="COBREXA.load_model-Tuple{String}" href="#COBREXA.load_model-Tuple{String}"><code>COBREXA.load_model</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">load_model(file_name::String)::MetabolicModel</code></pre><p>Generic function for loading models that chooses a specific loader function from the <code>file_name</code> extension, or throws an error.</p><p>Currently, these model types are supported:</p><ul><li>SBML models (<code>*.xml</code>, loaded with <a href="#COBREXA.load_sbml_model-Tuple{String}"><code>load_sbml_model</code></a>)</li><li>JSON models (<code>*.json</code>, loaded with <a href="#COBREXA.load_json_model-Tuple{String}"><code>load_json_model</code></a>)</li><li>MATLAB models (<code>*.mat</code>, loaded with <a href="#COBREXA.load_mat_model-Tuple{String}"><code>load_mat_model</code></a>)</li></ul></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/1011dcb5948951fc380713022f1ecf5b37961981/src/io/io.jl#L2-L13">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.load_model-Union{Tuple{T}, Tuple{Type{T}, String}} where T<:MetabolicModel" href="#COBREXA.load_model-Union{Tuple{T}, Tuple{Type{T}, String}} where T<:MetabolicModel"><code>COBREXA.load_model</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">load_model(type::Type{T}, file_name::String)::T where T</code></pre><p>Helper function tht loads the model using <a href="#COBREXA.load_model-Tuple{String}"><code>load_model</code></a> and return it converted to <code>type</code>.</p><p><strong>Example:</strong></p><pre><code class="language-none">load_model(CoreModel, "mySBMLModel.xml")</code></pre></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/1011dcb5948951fc380713022f1ecf5b37961981/src/io/io.jl#L27-L36">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.save_model-Tuple{MetabolicModel, String}" href="#COBREXA.save_model-Tuple{MetabolicModel, String}"><code>COBREXA.save_model</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">save_model(model::MetabolicModel, file_name::String)</code></pre><p>Generic function for saving models that chooses a specific writer function from the <code>file_name</code> extension, or throws an error.</p><p>Currently, these model types are supported:</p><ul><li>JSON models (<code>*.json</code>, loaded with <a href="#COBREXA.save_json_model-Tuple{MetabolicModel, String}"><code>save_json_model</code></a>)</li><li>MATLAB models (<code>*.mat</code>, loaded with <a href="#COBREXA.save_mat_model-Tuple{MetabolicModel, String}"><code>save_mat_model</code></a>)</li></ul></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/1011dcb5948951fc380713022f1ecf5b37961981/src/io/io.jl#L41-L51">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.load_json_model-Tuple{String}" href="#COBREXA.load_json_model-Tuple{String}"><code>COBREXA.load_json_model</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">load_json_model(filename::String)::JSONModel</code></pre><p>Load and return a JSON-formatted model that is stored in <code>file_name</code>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/1011dcb5948951fc380713022f1ecf5b37961981/src/io/json.jl#L1-L5">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.save_json_model-Tuple{MetabolicModel, String}" href="#COBREXA.save_json_model-Tuple{MetabolicModel, String}"><code>COBREXA.save_json_model</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">save_json_model(model::MetabolicModel, file_name::String)</code></pre><p>Save a <a href="#COBREXA.JSONModel"><code>JSONModel</code></a> in <code>model</code> to a JSON file <code>file_name</code>.</p><p>In case the <code>model</code> is not <code>JSONModel</code>, it will be converted automatically.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/1011dcb5948951fc380713022f1ecf5b37961981/src/io/json.jl#L10-L16">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.load_mat_model-Tuple{String}" href="#COBREXA.load_mat_model-Tuple{String}"><code>COBREXA.load_mat_model</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">load_mat_model(file_name::String)</code></pre><p>Load and return a MATLAB file <code>file_name</code> that contains a COBRA-compatible model.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/1011dcb5948951fc380713022f1ecf5b37961981/src/io/mat.jl#L2-L7">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.save_mat_model-Tuple{MetabolicModel, String}" href="#COBREXA.save_mat_model-Tuple{MetabolicModel, String}"><code>COBREXA.save_mat_model</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">save_mat_model(model::MetabolicModel, file_name::String; model_name::String="model")</code></pre><p>Save a <a href="#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><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/1011dcb5948951fc380713022f1ecf5b37961981/src/io/mat.jl#L14-L24">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.load_sbml_model-Tuple{String}" href="#COBREXA.load_sbml_model-Tuple{String}"><code>COBREXA.load_sbml_model</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">load_sbml_model(file_name::String)::SBMLModel</code></pre><p>Load and return a SBML XML model in <code>file_name</code>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/1011dcb5948951fc380713022f1ecf5b37961981/src/io/sbml.jl#L2-L6">source</a></section></article><h3 id="Pretty-printing"><a class="docs-heading-anchor" href="#Pretty-printing">Pretty printing</a><a id="Pretty-printing-1"></a><a class="docs-heading-anchor-permalink" href="#Pretty-printing" title="Permalink"></a></h3><article class="docstring"><header><a class="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> — <span class="docstring-category">Method</span></header><section><div><p>Pretty printing of everything metabolic-modelish.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/1011dcb5948951fc380713022f1ecf5b37961981/src/io/show/MetabolicModel.jl#L1-L3">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA._pretty_substances-Tuple{Vector{String}}" href="#COBREXA._pretty_substances-Tuple{Vector{String}}"><code>COBREXA._pretty_substances</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">_pretty_substances(ss::Vector{String})::String</code></pre><p>Nicely format a substance list.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/1011dcb5948951fc380713022f1ecf5b37961981/src/io/show/Reaction.jl#L2-L6">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="Base.show-Union{Tuple{M}, Tuple{IO, MIME{Symbol("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> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">Base.show(io::IO, ::MIME"text/plain", m::Serialized{M}) where {M}</code></pre><p>Show the <a href="#COBREXA.Serialized"><code>Serialized</code></a> model without unnecessarily loading it.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/1011dcb5948951fc380713022f1ecf5b37961981/src/io/show/Serialized.jl#L2-L6">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA._pretty_print_keyvals-Tuple{Any, String, Any}" href="#COBREXA._pretty_print_keyvals-Tuple{Any, String, Any}"><code>COBREXA._pretty_print_keyvals</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">_pretty_print_keyvals(io, def::String, payload; kwargs...)</code></pre><p>Nicely prints keys and values.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/1011dcb5948951fc380713022f1ecf5b37961981/src/io/show/pretty_printing.jl#L1-L5">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA._pretty_print_keyvals-Tuple{Any, String, Dict}" href="#COBREXA._pretty_print_keyvals-Tuple{Any, String, Dict}"><code>COBREXA._pretty_print_keyvals</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">_pretty_print_keyvals( + lb=-_constants.default_reaction_rate)</code></pre><p>Helper function to set the bounds of variables. The JuMP <code>set_normalized_rhs</code> function is a little confusing, so this function simplifies setting constraints. In short, JuMP uses a normalized right hand side representation of constraints, which means that lower bounds have their sign flipped. This function does this for you, so you don't have to remember to do this whenever you change the constraints. </p><p>Just supply the constraint <code>index</code> and the JuMP model (<code>opt_model</code>) that will be solved, and the variable's bounds will be set to <code>ub</code> and <code>lb</code>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/d4509bae4f4df01fe7d9479069af6510c69ad99e/src/base/solver.jl#L74-L89">source</a></section></article><h2 id="File-I/O-and-serialization"><a class="docs-heading-anchor" href="#File-I/O-and-serialization">File I/O and serialization</a><a id="File-I/O-and-serialization-1"></a><a class="docs-heading-anchor-permalink" href="#File-I/O-and-serialization" title="Permalink"></a></h2><article class="docstring"><header><a class="docstring-binding" id="COBREXA.load_model-Tuple{String}" href="#COBREXA.load_model-Tuple{String}"><code>COBREXA.load_model</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">load_model(file_name::String)::MetabolicModel</code></pre><p>Generic function for loading models that chooses a specific loader function from the <code>file_name</code> extension, or throws an error.</p><p>Currently, these model types are supported:</p><ul><li>SBML models (<code>*.xml</code>, loaded with <a href="#COBREXA.load_sbml_model-Tuple{String}"><code>load_sbml_model</code></a>)</li><li>JSON models (<code>*.json</code>, loaded with <a href="#COBREXA.load_json_model-Tuple{String}"><code>load_json_model</code></a>)</li><li>MATLAB models (<code>*.mat</code>, loaded with <a href="#COBREXA.load_mat_model-Tuple{String}"><code>load_mat_model</code></a>)</li></ul></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/d4509bae4f4df01fe7d9479069af6510c69ad99e/src/io/io.jl#L2-L13">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.load_model-Union{Tuple{T}, Tuple{Type{T}, String}} where T<:MetabolicModel" href="#COBREXA.load_model-Union{Tuple{T}, Tuple{Type{T}, String}} where T<:MetabolicModel"><code>COBREXA.load_model</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">load_model(type::Type{T}, file_name::String)::T where T</code></pre><p>Helper function tht loads the model using <a href="#COBREXA.load_model-Tuple{String}"><code>load_model</code></a> and return it converted to <code>type</code>.</p><p><strong>Example:</strong></p><pre><code class="language-none">load_model(CoreModel, "mySBMLModel.xml")</code></pre></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/d4509bae4f4df01fe7d9479069af6510c69ad99e/src/io/io.jl#L27-L36">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.save_model-Tuple{MetabolicModel, String}" href="#COBREXA.save_model-Tuple{MetabolicModel, String}"><code>COBREXA.save_model</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">save_model(model::MetabolicModel, file_name::String)</code></pre><p>Generic function for saving models that chooses a specific writer function from the <code>file_name</code> extension, or throws an error.</p><p>Currently, these model types are supported:</p><ul><li>JSON models (<code>*.json</code>, loaded with <a href="#COBREXA.save_json_model-Tuple{MetabolicModel, String}"><code>save_json_model</code></a>)</li><li>MATLAB models (<code>*.mat</code>, loaded with <a href="#COBREXA.save_mat_model-Tuple{MetabolicModel, String}"><code>save_mat_model</code></a>)</li></ul></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/d4509bae4f4df01fe7d9479069af6510c69ad99e/src/io/io.jl#L41-L51">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.load_json_model-Tuple{String}" href="#COBREXA.load_json_model-Tuple{String}"><code>COBREXA.load_json_model</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">load_json_model(filename::String)::JSONModel</code></pre><p>Load and return a JSON-formatted model that is stored in <code>file_name</code>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/d4509bae4f4df01fe7d9479069af6510c69ad99e/src/io/json.jl#L1-L5">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.save_json_model-Tuple{MetabolicModel, String}" href="#COBREXA.save_json_model-Tuple{MetabolicModel, String}"><code>COBREXA.save_json_model</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">save_json_model(model::MetabolicModel, file_name::String)</code></pre><p>Save a <a href="#COBREXA.JSONModel"><code>JSONModel</code></a> in <code>model</code> to a JSON file <code>file_name</code>.</p><p>In case the <code>model</code> is not <code>JSONModel</code>, it will be converted automatically.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/d4509bae4f4df01fe7d9479069af6510c69ad99e/src/io/json.jl#L10-L16">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.load_mat_model-Tuple{String}" href="#COBREXA.load_mat_model-Tuple{String}"><code>COBREXA.load_mat_model</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">load_mat_model(file_name::String)</code></pre><p>Load and return a MATLAB file <code>file_name</code> that contains a COBRA-compatible model.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/d4509bae4f4df01fe7d9479069af6510c69ad99e/src/io/mat.jl#L2-L7">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.save_mat_model-Tuple{MetabolicModel, String}" href="#COBREXA.save_mat_model-Tuple{MetabolicModel, String}"><code>COBREXA.save_mat_model</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">save_mat_model(model::MetabolicModel, file_name::String; model_name::String="model")</code></pre><p>Save a <a href="#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><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/d4509bae4f4df01fe7d9479069af6510c69ad99e/src/io/mat.jl#L14-L24">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.load_sbml_model-Tuple{String}" href="#COBREXA.load_sbml_model-Tuple{String}"><code>COBREXA.load_sbml_model</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">load_sbml_model(file_name::String)::SBMLModel</code></pre><p>Load and return a SBML XML model in <code>file_name</code>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/d4509bae4f4df01fe7d9479069af6510c69ad99e/src/io/sbml.jl#L2-L6">source</a></section></article><h3 id="Pretty-printing"><a class="docs-heading-anchor" href="#Pretty-printing">Pretty printing</a><a id="Pretty-printing-1"></a><a class="docs-heading-anchor-permalink" href="#Pretty-printing" title="Permalink"></a></h3><article class="docstring"><header><a class="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> — <span class="docstring-category">Method</span></header><section><div><p>Pretty printing of everything metabolic-modelish.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/d4509bae4f4df01fe7d9479069af6510c69ad99e/src/io/show/MetabolicModel.jl#L1-L3">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA._pretty_substances-Tuple{Vector{String}}" href="#COBREXA._pretty_substances-Tuple{Vector{String}}"><code>COBREXA._pretty_substances</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">_pretty_substances(ss::Vector{String})::String</code></pre><p>Nicely format a substance list.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/d4509bae4f4df01fe7d9479069af6510c69ad99e/src/io/show/Reaction.jl#L2-L6">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="Base.show-Union{Tuple{M}, Tuple{IO, MIME{Symbol("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> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">Base.show(io::IO, ::MIME"text/plain", m::Serialized{M}) where {M}</code></pre><p>Show the <a href="#COBREXA.Serialized"><code>Serialized</code></a> model without unnecessarily loading it.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/d4509bae4f4df01fe7d9479069af6510c69ad99e/src/io/show/Serialized.jl#L2-L6">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA._pretty_print_keyvals-Tuple{Any, String, Any}" href="#COBREXA._pretty_print_keyvals-Tuple{Any, String, Any}"><code>COBREXA._pretty_print_keyvals</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">_pretty_print_keyvals(io, def::String, payload; kwargs...)</code></pre><p>Nicely prints keys and values.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/d4509bae4f4df01fe7d9479069af6510c69ad99e/src/io/show/pretty_printing.jl#L1-L5">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA._pretty_print_keyvals-Tuple{Any, String, Dict}" href="#COBREXA._pretty_print_keyvals-Tuple{Any, String, Dict}"><code>COBREXA._pretty_print_keyvals</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">_pretty_print_keyvals( io, def::String, payload::Dict -)</code></pre><p>Specialization of <code>_pretty_print_keyvals</code> for dictionaries.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/1011dcb5948951fc380713022f1ecf5b37961981/src/io/show/pretty_printing.jl#L27-L35">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA._pretty_print_keyvals-Tuple{Any, String, String}" href="#COBREXA._pretty_print_keyvals-Tuple{Any, String, String}"><code>COBREXA._pretty_print_keyvals</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">_pretty_print_keyvals( +)</code></pre><p>Specialization of <code>_pretty_print_keyvals</code> for dictionaries.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/d4509bae4f4df01fe7d9479069af6510c69ad99e/src/io/show/pretty_printing.jl#L27-L35">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA._pretty_print_keyvals-Tuple{Any, String, String}" href="#COBREXA._pretty_print_keyvals-Tuple{Any, String, String}"><code>COBREXA._pretty_print_keyvals</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">_pretty_print_keyvals( io, def::String, payload::String -)</code></pre><p>Specialization of <code>_pretty_print_keyvals</code> for plain strings.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/1011dcb5948951fc380713022f1ecf5b37961981/src/io/show/pretty_printing.jl#L9-L17">source</a></section></article><h2 id="Model-reconstruction"><a class="docs-heading-anchor" href="#Model-reconstruction">Model reconstruction</a><a id="Model-reconstruction-1"></a><a class="docs-heading-anchor-permalink" href="#Model-reconstruction" title="Permalink"></a></h2><article class="docstring"><header><a class="docstring-binding" id="COBREXA.add_reactions-Tuple{CoreModel, CoreModel}" href="#COBREXA.add_reactions-Tuple{CoreModel, CoreModel}"><code>COBREXA.add_reactions</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">add_reactions(m1::CoreModel, m2::CoreModel; check_consistency = false)</code></pre><p>Add all reactions from <code>m2</code> to <code>m1</code>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/1011dcb5948951fc380713022f1ecf5b37961981/src/reconstruction/CoreModel.jl#L109-L114">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.add_reactions-Union{Tuple{K}, Tuple{V2}, Tuple{V1}, Tuple{CoreModel, V1, V2, AbstractFloat, AbstractFloat, AbstractFloat, String, K}} where {V1<:AbstractVector{Float64}, V2<:AbstractVector{Float64}, K<:AbstractVector{String}}" href="#COBREXA.add_reactions-Union{Tuple{K}, Tuple{V2}, Tuple{V1}, Tuple{CoreModel, V1, V2, AbstractFloat, AbstractFloat, AbstractFloat, String, K}} where {V1<:AbstractVector{Float64}, V2<:AbstractVector{Float64}, K<:AbstractVector{String}}"><code>COBREXA.add_reactions</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">add_reactions( +)</code></pre><p>Specialization of <code>_pretty_print_keyvals</code> for plain strings.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/d4509bae4f4df01fe7d9479069af6510c69ad99e/src/io/show/pretty_printing.jl#L9-L17">source</a></section></article><h2 id="Model-reconstruction"><a class="docs-heading-anchor" href="#Model-reconstruction">Model reconstruction</a><a id="Model-reconstruction-1"></a><a class="docs-heading-anchor-permalink" href="#Model-reconstruction" title="Permalink"></a></h2><article class="docstring"><header><a class="docstring-binding" id="COBREXA.add_reactions-Tuple{CoreModel, CoreModel}" href="#COBREXA.add_reactions-Tuple{CoreModel, CoreModel}"><code>COBREXA.add_reactions</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">add_reactions(m1::CoreModel, m2::CoreModel; check_consistency = false)</code></pre><p>Add all reactions from <code>m2</code> to <code>m1</code>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/d4509bae4f4df01fe7d9479069af6510c69ad99e/src/reconstruction/CoreModel.jl#L109-L114">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.add_reactions-Union{Tuple{K}, Tuple{V2}, Tuple{V1}, Tuple{CoreModel, V1, V2, AbstractFloat, AbstractFloat, AbstractFloat, String, K}} where {V1<:AbstractVector{Float64}, V2<:AbstractVector{Float64}, K<:AbstractVector{String}}" href="#COBREXA.add_reactions-Union{Tuple{K}, Tuple{V2}, Tuple{V1}, Tuple{CoreModel, V1, V2, AbstractFloat, AbstractFloat, AbstractFloat, String, K}} where {V1<:AbstractVector{Float64}, V2<:AbstractVector{Float64}, K<:AbstractVector{String}}"><code>COBREXA.add_reactions</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">add_reactions( m::CoreModel, s::V1, b::V2, @@ -60,7 +60,7 @@ genes :: OrderedDict{String, Gene}</code></pre><p><strong>Example</strong></p><p rxn::String, mets::K; check_consistency = false, -) where {V1<:VecType,V2<:VecType,K<:StringVecType}</code></pre></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/1011dcb5948951fc380713022f1ecf5b37961981/src/reconstruction/CoreModel.jl#L35-L48">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.add_reactions-Union{Tuple{K}, Tuple{V}, Tuple{M}, Tuple{CoreModel, M, V, V, V, V, K, K}} where {M<:AbstractMatrix{Float64}, V<:AbstractVector{Float64}, K<:AbstractVector{String}}" href="#COBREXA.add_reactions-Union{Tuple{K}, Tuple{V}, Tuple{M}, Tuple{CoreModel, M, V, V, V, V, K, K}} where {M<:AbstractMatrix{Float64}, V<:AbstractVector{Float64}, K<:AbstractVector{String}}"><code>COBREXA.add_reactions</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">add_reactions( +) where {V1<:VecType,V2<:VecType,K<:StringVecType}</code></pre></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/d4509bae4f4df01fe7d9479069af6510c69ad99e/src/reconstruction/CoreModel.jl#L35-L48">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.add_reactions-Union{Tuple{K}, Tuple{V}, Tuple{M}, Tuple{CoreModel, M, V, V, V, V, K, K}} where {M<:AbstractMatrix{Float64}, V<:AbstractVector{Float64}, K<:AbstractVector{String}}" href="#COBREXA.add_reactions-Union{Tuple{K}, Tuple{V}, Tuple{M}, Tuple{CoreModel, M, V, V, V, V, K, K}} where {M<:AbstractMatrix{Float64}, V<:AbstractVector{Float64}, K<:AbstractVector{String}}"><code>COBREXA.add_reactions</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">add_reactions( m::CoreModel, Sp::M, b::V, @@ -70,7 +70,7 @@ genes :: OrderedDict{String, Gene}</code></pre><p><strong>Example</strong></p><p rxns::K, mets::K; check_consistency = false, -) where {M<:MatType,V<:VecType,K<:StringVecType}</code></pre></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/1011dcb5948951fc380713022f1ecf5b37961981/src/reconstruction/CoreModel.jl#L129-L142">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.add_reactions-Union{Tuple{V2}, Tuple{V1}, Tuple{CoreModel, V1, V2, AbstractFloat, AbstractFloat, AbstractFloat}} where {V1<:AbstractVector{Float64}, V2<:AbstractVector{Float64}}" href="#COBREXA.add_reactions-Union{Tuple{V2}, Tuple{V1}, Tuple{CoreModel, V1, V2, AbstractFloat, AbstractFloat, AbstractFloat}} where {V1<:AbstractVector{Float64}, V2<:AbstractVector{Float64}}"><code>COBREXA.add_reactions</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">add_reactions( +) where {M<:MatType,V<:VecType,K<:StringVecType}</code></pre></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/d4509bae4f4df01fe7d9479069af6510c69ad99e/src/reconstruction/CoreModel.jl#L129-L142">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.add_reactions-Union{Tuple{V2}, Tuple{V1}, Tuple{CoreModel, V1, V2, AbstractFloat, AbstractFloat, AbstractFloat}} where {V1<:AbstractVector{Float64}, V2<:AbstractVector{Float64}}" href="#COBREXA.add_reactions-Union{Tuple{V2}, Tuple{V1}, Tuple{CoreModel, V1, V2, AbstractFloat, AbstractFloat, AbstractFloat}} where {V1<:AbstractVector{Float64}, V2<:AbstractVector{Float64}}"><code>COBREXA.add_reactions</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">add_reactions( m::CoreModel, s::V1, b::V2, @@ -78,7 +78,7 @@ genes :: OrderedDict{String, Gene}</code></pre><p><strong>Example</strong></p><p xl::AbstractFloat, xu::AbstractFloat; check_consistency = false, -) where {V1<:VecType,V2<:VecType}</code></pre><p>Add reaction(s) to a <code>CoreModel</code> model <code>m</code>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/1011dcb5948951fc380713022f1ecf5b37961981/src/reconstruction/CoreModel.jl#L1-L14">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.add_reactions-Union{Tuple{V}, Tuple{M}, Tuple{CoreModel, M, V, V, V, V}} where {M<:AbstractMatrix{Float64}, V<:AbstractVector{Float64}}" href="#COBREXA.add_reactions-Union{Tuple{V}, Tuple{M}, Tuple{CoreModel, M, V, V, V, V}} where {M<:AbstractMatrix{Float64}, V<:AbstractVector{Float64}}"><code>COBREXA.add_reactions</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">add_reactions( +) where {V1<:VecType,V2<:VecType}</code></pre><p>Add reaction(s) to a <code>CoreModel</code> model <code>m</code>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/d4509bae4f4df01fe7d9479069af6510c69ad99e/src/reconstruction/CoreModel.jl#L1-L14">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.add_reactions-Union{Tuple{V}, Tuple{M}, Tuple{CoreModel, M, V, V, V, V}} where {M<:AbstractMatrix{Float64}, V<:AbstractVector{Float64}}" href="#COBREXA.add_reactions-Union{Tuple{V}, Tuple{M}, Tuple{CoreModel, M, V, V, V, V}} where {M<:AbstractMatrix{Float64}, V<:AbstractVector{Float64}}"><code>COBREXA.add_reactions</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">add_reactions( m::CoreModel, Sp::M, b::V, @@ -86,17 +86,22 @@ genes :: OrderedDict{String, Gene}</code></pre><p><strong>Example</strong></p><p xl::V, xu::V; check_consistency = false, -) where {M<:MatType,V<:VecType}</code></pre></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/1011dcb5948951fc380713022f1ecf5b37961981/src/reconstruction/CoreModel.jl#L73-L84">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.change_bounds!-Union{Tuple{V}, Tuple{CoreModel, Vector{Int64}}} where V<:AbstractVector{Float64}" href="#COBREXA.change_bounds!-Union{Tuple{V}, Tuple{CoreModel, Vector{Int64}}} where V<:AbstractVector{Float64}"><code>COBREXA.change_bounds!</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">change_bounds!( +) where {M<:MatType,V<:VecType}</code></pre></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/d4509bae4f4df01fe7d9479069af6510c69ad99e/src/reconstruction/CoreModel.jl#L73-L84">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.change_bounds!-Union{Tuple{V}, Tuple{CoreModel, Vector{Int64}}} where V<:AbstractVector{Float64}" href="#COBREXA.change_bounds!-Union{Tuple{V}, Tuple{CoreModel, Vector{Int64}}} where V<:AbstractVector{Float64}"><code>COBREXA.change_bounds!</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">change_bounds!( model::CoreModel, rxns::Vector{Int}; xl::V = Float64[], xu::V = Float64[], -) where {V<:VecType}</code></pre><p>Change the lower and/or upper bounds ('xl' and 'xu') for given reactions.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/1011dcb5948951fc380713022f1ecf5b37961981/src/reconstruction/CoreModel.jl#L328-L338">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.change_bounds!-Union{Tuple{V}, Tuple{CoreModel, Vector{String}}} where V<:AbstractVector{Float64}" href="#COBREXA.change_bounds!-Union{Tuple{V}, Tuple{CoreModel, Vector{String}}} where V<:AbstractVector{Float64}"><code>COBREXA.change_bounds!</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">change_bounds!( +) where {V<:VecType}</code></pre><p>Change the lower and/or upper bounds ('xl' and 'xu') for given reactions.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/d4509bae4f4df01fe7d9479069af6510c69ad99e/src/reconstruction/CoreModel.jl#L378-L388">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.change_bounds!-Union{Tuple{V}, Tuple{CoreModel, Vector{String}}} where V<:AbstractVector{Float64}" href="#COBREXA.change_bounds!-Union{Tuple{V}, Tuple{CoreModel, Vector{String}}} where V<:AbstractVector{Float64}"><code>COBREXA.change_bounds!</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">change_bounds!( model::CoreModel, rxns::Vector{String}; xl::V = Float64[], xu::V = Float64[], -) where {V<:VecType}</code></pre></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/1011dcb5948951fc380713022f1ecf5b37961981/src/reconstruction/CoreModel.jl#L361-L369">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.remove_reactions-Tuple{CoreModel, Integer}" href="#COBREXA.remove_reactions-Tuple{CoreModel, Integer}"><code>COBREXA.remove_reactions</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">remove_reactions(m::CoreModel, rxn::Integer)</code></pre></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/1011dcb5948951fc380713022f1ecf5b37961981/src/reconstruction/CoreModel.jl#L299-L302">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.remove_reactions-Tuple{CoreModel, String}" href="#COBREXA.remove_reactions-Tuple{CoreModel, String}"><code>COBREXA.remove_reactions</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">remove_reactions(m::CoreModel, rxn::String)</code></pre></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/1011dcb5948951fc380713022f1ecf5b37961981/src/reconstruction/CoreModel.jl#L307-L310">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.remove_reactions-Tuple{CoreModel, Vector{Int64}}" href="#COBREXA.remove_reactions-Tuple{CoreModel, Vector{Int64}}"><code>COBREXA.remove_reactions</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">remove_reactions(m::CoreModel, rxns::Vector{Int})</code></pre><p>Remove reaction(s) from a <code>CoreModel</code>.</p><p>Also removes any metabolites not involved in any reaction after the deletion.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/1011dcb5948951fc380713022f1ecf5b37961981/src/reconstruction/CoreModel.jl#L273-L280">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.remove_reactions-Tuple{CoreModel, Vector{String}}" href="#COBREXA.remove_reactions-Tuple{CoreModel, Vector{String}}"><code>COBREXA.remove_reactions</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">remove_reactions(m::CoreModel, rxns::Vector{String})</code></pre></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/1011dcb5948951fc380713022f1ecf5b37961981/src/reconstruction/CoreModel.jl#L315-L318">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.verify_consistency-Union{Tuple{K}, Tuple{V}, Tuple{M}, Tuple{CoreModel, M, V, V, V, V, K, K, Any, Any}} where {M<:AbstractMatrix{Float64}, V<:AbstractVector{Float64}, K<:AbstractVector{String}}" href="#COBREXA.verify_consistency-Union{Tuple{K}, Tuple{V}, Tuple{M}, Tuple{CoreModel, M, V, V, V, V, K, K, Any, Any}} where {M<:AbstractMatrix{Float64}, V<:AbstractVector{Float64}, K<:AbstractVector{String}}"><code>COBREXA.verify_consistency</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">verify_consistency( +) where {V<:VecType}</code></pre></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/d4509bae4f4df01fe7d9479069af6510c69ad99e/src/reconstruction/CoreModel.jl#L411-L419">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.remove_metabolites-Tuple{CoreModel, Any}" href="#COBREXA.remove_metabolites-Tuple{CoreModel, Any}"><code>COBREXA.remove_metabolites</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">remove_metabolites(model::CoreModel, metabolites)</code></pre><p>Removes a set of <code>metabolites</code> from the <code>model</code> of type <code>CoreModel</code> and returns a new <code>CoreModel</code> without those metabolites. Here, <code>metabolites</code> can be either a string, a vector of strings, an index or a vector of indices. Also removes any reactions that have no associated metabolites after the metabolites have been removed.</p><p><strong>Example</strong></p><pre><code class="language-none">model = load_model(CoreModel, "e_coli_core.json") + +m1 = remove_metabolites(model, ["glc__D_e", "for_c"]) +m2 = remove_metabolites(model, "glc__D_e") +m3 = remove_metabolites(model, indexin(["glc__D_e", "for_c"], metabolites(model))) +m4 = remove_metabolites(model, first(indexin(["glc__D_e"], metabolites(model))))</code></pre></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/d4509bae4f4df01fe7d9479069af6510c69ad99e/src/reconstruction/CoreModel.jl#L273-L291">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.remove_reactions-Tuple{CoreModel, Integer}" href="#COBREXA.remove_reactions-Tuple{CoreModel, Integer}"><code>COBREXA.remove_reactions</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">remove_reactions(m::CoreModel, rxn::Integer)</code></pre></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/d4509bae4f4df01fe7d9479069af6510c69ad99e/src/reconstruction/CoreModel.jl#L349-L352">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.remove_reactions-Tuple{CoreModel, String}" href="#COBREXA.remove_reactions-Tuple{CoreModel, String}"><code>COBREXA.remove_reactions</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">remove_reactions(m::CoreModel, rxn::String)</code></pre></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/d4509bae4f4df01fe7d9479069af6510c69ad99e/src/reconstruction/CoreModel.jl#L357-L360">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.remove_reactions-Tuple{CoreModel, Vector{Int64}}" href="#COBREXA.remove_reactions-Tuple{CoreModel, Vector{Int64}}"><code>COBREXA.remove_reactions</code></a> — <span class="docstring-category">Method</span></header><section><div><p>Removes a set of reactions from a CoreModel. Also removes the metabolites not involved in any reaction.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/d4509bae4f4df01fe7d9479069af6510c69ad99e/src/reconstruction/CoreModel.jl#L327-L330">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.remove_reactions-Tuple{CoreModel, Vector{String}}" href="#COBREXA.remove_reactions-Tuple{CoreModel, Vector{String}}"><code>COBREXA.remove_reactions</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">remove_reactions(m::CoreModel, rxns::Vector{String})</code></pre></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/d4509bae4f4df01fe7d9479069af6510c69ad99e/src/reconstruction/CoreModel.jl#L365-L368">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.verify_consistency-Union{Tuple{K}, Tuple{V}, Tuple{M}, Tuple{CoreModel, M, V, V, V, V, K, K, Any, Any}} where {M<:AbstractMatrix{Float64}, V<:AbstractVector{Float64}, K<:AbstractVector{String}}" href="#COBREXA.verify_consistency-Union{Tuple{K}, Tuple{V}, Tuple{M}, Tuple{CoreModel, M, V, V, V, V, K, K, Any, Any}} where {M<:AbstractMatrix{Float64}, V<:AbstractVector{Float64}, K<:AbstractVector{String}}"><code>COBREXA.verify_consistency</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">verify_consistency( m::CoreModel, Sp::M, b::V, @@ -107,17 +112,17 @@ genes :: OrderedDict{String, Gene}</code></pre><p><strong>Example</strong></p><p mets::K, new_reactions, new_metabolites, -) where {M<:MatType,V<:VecType,K<:StringVecType}</code></pre><p>Check the consistency of given reactions with existing reactions in <code>m</code>.</p><p>TODO: work in progress, doesn't return consistency status.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/1011dcb5948951fc380713022f1ecf5b37961981/src/reconstruction/CoreModel.jl#L214-L232">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.add_coupling_constraints!-Tuple{CoreModelCoupled, AbstractVector{Float64}, AbstractFloat, AbstractFloat}" href="#COBREXA.add_coupling_constraints!-Tuple{CoreModelCoupled, AbstractVector{Float64}, AbstractFloat, AbstractFloat}"><code>COBREXA.add_coupling_constraints!</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">add_coupling_constraints!( +) where {M<:MatType,V<:VecType,K<:StringVecType}</code></pre><p>Check the consistency of given reactions with existing reactions in <code>m</code>.</p><p>TODO: work in progress, doesn't return consistency status.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/d4509bae4f4df01fe7d9479069af6510c69ad99e/src/reconstruction/CoreModel.jl#L214-L232">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.add_coupling_constraints!-Tuple{CoreModelCoupled, AbstractVector{Float64}, AbstractFloat, AbstractFloat}" href="#COBREXA.add_coupling_constraints!-Tuple{CoreModelCoupled, AbstractVector{Float64}, AbstractFloat, AbstractFloat}"><code>COBREXA.add_coupling_constraints!</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">add_coupling_constraints!( m::CoreModelCoupled, c::VecType, cl::AbstractFloat, cu::AbstractFloat, -)</code></pre><p>Overload for adding a single coupling constraint.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/1011dcb5948951fc380713022f1ecf5b37961981/src/reconstruction/CoreModelCoupled.jl#L255-L264">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.add_coupling_constraints!-Union{Tuple{V}, Tuple{CoreModelCoupled, AbstractMatrix{Float64}, V, V}} where V<:AbstractVector{Float64}" href="#COBREXA.add_coupling_constraints!-Union{Tuple{V}, Tuple{CoreModelCoupled, AbstractMatrix{Float64}, V, V}} where V<:AbstractVector{Float64}"><code>COBREXA.add_coupling_constraints!</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">add_coupling_constraints!( +)</code></pre><p>Overload for adding a single coupling constraint.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/d4509bae4f4df01fe7d9479069af6510c69ad99e/src/reconstruction/CoreModelCoupled.jl#L255-L264">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.add_coupling_constraints!-Union{Tuple{V}, Tuple{CoreModelCoupled, AbstractMatrix{Float64}, V, V}} where V<:AbstractVector{Float64}" href="#COBREXA.add_coupling_constraints!-Union{Tuple{V}, Tuple{CoreModelCoupled, AbstractMatrix{Float64}, V, V}} where V<:AbstractVector{Float64}"><code>COBREXA.add_coupling_constraints!</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">add_coupling_constraints!( m::CoreModelCoupled, C::MatType, cl::V, cu::V, -) where {V<:VecType}</code></pre><p>In-place add a single coupling constraint in form</p><pre><code class="language-none"> câ‚— ≤ C x ≤ cᵤ</code></pre></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/1011dcb5948951fc380713022f1ecf5b37961981/src/reconstruction/CoreModelCoupled.jl#L280-L292">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.add_coupling_constraints-Tuple{CoreModel, Vararg{Any, N} where N}" href="#COBREXA.add_coupling_constraints-Tuple{CoreModel, Vararg{Any, N} where N}"><code>COBREXA.add_coupling_constraints</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">add_coupling_constraints(m::CoreModel, args...)</code></pre><p>Add coupling constraints to a plain <a href="#COBREXA.CoreModel"><code>CoreModel</code></a> (returns a <a href="#COBREXA.CoreModelCoupled"><code>CoreModelCoupled</code></a>).</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/1011dcb5948951fc380713022f1ecf5b37961981/src/reconstruction/CoreModelCoupled.jl#L246-L251">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.add_coupling_constraints-Tuple{CoreModelCoupled, Vararg{Any, N} where N}" href="#COBREXA.add_coupling_constraints-Tuple{CoreModelCoupled, Vararg{Any, N} where N}"><code>COBREXA.add_coupling_constraints</code></a> — <span class="docstring-category">Method</span></header><section><div><p>Add constraints of the following form to a CoreModelCoupled and return a modified one.</p><p>Add constraints to a <a href="#COBREXA.CoreModelCoupled"><code>CoreModelCoupled</code></a> and return a modified one.</p><p>The arguments are same as for in-place <a href="#COBREXA.add_coupling_constraints!-Tuple{CoreModelCoupled, AbstractVector{Float64}, AbstractFloat, AbstractFloat}"><code>add_coupling_constraints!</code></a>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/1011dcb5948951fc380713022f1ecf5b37961981/src/reconstruction/CoreModelCoupled.jl#L233-L239">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.add_reactions-Tuple{CoreModelCoupled, CoreModel}" href="#COBREXA.add_reactions-Tuple{CoreModelCoupled, CoreModel}"><code>COBREXA.add_reactions</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">add_reactions(m1::CoreModelCoupled, m2::CoreModel; check_consistency = false)</code></pre><p>Add all reactions from <code>m2</code> to <code>m1</code>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/1011dcb5948951fc380713022f1ecf5b37961981/src/reconstruction/CoreModelCoupled.jl#L123-L128">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.add_reactions-Union{Tuple{K}, Tuple{V2}, Tuple{V1}, Tuple{CoreModelCoupled, V1, V2, AbstractFloat, AbstractFloat, AbstractFloat, String, K}} where {V1<:AbstractVector{Float64}, V2<:AbstractVector{Float64}, K<:AbstractVector{String}}" href="#COBREXA.add_reactions-Union{Tuple{K}, Tuple{V2}, Tuple{V1}, Tuple{CoreModelCoupled, V1, V2, AbstractFloat, AbstractFloat, AbstractFloat, String, K}} where {V1<:AbstractVector{Float64}, V2<:AbstractVector{Float64}, K<:AbstractVector{String}}"><code>COBREXA.add_reactions</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">add_reactions( +) where {V<:VecType}</code></pre><p>In-place add a single coupling constraint in form</p><pre><code class="language-none"> câ‚— ≤ C x ≤ cᵤ</code></pre></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/d4509bae4f4df01fe7d9479069af6510c69ad99e/src/reconstruction/CoreModelCoupled.jl#L280-L292">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.add_coupling_constraints-Tuple{CoreModel, Vararg{Any, N} where N}" href="#COBREXA.add_coupling_constraints-Tuple{CoreModel, Vararg{Any, N} where N}"><code>COBREXA.add_coupling_constraints</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">add_coupling_constraints(m::CoreModel, args...)</code></pre><p>Add coupling constraints to a plain <a href="#COBREXA.CoreModel"><code>CoreModel</code></a> (returns a <a href="#COBREXA.CoreModelCoupled"><code>CoreModelCoupled</code></a>).</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/d4509bae4f4df01fe7d9479069af6510c69ad99e/src/reconstruction/CoreModelCoupled.jl#L246-L251">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.add_coupling_constraints-Tuple{CoreModelCoupled, Vararg{Any, N} where N}" href="#COBREXA.add_coupling_constraints-Tuple{CoreModelCoupled, Vararg{Any, N} where N}"><code>COBREXA.add_coupling_constraints</code></a> — <span class="docstring-category">Method</span></header><section><div><p>Add constraints of the following form to a CoreModelCoupled and return a modified one.</p><p>Add constraints to a <a href="#COBREXA.CoreModelCoupled"><code>CoreModelCoupled</code></a> and return a modified one.</p><p>The arguments are same as for in-place <a href="#COBREXA.add_coupling_constraints!-Tuple{CoreModelCoupled, AbstractVector{Float64}, AbstractFloat, AbstractFloat}"><code>add_coupling_constraints!</code></a>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/d4509bae4f4df01fe7d9479069af6510c69ad99e/src/reconstruction/CoreModelCoupled.jl#L233-L239">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.add_reactions-Tuple{CoreModelCoupled, CoreModel}" href="#COBREXA.add_reactions-Tuple{CoreModelCoupled, CoreModel}"><code>COBREXA.add_reactions</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">add_reactions(m1::CoreModelCoupled, m2::CoreModel; check_consistency = false)</code></pre><p>Add all reactions from <code>m2</code> to <code>m1</code>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/d4509bae4f4df01fe7d9479069af6510c69ad99e/src/reconstruction/CoreModelCoupled.jl#L123-L128">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.add_reactions-Union{Tuple{K}, Tuple{V2}, Tuple{V1}, Tuple{CoreModelCoupled, V1, V2, AbstractFloat, AbstractFloat, AbstractFloat, String, K}} where {V1<:AbstractVector{Float64}, V2<:AbstractVector{Float64}, K<:AbstractVector{String}}" href="#COBREXA.add_reactions-Union{Tuple{K}, Tuple{V2}, Tuple{V1}, Tuple{CoreModelCoupled, V1, V2, AbstractFloat, AbstractFloat, AbstractFloat, String, K}} where {V1<:AbstractVector{Float64}, V2<:AbstractVector{Float64}, K<:AbstractVector{String}}"><code>COBREXA.add_reactions</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">add_reactions( m::CoreModelCoupled, s::V1, b::V2, @@ -127,7 +132,7 @@ genes :: OrderedDict{String, Gene}</code></pre><p><strong>Example</strong></p><p rxn::String, mets::K; check_consistency = false, -) where {V1<:VecType,V2<:VecType,K<:StringVecType}</code></pre></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/1011dcb5948951fc380713022f1ecf5b37961981/src/reconstruction/CoreModelCoupled.jl#L41-L54">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.add_reactions-Union{Tuple{K}, Tuple{V}, Tuple{M}, Tuple{CoreModelCoupled, M, V, V, V, V, K, K}} where {M<:AbstractMatrix{Float64}, V<:AbstractVector{Float64}, K<:AbstractVector{String}}" href="#COBREXA.add_reactions-Union{Tuple{K}, Tuple{V}, Tuple{M}, Tuple{CoreModelCoupled, M, V, V, V, V, K, K}} where {M<:AbstractMatrix{Float64}, V<:AbstractVector{Float64}, K<:AbstractVector{String}}"><code>COBREXA.add_reactions</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">add_reactions( +) where {V1<:VecType,V2<:VecType,K<:StringVecType}</code></pre></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/d4509bae4f4df01fe7d9479069af6510c69ad99e/src/reconstruction/CoreModelCoupled.jl#L41-L54">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.add_reactions-Union{Tuple{K}, Tuple{V}, Tuple{M}, Tuple{CoreModelCoupled, M, V, V, V, V, K, K}} where {M<:AbstractMatrix{Float64}, V<:AbstractVector{Float64}, K<:AbstractVector{String}}" href="#COBREXA.add_reactions-Union{Tuple{K}, Tuple{V}, Tuple{M}, Tuple{CoreModelCoupled, M, V, V, V, V, K, K}} where {M<:AbstractMatrix{Float64}, V<:AbstractVector{Float64}, K<:AbstractVector{String}}"><code>COBREXA.add_reactions</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">add_reactions( m::CoreModelCoupled, Sp::M, b::V, @@ -137,7 +142,7 @@ genes :: OrderedDict{String, Gene}</code></pre><p><strong>Example</strong></p><p rxns::K, mets::K; check_consistency = false, -) where {M<:MatType,V<:VecType,K<:StringVecType}</code></pre></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/1011dcb5948951fc380713022f1ecf5b37961981/src/reconstruction/CoreModelCoupled.jl#L143-L156">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.add_reactions-Union{Tuple{V2}, Tuple{V1}, Tuple{CoreModelCoupled, V1, V2, AbstractFloat, AbstractFloat, AbstractFloat}} where {V1<:AbstractVector{Float64}, V2<:AbstractVector{Float64}}" href="#COBREXA.add_reactions-Union{Tuple{V2}, Tuple{V1}, Tuple{CoreModelCoupled, V1, V2, AbstractFloat, AbstractFloat, AbstractFloat}} where {V1<:AbstractVector{Float64}, V2<:AbstractVector{Float64}}"><code>COBREXA.add_reactions</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">add_reactions( +) where {M<:MatType,V<:VecType,K<:StringVecType}</code></pre></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/d4509bae4f4df01fe7d9479069af6510c69ad99e/src/reconstruction/CoreModelCoupled.jl#L143-L156">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.add_reactions-Union{Tuple{V2}, Tuple{V1}, Tuple{CoreModelCoupled, V1, V2, AbstractFloat, AbstractFloat, AbstractFloat}} where {V1<:AbstractVector{Float64}, V2<:AbstractVector{Float64}}" href="#COBREXA.add_reactions-Union{Tuple{V2}, Tuple{V1}, Tuple{CoreModelCoupled, V1, V2, AbstractFloat, AbstractFloat, AbstractFloat}} where {V1<:AbstractVector{Float64}, V2<:AbstractVector{Float64}}"><code>COBREXA.add_reactions</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">add_reactions( m::CoreModelCoupled, s::V1, b::V2, @@ -145,7 +150,7 @@ genes :: OrderedDict{String, Gene}</code></pre><p><strong>Example</strong></p><p xl::AbstractFloat, xu::AbstractFloat; check_consistency = false, -) where {V1<:VecType,V2<:VecType}</code></pre><p>Add reaction(s) to a <code>CoreModelCoupled</code> model <code>m</code>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/1011dcb5948951fc380713022f1ecf5b37961981/src/reconstruction/CoreModelCoupled.jl#L1-L14">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.add_reactions-Union{Tuple{V}, Tuple{M}, Tuple{CoreModelCoupled, M, V, V, V, V}} where {M<:AbstractMatrix{Float64}, V<:AbstractVector{Float64}}" href="#COBREXA.add_reactions-Union{Tuple{V}, Tuple{M}, Tuple{CoreModelCoupled, M, V, V, V, V}} where {M<:AbstractMatrix{Float64}, V<:AbstractVector{Float64}}"><code>COBREXA.add_reactions</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">add_reactions( +) where {V1<:VecType,V2<:VecType}</code></pre><p>Add reaction(s) to a <code>CoreModelCoupled</code> model <code>m</code>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/d4509bae4f4df01fe7d9479069af6510c69ad99e/src/reconstruction/CoreModelCoupled.jl#L1-L14">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.add_reactions-Union{Tuple{V}, Tuple{M}, Tuple{CoreModelCoupled, M, V, V, V, V}} where {M<:AbstractMatrix{Float64}, V<:AbstractVector{Float64}}" href="#COBREXA.add_reactions-Union{Tuple{V}, Tuple{M}, Tuple{CoreModelCoupled, M, V, V, V, V}} where {M<:AbstractMatrix{Float64}, V<:AbstractVector{Float64}}"><code>COBREXA.add_reactions</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">add_reactions( m::CoreModelCoupled, Sp::M, b::V, @@ -153,32 +158,32 @@ genes :: OrderedDict{String, Gene}</code></pre><p><strong>Example</strong></p><p xl::V, xu::V; check_consistency = false, -) where {M<:MatType,V<:VecType}</code></pre></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/1011dcb5948951fc380713022f1ecf5b37961981/src/reconstruction/CoreModelCoupled.jl#L85-L96">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.change_bounds!-Union{Tuple{V}, Tuple{CoreModelCoupled, Vector{Int64}}} where V<:AbstractVector{Float64}" href="#COBREXA.change_bounds!-Union{Tuple{V}, Tuple{CoreModelCoupled, Vector{Int64}}} where V<:AbstractVector{Float64}"><code>COBREXA.change_bounds!</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">change_bounds!( +) where {M<:MatType,V<:VecType}</code></pre></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/d4509bae4f4df01fe7d9479069af6510c69ad99e/src/reconstruction/CoreModelCoupled.jl#L85-L96">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.change_bounds!-Union{Tuple{V}, Tuple{CoreModelCoupled, Vector{Int64}}} where V<:AbstractVector{Float64}" href="#COBREXA.change_bounds!-Union{Tuple{V}, Tuple{CoreModelCoupled, Vector{Int64}}} where V<:AbstractVector{Float64}"><code>COBREXA.change_bounds!</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">change_bounds!( model::CoreModelCoupled, rxns::Vector{Int}; xl::V = Float64[], xu::V = Float64[], -)</code></pre><p>Change the lower and/or upper bounds ('xl' and 'xu') for given reactions.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/1011dcb5948951fc380713022f1ecf5b37961981/src/reconstruction/CoreModelCoupled.jl#L439-L449">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.change_bounds!-Union{Tuple{V}, Tuple{CoreModelCoupled, Vector{String}}} where V<:AbstractVector{Float64}" href="#COBREXA.change_bounds!-Union{Tuple{V}, Tuple{CoreModelCoupled, Vector{String}}} where V<:AbstractVector{Float64}"><code>COBREXA.change_bounds!</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">change_bounds!( +)</code></pre><p>Change the lower and/or upper bounds ('xl' and 'xu') for given reactions.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/d4509bae4f4df01fe7d9479069af6510c69ad99e/src/reconstruction/CoreModelCoupled.jl#L439-L449">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.change_bounds!-Union{Tuple{V}, Tuple{CoreModelCoupled, Vector{String}}} where V<:AbstractVector{Float64}" href="#COBREXA.change_bounds!-Union{Tuple{V}, Tuple{CoreModelCoupled, Vector{String}}} where V<:AbstractVector{Float64}"><code>COBREXA.change_bounds!</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">change_bounds!( model::CoreModelCoupled, rxns::Vector{String}; xl::V = Float64[], xu::V = Float64[], -) where {V<:VecType}</code></pre></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/1011dcb5948951fc380713022f1ecf5b37961981/src/reconstruction/CoreModelCoupled.jl#L464-L472">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.change_coupling_bounds!-Union{Tuple{V}, Tuple{CoreModelCoupled, Vector{Int64}}} where V<:AbstractVector{Float64}" href="#COBREXA.change_coupling_bounds!-Union{Tuple{V}, Tuple{CoreModelCoupled, Vector{Int64}}} where V<:AbstractVector{Float64}"><code>COBREXA.change_coupling_bounds!</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">change_coupling_bounds!( +) where {V<:VecType}</code></pre></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/d4509bae4f4df01fe7d9479069af6510c69ad99e/src/reconstruction/CoreModelCoupled.jl#L464-L472">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.change_coupling_bounds!-Union{Tuple{V}, Tuple{CoreModelCoupled, Vector{Int64}}} where V<:AbstractVector{Float64}" href="#COBREXA.change_coupling_bounds!-Union{Tuple{V}, Tuple{CoreModelCoupled, Vector{Int64}}} where V<:AbstractVector{Float64}"><code>COBREXA.change_coupling_bounds!</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">change_coupling_bounds!( model::CoreModelCoupled, constraints::Vector{Int}; cl::V = Float64[], cu::V = Float64[], -) where {V<:VecType}</code></pre><p>Change the lower and/or upper bounds (<code>cl</code> and <code>cu</code>) for the given list of coupling constraints.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/1011dcb5948951fc380713022f1ecf5b37961981/src/reconstruction/CoreModelCoupled.jl#L349-L359">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.find_exchange_metabolites-Tuple{CoreModelCoupled}" href="#COBREXA.find_exchange_metabolites-Tuple{CoreModelCoupled}"><code>COBREXA.find_exchange_metabolites</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">find_exchange_metabolites( +) where {V<:VecType}</code></pre><p>Change the lower and/or upper bounds (<code>cl</code> and <code>cu</code>) for the given list of coupling constraints.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/d4509bae4f4df01fe7d9479069af6510c69ad99e/src/reconstruction/CoreModelCoupled.jl#L349-L359">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.find_exchange_metabolites-Tuple{CoreModelCoupled}" href="#COBREXA.find_exchange_metabolites-Tuple{CoreModelCoupled}"><code>COBREXA.find_exchange_metabolites</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">find_exchange_metabolites( model::CoreModelCoupled; exclude_biomass = false, biomass_str::String = "biomass", exc_prefs = ["EX_"; "Exch_"; "Ex_"], -)</code></pre><p>Get indices of exchanged metabolites.</p><p>In practice returns the metabolites consumed by the reactions given by <code>find_exchange_reactions</code> and if called with the same arguments, the two outputs correspond.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/1011dcb5948951fc380713022f1ecf5b37961981/src/reconstruction/CoreModelCoupled.jl#L411-L424">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.find_exchange_reactions-Tuple{CoreModelCoupled}" href="#COBREXA.find_exchange_reactions-Tuple{CoreModelCoupled}"><code>COBREXA.find_exchange_reactions</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">find_exchange_reactions( +)</code></pre><p>Get indices of exchanged metabolites.</p><p>In practice returns the metabolites consumed by the reactions given by <code>find_exchange_reactions</code> and if called with the same arguments, the two outputs correspond.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/d4509bae4f4df01fe7d9479069af6510c69ad99e/src/reconstruction/CoreModelCoupled.jl#L411-L424">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.find_exchange_reactions-Tuple{CoreModelCoupled}" href="#COBREXA.find_exchange_reactions-Tuple{CoreModelCoupled}"><code>COBREXA.find_exchange_reactions</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">find_exchange_reactions( model::CoreModelCoupled; exclude_biomass = false, biomass_str::String = "biomass", exc_prefs = ["EX_"; "Exch_"; "Ex_"], -)</code></pre><p>Get indices of exchange reactions.</p><p>Exchange reactions are identified based on most commonly used prefixes.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/1011dcb5948951fc380713022f1ecf5b37961981/src/reconstruction/CoreModelCoupled.jl#L384-L396">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.remove_coupling_constraints!-Tuple{CoreModelCoupled, Int64}" href="#COBREXA.remove_coupling_constraints!-Tuple{CoreModelCoupled, Int64}"><code>COBREXA.remove_coupling_constraints!</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">remove_coupling_constraints!(m::CoreModelCoupled, constraint::Int)</code></pre><p>Removes a single coupling constraints from a <a href="#COBREXA.CoreModelCoupled"><code>CoreModelCoupled</code></a> in-place.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/1011dcb5948951fc380713022f1ecf5b37961981/src/reconstruction/CoreModelCoupled.jl#L325-L330">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.remove_coupling_constraints!-Tuple{CoreModelCoupled, Vector{Int64}}" href="#COBREXA.remove_coupling_constraints!-Tuple{CoreModelCoupled, Vector{Int64}}"><code>COBREXA.remove_coupling_constraints!</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">remove_coupling_constraints!(m::CoreModelCoupled, constraints::Vector{Int})</code></pre><p>Removes a set of coupling constraints from a <a href="#COBREXA.CoreModelCoupled"><code>CoreModelCoupled</code></a> in-place.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/1011dcb5948951fc380713022f1ecf5b37961981/src/reconstruction/CoreModelCoupled.jl#L335-L340">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.remove_coupling_constraints-Tuple{CoreModelCoupled, Vararg{Any, N} where N}" href="#COBREXA.remove_coupling_constraints-Tuple{CoreModelCoupled, Vararg{Any, N} where N}"><code>COBREXA.remove_coupling_constraints</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">remove_coupling_constraints(m::CoreModelCoupled, args...)</code></pre><p>Remove coupling constraints from the linear model, and return the modified model. Arguments are the same as for in-place version <a href="#COBREXA.remove_coupling_constraints!-Tuple{CoreModelCoupled, Int64}"><code>remove_coupling_constraints!</code></a>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/1011dcb5948951fc380713022f1ecf5b37961981/src/reconstruction/CoreModelCoupled.jl#L311-L317">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.remove_reactions-Tuple{CoreModelCoupled, Integer}" href="#COBREXA.remove_reactions-Tuple{CoreModelCoupled, Integer}"><code>COBREXA.remove_reactions</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">remove_reactions(m::CoreModelCoupled, rxn::Integer)</code></pre></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/1011dcb5948951fc380713022f1ecf5b37961981/src/reconstruction/CoreModelCoupled.jl#L204-L207">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.remove_reactions-Tuple{CoreModelCoupled, String}" href="#COBREXA.remove_reactions-Tuple{CoreModelCoupled, String}"><code>COBREXA.remove_reactions</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">remove_reactions(m::CoreModelCoupled, rxn::String)</code></pre></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/1011dcb5948951fc380713022f1ecf5b37961981/src/reconstruction/CoreModelCoupled.jl#L212-L215">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.remove_reactions-Tuple{CoreModelCoupled, Vector{Int64}}" href="#COBREXA.remove_reactions-Tuple{CoreModelCoupled, Vector{Int64}}"><code>COBREXA.remove_reactions</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">remove_reactions(m::CoreModelCoupled, rxns::Vector{Int})</code></pre><p>Remove reaction(s) from a <code>CoreModelCoupled</code>.</p><p>Also removes any metabolites not involved in any reaction after the deletion.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/1011dcb5948951fc380713022f1ecf5b37961981/src/reconstruction/CoreModelCoupled.jl#L187-L194">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.remove_reactions-Tuple{CoreModelCoupled, Vector{String}}" href="#COBREXA.remove_reactions-Tuple{CoreModelCoupled, Vector{String}}"><code>COBREXA.remove_reactions</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">remove_reactions(m::CoreModelCoupled, rxns::Vector{String})</code></pre></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/1011dcb5948951fc380713022f1ecf5b37961981/src/reconstruction/CoreModelCoupled.jl#L220-L223">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.:⟵-Tuple{Union{Nothing, Metabolite, MetaboliteWithCoefficient, Vector{MetaboliteWithCoefficient}}, Union{Nothing, Metabolite, MetaboliteWithCoefficient, Vector{MetaboliteWithCoefficient}}}" href="#COBREXA.:⟵-Tuple{Union{Nothing, Metabolite, MetaboliteWithCoefficient, Vector{MetaboliteWithCoefficient}}, Union{Nothing, Metabolite, MetaboliteWithCoefficient, Vector{MetaboliteWithCoefficient}}}"><code>COBREXA.:⟵</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">⟵( +)</code></pre><p>Get indices of exchange reactions.</p><p>Exchange reactions are identified based on most commonly used prefixes.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/d4509bae4f4df01fe7d9479069af6510c69ad99e/src/reconstruction/CoreModelCoupled.jl#L384-L396">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.remove_coupling_constraints!-Tuple{CoreModelCoupled, Int64}" href="#COBREXA.remove_coupling_constraints!-Tuple{CoreModelCoupled, Int64}"><code>COBREXA.remove_coupling_constraints!</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">remove_coupling_constraints!(m::CoreModelCoupled, constraint::Int)</code></pre><p>Removes a single coupling constraints from a <a href="#COBREXA.CoreModelCoupled"><code>CoreModelCoupled</code></a> in-place.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/d4509bae4f4df01fe7d9479069af6510c69ad99e/src/reconstruction/CoreModelCoupled.jl#L325-L330">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.remove_coupling_constraints!-Tuple{CoreModelCoupled, Vector{Int64}}" href="#COBREXA.remove_coupling_constraints!-Tuple{CoreModelCoupled, Vector{Int64}}"><code>COBREXA.remove_coupling_constraints!</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">remove_coupling_constraints!(m::CoreModelCoupled, constraints::Vector{Int})</code></pre><p>Removes a set of coupling constraints from a <a href="#COBREXA.CoreModelCoupled"><code>CoreModelCoupled</code></a> in-place.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/d4509bae4f4df01fe7d9479069af6510c69ad99e/src/reconstruction/CoreModelCoupled.jl#L335-L340">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.remove_coupling_constraints-Tuple{CoreModelCoupled, Vararg{Any, N} where N}" href="#COBREXA.remove_coupling_constraints-Tuple{CoreModelCoupled, Vararg{Any, N} where N}"><code>COBREXA.remove_coupling_constraints</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">remove_coupling_constraints(m::CoreModelCoupled, args...)</code></pre><p>Remove coupling constraints from the linear model, and return the modified model. Arguments are the same as for in-place version <a href="#COBREXA.remove_coupling_constraints!-Tuple{CoreModelCoupled, Int64}"><code>remove_coupling_constraints!</code></a>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/d4509bae4f4df01fe7d9479069af6510c69ad99e/src/reconstruction/CoreModelCoupled.jl#L311-L317">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.remove_reactions-Tuple{CoreModelCoupled, Integer}" href="#COBREXA.remove_reactions-Tuple{CoreModelCoupled, Integer}"><code>COBREXA.remove_reactions</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">remove_reactions(m::CoreModelCoupled, rxn::Integer)</code></pre></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/d4509bae4f4df01fe7d9479069af6510c69ad99e/src/reconstruction/CoreModelCoupled.jl#L204-L207">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.remove_reactions-Tuple{CoreModelCoupled, String}" href="#COBREXA.remove_reactions-Tuple{CoreModelCoupled, String}"><code>COBREXA.remove_reactions</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">remove_reactions(m::CoreModelCoupled, rxn::String)</code></pre></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/d4509bae4f4df01fe7d9479069af6510c69ad99e/src/reconstruction/CoreModelCoupled.jl#L212-L215">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.remove_reactions-Tuple{CoreModelCoupled, Vector{Int64}}" href="#COBREXA.remove_reactions-Tuple{CoreModelCoupled, Vector{Int64}}"><code>COBREXA.remove_reactions</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">remove_reactions(m::CoreModelCoupled, rxns::Vector{Int})</code></pre><p>Remove reaction(s) from a <code>CoreModelCoupled</code>.</p><p>Also removes any metabolites not involved in any reaction after the deletion.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/d4509bae4f4df01fe7d9479069af6510c69ad99e/src/reconstruction/CoreModelCoupled.jl#L187-L194">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.remove_reactions-Tuple{CoreModelCoupled, Vector{String}}" href="#COBREXA.remove_reactions-Tuple{CoreModelCoupled, Vector{String}}"><code>COBREXA.remove_reactions</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">remove_reactions(m::CoreModelCoupled, rxns::Vector{String})</code></pre></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/d4509bae4f4df01fe7d9479069af6510c69ad99e/src/reconstruction/CoreModelCoupled.jl#L220-L223">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.:⟵-Tuple{Union{Nothing, Metabolite, MetaboliteWithCoefficient, Vector{MetaboliteWithCoefficient}}, Union{Nothing, Metabolite, MetaboliteWithCoefficient, Vector{MetaboliteWithCoefficient}}}" href="#COBREXA.:⟵-Tuple{Union{Nothing, Metabolite, MetaboliteWithCoefficient, Vector{MetaboliteWithCoefficient}}, Union{Nothing, Metabolite, MetaboliteWithCoefficient, Vector{MetaboliteWithCoefficient}}}"><code>COBREXA.:⟵</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">⟵( substrates::Union{ Nothing, Metabolite, @@ -191,7 +196,7 @@ genes :: OrderedDict{String, Gene}</code></pre><p><strong>Example</strong></p><p MetaboliteWithCoefficient, Vector{MetaboliteWithCoefficient} }, -)</code></pre><p>Make a reverse-only <a href="#COBREXA.Reaction"><code>Reaction</code></a> from <code>substrates</code> and <code>products</code>. An equivalent alternative is <code>â†</code>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/1011dcb5948951fc380713022f1ecf5b37961981/src/reconstruction/Reaction.jl#L102-L120">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.:⟶-Tuple{Union{Nothing, Metabolite, MetaboliteWithCoefficient, Vector{MetaboliteWithCoefficient}}, Union{Nothing, Metabolite, MetaboliteWithCoefficient, Vector{MetaboliteWithCoefficient}}}" href="#COBREXA.:⟶-Tuple{Union{Nothing, Metabolite, MetaboliteWithCoefficient, Vector{MetaboliteWithCoefficient}}, Union{Nothing, Metabolite, MetaboliteWithCoefficient, Vector{MetaboliteWithCoefficient}}}"><code>COBREXA.:⟶</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">⟶( +)</code></pre><p>Make a reverse-only <a href="#COBREXA.Reaction"><code>Reaction</code></a> from <code>substrates</code> and <code>products</code>. An equivalent alternative is <code>â†</code>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/d4509bae4f4df01fe7d9479069af6510c69ad99e/src/reconstruction/Reaction.jl#L102-L120">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.:⟶-Tuple{Union{Nothing, Metabolite, MetaboliteWithCoefficient, Vector{MetaboliteWithCoefficient}}, Union{Nothing, Metabolite, MetaboliteWithCoefficient, Vector{MetaboliteWithCoefficient}}}" href="#COBREXA.:⟶-Tuple{Union{Nothing, Metabolite, MetaboliteWithCoefficient, Vector{MetaboliteWithCoefficient}}, Union{Nothing, Metabolite, MetaboliteWithCoefficient, Vector{MetaboliteWithCoefficient}}}"><code>COBREXA.:⟶</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">⟶( substrates::Union{ Nothing, Metabolite, @@ -204,7 +209,7 @@ genes :: OrderedDict{String, Gene}</code></pre><p><strong>Example</strong></p><p MetaboliteWithCoefficient, Vector{MetaboliteWithCoefficient} }, -)</code></pre><p>Make a forward-only <a href="#COBREXA.Reaction"><code>Reaction</code></a> from <code>substrates</code> and <code>products</code>. An equivalent alternative is <code>→</code>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/1011dcb5948951fc380713022f1ecf5b37961981/src/reconstruction/Reaction.jl#L64-L82">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.:⟷-Tuple{Union{Nothing, Metabolite, MetaboliteWithCoefficient, Vector{MetaboliteWithCoefficient}}, Union{Nothing, Metabolite, MetaboliteWithCoefficient, Vector{MetaboliteWithCoefficient}}}" href="#COBREXA.:⟷-Tuple{Union{Nothing, Metabolite, MetaboliteWithCoefficient, Vector{MetaboliteWithCoefficient}}, Union{Nothing, Metabolite, MetaboliteWithCoefficient, Vector{MetaboliteWithCoefficient}}}"><code>COBREXA.:⟷</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">⟷( +)</code></pre><p>Make a forward-only <a href="#COBREXA.Reaction"><code>Reaction</code></a> from <code>substrates</code> and <code>products</code>. An equivalent alternative is <code>→</code>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/d4509bae4f4df01fe7d9479069af6510c69ad99e/src/reconstruction/Reaction.jl#L64-L82">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.:⟷-Tuple{Union{Nothing, Metabolite, MetaboliteWithCoefficient, Vector{MetaboliteWithCoefficient}}, Union{Nothing, Metabolite, MetaboliteWithCoefficient, Vector{MetaboliteWithCoefficient}}}" href="#COBREXA.:⟷-Tuple{Union{Nothing, Metabolite, MetaboliteWithCoefficient, Vector{MetaboliteWithCoefficient}}, Union{Nothing, Metabolite, MetaboliteWithCoefficient, Vector{MetaboliteWithCoefficient}}}"><code>COBREXA.:⟷</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">⟷( substrates::Union{ Nothing, Metabolite, @@ -217,15 +222,15 @@ genes :: OrderedDict{String, Gene}</code></pre><p><strong>Example</strong></p><p MetaboliteWithCoefficient, Vector{MetaboliteWithCoefficient} }, -)</code></pre><p>Make a bidirectional (reversible) <a href="#COBREXA.Reaction"><code>Reaction</code></a> from <code>substrates</code> and <code>products</code>. An equivalent alternative is <code>↔</code>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/1011dcb5948951fc380713022f1ecf5b37961981/src/reconstruction/Reaction.jl#L140-L158">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.add_gene!-Tuple{StandardModel, Gene}" href="#COBREXA.add_gene!-Tuple{StandardModel, Gene}"><code>COBREXA.add_gene!</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">add_gene!(model::StandardModel, genes::Gene)</code></pre><p>Add <code>gene</code> to <code>model</code> based on gene <code>id</code>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/1011dcb5948951fc380713022f1ecf5b37961981/src/reconstruction/StandardModel.jl#L48-L52">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.add_genes!-Tuple{StandardModel, Vector{Gene}}" href="#COBREXA.add_genes!-Tuple{StandardModel, Vector{Gene}}"><code>COBREXA.add_genes!</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">add_genes!(model::StandardModel, genes::Vector{Gene})</code></pre><p>Add <code>genes</code> to <code>model</code> based on gene <code>id</code>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/1011dcb5948951fc380713022f1ecf5b37961981/src/reconstruction/StandardModel.jl#L37-L41">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.add_metabolite!-Tuple{StandardModel, Metabolite}" href="#COBREXA.add_metabolite!-Tuple{StandardModel, Metabolite}"><code>COBREXA.add_metabolite!</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">add_metabolite!(model::StandardModel, met::Metabolite)</code></pre><p>Add <code>met</code> to <code>model</code> based on metabolite <code>id</code>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/1011dcb5948951fc380713022f1ecf5b37961981/src/reconstruction/StandardModel.jl#L30-L34">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.add_metabolites!-Tuple{StandardModel, Vector{Metabolite}}" href="#COBREXA.add_metabolites!-Tuple{StandardModel, Vector{Metabolite}}"><code>COBREXA.add_metabolites!</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">add_metabolites!(model::StandardModel, mets::Vector{Metabolite})</code></pre><p>Add <code>mets</code> to <code>model</code> based on metabolite <code>id</code>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/1011dcb5948951fc380713022f1ecf5b37961981/src/reconstruction/StandardModel.jl#L19-L23">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.add_reaction!-Tuple{StandardModel, Reaction}" href="#COBREXA.add_reaction!-Tuple{StandardModel, Reaction}"><code>COBREXA.add_reaction!</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">add_reaction!(model::StandardModel, rxn::Reaction)</code></pre><p>Add <code>rxn</code> to <code>model</code> based on reaction <code>id</code>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/1011dcb5948951fc380713022f1ecf5b37961981/src/reconstruction/StandardModel.jl#L12-L16">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.add_reactions!-Tuple{StandardModel, Vector{Reaction}}" href="#COBREXA.add_reactions!-Tuple{StandardModel, Vector{Reaction}}"><code>COBREXA.add_reactions!</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">add_reactions!(model::StandardModel, rxns::Vector{Reaction})</code></pre><p>Add <code>rxns</code> to <code>model</code> based on reaction <code>id</code>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/1011dcb5948951fc380713022f1ecf5b37961981/src/reconstruction/StandardModel.jl#L1-L5">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.remove_gene!-Tuple{StandardModel, String}" href="#COBREXA.remove_gene!-Tuple{StandardModel, String}"><code>COBREXA.remove_gene!</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">remove_gene!( +)</code></pre><p>Make a bidirectional (reversible) <a href="#COBREXA.Reaction"><code>Reaction</code></a> from <code>substrates</code> and <code>products</code>. An equivalent alternative is <code>↔</code>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/d4509bae4f4df01fe7d9479069af6510c69ad99e/src/reconstruction/Reaction.jl#L140-L158">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.add_gene!-Tuple{StandardModel, Gene}" href="#COBREXA.add_gene!-Tuple{StandardModel, Gene}"><code>COBREXA.add_gene!</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">add_gene!(model::StandardModel, genes::Gene)</code></pre><p>Add <code>gene</code> to <code>model</code> based on gene <code>id</code>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/d4509bae4f4df01fe7d9479069af6510c69ad99e/src/reconstruction/StandardModel.jl#L48-L52">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.add_genes!-Tuple{StandardModel, Vector{Gene}}" href="#COBREXA.add_genes!-Tuple{StandardModel, Vector{Gene}}"><code>COBREXA.add_genes!</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">add_genes!(model::StandardModel, genes::Vector{Gene})</code></pre><p>Add <code>genes</code> to <code>model</code> based on gene <code>id</code>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/d4509bae4f4df01fe7d9479069af6510c69ad99e/src/reconstruction/StandardModel.jl#L37-L41">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.add_metabolite!-Tuple{StandardModel, Metabolite}" href="#COBREXA.add_metabolite!-Tuple{StandardModel, Metabolite}"><code>COBREXA.add_metabolite!</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">add_metabolite!(model::StandardModel, met::Metabolite)</code></pre><p>Add <code>met</code> to <code>model</code> based on metabolite <code>id</code>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/d4509bae4f4df01fe7d9479069af6510c69ad99e/src/reconstruction/StandardModel.jl#L30-L34">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.add_metabolites!-Tuple{StandardModel, Vector{Metabolite}}" href="#COBREXA.add_metabolites!-Tuple{StandardModel, Vector{Metabolite}}"><code>COBREXA.add_metabolites!</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">add_metabolites!(model::StandardModel, mets::Vector{Metabolite})</code></pre><p>Add <code>mets</code> to <code>model</code> based on metabolite <code>id</code>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/d4509bae4f4df01fe7d9479069af6510c69ad99e/src/reconstruction/StandardModel.jl#L19-L23">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.add_reaction!-Tuple{StandardModel, Reaction}" href="#COBREXA.add_reaction!-Tuple{StandardModel, Reaction}"><code>COBREXA.add_reaction!</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">add_reaction!(model::StandardModel, rxn::Reaction)</code></pre><p>Add <code>rxn</code> to <code>model</code> based on reaction <code>id</code>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/d4509bae4f4df01fe7d9479069af6510c69ad99e/src/reconstruction/StandardModel.jl#L12-L16">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.add_reactions!-Tuple{StandardModel, Vector{Reaction}}" href="#COBREXA.add_reactions!-Tuple{StandardModel, Vector{Reaction}}"><code>COBREXA.add_reactions!</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">add_reactions!(model::StandardModel, rxns::Vector{Reaction})</code></pre><p>Add <code>rxns</code> to <code>model</code> based on reaction <code>id</code>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/d4509bae4f4df01fe7d9479069af6510c69ad99e/src/reconstruction/StandardModel.jl#L1-L5">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.remove_gene!-Tuple{StandardModel, String}" href="#COBREXA.remove_gene!-Tuple{StandardModel, String}"><code>COBREXA.remove_gene!</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">remove_gene!( model::StandardModel, id::Vector{String}; knockout_reactions::Bool = false, -)</code></pre><p>Remove gene with <code>id</code> from <code>model</code>. If <code>knockout_reactions</code> is true, then also constrain reactions that require the genes to function to carry zero flux.</p><p><strong>Example</strong></p><pre><code class="language-none">remove_gene!(model, "g1")</code></pre></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/1011dcb5948951fc380713022f1ecf5b37961981/src/reconstruction/StandardModel.jl#L198-L212">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.remove_genes!-Tuple{StandardModel, Vector{String}}" href="#COBREXA.remove_genes!-Tuple{StandardModel, Vector{String}}"><code>COBREXA.remove_genes!</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">remove_genes!( +)</code></pre><p>Remove gene with <code>id</code> from <code>model</code>. If <code>knockout_reactions</code> is true, then also constrain reactions that require the genes to function to carry zero flux.</p><p><strong>Example</strong></p><pre><code class="language-none">remove_gene!(model, "g1")</code></pre></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/d4509bae4f4df01fe7d9479069af6510c69ad99e/src/reconstruction/StandardModel.jl#L198-L212">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.remove_genes!-Tuple{StandardModel, Vector{String}}" href="#COBREXA.remove_genes!-Tuple{StandardModel, Vector{String}}"><code>COBREXA.remove_genes!</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">remove_genes!( model::StandardModel, ids::Vector{String}; knockout_reactions::Bool = false, -)</code></pre><p>Remove all genes with <code>ids</code> from <code>model</code>. If <code>knockout_reactions</code> is true, then also constrain reactions that require the genes to function to carry zero flux.</p><p><strong>Example</strong></p><pre><code class="language-none">remove_genes!(model, ["g1", "g2"])</code></pre></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/1011dcb5948951fc380713022f1ecf5b37961981/src/reconstruction/StandardModel.jl#L165-L179">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.remove_metabolite!-Tuple{StandardModel, String}" href="#COBREXA.remove_metabolite!-Tuple{StandardModel, String}"><code>COBREXA.remove_metabolite!</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">remove_metabolite!(model::StandardModel, id::String)</code></pre><p>Remove metabolite with <code>id</code> from <code>model</code>. Warning, this could leave the model inconsistent, e.g. a reaction might require the deleted metabolite, in which case analysis functions will error.</p><p><strong>Example</strong></p><pre><code class="language-none">remove_metabolite!(model, "atp_c")</code></pre></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/1011dcb5948951fc380713022f1ecf5b37961981/src/reconstruction/StandardModel.jl#L151-L162">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.remove_metabolites!-Tuple{StandardModel, Vector{String}}" href="#COBREXA.remove_metabolites!-Tuple{StandardModel, Vector{String}}"><code>COBREXA.remove_metabolites!</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">remove_metabolites!(model::StandardModel, ids::Vector{String})</code></pre><p>Remove all metabolites with <code>ids</code> from <code>model</code>. Warning, this could leave the model inconsistent, e.g. a reaction might require the deleted metabolite, in which case analysis functions will error.</p><p><strong>Example</strong></p><pre><code class="language-none">remove_metabolites!(model, ["atp_c", "adp_c"])</code></pre></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/1011dcb5948951fc380713022f1ecf5b37961981/src/reconstruction/StandardModel.jl#L135-L146">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.remove_reaction!-Tuple{StandardModel, String}" href="#COBREXA.remove_reaction!-Tuple{StandardModel, String}"><code>COBREXA.remove_reaction!</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">remove_reaction!(model::StandardModel, id::String)</code></pre><p>Remove reaction with <code>id</code> from <code>model</code>. Note, may result in orphan metabolites.</p><p><strong>Example</strong></p><pre><code class="language-none">remove_reaction!(model, "EX_glc__D_e")</code></pre></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/1011dcb5948951fc380713022f1ecf5b37961981/src/reconstruction/StandardModel.jl#L123-L132">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.remove_reactions!-Tuple{StandardModel, Vector{String}}" href="#COBREXA.remove_reactions!-Tuple{StandardModel, Vector{String}}"><code>COBREXA.remove_reactions!</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">remove_reactions!(model::StandardModel, ids::Vector{String})</code></pre><p>Remove all reactions with <code>ids</code> from <code>model</code>. Note, may result in orphan metabolites.</p><p><strong>Example</strong></p><pre><code class="language-none">remove_reactions!(model, ["EX_glc__D_e", "fba"])</code></pre></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/1011dcb5948951fc380713022f1ecf5b37961981/src/reconstruction/StandardModel.jl#L109-L118">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.@add_reactions!-Tuple{Symbol, Expr}" href="#COBREXA.@add_reactions!-Tuple{Symbol, Expr}"><code>COBREXA.@add_reactions!</code></a> — <span class="docstring-category">Macro</span></header><section><div><pre><code class="language-julia">@add_reactions!(model::Symbol, ex::Expr)</code></pre><p>Shortcut to add multiple reactions and their lower and upper bounds</p><p><strong>Call variants</strong></p><pre><code class="language-none">@add_reactions! model begin +)</code></pre><p>Remove all genes with <code>ids</code> from <code>model</code>. If <code>knockout_reactions</code> is true, then also constrain reactions that require the genes to function to carry zero flux.</p><p><strong>Example</strong></p><pre><code class="language-none">remove_genes!(model, ["g1", "g2"])</code></pre></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/d4509bae4f4df01fe7d9479069af6510c69ad99e/src/reconstruction/StandardModel.jl#L165-L179">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.remove_metabolite!-Tuple{StandardModel, String}" href="#COBREXA.remove_metabolite!-Tuple{StandardModel, String}"><code>COBREXA.remove_metabolite!</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">remove_metabolite!(model::StandardModel, id::String)</code></pre><p>Remove metabolite with <code>id</code> from <code>model</code>. Warning, this could leave the model inconsistent, e.g. a reaction might require the deleted metabolite, in which case analysis functions will error.</p><p><strong>Example</strong></p><pre><code class="language-none">remove_metabolite!(model, "atp_c")</code></pre></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/d4509bae4f4df01fe7d9479069af6510c69ad99e/src/reconstruction/StandardModel.jl#L151-L162">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.remove_metabolites!-Tuple{StandardModel, Vector{String}}" href="#COBREXA.remove_metabolites!-Tuple{StandardModel, Vector{String}}"><code>COBREXA.remove_metabolites!</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">remove_metabolites!(model::StandardModel, ids::Vector{String})</code></pre><p>Remove all metabolites with <code>ids</code> from <code>model</code>. Warning, this could leave the model inconsistent, e.g. a reaction might require the deleted metabolite, in which case analysis functions will error.</p><p><strong>Example</strong></p><pre><code class="language-none">remove_metabolites!(model, ["atp_c", "adp_c"])</code></pre></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/d4509bae4f4df01fe7d9479069af6510c69ad99e/src/reconstruction/StandardModel.jl#L135-L146">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.remove_reaction!-Tuple{StandardModel, String}" href="#COBREXA.remove_reaction!-Tuple{StandardModel, String}"><code>COBREXA.remove_reaction!</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">remove_reaction!(model::StandardModel, id::String)</code></pre><p>Remove reaction with <code>id</code> from <code>model</code>. Note, may result in orphan metabolites.</p><p><strong>Example</strong></p><pre><code class="language-none">remove_reaction!(model, "EX_glc__D_e")</code></pre></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/d4509bae4f4df01fe7d9479069af6510c69ad99e/src/reconstruction/StandardModel.jl#L123-L132">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.remove_reactions!-Tuple{StandardModel, Vector{String}}" href="#COBREXA.remove_reactions!-Tuple{StandardModel, Vector{String}}"><code>COBREXA.remove_reactions!</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">remove_reactions!(model::StandardModel, ids::Vector{String})</code></pre><p>Remove all reactions with <code>ids</code> from <code>model</code>. Note, may result in orphan metabolites.</p><p><strong>Example</strong></p><pre><code class="language-none">remove_reactions!(model, ["EX_glc__D_e", "fba"])</code></pre></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/d4509bae4f4df01fe7d9479069af6510c69ad99e/src/reconstruction/StandardModel.jl#L109-L118">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.@add_reactions!-Tuple{Symbol, Expr}" href="#COBREXA.@add_reactions!-Tuple{Symbol, Expr}"><code>COBREXA.@add_reactions!</code></a> — <span class="docstring-category">Macro</span></header><section><div><pre><code class="language-julia">@add_reactions!(model::Symbol, ex::Expr)</code></pre><p>Shortcut to add multiple reactions and their lower and upper bounds</p><p><strong>Call variants</strong></p><pre><code class="language-none">@add_reactions! model begin reaction_name, reaction end @@ -239,7 +244,51 @@ end</code></pre><p><strong>Examples</strong></p><pre><code class="language-none" "v1", nothing ⟶ A, 0, 500 "v2", A ⟷ B + C, -500 "v3", B + C ⟶ nothing -end</code></pre></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/1011dcb5948951fc380713022f1ecf5b37961981/src/reconstruction/StandardModel.jl#L55-L85">source</a></section></article><h2 id="Analysis-functions"><a class="docs-heading-anchor" href="#Analysis-functions">Analysis functions</a><a id="Analysis-functions-1"></a><a class="docs-heading-anchor-permalink" href="#Analysis-functions" title="Permalink"></a></h2><article class="docstring"><header><a class="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> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">flux_balance_analysis( +end</code></pre></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/d4509bae4f4df01fe7d9479069af6510c69ad99e/src/reconstruction/StandardModel.jl#L55-L85">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.add_model_with_exchanges-Tuple{CoreModel, MetabolicModel, Vector{String}, Vector{String}}" href="#COBREXA.add_model_with_exchanges-Tuple{CoreModel, MetabolicModel, Vector{String}, Vector{String}}"><code>COBREXA.add_model_with_exchanges</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">add_model_with_exchanges( + community::CoreModel, + model::MetabolicModel, + exchange_rxn_ids::Vector{String}, + exchange_met_ids::Vector{String}; + model_name = "unknown_species", + biomass_id = nothing, +)::CoreModel</code></pre><p>Add <code>model</code> to <code>community</code>, which is a pre-existing community model with <code>exchange_rxn_ids</code> and <code>exchange_met_ids</code>. The <code>model_name</code> is appended to each reaction and metabolite, see <a href="@ref"><code>join</code></a>. If <code>biomass_id</code> is specified then a biomass metabolite for <code>model</code> is also added to the resulting model. The column corresponding to the <code>biomass_id</code> reaction then produces this new biomass metabolite with unit coefficient. Note, <code>exchange_rxn_ids</code> and <code>exchange_met_ids</code> must already exist in the <code>community</code> model.</p><p><strong>Example</strong></p><pre><code class="language-none">community = add_model_with_exchanges(community, model, exchange_rxn_ids, exchange_met_ids; model_name="species_2", biomass_id="BIOMASS_Ecoli_core_w_GAM")</code></pre></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/d4509bae4f4df01fe7d9479069af6510c69ad99e/src/reconstruction/community.jl#L61-L83">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.add_objective!-Tuple{CoreModel, Vector{String}}" href="#COBREXA.add_objective!-Tuple{CoreModel, Vector{String}}"><code>COBREXA.add_objective!</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">add_objective!( + community::CoreModel, + objective_mets::Vector{String}; + objective_weights = Float64[], + objective_column_index = 0, +)</code></pre><p>Add an objective to the <code>community</code> model. Supply the string names of the objective metabolites in <code>objective_mets</code>. Optionally specify the weight to assign each metabolite in the objective function, if unassigned then equal weight is assumed. Also, optionally specify whether the objective already exists in the model by assigning <code>objective_column_index</code>. If unassigned then an objective column will be added, otherwise the column at <code>objective_column_index</code> will be updated.</p><p>Note, the weights are negated inside the function so that the objective metabolites are seen as reagents/substrates, not products in the reaction equation. </p><p><strong>Example</strong></p><pre><code class="language-none">add_objective!(model, ["met1", "met2"]) # adds a new column with weights = [1,1] +add_objective!(model, ["met1", "met2"]; objective_weights=[0.1, 0.9]) # adds a new column +add_objective!(model, ["met1", "met2"]; objective_weights=[0.1, 0.9], objective_column_index=10) # updates column 10</code></pre></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/d4509bae4f4df01fe7d9479069af6510c69ad99e/src/reconstruction/community.jl#L1-L26">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.join_with_exchanges-Union{Tuple{M}, Tuple{Vector{M}, Vector{String}, Vector{String}}} where M<:MetabolicModel" href="#COBREXA.join_with_exchanges-Union{Tuple{M}, Tuple{Vector{M}, Vector{String}, Vector{String}}} where M<:MetabolicModel"><code>COBREXA.join_with_exchanges</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">join_with_exchanges(models::Vector{M}, + exchange_rxn_ids::Vector{String}, + exchange_met_ids::Vector{String}; + add_biomass_objective=false, + biomass_ids::Vector{String}, + model_names=String[] +)</code></pre><p>Return a <code>CoreModel</code> representing the community model of <code>models</code> joined through their <code>exchange_rxn_ids</code> and <code>exchange_met_ids</code>. These exchange reactions and metabolites link to environmental metabolites and reactions. Optionally specify <code>model_names</code> to append a specific name to each reaction and metabolite of an organism for easier reference (default is <code>species_i</code> for each model index i in <code>models</code>). Note, the bounds of the environmental variables are all set to zero. Thus, to run a simulation you need to constrain them appropriately. All the other bounds are inherited from the models used to construct the community model.</p><p>If <code>add_biomass_objective</code> is true then <code>biomass_ids</code> needs to be supplied as well. This creates a model with an extra reaction added to the end of the stoichiometric matrix (last column) that can be assigned as the objective reaction. It also creates biomass "metabolites" that can be used in this objective reaction. Note, this reaction is unspecified, further action needs to be taken to specify it, e.g. assign weights to the last column of the stoichiometric matrix in the rows corresponding to the biomass metabolites.</p><p>To further clarify how this <code>join</code> works. Suppose you have 2 organisms with stoichiometric matrices Sâ‚ and Sâ‚‚ and you want to link them with <code>exchange_met_ids = [emâ‚, emâ‚‚, em₃, ...]</code> and <code>exchange_rxn_ids = [erâ‚, erâ‚‚, er₃, ...]</code>. Then a new community stoichiometric matrix is constructed that looks like this:</p><pre><code class="language-none"> _ erâ‚ erâ‚‚ er₃ ... b_ + |Sâ‚ | + | Sâ‚‚ | + emâ‚| | +S = emâ‚‚| | + em₃| | + ...| | + bmâ‚| | + bmâ‚‚|_ _| +</code></pre><p>The exchange reactions in each model get linked to environmental metabolites, <code>emáµ¢</code>, and these get linked to environmental exchanges, <code>eráµ¢</code>. These <code>eráµ¢</code> behave like normal single organism exchange reactions. When <code>add_biomass_objective</code> is true each model's biomass becomes a pseudo-metabolite (<code>bmáµ¢</code>). These can be weighted in column <code>b</code>, called the <code>community_biomass</code> reaction in the community model, if desired. Refer to the tutorial if this is unclear.</p><p><strong>Example</strong></p><pre><code class="language-none">m1 = load_model(core_model_path) +m2 = load_model(CoreModel, core_model_path) + +# need to list ALL the exchanges that will form part of the entire model +exchange_rxn_ids = filter(looks_like_exchange_reaction, reactions(m1)) +exchange_met_ids = [first(keys(reaction_stoichiometry(m1, ex_rxn))) for ex_rxn in exchange_rxn_ids] + +biomass_ids = ["BIOMASS_Ecoli_core_w_GAM", "BIOMASS_Ecoli_core_w_GAM"] + +community = join_with_exchanges( + [m1, m2], + exchange_rxn_ids, + exchange_met_ids; + add_biomass_objective = true, + biomass_ids = biomass_ids, +)</code></pre></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/d4509bae4f4df01fe7d9479069af6510c69ad99e/src/reconstruction/community.jl#L171-L242">source</a></section></article><h2 id="Analysis-functions"><a class="docs-heading-anchor" href="#Analysis-functions">Analysis functions</a><a id="Analysis-functions-1"></a><a class="docs-heading-anchor-permalink" href="#Analysis-functions" title="Permalink"></a></h2><article class="docstring"><header><a class="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> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">flux_balance_analysis( model::M, optimizer; modifications = [], @@ -247,11 +296,11 @@ end</code></pre></div><a class="docs-sourcelink" target="_blank" href="https://g s.t. S x = b xâ‚— ≤ x ≤ xᵤ</code></pre><p>See "Orth, J., Thiele, I. & Palsson, B. What is flux balance analysis?. Nat Biotechnol 28, 245–248 (2010). https://doi.org/10.1038/nbt.1614" for more information.</p><p>The <code>optimizer</code> must be set to a <code>JuMP</code>-compatible optimizer, such as <code>GLPK.Optimizer</code> or <code>Tulip.Optimizer</code></p><p>Optionally, you may specify one or more modifications to be applied to the model before the analysis, such as <a href="#COBREXA.change_optimizer_attribute-Tuple{Any, Any}"><code>change_optimizer_attribute</code></a>,<a href="#COBREXA.change_objective-Tuple{Union{String, Vector{String}}}"><code>change_objective</code></a>, and <a href="#COBREXA.change_sense-Tuple{Any}"><code>change_sense</code></a>.</p><p>Returns an optimized <code>JuMP</code> model.</p><p><strong>Example</strong></p><pre><code class="language-none">model = load_model(StandardModel, "e_coli_core.json") biomass = findfirst(model.reactions, "BIOMASS_Ecoli_core_w_GAM") -solution = flux_balance_analysis(model, GLPK.optimizer; modifications=[change_objective(biomass)])</code></pre></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/1011dcb5948951fc380713022f1ecf5b37961981/src/analysis/flux_balance_analysis.jl#L31-L66">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.flux_balance_analysis_dict-Tuple{MetabolicModel, Vararg{Any, N} where N}" href="#COBREXA.flux_balance_analysis_dict-Tuple{MetabolicModel, Vararg{Any, N} where N}"><code>COBREXA.flux_balance_analysis_dict</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">flux_balance_analysis_dict(model::MetabolicModel, args...)::Union{Dict{String, Float64},Nothing}</code></pre><p>A variant of FBA that returns a dictionary assigning fluxes to reactions, if the solution is found. Arguments are passed to <a href="#COBREXA.flux_balance_analysis-Union{Tuple{M}, Tuple{M, Any}} where M<:MetabolicModel"><code>flux_balance_analysis</code></a>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/1011dcb5948951fc380713022f1ecf5b37961981/src/analysis/flux_balance_analysis.jl#L15-L20">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.flux_balance_analysis_vec-Tuple" href="#COBREXA.flux_balance_analysis_vec-Tuple"><code>COBREXA.flux_balance_analysis_vec</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">flux_balance_analysis_vec(args...)::Union{Vector{Float64},Nothing}</code></pre><p>A variant of FBA that returns a vector of fluxes in the same order as reactions of the model, if the solution is found.</p><p>Arguments are passed to <a href="#COBREXA.flux_balance_analysis-Union{Tuple{M}, Tuple{M, Any}} where M<:MetabolicModel"><code>flux_balance_analysis</code></a>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/1011dcb5948951fc380713022f1ecf5b37961981/src/analysis/flux_balance_analysis.jl#L1-L8">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA._FVA_add_constraint-NTuple{4, Any}" href="#COBREXA._FVA_add_constraint-NTuple{4, Any}"><code>COBREXA._FVA_add_constraint</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">_FVA_add_constraint(model, c, x, Z)</code></pre><p>Internal helper function for adding constraints to a model. Exists mainly because for avoiding namespace problems on remote workers.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/1011dcb5948951fc380713022f1ecf5b37961981/src/analysis/flux_variability_analysis.jl#L134-L139">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA._FVA_optimize_reaction-Tuple{Any, Any, Any}" href="#COBREXA._FVA_optimize_reaction-Tuple{Any, Any, Any}"><code>COBREXA._FVA_optimize_reaction</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">_FVA_get_opt(model, rid)</code></pre><p>Internal helper for creating the optimized model on a remote worker, for avoiding namespace problems.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/1011dcb5948951fc380713022f1ecf5b37961981/src/analysis/flux_variability_analysis.jl#L145-L150">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.flux_variability_analysis-Tuple{MetabolicModel, Any}" href="#COBREXA.flux_variability_analysis-Tuple{MetabolicModel, Any}"><code>COBREXA.flux_variability_analysis</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">flux_variability_analysis( +solution = flux_balance_analysis(model, GLPK.optimizer; modifications=[change_objective(biomass)])</code></pre></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/d4509bae4f4df01fe7d9479069af6510c69ad99e/src/analysis/flux_balance_analysis.jl#L31-L66">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.flux_balance_analysis_dict-Tuple{MetabolicModel, Vararg{Any, N} where N}" href="#COBREXA.flux_balance_analysis_dict-Tuple{MetabolicModel, Vararg{Any, N} where N}"><code>COBREXA.flux_balance_analysis_dict</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">flux_balance_analysis_dict(model::MetabolicModel, args...)::Union{Dict{String, Float64},Nothing}</code></pre><p>A variant of FBA that returns a dictionary assigning fluxes to reactions, if the solution is found. Arguments are passed to <a href="#COBREXA.flux_balance_analysis-Union{Tuple{M}, Tuple{M, Any}} where M<:MetabolicModel"><code>flux_balance_analysis</code></a>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/d4509bae4f4df01fe7d9479069af6510c69ad99e/src/analysis/flux_balance_analysis.jl#L15-L20">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.flux_balance_analysis_vec-Tuple" href="#COBREXA.flux_balance_analysis_vec-Tuple"><code>COBREXA.flux_balance_analysis_vec</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">flux_balance_analysis_vec(args...)::Union{Vector{Float64},Nothing}</code></pre><p>A variant of FBA that returns a vector of fluxes in the same order as reactions of the model, if the solution is found.</p><p>Arguments are passed to <a href="#COBREXA.flux_balance_analysis-Union{Tuple{M}, Tuple{M, Any}} where M<:MetabolicModel"><code>flux_balance_analysis</code></a>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/d4509bae4f4df01fe7d9479069af6510c69ad99e/src/analysis/flux_balance_analysis.jl#L1-L8">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA._FVA_add_constraint-NTuple{4, Any}" href="#COBREXA._FVA_add_constraint-NTuple{4, Any}"><code>COBREXA._FVA_add_constraint</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">_FVA_add_constraint(model, c, x, Z)</code></pre><p>Internal helper function for adding constraints to a model. Exists mainly because for avoiding namespace problems on remote workers.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/d4509bae4f4df01fe7d9479069af6510c69ad99e/src/analysis/flux_variability_analysis.jl#L134-L139">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA._FVA_optimize_reaction-Tuple{Any, Any, Any}" href="#COBREXA._FVA_optimize_reaction-Tuple{Any, Any, Any}"><code>COBREXA._FVA_optimize_reaction</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">_FVA_get_opt(model, rid)</code></pre><p>Internal helper for creating the optimized model on a remote worker, for avoiding namespace problems.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/d4509bae4f4df01fe7d9479069af6510c69ad99e/src/analysis/flux_variability_analysis.jl#L145-L150">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.flux_variability_analysis-Tuple{MetabolicModel, Any}" href="#COBREXA.flux_variability_analysis-Tuple{MetabolicModel, Any}"><code>COBREXA.flux_variability_analysis</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">flux_variability_analysis( model::MetabolicModel, optimizer; kwargs... -)</code></pre><p>A simpler version of <a href="#COBREXA.flux_variability_analysis-Tuple{MetabolicModel, Any}"><code>flux_variability_analysis</code></a> that maximizes and minimizes all reactions in the model. Arguments are forwarded.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/1011dcb5948951fc380713022f1ecf5b37961981/src/analysis/flux_variability_analysis.jl#L94-L102">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.flux_variability_analysis-Tuple{MetabolicModel, Vector{Int64}, Any}" href="#COBREXA.flux_variability_analysis-Tuple{MetabolicModel, Vector{Int64}, Any}"><code>COBREXA.flux_variability_analysis</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">flux_variability_analysis( +)</code></pre><p>A simpler version of <a href="#COBREXA.flux_variability_analysis-Tuple{MetabolicModel, Any}"><code>flux_variability_analysis</code></a> that maximizes and minimizes all reactions in the model. Arguments are forwarded.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/d4509bae4f4df01fe7d9479069af6510c69ad99e/src/analysis/flux_variability_analysis.jl#L94-L102">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.flux_variability_analysis-Tuple{MetabolicModel, Vector{Int64}, Any}" href="#COBREXA.flux_variability_analysis-Tuple{MetabolicModel, Vector{Int64}, Any}"><code>COBREXA.flux_variability_analysis</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">flux_variability_analysis( model::MetabolicModel, reactions::Vector{Int}, optimizer; @@ -263,11 +312,11 @@ solution = flux_balance_analysis(model, GLPK.optimizer; modifications=[change_ob s.t. S x = b xâ‚— ≤ x ≤ xᵤ cáµ€x ≥ bounds(Zâ‚€)[1] - cáµ€x ≤ bounds(Zâ‚€)[2]</code></pre><p>where Zâ‚€:= cáµ€xâ‚€ is the objective value of an optimal solution of the associated FBA problem (see <a href="#COBREXA.flux_balance_analysis-Union{Tuple{M}, Tuple{M, Any}} where M<:MetabolicModel"><code>flux_balance_analysis</code></a>). See "Gudmundsson, S., Thiele, I. Computationally efficient flux variability analysis. BMC Bioinformatics 11, 489 (2010). https://doi.org/10.1186/1471-2105-11-489" for more information.</p><p>The <code>bounds</code> is a user-supplied function that specifies the objective bounds for the variability optimizations, by default it restricts the flux objective value to the precise optimum reached in FBA. It can return <code>-Inf</code> and <code>Inf</code> in first and second pair to remove the limit. Use <a href="#COBREXA.gamma_bounds-Tuple{Any}"><code>gamma_bounds</code></a> and <a href="#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>).</p><p><code>ret</code> is a function used to extract results from optimized JuMP models of the individual reactions. 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>length(reactions)</code>,2). The optimizer result status is checked with <a href="#COBREXA.is_solved-Tuple{Any}"><code>is_solved</code></a>; <code>nothing</code> is returned if the optimization failed for any reason.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/1011dcb5948951fc380713022f1ecf5b37961981/src/analysis/flux_variability_analysis.jl#L1-L46">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.flux_variability_analysis_dict-Tuple{MetabolicModel, Any}" href="#COBREXA.flux_variability_analysis_dict-Tuple{MetabolicModel, Any}"><code>COBREXA.flux_variability_analysis_dict</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">flux_variability_analysis_dict( + cáµ€x ≤ bounds(Zâ‚€)[2]</code></pre><p>where Zâ‚€:= cáµ€xâ‚€ is the objective value of an optimal solution of the associated FBA problem (see <a href="#COBREXA.flux_balance_analysis-Union{Tuple{M}, Tuple{M, Any}} where M<:MetabolicModel"><code>flux_balance_analysis</code></a>). See "Gudmundsson, S., Thiele, I. Computationally efficient flux variability analysis. BMC Bioinformatics 11, 489 (2010). https://doi.org/10.1186/1471-2105-11-489" for more information.</p><p>The <code>bounds</code> is a user-supplied function that specifies the objective bounds for the variability optimizations, by default it restricts the flux objective value to the precise optimum reached in FBA. It can return <code>-Inf</code> and <code>Inf</code> in first and second pair to remove the limit. Use <a href="#COBREXA.gamma_bounds-Tuple{Any}"><code>gamma_bounds</code></a> and <a href="#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>).</p><p><code>ret</code> is a function used to extract results from optimized JuMP models of the individual reactions. 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>length(reactions)</code>,2). The optimizer result status is checked with <a href="#COBREXA.is_solved-Tuple{Any}"><code>is_solved</code></a>; <code>nothing</code> is returned if the optimization failed for any reason.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/d4509bae4f4df01fe7d9479069af6510c69ad99e/src/analysis/flux_variability_analysis.jl#L1-L46">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.flux_variability_analysis_dict-Tuple{MetabolicModel, Any}" href="#COBREXA.flux_variability_analysis_dict-Tuple{MetabolicModel, Any}"><code>COBREXA.flux_variability_analysis_dict</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">flux_variability_analysis_dict( model::MetabolicModel, optimizer; kwargs... -)</code></pre><p>A variant of <a href="#COBREXA.flux_variability_analysis-Tuple{MetabolicModel, Any}"><code>flux_variability_analysis</code></a> that returns the individual maximized and minimized fluxes of all reactions as two dictionaries (of dictionaries). All keyword arguments except <code>ret</code> are passed through.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/1011dcb5948951fc380713022f1ecf5b37961981/src/analysis/flux_variability_analysis.jl#L108-L118">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.parsimonious_flux_balance_analysis-Tuple{MetabolicModel, Any}" href="#COBREXA.parsimonious_flux_balance_analysis-Tuple{MetabolicModel, Any}"><code>COBREXA.parsimonious_flux_balance_analysis</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">parsimonious_flux_balance_analysis( +)</code></pre><p>A variant of <a href="#COBREXA.flux_variability_analysis-Tuple{MetabolicModel, Any}"><code>flux_variability_analysis</code></a> that returns the individual maximized and minimized fluxes of all reactions as two dictionaries (of dictionaries). All keyword arguments except <code>ret</code> are passed through.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/d4509bae4f4df01fe7d9479069af6510c69ad99e/src/analysis/flux_variability_analysis.jl#L108-L118">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.parsimonious_flux_balance_analysis-Tuple{MetabolicModel, Any}" href="#COBREXA.parsimonious_flux_balance_analysis-Tuple{MetabolicModel, Any}"><code>COBREXA.parsimonious_flux_balance_analysis</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">parsimonious_flux_balance_analysis( model::MetabolicModel, optimizer; modifications = [], @@ -282,13 +331,13 @@ s.t. S x = b atts = Dict("OutputFlag" => 0) model = load_model(StandardModel, "iJO1366.json") biomass = findfirst(model.reactions, "BIOMASS_Ec_iJO1366_WT_53p95M") -sol = pfba(model, biomass, Gurobi.optimizer)</code></pre></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/1011dcb5948951fc380713022f1ecf5b37961981/src/analysis/parsimonious_flux_balance_analysis.jl#L1-L55">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.parsimonious_flux_balance_analysis_dict-Tuple{MetabolicModel, Vararg{Any, N} where N}" href="#COBREXA.parsimonious_flux_balance_analysis_dict-Tuple{MetabolicModel, Vararg{Any, N} where N}"><code>COBREXA.parsimonious_flux_balance_analysis_dict</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">parsimonious_flux_balance_analysis_dict(model::MetabolicModel, args...; kwargs...)</code></pre><p>Perform parsimonious flux balance analysis on <code>model</code> using <code>optimizer</code>. Returns a dictionary mapping the reaction IDs to fluxes. Arguments are forwarded to <a href="#COBREXA.parsimonious_flux_balance_analysis-Tuple{MetabolicModel, Any}"><code>parsimonious_flux_balance_analysis</code></a> internally.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/1011dcb5948951fc380713022f1ecf5b37961981/src/analysis/parsimonious_flux_balance_analysis.jl#L112-L118">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.parsimonious_flux_balance_analysis_vec-Tuple" href="#COBREXA.parsimonious_flux_balance_analysis_vec-Tuple"><code>COBREXA.parsimonious_flux_balance_analysis_vec</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">parsimonious_flux_balance_analysis_vec(args...; kwargs...)</code></pre><p>Perform parsimonious flux balance analysis on <code>model</code> using <code>optimizer</code>. Returns a vector of fluxes in the same order as the reactions in <code>model</code>. Arguments are forwarded to <a href="#COBREXA.parsimonious_flux_balance_analysis-Tuple{MetabolicModel, Any}"><code>parsimonious_flux_balance_analysis</code></a> internally.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/1011dcb5948951fc380713022f1ecf5b37961981/src/analysis/parsimonious_flux_balance_analysis.jl#L97-L103">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.screen-Union{Tuple{MetabolicModel}, Tuple{N}, Tuple{T}, Tuple{V}} where {V<:(AbstractVector{T} where T), T<:Tuple, N}" href="#COBREXA.screen-Union{Tuple{MetabolicModel}, Tuple{N}, Tuple{T}, Tuple{V}} where {V<:(AbstractVector{T} where T), T<:Tuple, N}"><code>COBREXA.screen</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">function screen( +sol = pfba(model, biomass, Gurobi.optimizer)</code></pre></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/d4509bae4f4df01fe7d9479069af6510c69ad99e/src/analysis/parsimonious_flux_balance_analysis.jl#L1-L55">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.parsimonious_flux_balance_analysis_dict-Tuple{MetabolicModel, Vararg{Any, N} where N}" href="#COBREXA.parsimonious_flux_balance_analysis_dict-Tuple{MetabolicModel, Vararg{Any, N} where N}"><code>COBREXA.parsimonious_flux_balance_analysis_dict</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">parsimonious_flux_balance_analysis_dict(model::MetabolicModel, args...; kwargs...)</code></pre><p>Perform parsimonious flux balance analysis on <code>model</code> using <code>optimizer</code>. Returns a dictionary mapping the reaction IDs to fluxes. Arguments are forwarded to <a href="#COBREXA.parsimonious_flux_balance_analysis-Tuple{MetabolicModel, Any}"><code>parsimonious_flux_balance_analysis</code></a> internally.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/d4509bae4f4df01fe7d9479069af6510c69ad99e/src/analysis/parsimonious_flux_balance_analysis.jl#L112-L118">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.parsimonious_flux_balance_analysis_vec-Tuple" href="#COBREXA.parsimonious_flux_balance_analysis_vec-Tuple"><code>COBREXA.parsimonious_flux_balance_analysis_vec</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">parsimonious_flux_balance_analysis_vec(args...; kwargs...)</code></pre><p>Perform parsimonious flux balance analysis on <code>model</code> using <code>optimizer</code>. Returns a vector of fluxes in the same order as the reactions in <code>model</code>. Arguments are forwarded to <a href="#COBREXA.parsimonious_flux_balance_analysis-Tuple{MetabolicModel, Any}"><code>parsimonious_flux_balance_analysis</code></a> internally.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/d4509bae4f4df01fe7d9479069af6510c69ad99e/src/analysis/parsimonious_flux_balance_analysis.jl#L97-L103">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.screen-Union{Tuple{MetabolicModel}, Tuple{N}, Tuple{T}, Tuple{V}} where {V<:(AbstractVector{T} where T), T<:Tuple, N}" href="#COBREXA.screen-Union{Tuple{MetabolicModel}, Tuple{N}, Tuple{T}, Tuple{V}} where {V<:(AbstractVector{T} where T), T<:Tuple, N}"><code>COBREXA.screen</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">function screen( model::MetabolicModel; variants::Maybe{Array{V,N}} = nothing, analysis, args::Maybe{Array{T,N}} = nothing, workers = [myid()], -)::Array where {V<:AbstractVector, T<:Tuple,N}</code></pre><p>Take an array of model-modifying function vectors in <code>variants</code>, and execute the function <code>analysis</code> on all variants of the <code>model</code> specified by <code>variants</code>. The computation is distributed over worker IDs in <code>workers</code>. If <code>args</code> are supplied (as an array of the same size as the <code>variants</code>), they are forwarded as arguments to the corresponding analysis function calls.</p><p>The array of variants must contain vectors of single-parameter functions, these are applied to model in order. The functions must <em>not</em> modify the model, but rather return a modified copy. The copy should be made as shallow as possible, to increase memory efficiency of the process. Variant generators that modify the argument model in-place will cause unpredictable results. Refer to the definition of <a href="#COBREXA.screen_variant"><code>screen_variant</code></a> for details.</p><p>The function <code>analysis</code> will receive a single argument (the modified model), together with an expanded tuple of arguments from <code>args</code>.</p><p>The modification and analysis functions are transferred to <code>workers</code> as-is; all packages required to run them (e.g. the optimization solvers) must be loaded there. Typically, you want to use the macro <code>@everywhere using MyFavoriteSolver</code> from <code>Distributed</code> package for loading the solvers.</p><p><strong>Return value</strong></p><p>The results of running <code>analysis</code> are collected in to the resulting array, in a way that preserves the shape of the <code>variants</code>, similarly as with <code>pmap</code>.</p><p>The results of <code>analysis</code> function must be serializable, preferably made only from pure Julia structures, because they may be transferred over the network between the computation nodes. For that reason, functions that return whole JuMP models that contain pointers to allocated C structures (such as <a href="#COBREXA.flux_balance_analysis-Union{Tuple{M}, Tuple{M, Any}} where M<:MetabolicModel"><code>flux_balance_analysis</code></a> used with <code>GLPK</code> or <code>Gurobi</code> otimizers) will generally not in this context.</p><p><strong>Example</strong></p><p>``` function reverse_reaction(i::Int) (model::CoreModel) -> begin mod = copy(model) mod.S[:,i] .*= -1 # this is unrealistic but sufficient for demonstration mod end end</p><p>m = load<em>model(CoreModel, "e</em>coli_core.xml")</p><p>screen<em>variants(m, [ [reverse</em>reaction(5)], [reverse<em>reaction(3), reverse</em>reaction(6)] ], mod -> mod.S[:,3]) # observe the changes in S</p><p>screen<em>variants(m, [ [reverse</em>reaction(5)], [reverse<em>reaction(3), reverse</em>reaction(6)] ], mod -> flux<em>balance</em>analysis_vec(mod, GLPK.Optimizer)) # run analysis</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/1011dcb5948951fc380713022f1ecf5b37961981/src/analysis/screening.jl#L2-L69">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.screen_variant" href="#COBREXA.screen_variant"><code>COBREXA.screen_variant</code></a> — <span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia">screen_variant(model::MetabolicModel, variant::Vector, analysis, args = ())</code></pre><p>Helper function for <a href="#COBREXA.screen-Union{Tuple{MetabolicModel}, Tuple{N}, Tuple{T}, Tuple{V}} where {V<:(AbstractVector{T} where T), T<:Tuple, N}"><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><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/1011dcb5948951fc380713022f1ecf5b37961981/src/analysis/screening.jl#L122-L130">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.screen_variants-Tuple{Any, Any, Any}" href="#COBREXA.screen_variants-Tuple{Any, Any, Any}"><code>COBREXA.screen_variants</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">screen_variants(model, variants, analysis; workers=[myid()])</code></pre><p>A shortcut for <a href="#COBREXA.screen-Union{Tuple{MetabolicModel}, Tuple{N}, Tuple{T}, Tuple{V}} where {V<:(AbstractVector{T} where T), T<:Tuple, N}"><code>screen</code></a> that only works with model variants.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/1011dcb5948951fc380713022f1ecf5b37961981/src/analysis/screening.jl#L138-L142">source</a></section></article><h3 id="Analysis-modifications"><a class="docs-heading-anchor" href="#Analysis-modifications">Analysis modifications</a><a id="Analysis-modifications-1"></a><a class="docs-heading-anchor-permalink" href="#Analysis-modifications" title="Permalink"></a></h3><article class="docstring"><header><a class="docstring-binding" id="COBREXA._do_knockout-Tuple{MetabolicModel, Any, Vector{String}}" href="#COBREXA._do_knockout-Tuple{MetabolicModel, Any, Vector{String}}"><code>COBREXA._do_knockout</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">_do_knockout(model::MetabolicModel, opt_model)</code></pre><p>Internal helper for knockouts on generic MetabolicModels. This can be overloaded so that the knockouts may work differently (more efficiently) with other models.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/1011dcb5948951fc380713022f1ecf5b37961981/src/analysis/modifications/knockout.jl#L17-L23">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.knockout-Tuple{String}" href="#COBREXA.knockout-Tuple{String}"><code>COBREXA.knockout</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">knockout(gene_id::String)</code></pre><p>A helper variant of <a href="#COBREXA.knockout-Tuple{String}"><code>knockout</code></a> for a single gene.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/1011dcb5948951fc380713022f1ecf5b37961981/src/analysis/modifications/knockout.jl#L10-L14">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.knockout-Tuple{Vector{String}}" href="#COBREXA.knockout-Tuple{Vector{String}}"><code>COBREXA.knockout</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">knockout(gene_ids::Vector{String})</code></pre><p>A modification that zeroes the bounds of all reactions that would be knocked out by the specified genes (effectively disables the reactions).</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/1011dcb5948951fc380713022f1ecf5b37961981/src/analysis/modifications/knockout.jl#L1-L6">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.change_constraint-Tuple{String, Any, Any}" href="#COBREXA.change_constraint-Tuple{String, Any, Any}"><code>COBREXA.change_constraint</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">change_constraint(id::String, lb, ub)</code></pre><p>Change the lower and upper bounds (<code>lb</code> and <code>ub</code> respectively) of reaction <code>id</code>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/1011dcb5948951fc380713022f1ecf5b37961981/src/analysis/modifications/optimizer.jl#L54-L58">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.change_objective-Tuple{Union{String, Vector{String}}}" href="#COBREXA.change_objective-Tuple{Union{String, Vector{String}}}"><code>COBREXA.change_objective</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">change_objective(new_objective::Union{String,Vector{String}}; weights=[], sense=MOI.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.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/1011dcb5948951fc380713022f1ecf5b37961981/src/analysis/modifications/optimizer.jl#L66-L75">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.change_optimizer-Tuple{Any}" href="#COBREXA.change_optimizer-Tuple{Any}"><code>COBREXA.change_optimizer</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">change_optimizer(optimizer)</code></pre><p>Change the JuMP optimizer used to run the optimization.</p><p>This may be used to try different approaches for reaching the optimum, and in problems that may require different optimizers for different parts, such as the <a href="#COBREXA.parsimonious_flux_balance_analysis-Tuple{MetabolicModel, Any}"><code>parsimonious_flux_balance_analysis</code></a>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/1011dcb5948951fc380713022f1ecf5b37961981/src/analysis/modifications/optimizer.jl#L15-L23">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.change_optimizer_attribute-Tuple{Any, Any}" href="#COBREXA.change_optimizer_attribute-Tuple{Any, Any}"><code>COBREXA.change_optimizer_attribute</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">change_optimizer_attribute(attribute_key, value)</code></pre><p>Change a JuMP optimizer attribute. The attributes are optimizer-specific, refer to the JuMP documentation and the documentation of the specific optimizer for usable keys and values.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/1011dcb5948951fc380713022f1ecf5b37961981/src/analysis/modifications/optimizer.jl#L28-L34">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.change_sense-Tuple{Any}" href="#COBREXA.change_sense-Tuple{Any}"><code>COBREXA.change_sense</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">change_sense(objective_sense)</code></pre><p>Change the objective sense of optimization. Possible arguments are <code>MOI.MAX_SENSE</code> and <code>MOI.MIN_SENSE</code>.</p><p>If you want to change the objective and sense at the same time, use <a href="#COBREXA.change_objective-Tuple{Union{String, Vector{String}}}"><code>change_objective</code></a> instead to do both at once.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/1011dcb5948951fc380713022f1ecf5b37961981/src/analysis/modifications/optimizer.jl#L2-L10">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.constrain_objective_value-Tuple{Any}" href="#COBREXA.constrain_objective_value-Tuple{Any}"><code>COBREXA.constrain_objective_value</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">constrain_objective_value(tolerance)</code></pre><p>Limit the objective value to <code>tolerance</code>-times the current objective value, as with <a href="#COBREXA.objective_bounds-Tuple{Any}"><code>objective_bounds</code></a>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/1011dcb5948951fc380713022f1ecf5b37961981/src/analysis/modifications/optimizer.jl#L40-L45">source</a></section></article><h3 id="Flux-sampling"><a class="docs-heading-anchor" href="#Flux-sampling">Flux sampling</a><a id="Flux-sampling-1"></a><a class="docs-heading-anchor-permalink" href="#Flux-sampling" title="Permalink"></a></h3><article class="docstring"><header><a class="docstring-binding" id="COBREXA._affine_hit_and_run_chain-NTuple{5, Any}" href="#COBREXA._affine_hit_and_run_chain-NTuple{5, Any}"><code>COBREXA._affine_hit_and_run_chain</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">_affine_hit_and_run_chain(warmup, lbs, ubs, iters, chain)</code></pre><p>Internal helper function for computing a single affine hit-and-run chain. The number of the chain is passed for possible future initialization of stable RNGs.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/1011dcb5948951fc380713022f1ecf5b37961981/src/analysis/sampling/affine_hit_and_run.jl#L73-L79">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.affine_hit_and_run-Tuple{Matrix{Float64}, Vector{Float64}, Vector{Float64}}" href="#COBREXA.affine_hit_and_run-Tuple{Matrix{Float64}, Vector{Float64}, Vector{Float64}}"><code>COBREXA.affine_hit_and_run</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">function affine_hit_and_run( +)::Array where {V<:AbstractVector, T<:Tuple,N}</code></pre><p>Take an array of model-modifying function vectors in <code>variants</code>, and execute the function <code>analysis</code> on all variants of the <code>model</code> specified by <code>variants</code>. The computation is distributed over worker IDs in <code>workers</code>. If <code>args</code> are supplied (as an array of the same size as the <code>variants</code>), they are forwarded as arguments to the corresponding analysis function calls.</p><p>The array of variants must contain vectors of single-parameter functions, these are applied to model in order. The functions must <em>not</em> modify the model, but rather return a modified copy. The copy should be made as shallow as possible, to increase memory efficiency of the process. Variant generators that modify the argument model in-place will cause unpredictable results. Refer to the definition of <a href="#COBREXA.screen_variant"><code>screen_variant</code></a> for details.</p><p>The function <code>analysis</code> will receive a single argument (the modified model), together with an expanded tuple of arguments from <code>args</code>.</p><p>The modification and analysis functions are transferred to <code>workers</code> as-is; all packages required to run them (e.g. the optimization solvers) must be loaded there. Typically, you want to use the macro <code>@everywhere using MyFavoriteSolver</code> from <code>Distributed</code> package for loading the solvers.</p><p><strong>Return value</strong></p><p>The results of running <code>analysis</code> are collected in to the resulting array, in a way that preserves the shape of the <code>variants</code>, similarly as with <code>pmap</code>.</p><p>The results of <code>analysis</code> function must be serializable, preferably made only from pure Julia structures, because they may be transferred over the network between the computation nodes. For that reason, functions that return whole JuMP models that contain pointers to allocated C structures (such as <a href="#COBREXA.flux_balance_analysis-Union{Tuple{M}, Tuple{M, Any}} where M<:MetabolicModel"><code>flux_balance_analysis</code></a> used with <code>GLPK</code> or <code>Gurobi</code> otimizers) will generally not in this context.</p><p><strong>Example</strong></p><p>``` function reverse_reaction(i::Int) (model::CoreModel) -> begin mod = copy(model) mod.S[:,i] .*= -1 # this is unrealistic but sufficient for demonstration mod end end</p><p>m = load<em>model(CoreModel, "e</em>coli_core.xml")</p><p>screen<em>variants(m, [ [reverse</em>reaction(5)], [reverse<em>reaction(3), reverse</em>reaction(6)] ], mod -> mod.S[:,3]) # observe the changes in S</p><p>screen<em>variants(m, [ [reverse</em>reaction(5)], [reverse<em>reaction(3), reverse</em>reaction(6)] ], mod -> flux<em>balance</em>analysis_vec(mod, GLPK.Optimizer)) # run analysis</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/d4509bae4f4df01fe7d9479069af6510c69ad99e/src/analysis/screening.jl#L2-L69">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.screen_variant" href="#COBREXA.screen_variant"><code>COBREXA.screen_variant</code></a> — <span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia">screen_variant(model::MetabolicModel, variant::Vector, analysis, args = ())</code></pre><p>Helper function for <a href="#COBREXA.screen-Union{Tuple{MetabolicModel}, Tuple{N}, Tuple{T}, Tuple{V}} where {V<:(AbstractVector{T} where T), T<:Tuple, N}"><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><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/d4509bae4f4df01fe7d9479069af6510c69ad99e/src/analysis/screening.jl#L122-L130">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.screen_variants-Tuple{Any, Any, Any}" href="#COBREXA.screen_variants-Tuple{Any, Any, Any}"><code>COBREXA.screen_variants</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">screen_variants(model, variants, analysis; workers=[myid()])</code></pre><p>A shortcut for <a href="#COBREXA.screen-Union{Tuple{MetabolicModel}, Tuple{N}, Tuple{T}, Tuple{V}} where {V<:(AbstractVector{T} where T), T<:Tuple, N}"><code>screen</code></a> that only works with model variants.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/d4509bae4f4df01fe7d9479069af6510c69ad99e/src/analysis/screening.jl#L138-L142">source</a></section></article><h3 id="Analysis-modifications"><a class="docs-heading-anchor" href="#Analysis-modifications">Analysis modifications</a><a id="Analysis-modifications-1"></a><a class="docs-heading-anchor-permalink" href="#Analysis-modifications" title="Permalink"></a></h3><article class="docstring"><header><a class="docstring-binding" id="COBREXA._do_knockout-Tuple{MetabolicModel, Any, Vector{String}}" href="#COBREXA._do_knockout-Tuple{MetabolicModel, Any, Vector{String}}"><code>COBREXA._do_knockout</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">_do_knockout(model::MetabolicModel, opt_model)</code></pre><p>Internal helper for knockouts on generic MetabolicModels. This can be overloaded so that the knockouts may work differently (more efficiently) with other models.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/d4509bae4f4df01fe7d9479069af6510c69ad99e/src/analysis/modifications/knockout.jl#L17-L23">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.knockout-Tuple{String}" href="#COBREXA.knockout-Tuple{String}"><code>COBREXA.knockout</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">knockout(gene_id::String)</code></pre><p>A helper variant of <a href="#COBREXA.knockout-Tuple{String}"><code>knockout</code></a> for a single gene.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/d4509bae4f4df01fe7d9479069af6510c69ad99e/src/analysis/modifications/knockout.jl#L10-L14">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.knockout-Tuple{Vector{String}}" href="#COBREXA.knockout-Tuple{Vector{String}}"><code>COBREXA.knockout</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">knockout(gene_ids::Vector{String})</code></pre><p>A modification that zeroes the bounds of all reactions that would be knocked out by the specified genes (effectively disables the reactions).</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/d4509bae4f4df01fe7d9479069af6510c69ad99e/src/analysis/modifications/knockout.jl#L1-L6">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.change_constraint-Tuple{String, Any, Any}" href="#COBREXA.change_constraint-Tuple{String, Any, Any}"><code>COBREXA.change_constraint</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">change_constraint(id::String, lb, ub)</code></pre><p>Change the lower and upper bounds (<code>lb</code> and <code>ub</code> respectively) of reaction <code>id</code>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/d4509bae4f4df01fe7d9479069af6510c69ad99e/src/analysis/modifications/optimizer.jl#L54-L58">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.change_objective-Tuple{Union{String, Vector{String}}}" href="#COBREXA.change_objective-Tuple{Union{String, Vector{String}}}"><code>COBREXA.change_objective</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">change_objective(new_objective::Union{String,Vector{String}}; weights=[], sense=MOI.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.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/d4509bae4f4df01fe7d9479069af6510c69ad99e/src/analysis/modifications/optimizer.jl#L66-L75">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.change_optimizer-Tuple{Any}" href="#COBREXA.change_optimizer-Tuple{Any}"><code>COBREXA.change_optimizer</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">change_optimizer(optimizer)</code></pre><p>Change the JuMP optimizer used to run the optimization.</p><p>This may be used to try different approaches for reaching the optimum, and in problems that may require different optimizers for different parts, such as the <a href="#COBREXA.parsimonious_flux_balance_analysis-Tuple{MetabolicModel, Any}"><code>parsimonious_flux_balance_analysis</code></a>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/d4509bae4f4df01fe7d9479069af6510c69ad99e/src/analysis/modifications/optimizer.jl#L15-L23">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.change_optimizer_attribute-Tuple{Any, Any}" href="#COBREXA.change_optimizer_attribute-Tuple{Any, Any}"><code>COBREXA.change_optimizer_attribute</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">change_optimizer_attribute(attribute_key, value)</code></pre><p>Change a JuMP optimizer attribute. The attributes are optimizer-specific, refer to the JuMP documentation and the documentation of the specific optimizer for usable keys and values.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/d4509bae4f4df01fe7d9479069af6510c69ad99e/src/analysis/modifications/optimizer.jl#L28-L34">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.change_sense-Tuple{Any}" href="#COBREXA.change_sense-Tuple{Any}"><code>COBREXA.change_sense</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">change_sense(objective_sense)</code></pre><p>Change the objective sense of optimization. Possible arguments are <code>MOI.MAX_SENSE</code> and <code>MOI.MIN_SENSE</code>.</p><p>If you want to change the objective and sense at the same time, use <a href="#COBREXA.change_objective-Tuple{Union{String, Vector{String}}}"><code>change_objective</code></a> instead to do both at once.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/d4509bae4f4df01fe7d9479069af6510c69ad99e/src/analysis/modifications/optimizer.jl#L2-L10">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.constrain_objective_value-Tuple{Any}" href="#COBREXA.constrain_objective_value-Tuple{Any}"><code>COBREXA.constrain_objective_value</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">constrain_objective_value(tolerance)</code></pre><p>Limit the objective value to <code>tolerance</code>-times the current objective value, as with <a href="#COBREXA.objective_bounds-Tuple{Any}"><code>objective_bounds</code></a>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/d4509bae4f4df01fe7d9479069af6510c69ad99e/src/analysis/modifications/optimizer.jl#L40-L45">source</a></section></article><h3 id="Flux-sampling"><a class="docs-heading-anchor" href="#Flux-sampling">Flux sampling</a><a id="Flux-sampling-1"></a><a class="docs-heading-anchor-permalink" href="#Flux-sampling" title="Permalink"></a></h3><article class="docstring"><header><a class="docstring-binding" id="COBREXA._affine_hit_and_run_chain-NTuple{5, Any}" href="#COBREXA._affine_hit_and_run_chain-NTuple{5, Any}"><code>COBREXA._affine_hit_and_run_chain</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">_affine_hit_and_run_chain(warmup, lbs, ubs, iters, chain)</code></pre><p>Internal helper function for computing a single affine hit-and-run chain. The number of the chain is passed for possible future initialization of stable RNGs.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/d4509bae4f4df01fe7d9479069af6510c69ad99e/src/analysis/sampling/affine_hit_and_run.jl#L73-L79">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.affine_hit_and_run-Tuple{Matrix{Float64}, Vector{Float64}, Vector{Float64}}" href="#COBREXA.affine_hit_and_run-Tuple{Matrix{Float64}, Vector{Float64}, Vector{Float64}}"><code>COBREXA.affine_hit_and_run</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">function affine_hit_and_run( warmup_points::Matrix{Float64}, lbs::Vector{Float64}, ubs::Vector{Float64}; @@ -301,39 +350,39 @@ using Tulip model = load_model(StandardModel, model_path) warmup, lbs, ubs = warmup_from_variability(model, Tulip.Optimizer, 100) -samples = affine_hit_and_run(warmup, lbs, ubs, sample_iters = 1:3)</code></pre></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/1011dcb5948951fc380713022f1ecf5b37961981/src/analysis/sampling/affine_hit_and_run.jl#L1-L41">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.warmup_from_variability" href="#COBREXA.warmup_from_variability"><code>COBREXA.warmup_from_variability</code></a> — <span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia">function warmup_from_variability( +samples = affine_hit_and_run(warmup, lbs, ubs, sample_iters = 1:3)</code></pre></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/d4509bae4f4df01fe7d9479069af6510c69ad99e/src/analysis/sampling/affine_hit_and_run.jl#L1-L41">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.warmup_from_variability" href="#COBREXA.warmup_from_variability"><code>COBREXA.warmup_from_variability</code></a> — <span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia">function warmup_from_variability( model::MetabolicModel, optimizer, min_reactions::Vector{Int}=1:n_reactions(model), max_reactions::Vector{Int}=1:n_reactions(model); modifications = [], workers::Vector{Int} = [myid()], -)::Tuple{Matrix{Float64}, Vector{Float64}, Vector{Float64}}</code></pre><p>Generate FVA-like warmup points for samplers, by minimizing and maximizing the specified reactions. The result is returned as a matrix, each point occupies as single column in the result.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/1011dcb5948951fc380713022f1ecf5b37961981/src/analysis/sampling/warmup_variability.jl#L33-L46">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.warmup_from_variability-Tuple{MetabolicModel, Any, Int64}" href="#COBREXA.warmup_from_variability-Tuple{MetabolicModel, Any, Int64}"><code>COBREXA.warmup_from_variability</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">warmup_from_variability( +)::Tuple{Matrix{Float64}, Vector{Float64}, Vector{Float64}}</code></pre><p>Generate FVA-like warmup points for samplers, by minimizing and maximizing the specified reactions. The result is returned as a matrix, each point occupies as single column in the result.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/d4509bae4f4df01fe7d9479069af6510c69ad99e/src/analysis/sampling/warmup_variability.jl#L33-L46">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.warmup_from_variability-Tuple{MetabolicModel, Any, Int64}" href="#COBREXA.warmup_from_variability-Tuple{MetabolicModel, Any, Int64}"><code>COBREXA.warmup_from_variability</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">warmup_from_variability( model::MetabolicModel, optimizer, n_points::Int; kwargs... -)</code></pre><p>Generates FVA-like warmup points for samplers, by selecting random points by minimizing and maximizing reactions. Can not return more than 2 times the number of reactions in the model.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/1011dcb5948951fc380713022f1ecf5b37961981/src/analysis/sampling/warmup_variability.jl#L1-L12">source</a></section></article><h2 id="Miscellaneous-utilities"><a class="docs-heading-anchor" href="#Miscellaneous-utilities">Miscellaneous utilities</a><a id="Miscellaneous-utilities-1"></a><a class="docs-heading-anchor-permalink" href="#Miscellaneous-utilities" title="Permalink"></a></h2><article class="docstring"><header><a class="docstring-binding" id="COBREXA.ambiguously_identified_items-Tuple{Dict{String, Dict{String, Set{String}}}}" href="#COBREXA.ambiguously_identified_items-Tuple{Dict{String, Dict{String, Set{String}}}}"><code>COBREXA.ambiguously_identified_items</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">ambiguously_identified_items( +)</code></pre><p>Generates FVA-like warmup points for samplers, by selecting random points by minimizing and maximizing reactions. Can not return more than 2 times the number of reactions in the model.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/d4509bae4f4df01fe7d9479069af6510c69ad99e/src/analysis/sampling/warmup_variability.jl#L1-L12">source</a></section></article><h2 id="Miscellaneous-utilities"><a class="docs-heading-anchor" href="#Miscellaneous-utilities">Miscellaneous utilities</a><a id="Miscellaneous-utilities-1"></a><a class="docs-heading-anchor-permalink" href="#Miscellaneous-utilities" title="Permalink"></a></h2><article class="docstring"><header><a class="docstring-binding" id="COBREXA.ambiguously_identified_items-Tuple{Dict{String, Dict{String, Set{String}}}}" href="#COBREXA.ambiguously_identified_items-Tuple{Dict{String, Dict{String, Set{String}}}}"><code>COBREXA.ambiguously_identified_items</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">ambiguously_identified_items( index::Dict{String,Dict{String,[String]}}, -)::Vector{String}</code></pre><p>Find items (genes, metabolites, ...) from the annotation index that are identified non-uniquely by at least one of their annotations.</p><p>This often indicates that the items are duplicate or miscategorized.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/1011dcb5948951fc380713022f1ecf5b37961981/src/base/utils/Annotation.jl#L44-L53">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.annotation_index-Tuple{AbstractDict{String, V} where V}" href="#COBREXA.annotation_index-Tuple{AbstractDict{String, V} where V}"><code>COBREXA.annotation_index</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">annotation_index( +)::Vector{String}</code></pre><p>Find items (genes, metabolites, ...) from the annotation index that are identified non-uniquely by at least one of their annotations.</p><p>This often indicates that the items are duplicate or miscategorized.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/d4509bae4f4df01fe7d9479069af6510c69ad99e/src/base/utils/Annotation.jl#L44-L53">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.annotation_index-Tuple{AbstractDict{String, V} where V}" href="#COBREXA.annotation_index-Tuple{AbstractDict{String, V} where V}"><code>COBREXA.annotation_index</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">annotation_index( xs::AbstractDict{String}; annotations = _annotations, -)::Dict{String,Dict{String,[String]}}</code></pre><p>Extract annotations from a dictionary of items <code>xs</code> and build an index that maps annotation "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><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/1011dcb5948951fc380713022f1ecf5b37961981/src/base/utils/Annotation.jl#L6-L20">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.get_atoms-Tuple{Metabolite}" href="#COBREXA.get_atoms-Tuple{Metabolite}"><code>COBREXA.get_atoms</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">get_atoms(met::Metabolite)::MetaboliteFormula</code></pre><p>Simple wrapper for getting the atom dictionary count out of a <code>Metabolite</code>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/1011dcb5948951fc380713022f1ecf5b37961981/src/base/utils/Metabolite.jl#L1-L5">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.check_duplicate_reaction-Tuple{Reaction, OrderedCollections.OrderedDict{String, Reaction}}" href="#COBREXA.check_duplicate_reaction-Tuple{Reaction, OrderedCollections.OrderedDict{String, Reaction}}"><code>COBREXA.check_duplicate_reaction</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">check_duplicate_reaction(rxn::Reaction, rxns::Dict{String, Reaction}; only_metabolites=true)</code></pre><p>Check if <code>rxn</code> already exists in <code>rxns</code> but has another <code>id</code>. If <code>only_metabolites</code> is <code>true</code> then only the metabolite <code>id</code>s are checked. Otherwise, compares metabolite <code>id</code>s and the absolute value of their stoichiometric coefficients to those of <code>rxn</code>. If <code>rxn</code> has the same reaction equation as another reaction in <code>rxns</code>, the return the <code>id</code>. Otherwise return <code>nothing</code>.</p><p>See also: <a href="#COBREXA.is_mass_balanced-Tuple{Reaction, StandardModel}"><code>is_mass_balanced</code></a></p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/1011dcb5948951fc380713022f1ecf5b37961981/src/base/utils/Reaction.jl#L1-L11">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.is_boundary-Tuple{Reaction}" href="#COBREXA.is_boundary-Tuple{Reaction}"><code>COBREXA.is_boundary</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">is_boundary(rxn::Reaction)</code></pre><p>Return true if reaction is a boundary reaction, otherwise return false. Checks if boundary by inspecting number of metabolites in reaction equation. Boundary reactions have only one metabolite, e.g. an exchange reaction, or a sink/demand reaction. </p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/1011dcb5948951fc380713022f1ecf5b37961981/src/base/utils/Reaction.jl#L41-L47">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.is_mass_balanced-Tuple{Reaction, StandardModel}" href="#COBREXA.is_mass_balanced-Tuple{Reaction, StandardModel}"><code>COBREXA.is_mass_balanced</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">is_mass_balanced(rxn::Reaction, model::StandardModel)</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).</p><p>See also: <a href="#COBREXA.get_atoms-Tuple{Metabolite}"><code>get_atoms</code></a>, <a href="#COBREXA.check_duplicate_reaction-Tuple{Reaction, OrderedCollections.OrderedDict{String, Reaction}}"><code>check_duplicate_reaction</code></a></p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/1011dcb5948951fc380713022f1ecf5b37961981/src/base/utils/Reaction.jl#L52-L59">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.serialize_model-Tuple{Serialized, String}" href="#COBREXA.serialize_model-Tuple{Serialized, String}"><code>COBREXA.serialize_model</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">serialize_model(model::Serialized, filename::String)::Serialized</code></pre><p>Specialization of <a href="#COBREXA.serialize_model-Tuple{Serialized, String}"><code>serialize_model</code></a> that prevents nested serialization of already-serialized models.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/1011dcb5948951fc380713022f1ecf5b37961981/src/base/utils/Serialized.jl#L17-L22">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.serialize_model-Union{Tuple{MM}, Tuple{MM, String}} where MM<:MetabolicModel" href="#COBREXA.serialize_model-Union{Tuple{MM}, Tuple{MM, String}} where MM<:MetabolicModel"><code>COBREXA.serialize_model</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">serialize_model(model::MM, filename::String)::Serialized{MM} where {MM<:MetabolicModel}</code></pre><p>Serialize the <code>model</code> to file <code>filename</code>, returning a <a href="#COBREXA.Serialized"><code>Serialized</code></a> model that is able to load itself back automatically upon precaching by <a href="#COBREXA.precache!-Tuple{MetabolicModel}"><code>precache!</code></a>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/1011dcb5948951fc380713022f1ecf5b37961981/src/base/utils/Serialized.jl#L2-L8">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="Base.copy-Tuple{Gene}" href="#Base.copy-Tuple{Gene}"><code>Base.copy</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">Base.copy(g::Gene)</code></pre><p>Shallow copy of a <a href="#COBREXA.Gene"><code>Gene</code></a></p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/1011dcb5948951fc380713022f1ecf5b37961981/src/base/utils/StandardModel.jl#L42-L46">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="Base.copy-Tuple{Metabolite}" href="#Base.copy-Tuple{Metabolite}"><code>Base.copy</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">Base.copy(m::Metabolite)</code></pre><p>Shallow copy of a <a href="#COBREXA.Metabolite"><code>Metabolite</code></a></p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/1011dcb5948951fc380713022f1ecf5b37961981/src/base/utils/StandardModel.jl#L27-L31">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="Base.copy-Tuple{Reaction}" href="#Base.copy-Tuple{Reaction}"><code>Base.copy</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">Base.copy(r::Reaction)</code></pre><p>Shallow copy of a <a href="#COBREXA.Reaction"><code>Reaction</code></a></p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/1011dcb5948951fc380713022f1ecf5b37961981/src/base/utils/StandardModel.jl#L9-L13">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="Base.copy-Tuple{StandardModel}" href="#Base.copy-Tuple{StandardModel}"><code>Base.copy</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">Base.copy(m::StandardModel)</code></pre><p>Shallow copy of a <a href="#COBREXA.StandardModel"><code>StandardModel</code></a></p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/1011dcb5948951fc380713022f1ecf5b37961981/src/base/utils/StandardModel.jl#L2-L6">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.atom_exchange-Tuple{Dict{String, Float64}, StandardModel}" href="#COBREXA.atom_exchange-Tuple{Dict{String, Float64}, StandardModel}"><code>COBREXA.atom_exchange</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">atom_exchange(flux_dict::Dict{String, Float64}, model::StandardModel)</code></pre><p>Return a dictionary mapping the flux of atoms across the boundary of the model given <code>flux_dict</code> (the solution of a constraint based analysis) of reactions in <code>model</code>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/1011dcb5948951fc380713022f1ecf5b37961981/src/base/utils/StandardModel.jl#L49-L54">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.atom_exchange-Tuple{String, StandardModel}" href="#COBREXA.atom_exchange-Tuple{String, StandardModel}"><code>COBREXA.atom_exchange</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">atom_exchange(rxn_id::String, model::StandardModel)</code></pre><p>Return a dictionary mapping the flux of atoms through a reaction in <code>model</code>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/1011dcb5948951fc380713022f1ecf5b37961981/src/base/utils/StandardModel.jl#L70-L74">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.metabolite_fluxes-Tuple{Dict{String, Float64}, StandardModel}" href="#COBREXA.metabolite_fluxes-Tuple{Dict{String, Float64}, StandardModel}"><code>COBREXA.metabolite_fluxes</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">metabolite_fluxes(flux_dict::Dict{String, Float64}, model::StandardModel)</code></pre><p>Return two dictionaries of metabolite <code>id</code>s mapped to reactions that consume or produce them given the flux distribution supplied in <code>fluxdict</code>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/1011dcb5948951fc380713022f1ecf5b37961981/src/base/utils/StandardModel.jl#L86-L91">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.gamma_bounds-Tuple{Any}" href="#COBREXA.gamma_bounds-Tuple{Any}"><code>COBREXA.gamma_bounds</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">gamma_bounds(gamma)</code></pre><p>A bounds-generating function for <a href="#COBREXA.flux_variability_analysis-Tuple{MetabolicModel, Any}"><code>flux_variability_analysis</code></a> that limits the objective value to be at least <code>gamma*Zâ‚€</code>, as usual in COBRA packages. Use as the <code>bounds</code> argument:</p><pre><code class="language-none">flux_variability_analysis(model, some_optimizer; bounds = gamma_bounds(0.9))</code></pre></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/1011dcb5948951fc380713022f1ecf5b37961981/src/base/utils/bounds.jl#L1-L10">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.objective_bounds-Tuple{Any}" href="#COBREXA.objective_bounds-Tuple{Any}"><code>COBREXA.objective_bounds</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">(tolerance) = z -> begin</code></pre><p>A bounds-generating function for <a href="#COBREXA.flux_variability_analysis-Tuple{MetabolicModel, Any}"><code>flux_variability_analysis</code></a> that limits the objective value to a small multiple of Zâ‚€. Use as <code>bounds</code> argument, similarly to <a href="#COBREXA.gamma_bounds-Tuple{Any}"><code>gamma_bounds</code></a>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/1011dcb5948951fc380713022f1ecf5b37961981/src/base/utils/bounds.jl#L13-L19">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA._parse_formula-Tuple{String}" href="#COBREXA._parse_formula-Tuple{String}"><code>COBREXA._parse_formula</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">_parse_formula(f::String)::MetaboliteFormula</code></pre><p>Parse a formula in format <code>C2H6O</code> into a <a href="#COBREXA.MetaboliteFormula"><code>MetaboliteFormula</code></a>, which is basically a dictionary of atom counts in the molecule.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/1011dcb5948951fc380713022f1ecf5b37961981/src/base/utils/chemical_formulas.jl#L2-L7">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA._unparse_formula-Tuple{Dict{String, Int64}}" href="#COBREXA._unparse_formula-Tuple{Dict{String, Int64}}"><code>COBREXA._unparse_formula</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">_unparse_formula(f::MetaboliteFormula)::String</code></pre><p>Format <a href="#COBREXA.MetaboliteFormula"><code>MetaboliteFormula</code></a> to <code>String</code>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/1011dcb5948951fc380713022f1ecf5b37961981/src/base/utils/chemical_formulas.jl#L19-L23">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA._parse_grr-Tuple{SBML.GeneProductAssociation}" href="#COBREXA._parse_grr-Tuple{SBML.GeneProductAssociation}"><code>COBREXA._parse_grr</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">_parse_grr(gpa::SBML.GeneProductAssociation)::GeneAssociation</code></pre><p>Parse <code>SBML.GeneProductAssociation</code> structure to the simpler GeneAssociation. The input must be (implicitly) in a positive DNF.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/1011dcb5948951fc380713022f1ecf5b37961981/src/base/utils/gene_associations.jl#L2-L7">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA._parse_grr-Tuple{String}" href="#COBREXA._parse_grr-Tuple{String}"><code>COBREXA._parse_grr</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">_parse_grr(s::String)::GeneAssociation</code></pre><p>Parse a DNF gene association rule in format <code>(YIL010W and YLR043C) or (YIL010W and YGR209C)</code> to <code>GeneAssociation. Also accepts</code>OR<code>,</code>|<code>,</code>||<code>,</code>AND<code>,</code>&<code>, and</code>&&`.</p><p><strong>Example</strong></p><pre><code class="language-none">julia> _parse_grr("(YIL010W and YLR043C) or (YIL010W and YGR209C)") +)::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><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/d4509bae4f4df01fe7d9479069af6510c69ad99e/src/base/utils/Annotation.jl#L6-L20">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.get_atoms-Tuple{Metabolite}" href="#COBREXA.get_atoms-Tuple{Metabolite}"><code>COBREXA.get_atoms</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">get_atoms(met::Metabolite)::MetaboliteFormula</code></pre><p>Simple wrapper for getting the atom dictionary count out of a <code>Metabolite</code>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/d4509bae4f4df01fe7d9479069af6510c69ad99e/src/base/utils/Metabolite.jl#L1-L5">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.check_duplicate_reaction-Tuple{Reaction, OrderedCollections.OrderedDict{String, Reaction}}" href="#COBREXA.check_duplicate_reaction-Tuple{Reaction, OrderedCollections.OrderedDict{String, Reaction}}"><code>COBREXA.check_duplicate_reaction</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">check_duplicate_reaction(rxn::Reaction, rxns::Dict{String, Reaction}; only_metabolites=true)</code></pre><p>Check if <code>rxn</code> already exists in <code>rxns</code> but has another <code>id</code>. If <code>only_metabolites</code> is <code>true</code> then only the metabolite <code>id</code>s are checked. Otherwise, compares metabolite <code>id</code>s and the absolute value of their stoichiometric coefficients to those of <code>rxn</code>. If <code>rxn</code> has the same reaction equation as another reaction in <code>rxns</code>, the return the <code>id</code>. Otherwise return <code>nothing</code>.</p><p>See also: <a href="#COBREXA.is_mass_balanced-Tuple{Reaction, StandardModel}"><code>is_mass_balanced</code></a></p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/d4509bae4f4df01fe7d9479069af6510c69ad99e/src/base/utils/Reaction.jl#L1-L11">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.is_boundary-Tuple{Reaction}" href="#COBREXA.is_boundary-Tuple{Reaction}"><code>COBREXA.is_boundary</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">is_boundary(rxn::Reaction)</code></pre><p>Return true if reaction is a boundary reaction, otherwise return false. Checks if boundary by inspecting number of metabolites in reaction equation. Boundary reactions have only one metabolite, e.g. an exchange reaction, or a sink/demand reaction. </p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/d4509bae4f4df01fe7d9479069af6510c69ad99e/src/base/utils/Reaction.jl#L41-L47">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.is_mass_balanced-Tuple{Reaction, StandardModel}" href="#COBREXA.is_mass_balanced-Tuple{Reaction, StandardModel}"><code>COBREXA.is_mass_balanced</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">is_mass_balanced(rxn::Reaction, model::StandardModel)</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).</p><p>See also: <a href="#COBREXA.get_atoms-Tuple{Metabolite}"><code>get_atoms</code></a>, <a href="#COBREXA.check_duplicate_reaction-Tuple{Reaction, OrderedCollections.OrderedDict{String, Reaction}}"><code>check_duplicate_reaction</code></a></p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/d4509bae4f4df01fe7d9479069af6510c69ad99e/src/base/utils/Reaction.jl#L52-L59">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.serialize_model-Tuple{Serialized, String}" href="#COBREXA.serialize_model-Tuple{Serialized, String}"><code>COBREXA.serialize_model</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">serialize_model(model::Serialized, filename::String)::Serialized</code></pre><p>Specialization of <a href="#COBREXA.serialize_model-Tuple{Serialized, String}"><code>serialize_model</code></a> that prevents nested serialization of already-serialized models.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/d4509bae4f4df01fe7d9479069af6510c69ad99e/src/base/utils/Serialized.jl#L17-L22">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.serialize_model-Union{Tuple{MM}, Tuple{MM, String}} where MM<:MetabolicModel" href="#COBREXA.serialize_model-Union{Tuple{MM}, Tuple{MM, String}} where MM<:MetabolicModel"><code>COBREXA.serialize_model</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">serialize_model(model::MM, filename::String)::Serialized{MM} where {MM<:MetabolicModel}</code></pre><p>Serialize the <code>model</code> to file <code>filename</code>, returning a <a href="#COBREXA.Serialized"><code>Serialized</code></a> model that is able to load itself back automatically upon precaching by <a href="#COBREXA.precache!-Tuple{MetabolicModel}"><code>precache!</code></a>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/d4509bae4f4df01fe7d9479069af6510c69ad99e/src/base/utils/Serialized.jl#L2-L8">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="Base.copy-Tuple{Gene}" href="#Base.copy-Tuple{Gene}"><code>Base.copy</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">Base.copy(g::Gene)</code></pre><p>Shallow copy of a <a href="#COBREXA.Gene"><code>Gene</code></a></p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/d4509bae4f4df01fe7d9479069af6510c69ad99e/src/base/utils/StandardModel.jl#L42-L46">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="Base.copy-Tuple{Metabolite}" href="#Base.copy-Tuple{Metabolite}"><code>Base.copy</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">Base.copy(m::Metabolite)</code></pre><p>Shallow copy of a <a href="#COBREXA.Metabolite"><code>Metabolite</code></a></p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/d4509bae4f4df01fe7d9479069af6510c69ad99e/src/base/utils/StandardModel.jl#L27-L31">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="Base.copy-Tuple{Reaction}" href="#Base.copy-Tuple{Reaction}"><code>Base.copy</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">Base.copy(r::Reaction)</code></pre><p>Shallow copy of a <a href="#COBREXA.Reaction"><code>Reaction</code></a></p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/d4509bae4f4df01fe7d9479069af6510c69ad99e/src/base/utils/StandardModel.jl#L9-L13">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="Base.copy-Tuple{StandardModel}" href="#Base.copy-Tuple{StandardModel}"><code>Base.copy</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">Base.copy(m::StandardModel)</code></pre><p>Shallow copy of a <a href="#COBREXA.StandardModel"><code>StandardModel</code></a></p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/d4509bae4f4df01fe7d9479069af6510c69ad99e/src/base/utils/StandardModel.jl#L2-L6">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.atom_exchange-Tuple{Dict{String, Float64}, StandardModel}" href="#COBREXA.atom_exchange-Tuple{Dict{String, Float64}, StandardModel}"><code>COBREXA.atom_exchange</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">atom_exchange(flux_dict::Dict{String, Float64}, model::StandardModel)</code></pre><p>Return a dictionary mapping the flux of atoms across the boundary of the model given <code>flux_dict</code> (the solution of a constraint based analysis) of reactions in <code>model</code>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/d4509bae4f4df01fe7d9479069af6510c69ad99e/src/base/utils/StandardModel.jl#L49-L54">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.atom_exchange-Tuple{String, StandardModel}" href="#COBREXA.atom_exchange-Tuple{String, StandardModel}"><code>COBREXA.atom_exchange</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">atom_exchange(rxn_id::String, model::StandardModel)</code></pre><p>Return a dictionary mapping the flux of atoms through a reaction in <code>model</code>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/d4509bae4f4df01fe7d9479069af6510c69ad99e/src/base/utils/StandardModel.jl#L70-L74">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.metabolite_fluxes-Tuple{Dict{String, Float64}, StandardModel}" href="#COBREXA.metabolite_fluxes-Tuple{Dict{String, Float64}, StandardModel}"><code>COBREXA.metabolite_fluxes</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">metabolite_fluxes(flux_dict::Dict{String, Float64}, model::StandardModel)</code></pre><p>Return two dictionaries of metabolite <code>id</code>s mapped to reactions that consume or produce them given the flux distribution supplied in <code>fluxdict</code>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/d4509bae4f4df01fe7d9479069af6510c69ad99e/src/base/utils/StandardModel.jl#L86-L91">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.gamma_bounds-Tuple{Any}" href="#COBREXA.gamma_bounds-Tuple{Any}"><code>COBREXA.gamma_bounds</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">gamma_bounds(gamma)</code></pre><p>A bounds-generating function for <a href="#COBREXA.flux_variability_analysis-Tuple{MetabolicModel, Any}"><code>flux_variability_analysis</code></a> that limits the objective value to be at least <code>gamma*Zâ‚€</code>, as usual in COBRA packages. Use as the <code>bounds</code> argument:</p><pre><code class="language-none">flux_variability_analysis(model, some_optimizer; bounds = gamma_bounds(0.9))</code></pre></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/d4509bae4f4df01fe7d9479069af6510c69ad99e/src/base/utils/bounds.jl#L1-L10">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.objective_bounds-Tuple{Any}" href="#COBREXA.objective_bounds-Tuple{Any}"><code>COBREXA.objective_bounds</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">(tolerance) = z -> begin</code></pre><p>A bounds-generating function for <a href="#COBREXA.flux_variability_analysis-Tuple{MetabolicModel, Any}"><code>flux_variability_analysis</code></a> that limits the objective value to a small multiple of Zâ‚€. Use as <code>bounds</code> argument, similarly to <a href="#COBREXA.gamma_bounds-Tuple{Any}"><code>gamma_bounds</code></a>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/d4509bae4f4df01fe7d9479069af6510c69ad99e/src/base/utils/bounds.jl#L13-L19">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA._parse_formula-Tuple{String}" href="#COBREXA._parse_formula-Tuple{String}"><code>COBREXA._parse_formula</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">_parse_formula(f::String)::MetaboliteFormula</code></pre><p>Parse a formula in format <code>C2H6O</code> into a <a href="#COBREXA.MetaboliteFormula"><code>MetaboliteFormula</code></a>, which is basically a dictionary of atom counts in the molecule.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/d4509bae4f4df01fe7d9479069af6510c69ad99e/src/base/utils/chemical_formulas.jl#L2-L7">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA._unparse_formula-Tuple{Dict{String, Int64}}" href="#COBREXA._unparse_formula-Tuple{Dict{String, Int64}}"><code>COBREXA._unparse_formula</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">_unparse_formula(f::MetaboliteFormula)::String</code></pre><p>Format <a href="#COBREXA.MetaboliteFormula"><code>MetaboliteFormula</code></a> to <code>String</code>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/d4509bae4f4df01fe7d9479069af6510c69ad99e/src/base/utils/chemical_formulas.jl#L19-L23">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA._parse_grr-Tuple{SBML.GeneProductAssociation}" href="#COBREXA._parse_grr-Tuple{SBML.GeneProductAssociation}"><code>COBREXA._parse_grr</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">_parse_grr(gpa::SBML.GeneProductAssociation)::GeneAssociation</code></pre><p>Parse <code>SBML.GeneProductAssociation</code> structure to the simpler GeneAssociation. The input must be (implicitly) in a positive DNF.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/d4509bae4f4df01fe7d9479069af6510c69ad99e/src/base/utils/gene_associations.jl#L2-L7">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA._parse_grr-Tuple{String}" href="#COBREXA._parse_grr-Tuple{String}"><code>COBREXA._parse_grr</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">_parse_grr(s::String)::GeneAssociation</code></pre><p>Parse a DNF gene association rule in format <code>(YIL010W and YLR043C) or (YIL010W and YGR209C)</code> to <code>GeneAssociation. Also accepts</code>OR<code>,</code>|<code>,</code>||<code>,</code>AND<code>,</code>&<code>, and</code>&&`.</p><p><strong>Example</strong></p><pre><code class="language-none">julia> _parse_grr("(YIL010W and YLR043C) or (YIL010W and YGR209C)") 2-element Array{Array{String,1},1}: ["YIL010W", "YLR043C"] - ["YIL010W", "YGR209C"]</code></pre></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/1011dcb5948951fc380713022f1ecf5b37961981/src/base/utils/gene_associations.jl#L37-L51">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA._unparse_grr-Tuple{Type{SBML.GeneProductAssociation}, Vector{Vector{String}}}" href="#COBREXA._unparse_grr-Tuple{Type{SBML.GeneProductAssociation}, Vector{Vector{String}}}"><code>COBREXA._unparse_grr</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">_unparse_grr( + ["YIL010W", "YGR209C"]</code></pre></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/d4509bae4f4df01fe7d9479069af6510c69ad99e/src/base/utils/gene_associations.jl#L37-L51">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA._unparse_grr-Tuple{Type{SBML.GeneProductAssociation}, Vector{Vector{String}}}" href="#COBREXA._unparse_grr-Tuple{Type{SBML.GeneProductAssociation}, Vector{Vector{String}}}"><code>COBREXA._unparse_grr</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">_unparse_grr( ::Type{SBML.GeneProductAssociation}, x::GeneAssociation, -)::SBML.GeneAssociation</code></pre><p>Convert a GeneAssociation to the corresponding <code>SBML.jl</code> structure.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/1011dcb5948951fc380713022f1ecf5b37961981/src/base/utils/gene_associations.jl#L22-L29">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA._unparse_grr-Tuple{Type{String}, Vector{Vector{String}}}" href="#COBREXA._unparse_grr-Tuple{Type{String}, Vector{Vector{String}}}"><code>COBREXA._unparse_grr</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">unparse_grr(grr::Vector{Vector{Gene}}</code></pre><p>Converts a nested string gene reaction array back into a gene reaction rule string.</p><p><strong>Example</strong></p><pre><code class="language-none">julia> _unparse_grr(String, [["YIL010W", "YLR043C"], ["YIL010W", "YGR209C"]]) -"(YIL010W and YLR043C) or (YIL010W and YGR209C)"</code></pre></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/1011dcb5948951fc380713022f1ecf5b37961981/src/base/utils/gene_associations.jl#L63-L74">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA._guesskey-Tuple{Any, Any}" href="#COBREXA._guesskey-Tuple{Any, Any}"><code>COBREXA._guesskey</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">_guesskey(ks, possibilities)</code></pre><p>Unfortunately, many model types that contain dictionares do not have standardized field names, so we need to try a few possibilities and guess the best one. The keys used to look for valid field names should be ideally specified as constants in <code>src/base/constants.jl</code>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/1011dcb5948951fc380713022f1ecf5b37961981/src/base/utils/guesskey.jl#L2-L9">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.find_biomass_reaction_ids-Tuple{MetabolicModel}" href="#COBREXA.find_biomass_reaction_ids-Tuple{MetabolicModel}"><code>COBREXA.find_biomass_reaction_ids</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">find_biomass_reaction_ids(m::MetabolicModel; kwargs...)</code></pre><p>Shortcut for finding biomass reaction names in a model; arguments are forwarded to <a href="#COBREXA.looks_like_biomass_reaction-Tuple{String}"><code>looks_like_biomass_reaction</code></a>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/1011dcb5948951fc380713022f1ecf5b37961981/src/base/utils/looks_like.jl#L86-L91">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.find_biomass_reactions-Tuple{MetabolicModel}" href="#COBREXA.find_biomass_reactions-Tuple{MetabolicModel}"><code>COBREXA.find_biomass_reactions</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">find_biomass_reactions(m::MetabolicModel; kwargs...)</code></pre><p>Shortcut for finding biomass reaction indexes in a model; arguments are forwarded to <a href="#COBREXA.looks_like_biomass_reaction-Tuple{String}"><code>looks_like_biomass_reaction</code></a>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/1011dcb5948951fc380713022f1ecf5b37961981/src/base/utils/looks_like.jl#L77-L82">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.find_exchange_reaction_ids-Tuple{MetabolicModel}" href="#COBREXA.find_exchange_reaction_ids-Tuple{MetabolicModel}"><code>COBREXA.find_exchange_reaction_ids</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">find_exchange_reaction_ids(m::MetabolicModel; kwargs...)</code></pre><p>Shortcut for finding exchange reaction names in a model; arguments are forwarded to <a href="#COBREXA.looks_like_exchange_reaction-Tuple{String}"><code>looks_like_exchange_reaction</code></a>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/1011dcb5948951fc380713022f1ecf5b37961981/src/base/utils/looks_like.jl#L43-L48">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.find_exchange_reactions-Tuple{MetabolicModel}" href="#COBREXA.find_exchange_reactions-Tuple{MetabolicModel}"><code>COBREXA.find_exchange_reactions</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">find_exchange_reactions(m::MetabolicModel; kwargs...)</code></pre><p>Shortcut for finding exchange reaction indexes in a model; arguments are forwarded to <a href="#COBREXA.looks_like_exchange_reaction-Tuple{String}"><code>looks_like_exchange_reaction</code></a>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/1011dcb5948951fc380713022f1ecf5b37961981/src/base/utils/looks_like.jl#L34-L39">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.looks_like_biomass_reaction-Tuple{String}" href="#COBREXA.looks_like_biomass_reaction-Tuple{String}"><code>COBREXA.looks_like_biomass_reaction</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">looks_like_biomass_reaction(rxn_id::String; +)::SBML.GeneAssociation</code></pre><p>Convert a GeneAssociation to the corresponding <code>SBML.jl</code> structure.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/d4509bae4f4df01fe7d9479069af6510c69ad99e/src/base/utils/gene_associations.jl#L22-L29">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA._unparse_grr-Tuple{Type{String}, Vector{Vector{String}}}" href="#COBREXA._unparse_grr-Tuple{Type{String}, Vector{Vector{String}}}"><code>COBREXA._unparse_grr</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">unparse_grr(grr::Vector{Vector{Gene}}</code></pre><p>Converts a nested string gene reaction array back into a gene reaction rule string.</p><p><strong>Example</strong></p><pre><code class="language-none">julia> _unparse_grr(String, [["YIL010W", "YLR043C"], ["YIL010W", "YGR209C"]]) +"(YIL010W and YLR043C) or (YIL010W and YGR209C)"</code></pre></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/d4509bae4f4df01fe7d9479069af6510c69ad99e/src/base/utils/gene_associations.jl#L63-L74">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA._guesskey-Tuple{Any, Any}" href="#COBREXA._guesskey-Tuple{Any, Any}"><code>COBREXA._guesskey</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">_guesskey(ks, possibilities)</code></pre><p>Unfortunately, many model types that contain dictionares do not have standardized field names, so we need to try a few possibilities and guess the best one. The keys used to look for valid field names should be ideally specified as constants in <code>src/base/constants.jl</code>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/d4509bae4f4df01fe7d9479069af6510c69ad99e/src/base/utils/guesskey.jl#L2-L9">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.find_biomass_reaction_ids-Tuple{MetabolicModel}" href="#COBREXA.find_biomass_reaction_ids-Tuple{MetabolicModel}"><code>COBREXA.find_biomass_reaction_ids</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">find_biomass_reaction_ids(m::MetabolicModel; kwargs...)</code></pre><p>Shortcut for finding biomass reaction names in a model; arguments are forwarded to <a href="#COBREXA.looks_like_biomass_reaction-Tuple{String}"><code>looks_like_biomass_reaction</code></a>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/d4509bae4f4df01fe7d9479069af6510c69ad99e/src/base/utils/looks_like.jl#L86-L91">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.find_biomass_reactions-Tuple{MetabolicModel}" href="#COBREXA.find_biomass_reactions-Tuple{MetabolicModel}"><code>COBREXA.find_biomass_reactions</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">find_biomass_reactions(m::MetabolicModel; kwargs...)</code></pre><p>Shortcut for finding biomass reaction indexes in a model; arguments are forwarded to <a href="#COBREXA.looks_like_biomass_reaction-Tuple{String}"><code>looks_like_biomass_reaction</code></a>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/d4509bae4f4df01fe7d9479069af6510c69ad99e/src/base/utils/looks_like.jl#L77-L82">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.find_exchange_reaction_ids-Tuple{MetabolicModel}" href="#COBREXA.find_exchange_reaction_ids-Tuple{MetabolicModel}"><code>COBREXA.find_exchange_reaction_ids</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">find_exchange_reaction_ids(m::MetabolicModel; kwargs...)</code></pre><p>Shortcut for finding exchange reaction names in a model; arguments are forwarded to <a href="#COBREXA.looks_like_exchange_reaction-Tuple{String}"><code>looks_like_exchange_reaction</code></a>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/d4509bae4f4df01fe7d9479069af6510c69ad99e/src/base/utils/looks_like.jl#L43-L48">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.find_exchange_reactions-Tuple{MetabolicModel}" href="#COBREXA.find_exchange_reactions-Tuple{MetabolicModel}"><code>COBREXA.find_exchange_reactions</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">find_exchange_reactions(m::MetabolicModel; kwargs...)</code></pre><p>Shortcut for finding exchange reaction indexes in a model; arguments are forwarded to <a href="#COBREXA.looks_like_exchange_reaction-Tuple{String}"><code>looks_like_exchange_reaction</code></a>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/d4509bae4f4df01fe7d9479069af6510c69ad99e/src/base/utils/looks_like.jl#L34-L39">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.looks_like_biomass_reaction-Tuple{String}" href="#COBREXA.looks_like_biomass_reaction-Tuple{String}"><code>COBREXA.looks_like_biomass_reaction</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">looks_like_biomass_reaction(rxn_id::String; exclude_exchanges = false, exchange_prefixes = _constants.exchange_prefixes, biomass_strings = _constants.biomass_strings, )::Bool</code></pre><p>A predicate that matches reaction identifiers that look like biomass reactions. Biomass reactions are identified by looking for occurences of <code>biomass_strings</code> in the reaction id. If <code>exclude_exchanges</code> is set, the strings that look like exchanges (from <a href="#COBREXA.looks_like_exchange_reaction-Tuple{String}"><code>looks_like_exchange_reaction</code></a>) will not match.</p><p><strong>Example</strong></p><pre><code class="language-none">filter(looks_like_biomass_reaction, reactions(model)) # returns strings -findall(looks_like_biomass_reaction, reactions(model)) # returns indices</code></pre></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/1011dcb5948951fc380713022f1ecf5b37961981/src/base/utils/looks_like.jl#L52-L69">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.looks_like_exchange_metabolite-Tuple{String}" href="#COBREXA.looks_like_exchange_metabolite-Tuple{String}"><code>COBREXA.looks_like_exchange_metabolite</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">looks_like_exchange_metabolite(rxn_id::String; +findall(looks_like_biomass_reaction, reactions(model)) # returns indices</code></pre></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/d4509bae4f4df01fe7d9479069af6510c69ad99e/src/base/utils/looks_like.jl#L52-L69">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.looks_like_exchange_metabolite-Tuple{String}" href="#COBREXA.looks_like_exchange_metabolite-Tuple{String}"><code>COBREXA.looks_like_exchange_metabolite</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">looks_like_exchange_metabolite(rxn_id::String; exchange_suffixes = _constants.exchange_suffixes, )::Bool</code></pre><p>A predicate that matches metabolite identifiers that look like involved in exchange reactions. Exchange metabolites are identified by <code>exchange_suffixes</code> at the end of the metabolite id.</p><p><strong>Example</strong></p><pre><code class="language-none">filter(looks_like_exchange_metabolite, metabolites(model)) # returns strings -findall(looks_like_exchange_metabolite, metabolites(model)) # returns indices</code></pre></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/1011dcb5948951fc380713022f1ecf5b37961981/src/base/utils/looks_like.jl#L96-L110">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.looks_like_exchange_reaction-Tuple{String}" href="#COBREXA.looks_like_exchange_reaction-Tuple{String}"><code>COBREXA.looks_like_exchange_reaction</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">looks_like_exchange_reaction(rxn_id::String; +findall(looks_like_exchange_metabolite, metabolites(model)) # returns indices</code></pre></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/d4509bae4f4df01fe7d9479069af6510c69ad99e/src/base/utils/looks_like.jl#L96-L110">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.looks_like_exchange_reaction-Tuple{String}" href="#COBREXA.looks_like_exchange_reaction-Tuple{String}"><code>COBREXA.looks_like_exchange_reaction</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">looks_like_exchange_reaction(rxn_id::String; exclude_biomass = false, biomass_strings = _constants.biomass_strings, exchange_prefixes = _constants.exchange_prefixes, @@ -342,5 +391,5 @@ filter(looks_like_exchange_reaction, reactions(model)) # returns Strings # to use the optional arguments you need to expand the function's arguments using an anonymous function findall(x -> looks_like_exchange_reaction(x; exclude_biomass=true), reactions(model)) # returns indices -filter(x -> looks_like_exchange_reaction(x; exclude_biomass=true), reactions(model)) # returns Strings</code></pre></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/1011dcb5948951fc380713022f1ecf5b37961981/src/base/utils/looks_like.jl#L1-L25">source</a></section></article><h3 id="Logging-and-debugging-helpers"><a class="docs-heading-anchor" href="#Logging-and-debugging-helpers">Logging and debugging helpers</a><a id="Logging-and-debugging-helpers-1"></a><a class="docs-heading-anchor-permalink" href="#Logging-and-debugging-helpers" title="Permalink"></a></h3><article class="docstring"><header><a class="docstring-binding" id="COBREXA.log_io" href="#COBREXA.log_io"><code>COBREXA.log_io</code></a> — <span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia">log_io(enable::Bool=true)</code></pre><p>Enable (default) or disable (by passing <code>false</code>) output of messages and warnings from model input/output.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/1011dcb5948951fc380713022f1ecf5b37961981/src/base/logging/log.jl#L40-L44">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.log_models" href="#COBREXA.log_models"><code>COBREXA.log_models</code></a> — <span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia">log_models(enable::Bool=true)</code></pre><p>Enable (default) or disable (by passing <code>false</code>) output of model-related messages.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/1011dcb5948951fc380713022f1ecf5b37961981/src/base/logging/log.jl#L40-L44">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.log_perf" href="#COBREXA.log_perf"><code>COBREXA.log_perf</code></a> — <span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia">log_perf(enable::Bool=true)</code></pre><p>Enable (default) or disable (by passing <code>false</code>) output of performance-related tracing information.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/1011dcb5948951fc380713022f1ecf5b37961981/src/base/logging/log.jl#L40-L44">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.@_make_logging_tag-Tuple{Symbol, String}" href="#COBREXA.@_make_logging_tag-Tuple{Symbol, String}"><code>COBREXA.@_make_logging_tag</code></a> — <span class="docstring-category">Macro</span></header><section><div><pre><code class="language-julia">macro _make_logging_group(sym::Symbol, doc::String)</code></pre><p>This creates a group of functions that allow masking out topic-related logging actions. A call that goes as follows:</p><pre><code class="language-none">@_make_logging_tag XYZ</code></pre><p>creates the following tools:</p><ul><li>global variable <code>_XYZ_log_enabled</code> defaulted to false</li><li>function <code>log_XYZ</code> that can be called to turn the logging on/off</li><li>a masking macro <code>@_XYZ_log</code> that can be prepended to commands that should only happen if the logging of tag XYZ is enabled.</li></ul><p>The masking macro is then used as follows:</p><pre><code class="language-none">@_XYZ_log @info "This is the extra verbose information you wanted!" a b c</code></pre><p>The user can direct logging with these:</p><pre><code class="language-none">log_XYZ() -log_XYZ(false)</code></pre><p><code>doc</code> should be a name of the stuff that is being printed if the corresponding log_XYZ() is enabled – it is used to create a friendly documentation for the logging switch. In this case it could say <code>"X, Y and Z-related messages"</code>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/1011dcb5948951fc380713022f1ecf5b37961981/src/base/logging/log.jl#L2-L29">source</a></section></article></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../notebooks/">« Examples and notebooks</a><a class="docs-footer-nextpage" href="../howToContribute/">How to contribute »</a><div class="flexbox-break"></div><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> on <span class="colophon-date" title="Tuesday 8 June 2021 15:38">Tuesday 8 June 2021</span>. Using Julia version 1.6.0.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html> +filter(x -> looks_like_exchange_reaction(x; exclude_biomass=true), reactions(model)) # returns Strings</code></pre></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/d4509bae4f4df01fe7d9479069af6510c69ad99e/src/base/utils/looks_like.jl#L1-L25">source</a></section></article><h3 id="Logging-and-debugging-helpers"><a class="docs-heading-anchor" href="#Logging-and-debugging-helpers">Logging and debugging helpers</a><a id="Logging-and-debugging-helpers-1"></a><a class="docs-heading-anchor-permalink" href="#Logging-and-debugging-helpers" title="Permalink"></a></h3><article class="docstring"><header><a class="docstring-binding" id="COBREXA.log_io" href="#COBREXA.log_io"><code>COBREXA.log_io</code></a> — <span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia">log_io(enable::Bool=true)</code></pre><p>Enable (default) or disable (by passing <code>false</code>) output of messages and warnings from model input/output.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/d4509bae4f4df01fe7d9479069af6510c69ad99e/src/base/logging/log.jl#L40-L44">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.log_models" href="#COBREXA.log_models"><code>COBREXA.log_models</code></a> — <span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia">log_models(enable::Bool=true)</code></pre><p>Enable (default) or disable (by passing <code>false</code>) output of model-related messages.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/d4509bae4f4df01fe7d9479069af6510c69ad99e/src/base/logging/log.jl#L40-L44">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.log_perf" href="#COBREXA.log_perf"><code>COBREXA.log_perf</code></a> — <span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia">log_perf(enable::Bool=true)</code></pre><p>Enable (default) or disable (by passing <code>false</code>) output of performance-related tracing information.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/d4509bae4f4df01fe7d9479069af6510c69ad99e/src/base/logging/log.jl#L40-L44">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="COBREXA.@_make_logging_tag-Tuple{Symbol, String}" href="#COBREXA.@_make_logging_tag-Tuple{Symbol, String}"><code>COBREXA.@_make_logging_tag</code></a> — <span class="docstring-category">Macro</span></header><section><div><pre><code class="language-julia">macro _make_logging_group(sym::Symbol, doc::String)</code></pre><p>This creates a group of functions that allow masking out topic-related logging actions. A call that goes as follows:</p><pre><code class="language-none">@_make_logging_tag XYZ</code></pre><p>creates the following tools:</p><ul><li>global variable <code>_XYZ_log_enabled</code> defaulted to false</li><li>function <code>log_XYZ</code> that can be called to turn the logging on/off</li><li>a masking macro <code>@_XYZ_log</code> that can be prepended to commands that should only happen if the logging of tag XYZ is enabled.</li></ul><p>The masking macro is then used as follows:</p><pre><code class="language-none">@_XYZ_log @info "This is the extra verbose information you wanted!" a b c</code></pre><p>The user can direct logging with these:</p><pre><code class="language-none">log_XYZ() +log_XYZ(false)</code></pre><p><code>doc</code> should be a name of the stuff that is being printed if the corresponding log_XYZ() is enabled – it is used to create a friendly documentation for the logging switch. In this case it could say <code>"X, Y and Z-related messages"</code>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/d4509bae4f4df01fe7d9479069af6510c69ad99e/src/base/logging/log.jl#L2-L29">source</a></section></article></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../notebooks/">« Examples and notebooks</a><a class="docs-footer-nextpage" href="../howToContribute/">How to contribute »</a><div class="flexbox-break"></div><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> on <span class="colophon-date" title="Tuesday 8 June 2021 16:00">Tuesday 8 June 2021</span>. Using Julia version 1.6.0.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html> diff --git a/dev/howToContribute/index.html b/dev/howToContribute/index.html index e1f9b837cb2850f976b6785ebd535b7632040800..09c4f2f0330ac2e2426267f7c585dd402e6f7907 100644 --- a/dev/howToContribute/index.html +++ b/dev/howToContribute/index.html @@ -5,4 +5,4 @@ $ julia</code></pre><p>With Julia, you can install the development version of the package from the directory as follows:</p><pre><code class="language-julia">(v1.6) pkg> add .</code></pre><p>(press <code>]</code> to get into the packaging environment)</p><p>This adds the <code>COBREXA.jl</code> package and all its dependencies. You can verify that the installation worked by typing:</p><pre><code class="language-julia">(v1.6) pkg> status</code></pre><p>If you are planning to develop the package, it is often easier to install the package in development mode, with <code>dev</code> command:</p><pre><code class="language-julia">(v1.6) pkg> dev .</code></pre><p>That causes the package to always load with whatever code changes that you added to the source directory.</p><h4 id="Finally:-load-COBREXA.jl"><a class="docs-heading-anchor" href="#Finally:-load-COBREXA.jl">Finally: load COBREXA.jl</a><a id="Finally:-load-COBREXA.jl-1"></a><a class="docs-heading-anchor-permalink" href="#Finally:-load-COBREXA.jl" title="Permalink"></a></h4><p>With both of above options, you should get COBREXA.jl installed, which means that the following command should, without errors, load the package and make COBREXA.jl functions available for testing:</p><pre><code class="language-julia">julia> using COBREXA</code></pre><p>You may now freely modify the code and test the result.</p><p>Remember that if you want to work in the environment of the package, you need to <em>activate</em> it. That causes, among other, that the additional dependencies specified with packaging <code>add</code> command will be written automaticaly to <code>Project.toml</code> file of your local COBREXA.jl clone, not to your global environment. Activation is simple: when in the directory of the package, just type the command into the packaging shell:</p><pre><code class="language-julia">(v1.6) pkg> activate</code></pre><h3 id="Step-2:-Publish-your-changes"><a class="docs-heading-anchor" href="#Step-2:-Publish-your-changes">Step 2: Publish your changes</a><a id="Step-2:-Publish-your-changes-1"></a><a class="docs-heading-anchor-permalink" href="#Step-2:-Publish-your-changes" title="Permalink"></a></h3><p>You are expected to make a fork of the main COBREXA.jl repository, and open a pull request from that one to the <code>master</code> branch of the main repository. For creating the fork, just hit the "Fork" button on GitHub.</p><p>After that, change the directory to your repository and adjust the remotes:</p><pre><code class="language-bash">$ cd ~/.julia/dev/COBREXA # or any other directory, as needed $ git remote rename origin upstream # renames the origin (the main COBREXA.jl repo) to upstream $ git remote add origin git@github.com:yourUsername/COBREXA.jl.git # adds the link to your clone as new origin -$ git fetch origin # fetches the refs from your repo</code></pre><p>In the above code, change <code>yourUsername</code> is your GitHub username.</p><p>When the renaming is done, start a new branch at <code>upstream/master</code>. In the code snippet, substitute <code>yn</code> for your initials (Your Name here) and give the new feature a better name than <code>somefeature</code>:</p><pre><code class="language-bash">$ git checkout -b yn-somefeature origin/master</code></pre><p>Commit any changes and features that you like to the new branch. When the commits look complete to you, push the branch to your repository fork:</p><pre><code class="language-bash">$ git push -u origin yn-somefeature</code></pre><p>This makes your changes visible in your repository. After that, you can navigate to <a href="https://github.com/LCSB-BioCore/COBREXA.jl/pulls">GitHub's pull request page</a>, where you should immediately see a big green button that helps you to create a pull request for this branch. Read the section below for precise details and guidelines on submitting the pull requests.</p><h2 id="How-to-submit-a-pull-request-(PR)-with-your-modification/enhancement?"><a class="docs-heading-anchor" href="#How-to-submit-a-pull-request-(PR)-with-your-modification/enhancement?">How to submit a pull request (PR) with your modification/enhancement?</a><a id="How-to-submit-a-pull-request-(PR)-with-your-modification/enhancement?-1"></a><a class="docs-heading-anchor-permalink" href="#How-to-submit-a-pull-request-(PR)-with-your-modification/enhancement?" title="Permalink"></a></h2><ol><li><strong>Make a fork of the repository</strong>, commit the modifications in a <strong>separate branch</strong> and push the branch to your fork.</li><li>Make a pull request where you describe the motivation and expected outcome for the users. Specifically, consider any possible incompatibilities, and the necessity to increment the version number after your changes are applied. Label your pull request with a <a href="https://gitmoji.dev/">semantic emoji</a> in the title to indicate what it addresses.</li><li>After submitting the pull request, verify that all status checks (tests, documentation) are passing. Make sure any new contribution is properly documented and tested (you may want to check with coverage tools, using <code>test --coverage</code> from the Julia packaging shell)</li></ol><p>After you submitted a pull request, a label might be assigned that allows us to track and manage issues and pull requests.</p><p><strong>Tip</strong>: if you commit many small, partial changes, you may help us save energy by prefixing your commit names with <code>[skip ci]</code>, which deactivates the CI trigger on that commit. With each skipped CI, you may save as much as 15Wh of energy. Testing just the "final" commit of the pull-request branch is sufficient.</p><h2 id="For-developers:-What-is-the-expected-branch-management/workflow?"><a class="docs-heading-anchor" href="#For-developers:-What-is-the-expected-branch-management/workflow?">For developers: What is the expected branch management/workflow?</a><a id="For-developers:-What-is-the-expected-branch-management/workflow?-1"></a><a class="docs-heading-anchor-permalink" href="#For-developers:-What-is-the-expected-branch-management/workflow?" title="Permalink"></a></h2><p>The workflow is based on <a href="https://docs.gitlab.com/ee/topics/gitlab_flow.html">GitLab flow</a>, i.e., a <code>master</code> branch with <code>feature</code> branches being merged into the <code>master</code> branch. Depending on your access rights, you may open the <code>feature</code> branch in this repository, on in your fork.</p><p>The guidelines can be summarized as such:</p><ul><li>when making a contribution, create one new branch and open one new PR for each new independent feature or bugfix</li><li>do not push to another branch unless it is your own</li><li>try to get a review before merging unless the change is trivial and non-impacting</li><li>consider prefixing your branch names with your initials, so that one can easily see who owns which branch (e.g. <code>ad-somefeature</code> would be committed by Arthur Dent)</li></ul></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../functions/">« Function reference</a><div class="flexbox-break"></div><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> on <span class="colophon-date" title="Tuesday 8 June 2021 15:38">Tuesday 8 June 2021</span>. Using Julia version 1.6.0.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html> +$ git fetch origin # fetches the refs from your repo</code></pre><p>In the above code, change <code>yourUsername</code> is your GitHub username.</p><p>When the renaming is done, start a new branch at <code>upstream/master</code>. In the code snippet, substitute <code>yn</code> for your initials (Your Name here) and give the new feature a better name than <code>somefeature</code>:</p><pre><code class="language-bash">$ git checkout -b yn-somefeature origin/master</code></pre><p>Commit any changes and features that you like to the new branch. When the commits look complete to you, push the branch to your repository fork:</p><pre><code class="language-bash">$ git push -u origin yn-somefeature</code></pre><p>This makes your changes visible in your repository. After that, you can navigate to <a href="https://github.com/LCSB-BioCore/COBREXA.jl/pulls">GitHub's pull request page</a>, where you should immediately see a big green button that helps you to create a pull request for this branch. Read the section below for precise details and guidelines on submitting the pull requests.</p><h2 id="How-to-submit-a-pull-request-(PR)-with-your-modification/enhancement?"><a class="docs-heading-anchor" href="#How-to-submit-a-pull-request-(PR)-with-your-modification/enhancement?">How to submit a pull request (PR) with your modification/enhancement?</a><a id="How-to-submit-a-pull-request-(PR)-with-your-modification/enhancement?-1"></a><a class="docs-heading-anchor-permalink" href="#How-to-submit-a-pull-request-(PR)-with-your-modification/enhancement?" title="Permalink"></a></h2><ol><li><strong>Make a fork of the repository</strong>, commit the modifications in a <strong>separate branch</strong> and push the branch to your fork.</li><li>Make a pull request where you describe the motivation and expected outcome for the users. Specifically, consider any possible incompatibilities, and the necessity to increment the version number after your changes are applied. Label your pull request with a <a href="https://gitmoji.dev/">semantic emoji</a> in the title to indicate what it addresses.</li><li>After submitting the pull request, verify that all status checks (tests, documentation) are passing. Make sure any new contribution is properly documented and tested (you may want to check with coverage tools, using <code>test --coverage</code> from the Julia packaging shell)</li></ol><p>After you submitted a pull request, a label might be assigned that allows us to track and manage issues and pull requests.</p><p><strong>Tip</strong>: if you commit many small, partial changes, you may help us save energy by prefixing your commit names with <code>[skip ci]</code>, which deactivates the CI trigger on that commit. With each skipped CI, you may save as much as 15Wh of energy. Testing just the "final" commit of the pull-request branch is sufficient.</p><h2 id="For-developers:-What-is-the-expected-branch-management/workflow?"><a class="docs-heading-anchor" href="#For-developers:-What-is-the-expected-branch-management/workflow?">For developers: What is the expected branch management/workflow?</a><a id="For-developers:-What-is-the-expected-branch-management/workflow?-1"></a><a class="docs-heading-anchor-permalink" href="#For-developers:-What-is-the-expected-branch-management/workflow?" title="Permalink"></a></h2><p>The workflow is based on <a href="https://docs.gitlab.com/ee/topics/gitlab_flow.html">GitLab flow</a>, i.e., a <code>master</code> branch with <code>feature</code> branches being merged into the <code>master</code> branch. Depending on your access rights, you may open the <code>feature</code> branch in this repository, on in your fork.</p><p>The guidelines can be summarized as such:</p><ul><li>when making a contribution, create one new branch and open one new PR for each new independent feature or bugfix</li><li>do not push to another branch unless it is your own</li><li>try to get a review before merging unless the change is trivial and non-impacting</li><li>consider prefixing your branch names with your initials, so that one can easily see who owns which branch (e.g. <code>ad-somefeature</code> would be committed by Arthur Dent)</li></ul></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../functions/">« Function reference</a><div class="flexbox-break"></div><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> on <span class="colophon-date" title="Tuesday 8 June 2021 16:00">Tuesday 8 June 2021</span>. Using Julia version 1.6.0.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html> diff --git a/dev/index.html b/dev/index.html index a9e0835c2ae6b473e32a93e9f490ad8990fbb73f..445938988f60dffcccf9b3be4d7b8199f71fdd40 100644 --- a/dev/index.html +++ b/dev/index.html @@ -28,4 +28,4 @@ fluxes = flux_balance_analysis_dict(model, Tulip.Optimizer)</code></pre><p>The v "R_O2t" => 21.7995 "R_G6PDH2r" => 4.95999 "R_TALA" => 1.49698 - â‹® => â‹®</code></pre><h2 id="Tutorials"><a class="docs-heading-anchor" href="#Tutorials">Tutorials</a><a id="Tutorials-1"></a><a class="docs-heading-anchor-permalink" href="#Tutorials" title="Permalink"></a></h2><p>Detailed tutorial content is <a href="tutorials/">available here</a>.</p><ul><li><a href="tutorials/1_loading/#Loading-and-converting-model-data">Loading and converting model data</a></li><li><a href="tutorials/2_analysis/#Basic-analysis-of-constraint-based-models">Basic analysis of constraint-based models</a></li><li><a href="tutorials/3_hpc/#Distributed-processing-and-HPC-environments">Distributed processing and HPC environments</a></li><li><a href="tutorials/4_modifying/#Modifying-and-saving-the-models">Modifying and saving the models</a></li></ul><h2 id="Example-notebooks-and-workflows"><a class="docs-heading-anchor" href="#Example-notebooks-and-workflows">Example notebooks and workflows</a><a id="Example-notebooks-and-workflows-1"></a><a class="docs-heading-anchor-permalink" href="#Example-notebooks-and-workflows" title="Permalink"></a></h2><p>Detailed notebook content is <a href="notebooks/">available here</a>.</p><ul><li><a href="notebooks/1_loading_converting_saving/#Loading,-converting,-and-saving-models">Loading, converting, and saving models</a></li><li><a href="notebooks/2_finding_balance/#Finding-balance-and-variability-of-constraint-based-models">Finding balance and variability of constraint-based models</a></li><li><a href="notebooks/3_basic_stdmodel_usage/#Basic-usage-of-StandardModel">Basic usage of <code>StandardModel</code></a></li><li><a href="notebooks/4_basic_core_coupled_usage/#Basic-usage-of-CoreModel-and-CoreModelCoupled">Basic usage of <code>CoreModel</code> and <code>CoreModelCoupled</code></a></li><li><a href="notebooks/5_basic_stdmodel_construction/#Model-construction-and-modification">Model construction and modification</a></li></ul><h2 id="Functions-reference"><a class="docs-heading-anchor" href="#Functions-reference">Functions reference</a><a id="Functions-reference-1"></a><a class="docs-heading-anchor-permalink" href="#Functions-reference" title="Permalink"></a></h2><ul><li><a href="functions/#Functions">Functions</a></li><ul><li><a href="functions/#Base-Types">Base Types</a></li><li><a href="functions/#Model-types-and-contents">Model types and contents</a></li><li><a href="functions/#Base-functions">Base functions</a></li><li><a href="functions/#File-I/O-and-serialization">File I/O and serialization</a></li><li><a href="functions/#Model-reconstruction">Model reconstruction</a></li><li><a href="functions/#Analysis-functions">Analysis functions</a></li><li><a href="functions/#Miscellaneous-utilities">Miscellaneous utilities</a></li></ul></ul><h2 id="Contribution-guide"><a class="docs-heading-anchor" href="#Contribution-guide">Contribution guide</a><a id="Contribution-guide-1"></a><a class="docs-heading-anchor-permalink" href="#Contribution-guide" title="Permalink"></a></h2><p>If you wish to contribute code, patches or improvements to <code>COBREXA.jl</code>, please read the basic <a href="howToContribute/">contribution guidelines and hints.</a>.</p><h2 id="Acknowledgements"><a class="docs-heading-anchor" href="#Acknowledgements">Acknowledgements</a><a id="Acknowledgements-1"></a><a class="docs-heading-anchor-permalink" href="#Acknowledgements" title="Permalink"></a></h2><p><code>COBREXA.jl</code> is developed at the Luxembourg Centre for Systems Biomedicine of the University of Luxembourg (<a href="https://www.uni.lu/lcsb">uni.lu/lcsb</a>), cooperating with the Institute for Quantitative and Theoretical Biology at the Heinrich Heine University in Düsseldorf (<a href="https://www.qtb.hhu.de/">qtb.hhu.de</a>).</p><p>The development was supported by European Union's Horizon 2020 Programme under PerMedCoE project (<a href="https://www.permedcoe.eu/">permedcoe.eu</a>) agreement no. 951773.</p><img src="https://lcsb-biocore.github.io/COBREXA.jl/stable/assets/cobrexa.svg" alt="COBREXA logo" height="64px" style="height:64px; width:auto">   <img src="https://lcsb-biocore.github.io/COBREXA.jl/stable/assets/unilu.svg" alt="Uni.lu logo" height="64px" style="height:64px; width:auto">   <img src="https://lcsb-biocore.github.io/COBREXA.jl/stable/assets/lcsb.svg" alt="LCSB logo" height="64px" style="height:64px; width:auto">   <img src="https://lcsb-biocore.github.io/COBREXA.jl/stable/assets/hhu.svg" alt="HHU logo" height="64px" style="height:64px; width:auto">   <img src="https://lcsb-biocore.github.io/COBREXA.jl/stable/assets/qtb.svg" alt="QTB logo" height="64px" style="height:64px; width:auto">   <img src="https://lcsb-biocore.github.io/COBREXA.jl/stable/assets/permedcoe.svg" alt="PerMedCoE logo" height="64px" style="height:64px; width:auto"></article><nav class="docs-footer"><a class="docs-footer-nextpage" href="tutorials/">Tutorials »</a><div class="flexbox-break"></div><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> on <span class="colophon-date" title="Tuesday 8 June 2021 15:38">Tuesday 8 June 2021</span>. Using Julia version 1.6.0.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html> + â‹® => â‹®</code></pre><h2 id="Tutorials"><a class="docs-heading-anchor" href="#Tutorials">Tutorials</a><a id="Tutorials-1"></a><a class="docs-heading-anchor-permalink" href="#Tutorials" title="Permalink"></a></h2><p>Detailed tutorial content is <a href="tutorials/">available here</a>.</p><ul><li><a href="tutorials/1_loading/#Loading-and-converting-model-data">Loading and converting model data</a></li><li><a href="tutorials/2_analysis/#Basic-analysis-of-constraint-based-models">Basic analysis of constraint-based models</a></li><li><a href="tutorials/3_hpc/#Distributed-processing-and-HPC-environments">Distributed processing and HPC environments</a></li><li><a href="tutorials/4_modifying/#Modifying-and-saving-the-models">Modifying and saving the models</a></li></ul><h2 id="Example-notebooks-and-workflows"><a class="docs-heading-anchor" href="#Example-notebooks-and-workflows">Example notebooks and workflows</a><a id="Example-notebooks-and-workflows-1"></a><a class="docs-heading-anchor-permalink" href="#Example-notebooks-and-workflows" title="Permalink"></a></h2><p>Detailed notebook content is <a href="notebooks/">available here</a>.</p><ul><li><a href="notebooks/1_loading_converting_saving/#Loading,-converting,-and-saving-models">Loading, converting, and saving models</a></li><li><a href="notebooks/2_finding_balance/#Finding-balance-and-variability-of-constraint-based-models">Finding balance and variability of constraint-based models</a></li><li><a href="notebooks/3_basic_stdmodel_usage/#Basic-usage-of-StandardModel">Basic usage of <code>StandardModel</code></a></li><li><a href="notebooks/4_basic_core_coupled_usage/#Basic-usage-of-CoreModel-and-CoreModelCoupled">Basic usage of <code>CoreModel</code> and <code>CoreModelCoupled</code></a></li><li><a href="notebooks/5_basic_stdmodel_construction/#Model-construction-and-modification">Model construction and modification</a></li></ul><h2 id="Functions-reference"><a class="docs-heading-anchor" href="#Functions-reference">Functions reference</a><a id="Functions-reference-1"></a><a class="docs-heading-anchor-permalink" href="#Functions-reference" title="Permalink"></a></h2><ul><li><a href="functions/#Functions">Functions</a></li><ul><li><a href="functions/#Base-Types">Base Types</a></li><li><a href="functions/#Model-types-and-contents">Model types and contents</a></li><li><a href="functions/#Base-functions">Base functions</a></li><li><a href="functions/#File-I/O-and-serialization">File I/O and serialization</a></li><li><a href="functions/#Model-reconstruction">Model reconstruction</a></li><li><a href="functions/#Analysis-functions">Analysis functions</a></li><li><a href="functions/#Miscellaneous-utilities">Miscellaneous utilities</a></li></ul></ul><h2 id="Contribution-guide"><a class="docs-heading-anchor" href="#Contribution-guide">Contribution guide</a><a id="Contribution-guide-1"></a><a class="docs-heading-anchor-permalink" href="#Contribution-guide" title="Permalink"></a></h2><p>If you wish to contribute code, patches or improvements to <code>COBREXA.jl</code>, please read the basic <a href="howToContribute/">contribution guidelines and hints.</a>.</p><h2 id="Acknowledgements"><a class="docs-heading-anchor" href="#Acknowledgements">Acknowledgements</a><a id="Acknowledgements-1"></a><a class="docs-heading-anchor-permalink" href="#Acknowledgements" title="Permalink"></a></h2><p><code>COBREXA.jl</code> is developed at the Luxembourg Centre for Systems Biomedicine of the University of Luxembourg (<a href="https://www.uni.lu/lcsb">uni.lu/lcsb</a>), cooperating with the Institute for Quantitative and Theoretical Biology at the Heinrich Heine University in Düsseldorf (<a href="https://www.qtb.hhu.de/">qtb.hhu.de</a>).</p><p>The development was supported by European Union's Horizon 2020 Programme under PerMedCoE project (<a href="https://www.permedcoe.eu/">permedcoe.eu</a>) agreement no. 951773.</p><img src="https://lcsb-biocore.github.io/COBREXA.jl/stable/assets/cobrexa.svg" alt="COBREXA logo" height="64px" style="height:64px; width:auto">   <img src="https://lcsb-biocore.github.io/COBREXA.jl/stable/assets/unilu.svg" alt="Uni.lu logo" height="64px" style="height:64px; width:auto">   <img src="https://lcsb-biocore.github.io/COBREXA.jl/stable/assets/lcsb.svg" alt="LCSB logo" height="64px" style="height:64px; width:auto">   <img src="https://lcsb-biocore.github.io/COBREXA.jl/stable/assets/hhu.svg" alt="HHU logo" height="64px" style="height:64px; width:auto">   <img src="https://lcsb-biocore.github.io/COBREXA.jl/stable/assets/qtb.svg" alt="QTB logo" height="64px" style="height:64px; width:auto">   <img src="https://lcsb-biocore.github.io/COBREXA.jl/stable/assets/permedcoe.svg" alt="PerMedCoE logo" height="64px" style="height:64px; width:auto"></article><nav class="docs-footer"><a class="docs-footer-nextpage" href="tutorials/">Tutorials »</a><div class="flexbox-break"></div><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> on <span class="colophon-date" title="Tuesday 8 June 2021 16:00">Tuesday 8 June 2021</span>. Using Julia version 1.6.0.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html> diff --git a/dev/notebooks/1_loading_converting_saving.ipynb b/dev/notebooks/1_loading_converting_saving.ipynb index cab21afd027b386843c56d1505fe231ab7095fd2..75aee87323babf399519a059c2575a40b3b3e1a1 100644 Binary files a/dev/notebooks/1_loading_converting_saving.ipynb and b/dev/notebooks/1_loading_converting_saving.ipynb differ diff --git a/dev/notebooks/1_loading_converting_saving/index.html b/dev/notebooks/1_loading_converting_saving/index.html index efecab243270a2985e236b45c2f9ec10f0f0b57b..25ec25c5dbe9348d9ed31a54a844d805d07bce89 100644 --- a/dev/notebooks/1_loading_converting_saving/index.html +++ b/dev/notebooks/1_loading_converting_saving/index.html @@ -223,4 +223,4 @@ sm = convert(StandardModel, m) open(f -> serialize(f, sm), "myModel.stdmodel", "w")</code></pre><p>The models can then be loaded back using <code>deserialize</code>:</p><pre><code class="language-julia">sm2 = deserialize("myModel.stdmodel") issetequal(metabolites(sm), metabolites(sm2))</code></pre><pre class="documenter-example-output">true</pre><p>This form of loading operation is usually pretty quick:</p><pre><code class="language-julia">t = @elapsed deserialize("myModel.stdmodel") -@info "Deserialization took $t seconds"</code></pre><pre class="documenter-example-output">[ Info: Deserialization took 0.002489161 seconds</pre><p>Notably, large and complicated models with thousands of reactions and annotations can take seconds to decode properly. Serialization allows you to almost completely remove this overhead, and scales well to tens of millions of reactions.</p><hr/><p><em>This page was generated using <a href="https://github.com/fredrikekre/Literate.jl">Literate.jl</a>.</em></p></article><nav class="docs-footer"><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> on <span class="colophon-date" title="Tuesday 8 June 2021 15:38">Tuesday 8 June 2021</span>. Using Julia version 1.6.0.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html> +@info "Deserialization took $t seconds"</code></pre><pre class="documenter-example-output">[ Info: Deserialization took 0.002443067 seconds</pre><p>Notably, large and complicated models with thousands of reactions and annotations can take seconds to decode properly. Serialization allows you to almost completely remove this overhead, and scales well to tens of millions of reactions.</p><hr/><p><em>This page was generated using <a href="https://github.com/fredrikekre/Literate.jl">Literate.jl</a>.</em></p></article><nav class="docs-footer"><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> on <span class="colophon-date" title="Tuesday 8 June 2021 16:00">Tuesday 8 June 2021</span>. Using Julia version 1.6.0.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html> diff --git a/dev/notebooks/2_finding_balance/index.html b/dev/notebooks/2_finding_balance/index.html index 9418738c53fdf5e7515beca456328d007593631d..053158d38bc2ad50a1301e51c83694d89fbefec6 100644 --- a/dev/notebooks/2_finding_balance/index.html +++ b/dev/notebooks/2_finding_balance/index.html @@ -180,4 +180,4 @@ using OSQP</code></pre><pre class="documenter-example-output"> Resolving packa -25.642083259145206 0.0161569956400718 0.004729690379188246 - 3.8887743479784547</pre><hr/><p><em>This page was generated using <a href="https://github.com/fredrikekre/Literate.jl">Literate.jl</a>.</em></p></article><nav class="docs-footer"><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> on <span class="colophon-date" title="Tuesday 8 June 2021 15:38">Tuesday 8 June 2021</span>. Using Julia version 1.6.0.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html> + 3.8887743479784547</pre><hr/><p><em>This page was generated using <a href="https://github.com/fredrikekre/Literate.jl">Literate.jl</a>.</em></p></article><nav class="docs-footer"><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> on <span class="colophon-date" title="Tuesday 8 June 2021 16:00">Tuesday 8 June 2021</span>. Using Julia version 1.6.0.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html> diff --git a/dev/notebooks/3_basic_stdmodel_usage.ipynb b/dev/notebooks/3_basic_stdmodel_usage.ipynb index ffd382dc54828da69f117b624166f892bef8b86f..e09ad8120a1be9f343051655c5a76dfe50435f88 100644 Binary files a/dev/notebooks/3_basic_stdmodel_usage.ipynb and b/dev/notebooks/3_basic_stdmodel_usage.ipynb differ diff --git a/dev/notebooks/3_basic_stdmodel_usage/index.html b/dev/notebooks/3_basic_stdmodel_usage/index.html index 2ccf1d41cbcc4749208a6b53ed35817b10309243..f03f019170d0050f70d9fbb80d70f0c94678ee5b 100644 --- a/dev/notebooks/3_basic_stdmodel_usage/index.html +++ b/dev/notebooks/3_basic_stdmodel_usage/index.html @@ -84,57 +84,61 @@ consuming["atp_c"] # reactions consuming atp_c</code></pre><pre class= "b3736" => Gene("b3736", nothing, Dict("original_bigg_ids"=>["b3736"]), Dict(… "b3737" => Gene("b3737", nothing, Dict("original_bigg_ids"=>["b3737"]), Dict(… â‹® => â‹®</pre><p>The <code>Gene</code> type is a struct that can be used to store information about genes in a <code>StandardModel</code>. Each <code>Gene</code> is composed of the following fields:</p><pre><code class="language-julia">fieldnames(Gene)</code></pre><pre class="documenter-example-output">(:id, :name, :notes, :annotations)</pre><div class="admonition is-success"><header class="admonition-header">Tip: Use <tab> complete to explore the structure of types</header><div class="admonition-body"><p>Use <tab> to quickly explore the fields of a struct. For example, Gene.<tab> will list all the fields shown above.</p></div></div><p>The keys used in the ordered dictionaries in <code>model.genes</code> are the ids returned using the generic accessor <code>genes</code>. <code>Gene</code>s have pretty printing, as demonstrated below for a random gene drawn from the model:</p><pre><code class="language-julia">random_gene_id = genes(model)[rand(1:n_genes(model))] -model.genes[random_gene_id]</code></pre><pre class="documenter-example-output">Gene.id: b1478 +model.genes[random_gene_id]</code></pre><pre class="documenter-example-output">Gene.id: b4014 Gene.name: --- Gene.notes: - original_bigg_ids: ["b1478"] + original_bigg_ids: ["b4014"] Gene.annotations: sbo: ["SBO:0000243"] - uniprot: ["P39451"] - ecogene: ["EG12622"] - ncbigene: ["946036"] - ncbigi: ["90111280"] - refseq_locus_tag: ["b1478"] - refseq_name: ["adhP"] - asap: ["ABE-0004928"] - refseq_synonym: yddN, ..., JW1474 + uniprot: ["P08997"] + ecogene: ["EG10023"] + ncbigene: ["948512"] + ncbigi: ["16131840"] + refseq_locus_tag: ["b4014"] + refseq_name: ["aceB"] + asap: ["ABE-0013125"] + refseq_synonym: ECK4006, ..., JW3974 </pre><p>The same idea holds for both metabolites (stored as <code>Metabolite</code>s) and reactions (stored as <code>Reaction</code>s). This is demonstrated below.</p><pre><code class="language-julia">random_metabolite_id = metabolites(model)[rand(1:n_metabolites(model))] -model.metabolites[random_metabolite_id]</code></pre><pre class="documenter-example-output">Metabolite.id: akg_e +model.metabolites[random_metabolite_id]</code></pre><pre class="documenter-example-output">Metabolite.id: nad_c Metabolite.name: --- -Metabolite.formula: C5H4O5 -Metabolite.charge: -2 -Metabolite.compartment: e +Metabolite.formula: C21N7P2H26O14 +Metabolite.charge: -1 +Metabolite.compartment: c Metabolite.notes: - original_bigg_ids: ["akg_e"] + original_bigg_ids: ["nad_c"] Metabolite.annotations: - envipath: 32de3cf4-e3e6-4168-9... - sabiork: ["1922"] - kegg.compound: ["C00026"] + kegg.drug: ["D00002"] + sabiork: ["37"] + kegg.compound: ["C00003"] sbo: ["SBO:0000247"] - biocyc: ["META:2-KETOGLUTARATE"] - chebi: CHEBI:40661, ..., CHEBI:19748 - metanetx.chemical: ["MNXM20"] - inchi_key: KPGXRSRHYNQIFN-UHFFF... - hmdb: HMDB00208, ..., HMDB62781 - bigg.metabolite: ["akg"] - seed.compound: ["cpd00024"] - reactome.compound: 113594, ..., 389537 + biocyc: ["META:NAD"] + chebi: CHEBI:7422, ..., CHEBI:29867 + metanetx.chemical: ["MNXM8"] + inchi_key: BAWFJGJZGIEFAR-NNYOX... + hmdb: ["HMDB00902"] + bigg.metabolite: ["nad"] + seed.compound: ["cpd00003"] + reactome.compound: 352330, ..., 29360 </pre><pre><code class="language-julia">random_reaction_id = reactions(model)[rand(1:n_reactions(model))] -model.reactions[random_reaction_id]</code></pre><pre class="documenter-example-output">Reaction.id: O2t +model.reactions[random_reaction_id]</code></pre><pre class="documenter-example-output">Reaction.id: ATPM Reaction.name: --- -Reaction.metabolites: 1.0 o2_e ⟷ 1.0 o2_c -Reaction.lb: -1000.0 +Reaction.metabolites: 1.0 h2o_c + 1.0 atp_c ⟶ 1.0 adp_c + 1.0 pi_c + 1.0 h_c +Reaction.lb: 8.39 Reaction.ub: 1000.0 -Reaction.grr: (s0001) -Reaction.subsystem: Transport, Extracellular +Reaction.grr: () +Reaction.subsystem: Biomass and maintenance functions Reaction.notes: - original_bigg_ids: ["O2t"] + original_bigg_ids: ["ATPM"] Reaction.annotations: - metanetx.reaction: ["MNXR102090"] - sbo: ["SBO:0000185"] - seed.reaction: rxn09641, ..., rxn09734 - biocyc: ["META:TRANS-RXN0-474"] - bigg.reaction: ["O2t"] + bigg.reaction: ["ATPM"] + sabiork: ["75"] + metanetx.reaction: ["MNXR96131"] + rhea: 13066, ..., 13067 + sbo: ["SBO:0000176"] + seed.reaction: rxn11300, ..., rxn00062 + kegg.reaction: ["R00086"] + biocyc: ["META:ATPASE-RXN"] + ec-code: 3.6.1.5, ..., 3.6.3.49 Reaction.objective_coefficient: 0.0 </pre><p><code>StandardModel</code> can be used to build your own metabolic model or modify an existing one. One of the main use cases for <code>StandardModel</code> is that it can be used to merge multiple models or parts of multiple models together. Since the internals are uniform inside each <code>StandardModel</code>, attributes of other model types are squashed into the required format (using the generic accessors). This ensures that the internals of all <code>StandardModel</code>s are the same - allowing easy systematic evaluation.</p><div class="admonition is-warning"><header class="admonition-header">Warning: Combining models with different namespaces is tricky</header><div class="admonition-body"><p>Combining models that use different namespaces requires care. For example, in some models the water exchange reaction is called <code>EX_h2o_e</code>, while in others it is called <code>R_EX_h2o_s</code>. This needs to manually addressed (for now) to prevent duplicate, e.g. reactions, from being added.</p></div></div><h2 id="Checking-the-internals-of-StandardModels:-annotation_index"><a class="docs-heading-anchor" href="#Checking-the-internals-of-StandardModels:-annotation_index">Checking the internals of <code>StandardModel</code>s: <code>annotation_index</code></a><a id="Checking-the-internals-of-StandardModels:-annotation_index-1"></a><a class="docs-heading-anchor-permalink" href="#Checking-the-internals-of-StandardModels:-annotation_index" title="Permalink"></a></h2><p>Often when models are automatically reconstructed duplicate genes, reactions or metabolites end up in a model. <code>COBREXA</code> exports <code>annotation_index</code> to check for cases where the id of a struct may be different, but the annotations the same (possibly suggesting a duplication). <code>annotation_index</code> builds a dictionary mapping annotation features to the ids of whatever struct you are inspecting. This makes it easy to find structs that share certain annotation features.</p><pre><code class="language-julia">rxn_annotations = annotation_index(model.reactions)</code></pre><pre class="documenter-example-output">Dict{String, Dict{String, Set{String}}} with 10 entries: "ec-code" => Dict("3.6.3.37"=>Set(["ATPM"]), "3.6.3.42"=>Set(["ATPM… @@ -180,4 +184,4 @@ Reaction.notes: --- Reaction.annotations: --- Reaction.objective_coefficient: 0.0 </pre><pre><code class="language-julia">check_duplicate_reaction(pgm_duplicate, model.reactions; only_metabolites = false) # can also just check if only the metabolites are the same but different stoichiometry is used</code></pre><pre class="documenter-example-output">"PGM"</pre><h2 id="Checking-the-internals-of-StandardModels:-is_mass_balanced"><a class="docs-heading-anchor" href="#Checking-the-internals-of-StandardModels:-is_mass_balanced">Checking the internals of <code>StandardModel</code>s: <code>is_mass_balanced</code></a><a id="Checking-the-internals-of-StandardModels:-is_mass_balanced-1"></a><a class="docs-heading-anchor-permalink" href="#Checking-the-internals-of-StandardModels:-is_mass_balanced" title="Permalink"></a></h2><p>Finally, <code>is_mass_balanced</code> can be used to check if a reaction is mass balanced based on the formulas of the reaction equation.</p><pre><code class="language-julia">pgm_duplicate.metabolites = Dict{String,Float64}("3pg_c" => 1, "2pg_c" => -1, "h2o_c" => 1) # not mass balanced now -is_bal, extra_atoms = is_mass_balanced(pgm_duplicate, model) # extra_atoms shows which atoms are in excess/deficit</code></pre><pre class="documenter-example-output">(false, Dict("C" => 0.0, "P" => 0.0, "H" => 2.0, "O" => 1.0))</pre><hr/><p><em>This page was generated using <a href="https://github.com/fredrikekre/Literate.jl">Literate.jl</a>.</em></p></article><nav class="docs-footer"><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> on <span class="colophon-date" title="Tuesday 8 June 2021 15:38">Tuesday 8 June 2021</span>. Using Julia version 1.6.0.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html> +is_bal, extra_atoms = is_mass_balanced(pgm_duplicate, model) # extra_atoms shows which atoms are in excess/deficit</code></pre><pre class="documenter-example-output">(false, Dict("C" => 0.0, "P" => 0.0, "H" => 2.0, "O" => 1.0))</pre><hr/><p><em>This page was generated using <a href="https://github.com/fredrikekre/Literate.jl">Literate.jl</a>.</em></p></article><nav class="docs-footer"><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> on <span class="colophon-date" title="Tuesday 8 June 2021 16:00">Tuesday 8 June 2021</span>. Using Julia version 1.6.0.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html> diff --git a/dev/notebooks/4_basic_core_coupled_usage/index.html b/dev/notebooks/4_basic_core_coupled_usage/index.html index 6cd881a7d1b5a7a1b2997f6d350f63aecf974c15..613ca8c21a3a77434f3f6cd01609e612a05e6172 100644 --- a/dev/notebooks/4_basic_core_coupled_usage/index.html +++ b/dev/notebooks/4_basic_core_coupled_usage/index.html @@ -105,4 +105,4 @@ Number of reactions: 95 Number of metabolites: 72 </pre><pre><code class="language-julia">d = flux_balance_analysis_dict(model, Tulip.Optimizer) d["R_BIOMASS_Ecoli_core_w_GAM"]</code></pre><pre class="documenter-example-output">0.8739215022661532</pre><pre><code class="language-julia">dc = flux_balance_analysis_dict(cmodel, Tulip.Optimizer) -dc["R_BIOMASS_Ecoli_core_w_GAM"]</code></pre><pre class="documenter-example-output">0.6655856992982552</pre><hr/><p><em>This page was generated using <a href="https://github.com/fredrikekre/Literate.jl">Literate.jl</a>.</em></p></article><nav class="docs-footer"><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> on <span class="colophon-date" title="Tuesday 8 June 2021 15:38">Tuesday 8 June 2021</span>. Using Julia version 1.6.0.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html> +dc["R_BIOMASS_Ecoli_core_w_GAM"]</code></pre><pre class="documenter-example-output">0.6655856992982552</pre><hr/><p><em>This page was generated using <a href="https://github.com/fredrikekre/Literate.jl">Literate.jl</a>.</em></p></article><nav class="docs-footer"><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> on <span class="colophon-date" title="Tuesday 8 June 2021 16:00">Tuesday 8 June 2021</span>. Using Julia version 1.6.0.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html> diff --git a/dev/notebooks/5_basic_stdmodel_construction/index.html b/dev/notebooks/5_basic_stdmodel_construction/index.html index f3bc350bbec36f367ad77dbd2375d4d23ee9a9bc..08ee096aab640f6c3f43216e596a0cacb14da54e 100644 --- a/dev/notebooks/5_basic_stdmodel_construction/index.html +++ b/dev/notebooks/5_basic_stdmodel_construction/index.html @@ -58,4 +58,4 @@ model</code></pre><pre class="documenter-example-output">Metabolic model of type â‹… â‹… â‹… â‹… 1.0 â‹… -1.0 -1.0 Number of reactions: 8 Number of metabolites: 4 -</pre><hr/><p><em>This page was generated using <a href="https://github.com/fredrikekre/Literate.jl">Literate.jl</a>.</em></p></article><nav class="docs-footer"><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> on <span class="colophon-date" title="Tuesday 8 June 2021 15:38">Tuesday 8 June 2021</span>. Using Julia version 1.6.0.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html> +</pre><hr/><p><em>This page was generated using <a href="https://github.com/fredrikekre/Literate.jl">Literate.jl</a>.</em></p></article><nav class="docs-footer"><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> on <span class="colophon-date" title="Tuesday 8 June 2021 16:00">Tuesday 8 June 2021</span>. Using Julia version 1.6.0.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html> diff --git a/dev/notebooks/index.html b/dev/notebooks/index.html index f669f59f816529c10449bc17f48601f2e82033b7..75600dbab39b40b726c43b73cacf704f7fd8da92 100644 --- a/dev/notebooks/index.html +++ b/dev/notebooks/index.html @@ -1,2 +1,2 @@ <!DOCTYPE html> -<html lang="en"><head><meta charset="UTF-8"/><meta name="viewport" content="width=device-width, initial-scale=1.0"/><title>Examples and notebooks · COBREXA.jl</title><link href="https://fonts.googleapis.com/css?family=Lato|Roboto+Mono" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.0/css/fontawesome.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.0/css/solid.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.0/css/brands.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.11.1/katex.min.css" rel="stylesheet" type="text/css"/><script>documenterBaseURL=".."</script><script src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.6/require.min.js" data-main="../assets/documenter.js"></script><script src="../siteinfo.js"></script><script src="../../versions.js"></script><link class="docs-theme-link" rel="stylesheet" type="text/css" href="../assets/themes/documenter-dark.css" data-theme-name="documenter-dark" data-theme-primary-dark/><link class="docs-theme-link" rel="stylesheet" type="text/css" href="../assets/themes/documenter-light.css" data-theme-name="documenter-light" data-theme-primary/><script src="../assets/themeswap.js"></script><link href="../assets/favicon.ico" rel="icon" type="image/x-icon"/></head><body><div id="documenter"><nav class="docs-sidebar"><a class="docs-logo" href="../"><img class="docs-light-only" src="../assets/logo.svg" alt="COBREXA.jl logo"/><img class="docs-dark-only" src="../assets/logo-dark.svg" alt="COBREXA.jl logo"/></a><div class="docs-package-name"><span class="docs-autofit">COBREXA.jl</span></div><form class="docs-search" action="../search/"><input class="docs-search-query" id="documenter-search-query" name="q" type="text" placeholder="Search docs"/></form><ul class="docs-menu"><li><a class="tocitem" href="../">Home</a></li><li><a class="tocitem" href="../tutorials/">Tutorials</a></li><li class="is-active"><a class="tocitem" href>Examples and notebooks</a></li><li><a class="tocitem" href="../functions/">Function reference</a></li><li><a class="tocitem" href="../howToContribute/">How to contribute</a></li></ul><div class="docs-version-selector field has-addons"><div class="control"><span class="docs-label button is-static is-size-7">Version</span></div><div class="docs-selector control is-expanded"><div class="select is-fullwidth is-size-7"><select id="documenter-version-selector"></select></div></div></div></nav><div class="docs-main"><header class="docs-navbar"><nav class="breadcrumb"><ul class="is-hidden-mobile"><li class="is-active"><a href>Examples and notebooks</a></li></ul><ul class="is-hidden-tablet"><li class="is-active"><a href>Examples and notebooks</a></li></ul></nav><div class="docs-right"><a class="docs-edit-link" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/master/docs/src/notebooks.md" title="Edit on GitHub"><span class="docs-icon fab">ï‚›</span><span class="docs-label is-hidden-touch">Edit on GitHub</span></a><a class="docs-settings-button fas fa-cog" id="documenter-settings-button" href="#" title="Settings"></a><a class="docs-sidebar-button fa fa-bars is-hidden-desktop" id="documenter-sidebar-button" href="#"></a></div></header><article class="content" id="documenter-page"><h1 id="Notebooks-and-example-workflows"><a class="docs-heading-anchor" href="#Notebooks-and-example-workflows">Notebooks and example workflows</a><a id="Notebooks-and-example-workflows-1"></a><a class="docs-heading-anchor-permalink" href="#Notebooks-and-example-workflows" title="Permalink"></a></h1><ul><li><a href="1_loading_converting_saving/#Loading,-converting,-and-saving-models">Loading, converting, and saving models</a></li><ul><li><a href="1_loading_converting_saving/#Loading-models">Loading models</a></li><li><a href="1_loading_converting_saving/#Using-the-generic-interface-to-access-model-details">Using the generic interface to access model details</a></li><li><a href="1_loading_converting_saving/#Converting-between-model-types">Converting between model types</a></li><li><a href="1_loading_converting_saving/#Saving-and-exporting-models">Saving and exporting models</a></li></ul><li><a href="2_finding_balance/#Finding-balance-and-variability-of-constraint-based-models">Finding balance and variability of constraint-based models</a></li><ul><li><a href="2_finding_balance/#Optimization-solvers-in-COBREXA">Optimization solvers in <code>COBREXA</code></a></li><li><a href="2_finding_balance/#Flux-balance-analysis-(FBA)">Flux balance analysis (FBA)</a></li><li><a href="2_finding_balance/#Modifications">Modifications</a></li><li><a href="2_finding_balance/#Flux-variability-analysis-(FVA)">Flux variability analysis (FVA)</a></li><li><a href="2_finding_balance/#Parsimonious-flux-balance-analysis-(pFBA)">Parsimonious flux balance analysis (pFBA)</a></li></ul><li><a href="3_basic_stdmodel_usage/#Basic-usage-of-StandardModel">Basic usage of <code>StandardModel</code></a></li><ul><li><a href="3_basic_stdmodel_usage/#Loading-a-model">Loading a model</a></li><li><a href="3_basic_stdmodel_usage/#Basic-analysis">Basic analysis</a></li><li><a href="3_basic_stdmodel_usage/#Inspecting-the-flux-solution:-atom_exchange">Inspecting the flux solution: <code>atom_exchange</code></a></li><li><a href="3_basic_stdmodel_usage/#Inspecting-the-flux-solution:-metabolite_fluxes">Inspecting the flux solution: <code>metabolite_fluxes</code></a></li><li><a href="3_basic_stdmodel_usage/#Internals-of-StandardModel">Internals of <code>StandardModel</code></a></li><li><a href="3_basic_stdmodel_usage/#Genes,-Reactions,-and-Metabolites"><code>Gene</code>s, <code>Reaction</code>s, and <code>Metabolite</code>s</a></li><li><a href="3_basic_stdmodel_usage/#Checking-the-internals-of-StandardModels:-annotation_index">Checking the internals of <code>StandardModel</code>s: <code>annotation_index</code></a></li><li><a href="3_basic_stdmodel_usage/#Checking-the-internals-of-StandardModels:-check_duplicate_reaction">Checking the internals of <code>StandardModel</code>s: <code>check_duplicate_reaction</code></a></li><li><a href="3_basic_stdmodel_usage/#Checking-the-internals-of-StandardModels:-is_mass_balanced">Checking the internals of <code>StandardModel</code>s: <code>is_mass_balanced</code></a></li></ul><li><a href="4_basic_core_coupled_usage/#Basic-usage-of-CoreModel-and-CoreModelCoupled">Basic usage of <code>CoreModel</code> and <code>CoreModelCoupled</code></a></li><ul><li><a href="4_basic_core_coupled_usage/#Loading-a-CoreModel">Loading a <code>CoreModel</code></a></li><li><a href="4_basic_core_coupled_usage/#Basic-analysis-on-CoreModel">Basic analysis on <code>CoreModel</code></a></li><li><a href="4_basic_core_coupled_usage/#Structure-of-CoreModel">Structure of <code>CoreModel</code></a></li><li><a href="4_basic_core_coupled_usage/#CoreModelCoupled-adds-coupling-constraints-to-CoreModel"><code>CoreModelCoupled</code> adds coupling constraints to <code>CoreModel</code></a></li></ul><li><a href="5_basic_stdmodel_construction/#Model-construction-and-modification">Model construction and modification</a></li><ul><li><a href="5_basic_stdmodel_construction/#Model-construction">Model construction</a></li><li><a href="5_basic_stdmodel_construction/#Modifying-existing-models">Modifying existing models</a></li></ul></ul></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../tutorials/">« Tutorials</a><a class="docs-footer-nextpage" href="../functions/">Function reference »</a><div class="flexbox-break"></div><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> on <span class="colophon-date" title="Tuesday 8 June 2021 15:38">Tuesday 8 June 2021</span>. Using Julia version 1.6.0.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html> +<html lang="en"><head><meta charset="UTF-8"/><meta name="viewport" content="width=device-width, initial-scale=1.0"/><title>Examples and notebooks · COBREXA.jl</title><link href="https://fonts.googleapis.com/css?family=Lato|Roboto+Mono" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.0/css/fontawesome.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.0/css/solid.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.0/css/brands.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.11.1/katex.min.css" rel="stylesheet" type="text/css"/><script>documenterBaseURL=".."</script><script src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.6/require.min.js" data-main="../assets/documenter.js"></script><script src="../siteinfo.js"></script><script src="../../versions.js"></script><link class="docs-theme-link" rel="stylesheet" type="text/css" href="../assets/themes/documenter-dark.css" data-theme-name="documenter-dark" data-theme-primary-dark/><link class="docs-theme-link" rel="stylesheet" type="text/css" href="../assets/themes/documenter-light.css" data-theme-name="documenter-light" data-theme-primary/><script src="../assets/themeswap.js"></script><link href="../assets/favicon.ico" rel="icon" type="image/x-icon"/></head><body><div id="documenter"><nav class="docs-sidebar"><a class="docs-logo" href="../"><img class="docs-light-only" src="../assets/logo.svg" alt="COBREXA.jl logo"/><img class="docs-dark-only" src="../assets/logo-dark.svg" alt="COBREXA.jl logo"/></a><div class="docs-package-name"><span class="docs-autofit">COBREXA.jl</span></div><form class="docs-search" action="../search/"><input class="docs-search-query" id="documenter-search-query" name="q" type="text" placeholder="Search docs"/></form><ul class="docs-menu"><li><a class="tocitem" href="../">Home</a></li><li><a class="tocitem" href="../tutorials/">Tutorials</a></li><li class="is-active"><a class="tocitem" href>Examples and notebooks</a></li><li><a class="tocitem" href="../functions/">Function reference</a></li><li><a class="tocitem" href="../howToContribute/">How to contribute</a></li></ul><div class="docs-version-selector field has-addons"><div class="control"><span class="docs-label button is-static is-size-7">Version</span></div><div class="docs-selector control is-expanded"><div class="select is-fullwidth is-size-7"><select id="documenter-version-selector"></select></div></div></div></nav><div class="docs-main"><header class="docs-navbar"><nav class="breadcrumb"><ul class="is-hidden-mobile"><li class="is-active"><a href>Examples and notebooks</a></li></ul><ul class="is-hidden-tablet"><li class="is-active"><a href>Examples and notebooks</a></li></ul></nav><div class="docs-right"><a class="docs-edit-link" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/master/docs/src/notebooks.md" title="Edit on GitHub"><span class="docs-icon fab">ï‚›</span><span class="docs-label is-hidden-touch">Edit on GitHub</span></a><a class="docs-settings-button fas fa-cog" id="documenter-settings-button" href="#" title="Settings"></a><a class="docs-sidebar-button fa fa-bars is-hidden-desktop" id="documenter-sidebar-button" href="#"></a></div></header><article class="content" id="documenter-page"><h1 id="Notebooks-and-example-workflows"><a class="docs-heading-anchor" href="#Notebooks-and-example-workflows">Notebooks and example workflows</a><a id="Notebooks-and-example-workflows-1"></a><a class="docs-heading-anchor-permalink" href="#Notebooks-and-example-workflows" title="Permalink"></a></h1><ul><li><a href="1_loading_converting_saving/#Loading,-converting,-and-saving-models">Loading, converting, and saving models</a></li><ul><li><a href="1_loading_converting_saving/#Loading-models">Loading models</a></li><li><a href="1_loading_converting_saving/#Using-the-generic-interface-to-access-model-details">Using the generic interface to access model details</a></li><li><a href="1_loading_converting_saving/#Converting-between-model-types">Converting between model types</a></li><li><a href="1_loading_converting_saving/#Saving-and-exporting-models">Saving and exporting models</a></li></ul><li><a href="2_finding_balance/#Finding-balance-and-variability-of-constraint-based-models">Finding balance and variability of constraint-based models</a></li><ul><li><a href="2_finding_balance/#Optimization-solvers-in-COBREXA">Optimization solvers in <code>COBREXA</code></a></li><li><a href="2_finding_balance/#Flux-balance-analysis-(FBA)">Flux balance analysis (FBA)</a></li><li><a href="2_finding_balance/#Modifications">Modifications</a></li><li><a href="2_finding_balance/#Flux-variability-analysis-(FVA)">Flux variability analysis (FVA)</a></li><li><a href="2_finding_balance/#Parsimonious-flux-balance-analysis-(pFBA)">Parsimonious flux balance analysis (pFBA)</a></li></ul><li><a href="3_basic_stdmodel_usage/#Basic-usage-of-StandardModel">Basic usage of <code>StandardModel</code></a></li><ul><li><a href="3_basic_stdmodel_usage/#Loading-a-model">Loading a model</a></li><li><a href="3_basic_stdmodel_usage/#Basic-analysis">Basic analysis</a></li><li><a href="3_basic_stdmodel_usage/#Inspecting-the-flux-solution:-atom_exchange">Inspecting the flux solution: <code>atom_exchange</code></a></li><li><a href="3_basic_stdmodel_usage/#Inspecting-the-flux-solution:-metabolite_fluxes">Inspecting the flux solution: <code>metabolite_fluxes</code></a></li><li><a href="3_basic_stdmodel_usage/#Internals-of-StandardModel">Internals of <code>StandardModel</code></a></li><li><a href="3_basic_stdmodel_usage/#Genes,-Reactions,-and-Metabolites"><code>Gene</code>s, <code>Reaction</code>s, and <code>Metabolite</code>s</a></li><li><a href="3_basic_stdmodel_usage/#Checking-the-internals-of-StandardModels:-annotation_index">Checking the internals of <code>StandardModel</code>s: <code>annotation_index</code></a></li><li><a href="3_basic_stdmodel_usage/#Checking-the-internals-of-StandardModels:-check_duplicate_reaction">Checking the internals of <code>StandardModel</code>s: <code>check_duplicate_reaction</code></a></li><li><a href="3_basic_stdmodel_usage/#Checking-the-internals-of-StandardModels:-is_mass_balanced">Checking the internals of <code>StandardModel</code>s: <code>is_mass_balanced</code></a></li></ul><li><a href="4_basic_core_coupled_usage/#Basic-usage-of-CoreModel-and-CoreModelCoupled">Basic usage of <code>CoreModel</code> and <code>CoreModelCoupled</code></a></li><ul><li><a href="4_basic_core_coupled_usage/#Loading-a-CoreModel">Loading a <code>CoreModel</code></a></li><li><a href="4_basic_core_coupled_usage/#Basic-analysis-on-CoreModel">Basic analysis on <code>CoreModel</code></a></li><li><a href="4_basic_core_coupled_usage/#Structure-of-CoreModel">Structure of <code>CoreModel</code></a></li><li><a href="4_basic_core_coupled_usage/#CoreModelCoupled-adds-coupling-constraints-to-CoreModel"><code>CoreModelCoupled</code> adds coupling constraints to <code>CoreModel</code></a></li></ul><li><a href="5_basic_stdmodel_construction/#Model-construction-and-modification">Model construction and modification</a></li><ul><li><a href="5_basic_stdmodel_construction/#Model-construction">Model construction</a></li><li><a href="5_basic_stdmodel_construction/#Modifying-existing-models">Modifying existing models</a></li></ul></ul></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../tutorials/">« Tutorials</a><a class="docs-footer-nextpage" href="../functions/">Function reference »</a><div class="flexbox-break"></div><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> on <span class="colophon-date" title="Tuesday 8 June 2021 16:00">Tuesday 8 June 2021</span>. Using Julia version 1.6.0.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html> diff --git a/dev/search/index.html b/dev/search/index.html index c1923adb36c8bbdf120a75f2baab223e03b9e64c..99feb2a36dd74263c079f5e04b90ac3d0a972552 100644 --- a/dev/search/index.html +++ b/dev/search/index.html @@ -1,2 +1,2 @@ <!DOCTYPE html> -<html lang="en"><head><meta charset="UTF-8"/><meta name="viewport" content="width=device-width, initial-scale=1.0"/><title>Search · COBREXA.jl</title><link href="https://fonts.googleapis.com/css?family=Lato|Roboto+Mono" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.0/css/fontawesome.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.0/css/solid.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.0/css/brands.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.11.1/katex.min.css" rel="stylesheet" type="text/css"/><script>documenterBaseURL=".."</script><script src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.6/require.min.js" data-main="../assets/documenter.js"></script><script src="../siteinfo.js"></script><script src="../../versions.js"></script><link class="docs-theme-link" rel="stylesheet" type="text/css" href="../assets/themes/documenter-dark.css" data-theme-name="documenter-dark" data-theme-primary-dark/><link class="docs-theme-link" rel="stylesheet" type="text/css" href="../assets/themes/documenter-light.css" data-theme-name="documenter-light" data-theme-primary/><script src="../assets/themeswap.js"></script><link href="../assets/favicon.ico" rel="icon" type="image/x-icon"/></head><body><div id="documenter"><nav class="docs-sidebar"><a class="docs-logo" href="../"><img class="docs-light-only" src="../assets/logo.svg" alt="COBREXA.jl logo"/><img class="docs-dark-only" src="../assets/logo-dark.svg" alt="COBREXA.jl logo"/></a><div class="docs-package-name"><span class="docs-autofit">COBREXA.jl</span></div><form class="docs-search" action><input class="docs-search-query" id="documenter-search-query" name="q" type="text" placeholder="Search docs"/></form><ul class="docs-menu"><li><a class="tocitem" href="../">Home</a></li><li><a class="tocitem" href="../tutorials/">Tutorials</a></li><li><a class="tocitem" href="../notebooks/">Examples and notebooks</a></li><li><a class="tocitem" href="../functions/">Function reference</a></li><li><a class="tocitem" href="../howToContribute/">How to contribute</a></li></ul><div class="docs-version-selector field has-addons"><div class="control"><span class="docs-label button is-static is-size-7">Version</span></div><div class="docs-selector control is-expanded"><div class="select is-fullwidth is-size-7"><select id="documenter-version-selector"></select></div></div></div></nav><div class="docs-main"><header class="docs-navbar"><nav class="breadcrumb"><ul class="is-hidden-mobile"><li class="is-active"><a href>Search</a></li></ul><ul class="is-hidden-tablet"><li class="is-active"><a href>Search</a></li></ul></nav><div class="docs-right"><a class="docs-settings-button fas fa-cog" id="documenter-settings-button" href="#" title="Settings"></a><a class="docs-sidebar-button fa fa-bars is-hidden-desktop" id="documenter-sidebar-button" href="#"></a></div></header><article><p id="documenter-search-info">Loading search...</p><ul id="documenter-search-results"></ul></article><nav class="docs-footer"><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> on <span class="colophon-date" title="Tuesday 8 June 2021 15:38">Tuesday 8 June 2021</span>. Using Julia version 1.6.0.</p></section><footer class="modal-card-foot"></footer></div></div></div></body><script src="../search_index.js"></script><script src="../assets/search.js"></script></html> +<html lang="en"><head><meta charset="UTF-8"/><meta name="viewport" content="width=device-width, initial-scale=1.0"/><title>Search · COBREXA.jl</title><link href="https://fonts.googleapis.com/css?family=Lato|Roboto+Mono" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.0/css/fontawesome.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.0/css/solid.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.0/css/brands.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.11.1/katex.min.css" rel="stylesheet" type="text/css"/><script>documenterBaseURL=".."</script><script src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.6/require.min.js" data-main="../assets/documenter.js"></script><script src="../siteinfo.js"></script><script src="../../versions.js"></script><link class="docs-theme-link" rel="stylesheet" type="text/css" href="../assets/themes/documenter-dark.css" data-theme-name="documenter-dark" data-theme-primary-dark/><link class="docs-theme-link" rel="stylesheet" type="text/css" href="../assets/themes/documenter-light.css" data-theme-name="documenter-light" data-theme-primary/><script src="../assets/themeswap.js"></script><link href="../assets/favicon.ico" rel="icon" type="image/x-icon"/></head><body><div id="documenter"><nav class="docs-sidebar"><a class="docs-logo" href="../"><img class="docs-light-only" src="../assets/logo.svg" alt="COBREXA.jl logo"/><img class="docs-dark-only" src="../assets/logo-dark.svg" alt="COBREXA.jl logo"/></a><div class="docs-package-name"><span class="docs-autofit">COBREXA.jl</span></div><form class="docs-search" action><input class="docs-search-query" id="documenter-search-query" name="q" type="text" placeholder="Search docs"/></form><ul class="docs-menu"><li><a class="tocitem" href="../">Home</a></li><li><a class="tocitem" href="../tutorials/">Tutorials</a></li><li><a class="tocitem" href="../notebooks/">Examples and notebooks</a></li><li><a class="tocitem" href="../functions/">Function reference</a></li><li><a class="tocitem" href="../howToContribute/">How to contribute</a></li></ul><div class="docs-version-selector field has-addons"><div class="control"><span class="docs-label button is-static is-size-7">Version</span></div><div class="docs-selector control is-expanded"><div class="select is-fullwidth is-size-7"><select id="documenter-version-selector"></select></div></div></div></nav><div class="docs-main"><header class="docs-navbar"><nav class="breadcrumb"><ul class="is-hidden-mobile"><li class="is-active"><a href>Search</a></li></ul><ul class="is-hidden-tablet"><li class="is-active"><a href>Search</a></li></ul></nav><div class="docs-right"><a class="docs-settings-button fas fa-cog" id="documenter-settings-button" href="#" title="Settings"></a><a class="docs-sidebar-button fa fa-bars is-hidden-desktop" id="documenter-sidebar-button" href="#"></a></div></header><article><p id="documenter-search-info">Loading search...</p><ul id="documenter-search-results"></ul></article><nav class="docs-footer"><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> on <span class="colophon-date" title="Tuesday 8 June 2021 16:00">Tuesday 8 June 2021</span>. Using Julia version 1.6.0.</p></section><footer class="modal-card-foot"></footer></div></div></div></body><script src="../search_index.js"></script><script src="../assets/search.js"></script></html> diff --git a/dev/search_index.js b/dev/search_index.js index 1fab69580602ded07b386c8935a520216e6f609a..04ff7fc423f5d2a7e000f4072e013342258c626e 100644 --- a/dev/search_index.js +++ b/dev/search_index.js @@ -1,3 +1,3 @@ var documenterSearchIndex = {"docs": -[{"location":"advanced/1_modifications/#Screening-with-modifications","page":"Screening with modifications","title":"Screening with modifications","text":"","category":"section"},{"location":"tutorials/#COBREXA-Tutorials","page":"Tutorials","title":"COBREXA Tutorials","text":"","category":"section"},{"location":"tutorials/","page":"Tutorials","title":"Tutorials","text":"Pages = joinpath.(\"tutorials\", filter(x -> endswith(x, \".md\"), readdir(\"tutorials\")))\nDepth = 2","category":"page"},{"location":"advanced/2_custom_model/#Custom-models","page":"Custom models","title":"Custom models","text":"","category":"section"},{"location":"tutorials/2_analysis/#Basic-analysis-of-constraint-based-models","page":"Basic analysis of constraint-based models","title":"Basic analysis of constraint-based models","text":"","category":"section"},{"location":"tutorials/2_analysis/","page":"Basic analysis of constraint-based models","title":"Basic analysis of constraint-based models","text":"COBREXA.jl supports several common analysis methods that are often used for exploring the biological models. The currently supported methods include","category":"page"},{"location":"tutorials/2_analysis/","page":"Basic analysis of constraint-based models","title":"Basic analysis of constraint-based models","text":"Flux balance analysis (FBA), in function flux_balance_analysis\nFlux variability analysis (FVA), in flux_variability_analysis\nFlux sampling by hit-and-run algorithm, in hit_and_run\nParsimonious flux balance analysis (pFBA), in parsimonious_flux_balance_analysis","category":"page"},{"location":"tutorials/2_analysis/","page":"Basic analysis of constraint-based models","title":"Basic analysis of constraint-based models","text":"Other analysis methods are either in development and testing, or may be specified or customized by the user. Implementing new analyses is generally feasible; you may want to watch the COBREXA.jl repository for newly incoming analysis methods.","category":"page"},{"location":"tutorials/2_analysis/","page":"Basic analysis of constraint-based models","title":"Basic analysis of constraint-based models","text":"COBREXA.jl additionally exports several helper functions that may help you in running custom analysis methods:","category":"page"},{"location":"tutorials/2_analysis/","page":"Basic analysis of constraint-based models","title":"Basic analysis of constraint-based models","text":"you can convert all types of MetabolicModels to JuMP.jl models using make_optimization_model, then you may explore and analyze the models independently of COBREXA.jl using the tools provided by JuMP.jl\nthere is a system of analysis modifications that allows you to easily specify various adjustments to the existing analysis methods","category":"page"},{"location":"tutorials/2_analysis/","page":"Basic analysis of constraint-based models","title":"Basic analysis of constraint-based models","text":"tip: Notebook available!\nExamples of running the analysis functions are available here.","category":"page"},{"location":"tutorials/2_analysis/#Optimization-problem-solvers","page":"Basic analysis of constraint-based models","title":"Optimization problem solvers","text":"","category":"section"},{"location":"tutorials/2_analysis/","page":"Basic analysis of constraint-based models","title":"Basic analysis of constraint-based models","text":"For solving most analysis tasks, you need an optimization problem solver that is compatible with JuMP.jl. You may refer to the official list of supported solvers, but we generally recommend to use either of these:","category":"page"},{"location":"tutorials/2_analysis/","page":"Basic analysis of constraint-based models","title":"Basic analysis of constraint-based models","text":"Tulip (pure Julia implementation) for linear problems\nGLPK (based on a C library) for linear and mixed-integer problems\nGurobi (based on an external library, but requires a license that is free for academic use) for linear, mixed-integer and quadratic problems","category":"page"},{"location":"tutorials/2_analysis/","page":"Basic analysis of constraint-based models","title":"Basic analysis of constraint-based models","text":"All solvers can be installed using the Julia package manger.","category":"page"},{"location":"tutorials/2_analysis/#Flux-balance-analysis","page":"Basic analysis of constraint-based models","title":"Flux balance analysis","text":"","category":"section"},{"location":"tutorials/2_analysis/","page":"Basic analysis of constraint-based models","title":"Basic analysis of constraint-based models","text":"The above methods generally accept 2 arguments: the model, and the optimizer.","category":"page"},{"location":"tutorials/2_analysis/","page":"Basic analysis of constraint-based models","title":"Basic analysis of constraint-based models","text":"In particular, having installed e.g. GLPK from the above optimizers, you can run FBA on your favorite E. Coli core model as follows:","category":"page"},{"location":"tutorials/2_analysis/","page":"Basic analysis of constraint-based models","title":"Basic analysis of constraint-based models","text":"using COBREXA\nm = load_model(CoreModel, \"e_coli_core.xml\")\n\nusing GLPK\nopt_model = flux_balance_analysis(m, GLPK.Optimizer)","category":"page"},{"location":"tutorials/2_analysis/","page":"Basic analysis of constraint-based models","title":"Basic analysis of constraint-based models","text":"After a short while (the solver machinery usually needs to get precompiled before the first use), you should get opt_model, which is now an optimized JuMP.jl model. It may print out information like this:","category":"page"},{"location":"tutorials/2_analysis/","page":"Basic analysis of constraint-based models","title":"Basic analysis of constraint-based models","text":"A JuMP Model\nMaximization problem with:\nVariables: 95\nObjective function type: JuMP.GenericAffExpr{Float64,JuMP.VariableRef}\n`JuMP.GenericAffExpr{Float64,JuMP.VariableRef}`-in-`MathOptInterface.EqualTo{Float64}`: 73 constraints\n`JuMP.GenericAffExpr{Float64,JuMP.VariableRef}`-in-`MathOptInterface.LessThan{Float64}`: 192 constraints\nModel mode: AUTOMATIC\nCachingOptimizer state: ATTACHED_OPTIMIZER\nSolver name: GLPK\nNames registered in the model: lbs, mb, ubs, x","category":"page"},{"location":"tutorials/2_analysis/","page":"Basic analysis of constraint-based models","title":"Basic analysis of constraint-based models","text":"From that, you can extract the required information with the JuMP interface, loaded with using JuMP. With that,","category":"page"},{"location":"tutorials/2_analysis/","page":"Basic analysis of constraint-based models","title":"Basic analysis of constraint-based models","text":"objective_value(opt_model) prints roughly 0.87,\nvalue.(opt_model[:x]) prints the vector of individual reaction fluxes.","category":"page"},{"location":"tutorials/2_analysis/","page":"Basic analysis of constraint-based models","title":"Basic analysis of constraint-based models","text":"For convenience, you can get the results nicely formatted without manually getting them out of the optimized models:","category":"page"},{"location":"tutorials/2_analysis/","page":"Basic analysis of constraint-based models","title":"Basic analysis of constraint-based models","text":"flux_balance_analysis_vec works like flux_balance_analysis, but returns the vector of fluxes directly (in the same order as in reactions(m))\nflux_balance_analysis_dict returns a dictionary with the fluxes, keyed by reaction identifier","category":"page"},{"location":"tutorials/2_analysis/#Flux-variability-analysis","page":"Basic analysis of constraint-based models","title":"Flux variability analysis","text":"","category":"section"},{"location":"tutorials/2_analysis/","page":"Basic analysis of constraint-based models","title":"Basic analysis of constraint-based models","text":"FVA is implemented in flux_variability_analysis, which returns the usual matrix of minimal and maximal feasible fluxes for each reaction in the model.","category":"page"},{"location":"tutorials/2_analysis/","page":"Basic analysis of constraint-based models","title":"Basic analysis of constraint-based models","text":"The result of calling flux_variability_analysis(m, GLPK.Optimizer) may look like this (possibly showing minor numeric errors in the GLPK optimizer):","category":"page"},{"location":"tutorials/2_analysis/","page":"Basic analysis of constraint-based models","title":"Basic analysis of constraint-based models","text":"95×2 Array{Float64,2}:\n 0.0 0.0\n 6.00725 6.00725\n â‹® \n 3.64414e-13 3.17348e-13\n 3.2149 3.2149","category":"page"},{"location":"tutorials/2_analysis/","page":"Basic analysis of constraint-based models","title":"Basic analysis of constraint-based models","text":"You can relax the optimality requirement of the reactions by specifying a wider objective bound, getting a wider range of reaction fluxes, e.g. using gamma_bounds (for COBRA-like γ-bound) and objective_bounds (for a multiplicative bound around the original optimal objective).","category":"page"},{"location":"tutorials/2_analysis/","page":"Basic analysis of constraint-based models","title":"Basic analysis of constraint-based models","text":"As a result, flux_variability_analysis(m, GLPK.Optimizer; bounds=gamma_bounds(0.8)) will return a much less constrained system:","category":"page"},{"location":"tutorials/2_analysis/","page":"Basic analysis of constraint-based models","title":"Basic analysis of constraint-based models","text":"95×2 Array{Float64,2}:\n 0.0 0.0\n 0.754299 10.1285\n â‹® \n -4.42865 0.0\n 2.57192 3.2149","category":"page"},{"location":"tutorials/2_analysis/","page":"Basic analysis of constraint-based models","title":"Basic analysis of constraint-based models","text":"You may additionally restrict the analysis to a list of reactions (passing the list as the second argument, see documentation of flux_variability_analysis), or retrieve a dictionary of the resulting fluxes with flux_variability_analysis_dict.","category":"page"},{"location":"tutorials/2_analysis/#Parsimonious-flux-balance-analysis","page":"Basic analysis of constraint-based models","title":"Parsimonious flux balance analysis","text":"","category":"section"},{"location":"tutorials/2_analysis/","page":"Basic analysis of constraint-based models","title":"Basic analysis of constraint-based models","text":"Parsimonious flux balance analysis (pFBA) requires a solver that can handle quadratic problems. Some examples include, e.g. OSQP, Gurobi, Mosek, etc.","category":"page"},{"location":"tutorials/2_analysis/","page":"Basic analysis of constraint-based models","title":"Basic analysis of constraint-based models","text":"Otherwise, the function behaves just like flux_balance_analysis:","category":"page"},{"location":"tutorials/2_analysis/","page":"Basic analysis of constraint-based models","title":"Basic analysis of constraint-based models","text":"parsimonious_flux_balance_analysis(m, OSQP.Optimizer) will return a JuMP.jl model optimized to a slightly more realistic (parsimonious) optimum than plain FBA,\nparsimonious_flux_balance_analysis_vec will return the fluxes in a vector,\nparsimonious_flux_balance_analysis_dict will return a reaction-keyed dictionary.","category":"page"},{"location":"tutorials/2_analysis/#Flux-sampling","page":"Basic analysis of constraint-based models","title":"Flux sampling","text":"","category":"section"},{"location":"tutorials/2_analysis/","page":"Basic analysis of constraint-based models","title":"Basic analysis of constraint-based models","text":"For the hit_and_run, you need a previously optimized and constrained model from another analysis function, such as flux_balance_analysis, or created by make_optimization_model. You may need to carefully choose the number of iterations and sample sizes to match your model; see the documentation of hit_and_run for details.","category":"page"},{"location":"tutorials/2_analysis/","page":"Basic analysis of constraint-based models","title":"Basic analysis of constraint-based models","text":"As an example, you can run the sampling for 100 thousand iterations with:","category":"page"},{"location":"tutorials/2_analysis/","page":"Basic analysis of constraint-based models","title":"Basic analysis of constraint-based models","text":"hit_and_run(100_000, make_optimization_model(m, GLPK.Optimizer))","category":"page"},{"location":"tutorials/2_analysis/","page":"Basic analysis of constraint-based models","title":"Basic analysis of constraint-based models","text":"You should receive a matching flux sample with the (default) 1000 samples in a matrix that may look like this one:","category":"page"},{"location":"tutorials/2_analysis/","page":"Basic analysis of constraint-based models","title":"Basic analysis of constraint-based models","text":"95×1000 Array{Float64,2}:\n 0.0 0.0 … 0.0\n 7.82669 9.38895 3.30653\n 7.13016 4.36813 9.64434\n -0.290925 -9.3037 -0.0908829\n 24.1294 17.4794 0.0511032\n â‹® ⋱ \n -16.243 -37.4763 -5.57301\n 0.0 0.0 0.0\n -0.310819 -1.20057e-7 -2.13126\n 5.71597e-5 0.00990677 0.692399","category":"page"},{"location":"notebooks/#Notebooks-and-example-workflows","page":"Examples and notebooks","title":"Notebooks and example workflows","text":"","category":"section"},{"location":"notebooks/","page":"Examples and notebooks","title":"Examples and notebooks","text":"Pages = joinpath.(\"notebooks\", filter(x -> endswith(x, \".md\"), readdir(\"notebooks\")))\nDepth = 2","category":"page"},{"location":"notebooks/5_basic_stdmodel_construction/","page":"Model construction and modification","title":"Model construction and modification","text":"EditURL = \"https://github.com/LCSB-BioCore/COBREXA.jl/blob/master/docs/src/notebooks/5_basic_stdmodel_construction.jl\"","category":"page"},{"location":"notebooks/5_basic_stdmodel_construction/#Model-construction-and-modification","page":"Model construction and modification","title":"Model construction and modification","text":"","category":"section"},{"location":"notebooks/5_basic_stdmodel_construction/","page":"Model construction and modification","title":"Model construction and modification","text":"(Image: ) (Image: )","category":"page"},{"location":"notebooks/5_basic_stdmodel_construction/","page":"Model construction and modification","title":"Model construction and modification","text":"COBREXA can load models stored in .mat, .json, and .xml formats; and convert these into StandardModels. However, it is also possible to construct models from scratch, and modify existing models. This will be demonstrated here.","category":"page"},{"location":"notebooks/5_basic_stdmodel_construction/#Model-construction","page":"Model construction and modification","title":"Model construction","text":"","category":"section"},{"location":"notebooks/5_basic_stdmodel_construction/","page":"Model construction and modification","title":"Model construction and modification","text":"In COBREXA, model construction is primarily supported through StandardModels. To begin, create an empty StandardModel.","category":"page"},{"location":"notebooks/5_basic_stdmodel_construction/","page":"Model construction and modification","title":"Model construction and modification","text":"using COBREXA\n\nmodel = StandardModel(\"FirstModel\") # assign model id = \"FirstModel\"","category":"page"},{"location":"notebooks/5_basic_stdmodel_construction/","page":"Model construction and modification","title":"Model construction and modification","text":"Next, genes, metabolites and reactions need to be added to the model.","category":"page"},{"location":"notebooks/5_basic_stdmodel_construction/#Add-genes-to-the-model","page":"Model construction and modification","title":"Add genes to the model","text":"","category":"section"},{"location":"notebooks/5_basic_stdmodel_construction/","page":"Model construction and modification","title":"Model construction and modification","text":"gene_list = [Gene(string(\"g\", num)) for num = 1:8]","category":"page"},{"location":"notebooks/5_basic_stdmodel_construction/","page":"Model construction and modification","title":"Model construction and modification","text":"warning: Warning: Don't accidentally overwrite the generic accessors\nIt may be tempting to call a variable genes, metabolites, or reactions. However, these names conflict with generic accessors functions and will create problems downstream.","category":"page"},{"location":"notebooks/5_basic_stdmodel_construction/","page":"Model construction and modification","title":"Model construction and modification","text":"add_genes!(model, gene_list)","category":"page"},{"location":"notebooks/5_basic_stdmodel_construction/#Add-metabolites-to-the-model","page":"Model construction and modification","title":"Add metabolites to the model","text":"","category":"section"},{"location":"notebooks/5_basic_stdmodel_construction/","page":"Model construction and modification","title":"Model construction and modification","text":"metabolite_list = [Metabolite(string(\"m\", num)) for num = 1:4]\n\nmetabolite_list[1].formula = \"C6H12O6\" # can edit metabolites, etc. directly\n\nadd_metabolites!(model, metabolite_list)","category":"page"},{"location":"notebooks/5_basic_stdmodel_construction/#Add-reactions-to-the-model","page":"Model construction and modification","title":"Add reactions to the model","text":"","category":"section"},{"location":"notebooks/5_basic_stdmodel_construction/","page":"Model construction and modification","title":"Model construction and modification","text":"There are two ways to create and add reactions to a model. These are using functions, or macros.","category":"page"},{"location":"notebooks/5_basic_stdmodel_construction/","page":"Model construction and modification","title":"Model construction and modification","text":"r_m1 = Reaction(\"EX_m1\", Dict(\"m1\" => -1.0), :bidirectional) # exchange reaction: m1 <-> (is the same as m1 ⟷ nothing)\nr1 = Reaction(\"r1\", Dict(\"m1\" => -1.0, \"m2\" => 1.0), :forward)\nr1.grr = [[\"g1\", \"g2\"], [\"g3\"]] # add some gene reaction rules\nr2 = Reaction(\"r2\", Dict(\"m2\" => -1.0, \"m1\" => 1.0), :backward)\nr3 = Reaction(\"r3\", Dict(\"m2\" => -1.0, \"m3\" => 1.0), :bidirectional)\n\nadd_reactions!(model, [r1, r2, r3, r_m1]) # function approach\n\nm1 = metabolite_list[1]\nm2 = metabolite_list[2]\nm3 = metabolite_list[3]\nm4 = metabolite_list[4]\n\n@add_reactions! model begin # macro approach\n \"r4\", m2 ⟶ m4, 0, 1000\n \"r_m3\", m3 ⟷ nothing, -1000, 1000\n \"r_m4\", m4 ⟶ nothing\n \"r5\", m4 ⟶ m2\nend\n\nmodel.reactions[\"r4\"].grr = [[\"g5\"], [\"g6\", \"g7\"], [\"g8\"]]","category":"page"},{"location":"notebooks/5_basic_stdmodel_construction/","page":"Model construction and modification","title":"Model construction and modification","text":"note: Note: Using reaction arrows\nCOBREXA exports arrows that can be used to construct reactions. Both the long and short arrows (⟶ == →) mean the same thing if they point in the same direction.These arrows are accessible by using the LaTeX completions built into Julia. For example:→ is \\rightarrow<tab>\n⟶ is \\longrightarrow<tab>\n↠is \\leftarrow<tab>\n⟵ is \\longleftarrow<tab>\n↔ is \\leftrightarrow<tab>\n⟷ is \\longleftrightarrow<tab>","category":"page"},{"location":"notebooks/5_basic_stdmodel_construction/","page":"Model construction and modification","title":"Model construction and modification","text":"The constructed model can now be inspected.","category":"page"},{"location":"notebooks/5_basic_stdmodel_construction/","page":"Model construction and modification","title":"Model construction and modification","text":"model","category":"page"},{"location":"notebooks/5_basic_stdmodel_construction/#Modifying-existing-models","page":"Model construction and modification","title":"Modifying existing models","text":"","category":"section"},{"location":"notebooks/5_basic_stdmodel_construction/","page":"Model construction and modification","title":"Model construction and modification","text":"It is also possible to modify a model by deleting certain genes. This is simply achieved by calling remove_genes!.","category":"page"},{"location":"notebooks/5_basic_stdmodel_construction/","page":"Model construction and modification","title":"Model construction and modification","text":"remove_genes!(model, [\"g1\", \"g2\"]; knockout_reactions = false)\nmodel","category":"page"},{"location":"notebooks/5_basic_stdmodel_construction/","page":"Model construction and modification","title":"Model construction and modification","text":"","category":"page"},{"location":"notebooks/5_basic_stdmodel_construction/","page":"Model construction and modification","title":"Model construction and modification","text":"This page was generated using Literate.jl.","category":"page"},{"location":"tutorials/3_hpc/#Distributed-processing-and-HPC-environments","page":"Distributed processing and HPC environments","title":"Distributed processing and HPC environments","text":"","category":"section"},{"location":"tutorials/3_hpc/","page":"Distributed processing and HPC environments","title":"Distributed processing and HPC environments","text":"Distributed processing in Julia is represented mainly by the package Distributed.jl.","category":"page"},{"location":"tutorials/3_hpc/","page":"Distributed processing and HPC environments","title":"Distributed processing and HPC environments","text":"COBREXA.jl is able to utilize this existing system to almost transparently run the large parallelizable analyses on multiple CPU cores and multiple computers connected through the network. Ultimately, the approach scales to thousands of computing nodes in large HPC facilities.","category":"page"},{"location":"tutorials/3_hpc/","page":"Distributed processing and HPC environments","title":"Distributed processing and HPC environments","text":"Here, we give a short overview of how to work in the distributed environment and utilize the resources for COBREXA.jl analyses.","category":"page"},{"location":"tutorials/3_hpc/#Starting-the-distributed-workers","page":"Distributed processing and HPC environments","title":"Starting the distributed workers","text":"","category":"section"},{"location":"tutorials/3_hpc/","page":"Distributed processing and HPC environments","title":"Distributed processing and HPC environments","text":"COBREXA.jl follows the structure imposed by the Distributed package: You operate a main (usually called \"master\") computation node, connect to multiple other computers and start worker Julia processes there, and distribute the workload across this cluster.","category":"page"},{"location":"tutorials/3_hpc/","page":"Distributed processing and HPC environments","title":"Distributed processing and HPC environments","text":"To start, you need to load the package and add a few processes. This starts 5 processes locally:","category":"page"},{"location":"tutorials/3_hpc/","page":"Distributed processing and HPC environments","title":"Distributed processing and HPC environments","text":"using Distributed\naddprocs(5)","category":"page"},{"location":"tutorials/3_hpc/","page":"Distributed processing and HPC environments","title":"Distributed processing and HPC environments","text":"note: `Distributed.jl` installation\nDistributed.jl usually comes pre-installed with Julia distribution, but you may still need to \"enable\" it by typing ] add Distributed.","category":"page"},{"location":"tutorials/3_hpc/","page":"Distributed processing and HPC environments","title":"Distributed processing and HPC environments","text":"You may check that the workers are really there, using workers(). In this case, it should give you a vector of worker IDs, very likely equal to [2,3,4,5,6].","category":"page"},{"location":"tutorials/3_hpc/","page":"Distributed processing and HPC environments","title":"Distributed processing and HPC environments","text":"If you have compute resources available via a network, you may connect these as well, provided you have a secure shell (ssh) access to them. You will likely want to establish a key-based authentication (refer to ssh documentation) to make the connection easier.","category":"page"},{"location":"tutorials/3_hpc/","page":"Distributed processing and HPC environments","title":"Distributed processing and HPC environments","text":"With shell, check that you can ssh to a remote node and run Julia there:","category":"page"},{"location":"tutorials/3_hpc/","page":"Distributed processing and HPC environments","title":"Distributed processing and HPC environments","text":"user@pc> ssh server\n...\nuser@server> julia\n...\njulia> _","category":"page"},{"location":"tutorials/3_hpc/","page":"Distributed processing and HPC environments","title":"Distributed processing and HPC environments","text":"top: Running shell commands from Julia\nIf you don't want to quit your Julia session to try out the ssh connection from the shell, press ; in the Julia prompt on the beginning of the line. The interpreter will execute your next line as a shell command.","category":"page"},{"location":"tutorials/3_hpc/","page":"Distributed processing and HPC environments","title":"Distributed processing and HPC environments","text":"If this works for you, you can add some workers that run on the server from your Julia shell running on your pc. For example, the following starts 20 workers on the remote server and 10 workers on your friend's computer called joe_pc:","category":"page"},{"location":"tutorials/3_hpc/","page":"Distributed processing and HPC environments","title":"Distributed processing and HPC environments","text":"addprocs([('server', 20), ('joe_pc', 10)])","category":"page"},{"location":"tutorials/3_hpc/","page":"Distributed processing and HPC environments","title":"Distributed processing and HPC environments","text":"With this, you can schedule various computation on the workers; see the Julia manual of Distributed for basic details. You may try various convenience packages, such as DistributedArrays.jl and DistributedData.jl, to process any data in a distributed fashion.","category":"page"},{"location":"tutorials/3_hpc/#Running-a-distributed-analysis","page":"Distributed processing and HPC environments","title":"Running a distributed analysis","text":"","category":"section"},{"location":"tutorials/3_hpc/","page":"Distributed processing and HPC environments","title":"Distributed processing and HPC environments","text":"While not all COBREXA functions may be parallelized naturally, these that do will accept a special workers argument that specifies a list of worker IDs where the computation should be distributed. For the value, you can specify your desired worker IDs manually (e.g. [2,3,4]), or simply use workers().","category":"page"},{"location":"tutorials/3_hpc/","page":"Distributed processing and HPC environments","title":"Distributed processing and HPC environments","text":"For example, flux_variability_analysis can naturally parallelize the computation of all reactions's minima and maxima to finish the computation faster. To enable the parallelization, you first need to make sure that all workers have loaded both the COBREXA package and the optimizer:","category":"page"},{"location":"tutorials/3_hpc/","page":"Distributed processing and HPC environments","title":"Distributed processing and HPC environments","text":"using COBREXA, GLPK, Distributed\naddprocs(10) # add any kind and number of processes here\n@everywhere using COBREXA, GLPK # loads the necessary packages on all workers","category":"page"},{"location":"tutorials/3_hpc/","page":"Distributed processing and HPC environments","title":"Distributed processing and HPC environments","text":"When the package is loaded and precompiled everywhere, you may load your model and run the FVA with the workers parameter:","category":"page"},{"location":"tutorials/3_hpc/","page":"Distributed processing and HPC environments","title":"Distributed processing and HPC environments","text":"model = load_model(\"e_coli_core.xml\")\nresult = flux_variability_analysis(model, GLPK.Optimizer; workers=workers())","category":"page"},{"location":"tutorials/3_hpc/","page":"Distributed processing and HPC environments","title":"Distributed processing and HPC environments","text":"With the extra computing capacity from N workers available, the FVA should be computed roughly N-times faster.","category":"page"},{"location":"tutorials/3_hpc/","page":"Distributed processing and HPC environments","title":"Distributed processing and HPC environments","text":"note: Distribution and parallelization overhead\nCommunication of the workers with your Julia shell is not free. If the task that you are parallelizing is small and the model structure is very large, the distributed computation will actually spend most computation time just distributing the large model to the workers, and almost no time in executing the small parallel task. In such case, the performance will not improve by adding additional resources. You may want to check that the computation task is sufficiently large before investing the extra resources into the distributed execution. Amdahl's and Gustafson's laws can give you a better overview of the consequences of this overhead.","category":"page"},{"location":"tutorials/3_hpc/#Interacting-with-HPC-schedulers","page":"Distributed processing and HPC environments","title":"Interacting with HPC schedulers","text":"","category":"section"},{"location":"tutorials/3_hpc/","page":"Distributed processing and HPC environments","title":"Distributed processing and HPC environments","text":"Many researchers have access to institutional HPC facilities that allow time-sharing of the capacity of a large computer cluster between many researchers. Julia and COBREXA.jl work well within this environment; but your programs require some additional customization to be able to find and utilize the resources available from the HPC.","category":"page"},{"location":"tutorials/3_hpc/","page":"Distributed processing and HPC environments","title":"Distributed processing and HPC environments","text":"In our case, this reduces to a relatively complex task: You need to find out how many resources were allocated for your task, and you need to add the remote workers precisely at places that were allocated for your. Fortunately, the package ClusterManagers.jl can do precisely that.","category":"page"},{"location":"tutorials/3_hpc/","page":"Distributed processing and HPC environments","title":"Distributed processing and HPC environments","text":"For simplicily, we will assume that your HPC is scheduled by Slurm.","category":"page"},{"location":"tutorials/3_hpc/","page":"Distributed processing and HPC environments","title":"Distributed processing and HPC environments","text":"Adding of the workers from Slurm is done as follows:","category":"page"},{"location":"tutorials/3_hpc/","page":"Distributed processing and HPC environments","title":"Distributed processing and HPC environments","text":"you import the ClusterManagers package\nyou find how many processes to spawn from the environment from SLURM_NTASKS environment variable\nyou use the function addprocs_slurm to precisely connect to your allocated computational resources","category":"page"},{"location":"tutorials/3_hpc/","page":"Distributed processing and HPC environments","title":"Distributed processing and HPC environments","text":"The Julia script that does a parallel analysis may then start as follows:","category":"page"},{"location":"tutorials/3_hpc/","page":"Distributed processing and HPC environments","title":"Distributed processing and HPC environments","text":"using COBREXA, Distributed, ClusterManagers\n\navailable_workers = parse(Int, ENV[\"SLURM_NTASKS\"])\n\naddprocs_slurm(available_workers)\n\n...\nresult = flux_variability_analysis(...; workers=workers())\n...","category":"page"},{"location":"tutorials/3_hpc/","page":"Distributed processing and HPC environments","title":"Distributed processing and HPC environments","text":"After adding the Slurm workers, you may continue as if the workers were added using normal addprocs, and (for example) run the flux_variability_analysis as shown above.","category":"page"},{"location":"tutorials/3_hpc/","page":"Distributed processing and HPC environments","title":"Distributed processing and HPC environments","text":"tip: What about the other HPC schedulers?\nClusterManagers.jl supports many other common HPC scheduling systems, including LFS, Sun Grid, SGE, PBS, and Scyld, in a way almost identical to Slurm. See the package documentation for details.","category":"page"},{"location":"tutorials/3_hpc/#Wrapping-your-script-in-a-Slurm-job","page":"Distributed processing and HPC environments","title":"Wrapping your script in a Slurm job","text":"","category":"section"},{"location":"tutorials/3_hpc/","page":"Distributed processing and HPC environments","title":"Distributed processing and HPC environments","text":"To be able to submit your script for later processing using the sbatch Slurm command, you need to wrap it in a small \"batch\" script that tells Slurm how many resources the process needs.","category":"page"},{"location":"tutorials/3_hpc/","page":"Distributed processing and HPC environments","title":"Distributed processing and HPC environments","text":"Assuming you have a Julia computation script written down in myJob.jl and saved on your HPC cluster's access node, the corresponding Slurm batch script (let's call it myJob.sbatch) may look as follows:","category":"page"},{"location":"tutorials/3_hpc/","page":"Distributed processing and HPC environments","title":"Distributed processing and HPC environments","text":"#!/bin/bash -l\n#SBATCH -n 100 # the job will require 100 individual workers\n#SBATCH -c 1 # each worker will sit on a single CPU\n#SBATCH -t 30 # the whole job will take less than 30 minutes\n#SBATCH -J myJob # the name of the job\n\nmodule load lang/Julia # this is usually required to make Julia available to your job\n\njulia myJob.jl","category":"page"},{"location":"tutorials/3_hpc/","page":"Distributed processing and HPC environments","title":"Distributed processing and HPC environments","text":"To run the computation, simply run sbatch myJob.sbatch on the access node. The job will be scheduled and eventually executed. You may watch sacct and squeue in the meantime, to see the progress.","category":"page"},{"location":"tutorials/3_hpc/","page":"Distributed processing and HPC environments","title":"Distributed processing and HPC environments","text":"Remember that you need to explicitly save the result of your Julia script computation to files, to be able to retrieve them later. Standard outputs of the jobs are often mangled and discarded. If you still want to collect the standard output, you may change the last line of the batch script to","category":"page"},{"location":"tutorials/3_hpc/","page":"Distributed processing and HPC environments","title":"Distributed processing and HPC environments","text":"julia myJob.jl > myJob.log","category":"page"},{"location":"tutorials/3_hpc/","page":"Distributed processing and HPC environments","title":"Distributed processing and HPC environments","text":"and collect the output from the log later. This is convenient especially if logging various computation details using the @info and similar macros.","category":"page"},{"location":"functions/#Functions","page":"Function reference","title":"Functions","text":"","category":"section"},{"location":"functions/#Base-Types","page":"Function reference","title":"Base Types","text":"","category":"section"},{"location":"functions/","page":"Function reference","title":"Function reference","text":"Modules = [COBREXA]\nPages = map(file -> joinpath(\"base\", \"types\", \"abstract\", file), readdir(\"../src/base/types/abstract\"))","category":"page"},{"location":"functions/#COBREXA.Maybe","page":"Function reference","title":"COBREXA.Maybe","text":"Maybe{T} = Union{Nothing, T}\n\nA nice name for \"nullable\" type.\n\n\n\n\n\n","category":"type"},{"location":"functions/#COBREXA._default-Union{Tuple{T}, Tuple{T, Union{Nothing, T}}} where T","page":"Function reference","title":"COBREXA._default","text":"_default(d::T, x::Maybe{T})::T where {T}\n\nFold the Maybe{T} down to T by defaulting.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA._maybemap-Tuple{Any, Union{Nothing, T} where T}","page":"Function reference","title":"COBREXA._maybemap","text":"_maybemap(f, x::Maybe)::Maybe\n\nApply a function to x only if it is not nothing.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.Annotations","page":"Function reference","title":"COBREXA.Annotations","text":"Annotations = Dict{String,Vector{String}}\n\nDictionary used to store (possible multiple) standardized annotations of something, such as a Metabolite and a Reaction.\n\nExample\n\nAnnotations(\"PubChem\" => [\"CID12345\", \"CID54321\"])\n\n\n\n\n\n","category":"type"},{"location":"functions/#COBREXA.GeneAssociation","page":"Function reference","title":"COBREXA.GeneAssociation","text":"GeneAssociation = Vector{Vector{String}}\n\nAn association to genes, represented as a logical formula in a positive disjunctive normal form (DNF). (The 2nd-level vectors of strings are connected by \"and\" to form conjunctions, and the 1st-level vectors of these conjunctions are connected by \"or\" to form the DNF.)\n\n\n\n\n\n","category":"type"},{"location":"functions/#COBREXA.MetabolicModel","page":"Function reference","title":"COBREXA.MetabolicModel","text":"abstract type MetabolicModel end\n\nA helper supertype that wraps everything usable as a linear-like model for COBREXA functions.\n\nIf you want your model type to work with COBREXA, add the MetabolicModel as its supertype, and implement the accessor functions. Accessors reactions, metabolites, stoichiometry, bounds and objective must be implemented; others are not mandatory and default to safe \"empty\" values.\n\n\n\n\n\n","category":"type"},{"location":"functions/#COBREXA.MetaboliteFormula","page":"Function reference","title":"COBREXA.MetaboliteFormula","text":"MetaboliteFormula = Dict{String,Int}\n\nDictionary of atoms and their abundances in a molecule.\n\n\n\n\n\n","category":"type"},{"location":"functions/#COBREXA.Notes","page":"Function reference","title":"COBREXA.Notes","text":"Notes = Dict{String,Vector{String}}\n\nFree-form notes about something (e.g. a Gene), categorized by \"topic\".\n\n\n\n\n\n","category":"type"},{"location":"functions/#COBREXA.balance-Tuple{MetabolicModel}","page":"Function reference","title":"COBREXA.balance","text":"balance(a::MetabolicModel)::SparseVec\n\nGet the sparse balance vector of a model (ie. the b from S x = b).\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.bounds-Tuple{MetabolicModel}","page":"Function reference","title":"COBREXA.bounds","text":"bounds(a::MetabolicModel)::Tuple{SparseVec,SparseVec}\n\nGet the lower and upper flux bounds of a model.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.coupling-Tuple{MetabolicModel}","page":"Function reference","title":"COBREXA.coupling","text":"coupling(a::MetabolicModel)::SparseMat\n\nGet a matrix of coupling constraint definitions of a model. By default, there is no coupling in the models.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.coupling_bounds-Tuple{MetabolicModel}","page":"Function reference","title":"COBREXA.coupling_bounds","text":"coupling_bounds(a::MetabolicModel)::Tuple{SparseVec,SparseVec}\n\nGet the lower and upper bounds for each coupling bound in a model, as specified by coupling. By default, the model does not have any coupling bounds.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.gene_annotations-Tuple{MetabolicModel, String}","page":"Function reference","title":"COBREXA.gene_annotations","text":"gene_annotations(a::MetabolicModel, gene_id::String)::Annotations\n\nReturn standardized names that identify the corresponding gene or product. The dictionary assigns vectors of possible identifiers to identifier system names, e.g. \"PDB\" => [\"PROT01\"].\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.gene_notes-Tuple{MetabolicModel, String}","page":"Function reference","title":"COBREXA.gene_notes","text":"gene_notes(model::MetabolicModel, gene_id::String)::Notes\n\nReturn the notes associated with the gene gene_id in model.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.genes-Tuple{MetabolicModel}","page":"Function reference","title":"COBREXA.genes","text":"genes(a::MetabolicModel)::Vector{String}\n\nReturn identifiers of all genes contained in the model. By default, there are no genes.\n\nIn SBML, these are usually called \"gene products\" but we write genes for simplicity.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.metabolite_annotations-Tuple{MetabolicModel, String}","page":"Function reference","title":"COBREXA.metabolite_annotations","text":"metabolite_annotations(a::MetabolicModel, metabolite_id::String)::Annotations\n\nReturn standardized names that may help to reliably identify the metabolite. The dictionary assigns vectors of possible identifiers to identifier system names, e.g. \"ChEMBL\" => [\"123\"] or \"PubChem\" => [\"CID123\", \"CID654645645\"].\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.metabolite_charge-Tuple{MetabolicModel, String}","page":"Function reference","title":"COBREXA.metabolite_charge","text":"metabolitecharge(model::MetabolicModel, metaboliteid::String)::Maybe{Int}\n\nReturn the charge associated with metabolite metabolite_id in model. Returns nothing if charge not present.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.metabolite_compartment-Tuple{MetabolicModel, String}","page":"Function reference","title":"COBREXA.metabolite_compartment","text":"metabolite_compartment(model::MetabolicModel, metabolite_id::String)::Maybe{String}\n\nReturn the compartment of metabolite metabolite_id in model if it is assigned. If not, return nothing. \n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.metabolite_formula-Tuple{MetabolicModel, String}","page":"Function reference","title":"COBREXA.metabolite_formula","text":"metabolite_formula(\n a::MetabolicModel,\n metabolite_id::String,\n)::Maybe{MetaboliteFormula}\n\nReturn the formula of metabolite metabolite_id in model. Return nothing in case the formula is not known or irrelevant.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.metabolite_notes-Tuple{MetabolicModel, String}","page":"Function reference","title":"COBREXA.metabolite_notes","text":"metabolite_notes(model::MetabolicModel, metabolite_id::String)::Notes\n\nReturn the notes associated with metabolite reaction_id in model.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.metabolites-Tuple{MetabolicModel}","page":"Function reference","title":"COBREXA.metabolites","text":"metabolites(a::MetabolicModel)::Vector{String}\n\nReturn a vector of metabolite identifiers in a model.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.n_coupling_constraints-Tuple{MetabolicModel}","page":"Function reference","title":"COBREXA.n_coupling_constraints","text":"n_coupling_constraints(a::MetabolicModel)::Int\n\nGet the number of coupling constraints in a model.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.n_genes-Tuple{MetabolicModel}","page":"Function reference","title":"COBREXA.n_genes","text":"n_genes(a::MetabolicModel)::Int\n\nReturn the number of genes in the model (as returned by genes). If you just need the number of the genes, this may be much more efficient than calling genes and measuring the array.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.n_metabolites-Tuple{MetabolicModel}","page":"Function reference","title":"COBREXA.n_metabolites","text":"n_metabolites(a::MetabolicModel)::Int\n\nGet the number of metabolites in a model.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.n_reactions-Tuple{MetabolicModel}","page":"Function reference","title":"COBREXA.n_reactions","text":"n_reactions(a::MetabolicModel)::Int\n\nGet the number of reactions in a model.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.objective-Tuple{MetabolicModel}","page":"Function reference","title":"COBREXA.objective","text":"objective(a::MetabolicModel)::SparseVec\n\nGet the objective vector of a model.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.precache!-Tuple{MetabolicModel}","page":"Function reference","title":"COBREXA.precache!","text":"precache!(a::MetabolicModel)::Nothing\n\nDo whatever is feasible to get the model into a state that can be read from as-quickly-as-possible. This may include e.g. generating helper index structures and loading delayed parts of the model from disk. The model should be modified \"transparently\" in-place. Analysis functions call this right before applying modifications or converting the model to the optimization model using make_optimization_model; usually on the same machine where the optimizers (and, generally, the core analysis algorithms) will run. The calls are done in a good hope that the performance will be improved.\n\nBy default, it should be safe to do nothing.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.reaction_annotations-Tuple{MetabolicModel, String}","page":"Function reference","title":"COBREXA.reaction_annotations","text":"reaction_annotations(a::MetabolicModel, reaction_id::String)::Annotations\n\nReturn standardized names that may help identifying the reaction. The dictionary assigns vectors of possible identifiers to identifier system names, e.g. \"Reactome\" => [\"reactomeID123\"].\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.reaction_gene_association-Tuple{MetabolicModel, String}","page":"Function reference","title":"COBREXA.reaction_gene_association","text":"reaction_gene_association(a::MetabolicModel, gene_id::String)::Maybe{GeneAssociation}\n\nReturns the sets of genes that need to be present so that the reaction can work (technically, a DNF on gene availability, with positive atoms only).\n\nFor simplicity, nothing may be returned, meaning that the reaction always takes place. (in DNF, that would be equivalent to returning [[]].)\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.reaction_notes-Tuple{MetabolicModel, String}","page":"Function reference","title":"COBREXA.reaction_notes","text":"reaction_notes(model::MetabolicModel, reaction_id::String)::Notes\n\nReturn the notes associated with reaction reaction_id in model.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.reaction_stoichiometry-Tuple{MetabolicModel, String}","page":"Function reference","title":"COBREXA.reaction_stoichiometry","text":"reaction_stoichiometry(model::MetaboliteModel, rxn_id::String)::Dict{String, Float64}\n\nReturn the reaction equation of reaction with id rxn_id in model. The reaction equation maps metabolite ids to their stoichiometric coefficients.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.reaction_subsystem-Tuple{MetabolicModel, String}","page":"Function reference","title":"COBREXA.reaction_subsystem","text":"reaction_subsystem(model::MetabolicModel, reaction_id::String)::Maybe{String}\n\nReturn the subsystem of reaction reaction_id in model if it is assigned. If not, return nothing.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.reactions-Tuple{MetabolicModel}","page":"Function reference","title":"COBREXA.reactions","text":"reactions(a::MetabolicModel)::Vector{String}\n\nReturn a vector of reaction identifiers in a model.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.stoichiometry-Tuple{MetabolicModel}","page":"Function reference","title":"COBREXA.stoichiometry","text":"stoichiometry(a::MetabolicModel)::SparseMat\n\nGet the sparse stoichiometry matrix of a model.\n\n\n\n\n\n","category":"method"},{"location":"functions/#Model-types-and-contents","page":"Function reference","title":"Model types and contents","text":"","category":"section"},{"location":"functions/","page":"Function reference","title":"Function reference","text":"Modules = [COBREXA]\nPages = map(file -> joinpath(\"base\", \"types\", file), readdir(\"../src/base/types\"))","category":"page"},{"location":"functions/#COBREXA.CoreModel","page":"Function reference","title":"COBREXA.CoreModel","text":"struct CoreModel <: MetabolicModel\n\nA \"bare bones\" core linear optimization problem of the form, with reaction and metabolite names.\n\nmin c^T x\ns.t. S x = b\n xâ‚— ≤ x ≤ xᵤ\n\n\n\n\n\n","category":"type"},{"location":"functions/#Base.convert-Union{Tuple{M}, Tuple{Type{CoreModel}, M}} where M<:MetabolicModel","page":"Function reference","title":"Base.convert","text":"Base.convert(::Type{CoreModel}, m::M) where {M <: MetabolicModel}\n\nMake a CoreModel out of any compatible model type.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.balance-Tuple{CoreModel}","page":"Function reference","title":"COBREXA.balance","text":"balance(a::CoreModel)::SparseVec\n\nCoreModel target flux balance.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.bounds-Tuple{CoreModel}","page":"Function reference","title":"COBREXA.bounds","text":"bounds(a::CoreModel)::Tuple{SparseVec,SparseVec}\n\nCoreModel flux bounds.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.metabolites-Tuple{CoreModel}","page":"Function reference","title":"COBREXA.metabolites","text":"metabolites(a::CoreModel)::Vector{String}\n\nMetabolites in a CoreModel.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.objective-Tuple{CoreModel}","page":"Function reference","title":"COBREXA.objective","text":"objective(a::CoreModel)::SparseVec\n\nCoreModel objective vector.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.reaction_stoichiometry-Tuple{CoreModel, Int64}","page":"Function reference","title":"COBREXA.reaction_stoichiometry","text":"reaction_stoichiometry(model::CoreModel, rxn_id::String)::Dict{String, Float64}\n\nReturn the reaction equation of reaction with id rxn_ind in model. The reaction equation maps metabolite ids to their stoichiometric coefficients.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.reaction_stoichiometry-Tuple{CoreModel, String}","page":"Function reference","title":"COBREXA.reaction_stoichiometry","text":"reaction_stoichiometry(model::CoreModel, rxn_id::String)::Dict{String, Float64}\n\nReturn the reaction equation of reaction with id rxn_id in model. The reaction equation maps metabolite ids to their stoichiometric coefficients.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.reactions-Tuple{CoreModel}","page":"Function reference","title":"COBREXA.reactions","text":"reactions(a::CoreModel)::Vector{String}\n\nGet the reactions in a CoreModel.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.stoichiometry-Tuple{CoreModel}","page":"Function reference","title":"COBREXA.stoichiometry","text":"stoichiometry(a::CoreModel)::SparseMat\n\nCoreModel stoichiometry matrix.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.CoreModelCoupled","page":"Function reference","title":"COBREXA.CoreModelCoupled","text":"struct CoreModelCoupled <: MetabolicModel\n\nThe linear model with additional coupling constraints in the form\n\n câ‚— ≤ C x ≤ cᵤ\n\n\n\n\n\n","category":"type"},{"location":"functions/#Base.convert-Tuple{Type{CoreModelCoupled}, MetabolicModel}","page":"Function reference","title":"Base.convert","text":"Base.convert(::Type{CoreModelCoupled}, mm::MetabolicModel)\n\nMake a CoreModelCoupled out of any compatible model type.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.balance-Tuple{CoreModelCoupled}","page":"Function reference","title":"COBREXA.balance","text":"balance(a::CoreModelCoupled)\n\nExtract balance from CoreModelCoupled (uses the internal CoreModel).\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.bounds-Tuple{CoreModelCoupled}","page":"Function reference","title":"COBREXA.bounds","text":"bounds(a::CoreModelCoupled)\n\nExtract bounds from CoreModelCoupled (uses the internal CoreModel).\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.coupling-Tuple{CoreModelCoupled}","page":"Function reference","title":"COBREXA.coupling","text":"coupling(a::CoreModelCoupled)::SparseMat\n\nCoupling constraint matrix for a CoreModelCoupled.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.coupling_bounds-Tuple{CoreModelCoupled}","page":"Function reference","title":"COBREXA.coupling_bounds","text":"coupling_bounds(a::CoreModelCoupled)::Tuple{SparseVec,SparseVec}\n\nCoupling bounds for a CoreModelCoupled.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.metabolites-Tuple{CoreModelCoupled}","page":"Function reference","title":"COBREXA.metabolites","text":"metabolites(a::CoreModelCoupled)\n\nExtract metabolites from CoreModelCoupled (uses the internal CoreModel).\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.n_coupling_constraints-Tuple{CoreModelCoupled}","page":"Function reference","title":"COBREXA.n_coupling_constraints","text":"n_coupling_constraints(a::CoreModelCoupled)::Int\n\nThe number of coupling constraints in a CoreModelCoupled.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.objective-Tuple{CoreModelCoupled}","page":"Function reference","title":"COBREXA.objective","text":"objective(a::CoreModelCoupled)\n\nExtract objective from CoreModelCoupled (uses the internal CoreModel).\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.reaction_stoichiometry-Tuple{CoreModelCoupled, Int64}","page":"Function reference","title":"COBREXA.reaction_stoichiometry","text":"reaction_stoichiometry(model::CoreModelCoupled, rxn_ind::Int)::Dict{String, Float64}\n\nReturn the reaction equation of reaction with id rxn_ind in model. The reaction equation maps metabolite ids to their stoichiometric coefficients.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.reaction_stoichiometry-Tuple{CoreModelCoupled, String}","page":"Function reference","title":"COBREXA.reaction_stoichiometry","text":"reaction_stoichiometry(model::CoreModelCoupled, rxn_id::String)::Dict{String, Float64}\n\nReturn the reaction equation of reaction with id rxn_id in model. The reaction equation maps metabolite ids to their stoichiometric coefficients.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.reactions-Tuple{CoreModelCoupled}","page":"Function reference","title":"COBREXA.reactions","text":"reactions(a::CoreModelCoupled)\n\nExtract reactions from CoreModelCoupled (uses the internal CoreModel).\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.stoichiometry-Tuple{CoreModelCoupled}","page":"Function reference","title":"COBREXA.stoichiometry","text":"stoichiometry(a::CoreModelCoupled)\n\nExtract stoichiometry from CoreModelCoupled (uses the internal CoreModel).\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.Gene","page":"Function reference","title":"COBREXA.Gene","text":"Gene struct.\n\nFields\n\nid :: String\nname :: Union{String, Nothing}\nnotes :: Dict{String, Vector{String}}\nannotation :: Dict{String, Union{Vector{String}, String}}\n\n\n\n\n\n","category":"type"},{"location":"functions/#COBREXA.JSONModel","page":"Function reference","title":"COBREXA.JSONModel","text":"struct JSONModel <: MetabolicModel\n json::Dict{String,Any}\nend\n\nA struct used to store the contents of a JSON model, i.e. a model read from a file ending with .json. These model files typically store all the model parameters in arrays of JSON objects (i.e. Julia dictionaries).\n\nUsually, not all of the fields of the input JSON can be easily represented when converting to other models, care should be taken to avoid losing information.\n\nDirect work on this precise model type is not very efficient, as the accessor functions need to repeatedly find the information in the JSON tree. This gets very slow especially if calling many accessor functions sequentially. To avoid that, convert to e.g. StandardModel as soon as possible.\n\nExample\n\nmodel = load_json_model(\"some_model.json\")\nmodel.json # see the actual underlying JSON\nreactions(model) # see the list of reactions\n\n\n\n\n\n","category":"type"},{"location":"functions/#Base.convert-Tuple{Type{JSONModel}, MetabolicModel}","page":"Function reference","title":"Base.convert","text":"Base.convert(::Type{JSONModel}, mm::MetabolicModel)\n\nConvert any MetabolicModel to JSONModel.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.bounds-Tuple{JSONModel}","page":"Function reference","title":"COBREXA.bounds","text":"bounds(model::JSONModel)\n\nGet the bounds for reactions, assuming the information is stored in .lower_bound and .upper_bound.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.gene_annotations-Tuple{JSONModel, String}","page":"Function reference","title":"COBREXA.gene_annotations","text":"gene_annotations(model::JSONModel, gid::String)::Annotations\n\nGene annotations from the JSONModel.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.gene_notes-Tuple{JSONModel, String}","page":"Function reference","title":"COBREXA.gene_notes","text":"gene_notes(model::JSONModel, gid::String)::Notes\n\nGene notes from the JSONModel.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.genes-Tuple{JSONModel}","page":"Function reference","title":"COBREXA.genes","text":"genes(model::JSONModel)\n\nExtract gene names from a JSON model.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.metabolite_annotations-Tuple{JSONModel, String}","page":"Function reference","title":"COBREXA.metabolite_annotations","text":"metabolite_annotations(model::JSONModel, mid::String)::Annotations\n\nMetabolite annotations from the JSONModel.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.metabolite_charge-Tuple{JSONModel, String}","page":"Function reference","title":"COBREXA.metabolite_charge","text":"metabolite_charge(model::JSONModel, mid::String)\n\nReturn the metabolite .charge\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.metabolite_compartment-Tuple{JSONModel, String}","page":"Function reference","title":"COBREXA.metabolite_compartment","text":"metabolite_compartment(model::JSONModel, mid::String)\n\nReturn the metabolite .compartment\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.metabolite_formula-Tuple{JSONModel, String}","page":"Function reference","title":"COBREXA.metabolite_formula","text":"metabolite_formula(model::JSONModel, mid::String)\n\nParse and return the metabolite .formula\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.metabolite_notes-Tuple{JSONModel, String}","page":"Function reference","title":"COBREXA.metabolite_notes","text":"metabolite_notes(model::JSONModel, mid::String)::Notes\n\nMetabolite notes from the JSONModel.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.metabolites-Tuple{JSONModel}","page":"Function reference","title":"COBREXA.metabolites","text":"metabolites(model::JSONModel)\n\nExtract metabolite names (stored as .id) from JSON model.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.objective-Tuple{JSONModel}","page":"Function reference","title":"COBREXA.objective","text":"objective(model::JSONModel)\n\nCollect .objective_coefficient keys from model reactions.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.reaction_annotations-Tuple{JSONModel, String}","page":"Function reference","title":"COBREXA.reaction_annotations","text":"reaction_annotations(model::JSONModel, rid::String)::Annotations\n\nReaction annotations from the JSONModel.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.reaction_gene_association-Tuple{JSONModel, String}","page":"Function reference","title":"COBREXA.reaction_gene_association","text":"reaction_gene_associaton(model::JSONModel, rid::String)\n\nParses the .gene_reaction_rule from reactions.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.reaction_notes-Tuple{JSONModel, String}","page":"Function reference","title":"COBREXA.reaction_notes","text":"reaction_notes(model::JSONModel, rid::String)::Notes\n\nReaction notes from the JSONModel.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.reaction_stoichiometry-Tuple{JSONModel, String}","page":"Function reference","title":"COBREXA.reaction_stoichiometry","text":"reaction_stoichiometry(model::JSONModel, rxn_id::String)::Dict{String, Float64}\n\nReturn the reaction equation of reaction with id rxn_id in model. The reaction equation maps metabolite ids to their stoichiometric coefficients.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.reaction_subsystem-Tuple{JSONModel, String}","page":"Function reference","title":"COBREXA.reaction_subsystem","text":"reaction_subsystem(model::JSONModel, rid::String)\n\nParses the .subsystem out from reactions.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.reactions-Tuple{JSONModel}","page":"Function reference","title":"COBREXA.reactions","text":"reactions(model::JSONModel)\n\nExtract reaction names (stored as .id) from JSON model.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.stoichiometry-Tuple{JSONModel}","page":"Function reference","title":"COBREXA.stoichiometry","text":"stoichiometry(model::JSONModel)\n\nGet the stoichiometry. Assuming the information is stored in reaction object under key .metabolites.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.MATModel","page":"Function reference","title":"COBREXA.MATModel","text":"struct MATModel\n\nWrapper around the models loaded in dictionaries from the MATLAB representation.\n\n\n\n\n\n","category":"type"},{"location":"functions/#Base.convert-Tuple{Type{MATModel}, MetabolicModel}","page":"Function reference","title":"Base.convert","text":"Base.convert(::Type{MATModel}, m::MetabolicModel)\n\nConvert any metabolic model to MATModel.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA._mat_has_squashed_coupling-Tuple{Any}","page":"Function reference","title":"COBREXA._mat_has_squashed_coupling","text":"_mat_has_squashed_coupling(mat)\n\nGuesses whether C in the MAT file is stored in A=[S;C].\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.balance-Tuple{MATModel}","page":"Function reference","title":"COBREXA.balance","text":"balance(m::MATModel)\n\nExtracts balance from the MAT model, defaulting to zeroes if not present.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.bounds-Tuple{MATModel}","page":"Function reference","title":"COBREXA.bounds","text":"bounds(m::MATModel)\n\nExtracts bounds from the MAT file, saved under lb and ub.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.coupling-Tuple{MATModel}","page":"Function reference","title":"COBREXA.coupling","text":"coupling(m::MATModel)\n\nExtract coupling matrix stored, in C key.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.coupling_bounds-Tuple{MATModel}","page":"Function reference","title":"COBREXA.coupling_bounds","text":"coupling_bounds(m::MATModel)\n\nExtracts the coupling constraints. Currently, there are several accepted ways to store these in MATLAB models; this takes the constraints from vectors cl and cu.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.genes-Tuple{MATModel}","page":"Function reference","title":"COBREXA.genes","text":"genes(m::MATModel)\n\nExtracts the possible gene list from genes key.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.metabolite_charge-Tuple{MATModel, String}","page":"Function reference","title":"COBREXA.metabolite_charge","text":"metabolite_charge(m::MATModel, mid::String)\n\nExtract metabolite charge from metCharge or metCharges.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.metabolite_compartment-Tuple{MATModel, String}","page":"Function reference","title":"COBREXA.metabolite_compartment","text":"metabolite_compartment(m::MATModel, mid::String)\n\nExtract metabolite compartment from metCompartment or metCompartments.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.metabolite_formula-Tuple{MATModel, String}","page":"Function reference","title":"COBREXA.metabolite_formula","text":"metabolite_formula(m::MATModel, mid::String)\n\nExtract metabolite formula from key metFormula or metFormulas.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.metabolites-Tuple{MATModel}","page":"Function reference","title":"COBREXA.metabolites","text":"metabolites(m::MATModel)::Vector{String}\n\nExtracts metabolite names from mets key in the MAT file.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.objective-Tuple{MATModel}","page":"Function reference","title":"COBREXA.objective","text":"objective(m::MATModel)\n\nExtracts the objective from the MAT model (defaults to zeroes).\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.reaction_gene_association-Tuple{MATModel, String}","page":"Function reference","title":"COBREXA.reaction_gene_association","text":"reaction_gene_association(m::MATModel, rid::String)\n\nExtracts the associations from grRules key, if present.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.reaction_stoichiometry-Tuple{MATModel, Any}","page":"Function reference","title":"COBREXA.reaction_stoichiometry","text":"reaction_stoichiometry(model::MATModel, rxn_index)::Dict{String, Float64}\n\nReturn the reaction equation of reaction with index rxn_index in model. The reaction equation maps metabolite ids to their stoichiometric coefficients. Note, rxn_index can be any suitable type that can index into an array.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.reaction_stoichiometry-Tuple{MATModel, String}","page":"Function reference","title":"COBREXA.reaction_stoichiometry","text":"reaction_stoichiometry(model::MATModel, rxn_id::String)::Dict{String, Float64}\n\nReturn the reaction equation of reaction with id rxn_id in model. The reaction equation maps metabolite ids to their stoichiometric coefficients.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.reactions-Tuple{MATModel}","page":"Function reference","title":"COBREXA.reactions","text":"reactions(m::MATModel)::Vector{String}\n\nExtracts reaction names from rxns key in the MAT file.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.stoichiometry-Tuple{MATModel}","page":"Function reference","title":"COBREXA.stoichiometry","text":"stoichiometry(m::MATModel)\n\nExtract the stoichiometry matrix, stored under key S.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.Metabolite","page":"Function reference","title":"COBREXA.Metabolite","text":"Metabolite structure.\n\nFields\n\nid :: String\nname :: String\nformula :: String\ncharge :: Int\ncompartment :: String\nnotes :: Dict{String, Vector{String}}\nannotation :: Dict{String, Union{Vector{String}, String}}\n\n\n\n\n\n","category":"type"},{"location":"functions/#COBREXA.Reaction","page":"Function reference","title":"COBREXA.Reaction","text":"Reaction struct.\n\nFields\n\nid :: String\nname :: String\nmetabolites :: Dict{Metabolite, Float64}\nlb :: Float64\nub :: Float64\ngrr :: Vector{Vector{Gene}}\nsubsystem :: String\nnotes :: Dict{String, Vector{String}}\nannotation :: Dict{String, Union{Vector{String}, String}}\nobjective_coefficient :: Float64\n\n\n\n\n\n","category":"type"},{"location":"functions/#COBREXA.ReactionStatus","page":"Function reference","title":"COBREXA.ReactionStatus","text":"Used for concise reporting of modeling results.\n\n\n\n\n\n","category":"type"},{"location":"functions/#COBREXA.SBMLModel","page":"Function reference","title":"COBREXA.SBMLModel","text":"struct SBMLModel\n\nThin wrapper around the model from SBML.jl library. Allows easy conversion from SBML to any other model format.\n\n\n\n\n\n","category":"type"},{"location":"functions/#Base.convert-Tuple{Type{SBMLModel}, MetabolicModel}","page":"Function reference","title":"Base.convert","text":"Base.convert(::Type{SBMLModel}, mm::MetabolicModel)\n\nConvert any metabolic model to SBMLModel.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.balance-Tuple{SBMLModel}","page":"Function reference","title":"COBREXA.balance","text":"balance(model::SBMLModel)::SparseVec\n\nBalance vector of a SBMLModel. This is always zero.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.bounds-Tuple{SBMLModel}","page":"Function reference","title":"COBREXA.bounds","text":"bounds(model::SBMLModel)::Tuple{SparseVec,SparseVec}\n\nGet the lower and upper flux bounds of model SBMLModel. Throws DomainError in case if the SBML contains mismatching units.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.genes-Tuple{SBMLModel}","page":"Function reference","title":"COBREXA.genes","text":"genes(model::SBMLModel)::Vector{String}\n\nGet genes of a SBMLModel.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.metabolite_charge-Tuple{SBMLModel, String}","page":"Function reference","title":"COBREXA.metabolite_charge","text":"metabolite_charge(model::SBMLModel, mid::String)::Maybe{Int}\n\nGet charge of a chosen metabolite from SBMLModel.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.metabolite_formula-Tuple{SBMLModel, String}","page":"Function reference","title":"COBREXA.metabolite_formula","text":"metabolite_formula(model::SBMLModel, mid::String)::Maybe{MetaboliteFormula}\n\nGet MetaboliteFormula from a chosen metabolite from SBMLModel.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.metabolites-Tuple{SBMLModel}","page":"Function reference","title":"COBREXA.metabolites","text":"metabolites(model::SBMLModel)::Vector{String}\n\nGet metabolites from a SBMLModel.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.n_genes-Tuple{SBMLModel}","page":"Function reference","title":"COBREXA.n_genes","text":"n_genes(model::SBMLModel)::Int\n\nGet number of genes in SBMLModel.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.n_metabolites-Tuple{SBMLModel}","page":"Function reference","title":"COBREXA.n_metabolites","text":"n_metabolites(model::SBMLModel)::Int\n\nEfficient counting of metabolites in SBMLModel.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.n_reactions-Tuple{SBMLModel}","page":"Function reference","title":"COBREXA.n_reactions","text":"n_reactions(model::SBMLModel)::Int\n\nEfficient counting of reactions in SBMLModel.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.objective-Tuple{SBMLModel}","page":"Function reference","title":"COBREXA.objective","text":"objective(model::SBMLModel)::SparseVec\n\nObjective of the SBMLModel. \n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.reaction_gene_association-Tuple{SBMLModel, String}","page":"Function reference","title":"COBREXA.reaction_gene_association","text":"reaction_gene_association(model::SBMLModel, rid::String)::Maybe{GeneAssociation}\n\nRetrieve the GeneAssociation from SBMLModel.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.reaction_stoichiometry-Tuple{SBMLModel, String}","page":"Function reference","title":"COBREXA.reaction_stoichiometry","text":"reaction_stoichiometry(model::SBMLModel, rxn_id::String)::Dict{String, Float64}\n\nReturn the reaction equation of reaction with id rxn_id in model. The reaction equation maps metabolite ids to their stoichiometric coefficients.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.reactions-Tuple{SBMLModel}","page":"Function reference","title":"COBREXA.reactions","text":"reactions(model::SBMLModel)::Vector{String}\n\nGet reactions from a SBMLModel.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.stoichiometry-Tuple{SBMLModel}","page":"Function reference","title":"COBREXA.stoichiometry","text":"stoichiometry(model::SBMLModel)::SparseMat\n\nRecreate the stoichiometry matrix from the SBMLModel.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.Serialized","page":"Function reference","title":"COBREXA.Serialized","text":"mutable struct Serialized{M <: MetabolicModel}\n m::Maybe{M}\n filename::String\nend\n\nA meta-model that represents a model that is serialized on the disk. The internal model will be loaded on-demand by using any accessor, or by calling precache! directly.\n\n\n\n\n\n","category":"type"},{"location":"functions/#COBREXA.precache!-Tuple{Serialized}","page":"Function reference","title":"COBREXA.precache!","text":"precache!(model::Serialized{MetabolicModel})::Nothing\n\nLoad the Serialized model from disk in case it's not alreadly loaded.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.StandardModel","page":"Function reference","title":"COBREXA.StandardModel","text":"mutable struct StandardModel\n\nStandardModel is used to store a constraint based metabolic model with meta-information. Meta-information is defined as annotation details, which include gene-reaction-rules, formulas, etc.\n\nThis model type seeks to keep as much meta-information as possible, as opposed to CoreModel and CoreModelCoupled, which keep the bare neccessities only. When merging models and keeping meta-information is important, use this as the model type. If meta-information is not important, use the more efficient core model types. See CoreModel and CoreModelCoupled for comparison.\n\nIn this model, reactions, metabolites, and genes are stored in ordered dictionaries indexed by each struct's id field. For example, model.reactions[\"rxn1_id\"] returns a Reaction where the field id equals \"rxn1_id\". This makes adding and removing reactions efficient. \n\nNote that the stoichiometric matrix (or any other core data, e.g. flux bounds) is not stored directly as in CoreModel. When this model type is used in analysis functions, these core data structures are built from scratch each time an analysis function is called. This can cause performance issues if you run many small analysis functions sequentially. Consider using the core model types if performance is critical.\n\nSee also: Reaction, Metabolite, Gene\n\nFields\n\nid :: String\nreactions :: OrderedDict{String, Reaction}\nmetabolites :: OrderedDict{String, Metabolite}\ngenes :: OrderedDict{String, Gene}\n\nExample\n\nmodel = load_model(StandardModel, \"model_location\")\n\n\n\n\n\n","category":"type"},{"location":"functions/#Base.convert-Tuple{Type{StandardModel}, MetabolicModel}","page":"Function reference","title":"Base.convert","text":"Base.convert(::Type{StandardModel}, model::MetabolicModel)\n\nConvert any MetabolicModel into a StandardModel. Note, some data loss may occur since only the generic interface is used during the conversion process.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.balance-Tuple{StandardModel}","page":"Function reference","title":"COBREXA.balance","text":"balance(model::StandardModel)\n\nReturn the balance of the linear problem, i.e. b in Sv = 0 where S is the stoichiometric matrix and v is the flux vector.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.bounds-Tuple{StandardModel}","page":"Function reference","title":"COBREXA.bounds","text":"bounds(model::StandardModel)\n\nReturn the lower and upper bounds, respectively, for reactions in model. Order matches that of the reaction ids returned in reactions().\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.gene_annotations-Tuple{StandardModel, String}","page":"Function reference","title":"COBREXA.gene_annotations","text":"gene_annotations(model::StandardModel, id::String)::Annotations\n\nReturn the annotation associated with gene id in model. Return an empty Dict if not present.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.gene_notes-Tuple{StandardModel, String}","page":"Function reference","title":"COBREXA.gene_notes","text":"gene_notes(model::StandardModel, id::String)::Notes\n\nReturn the notes associated with gene id in model. Return an empty Dict if not present.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.genes-Tuple{StandardModel}","page":"Function reference","title":"COBREXA.genes","text":"genes(model::StandardModel)\n\nReturn a vector of gene id strings in model.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.lower_bounds-Tuple{StandardModel}","page":"Function reference","title":"COBREXA.lower_bounds","text":"lower_bounds(model::StandardModel)\n\nReturn the lower bounds for all reactions in model in sparse format.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.metabolite_annotations-Tuple{StandardModel, String}","page":"Function reference","title":"COBREXA.metabolite_annotations","text":"metabolite_annotations(model::StandardModel, id::String)::Annotations\n\nReturn the annotation associated with metabolite id in model. Return an empty Dict if not present.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.metabolite_charge-Tuple{StandardModel, String}","page":"Function reference","title":"COBREXA.metabolite_charge","text":"metabolite_charge(model::StandardModel, id::String)\n\nReturn the charge associated with metabolite id in model. Return nothing if not present.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.metabolite_compartment-Tuple{StandardModel, String}","page":"Function reference","title":"COBREXA.metabolite_compartment","text":"metabolite_compartment(model::StandardModel, id::String)\n\nReturn compartment associated with metabolite id in model. Return nothing if not present.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.metabolite_formula-Tuple{StandardModel, String}","page":"Function reference","title":"COBREXA.metabolite_formula","text":"metabolite_formula(model::StandardModel, id::String)\n\nReturn the formula of reaction id in model. Return nothing if not present.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.metabolite_notes-Tuple{StandardModel, String}","page":"Function reference","title":"COBREXA.metabolite_notes","text":"metabolite_notes(model::StandardModel, id::String)::Notes\n\nReturn the notes associated with metabolite id in model. Return an empty Dict if not present.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.metabolites-Tuple{StandardModel}","page":"Function reference","title":"COBREXA.metabolites","text":"metabolites(model::StandardModel)\n\nReturn a vector of metabolite id strings contained in model. The order of metabolite strings returned here matches the order used to construct the stoichiometric matrix.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.n_genes-Tuple{StandardModel}","page":"Function reference","title":"COBREXA.n_genes","text":"n_genes(model::StandardModel)\n\nReturn the number of genes in model.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.n_metabolites-Tuple{StandardModel}","page":"Function reference","title":"COBREXA.n_metabolites","text":"n_metabolites(model::StandardModel)\n\nReturn the number of metabolites in model.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.n_reactions-Tuple{StandardModel}","page":"Function reference","title":"COBREXA.n_reactions","text":"n_reactions(model::StandardModel)\n\nReturn the number of reactions contained in model.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.objective-Tuple{StandardModel}","page":"Function reference","title":"COBREXA.objective","text":"objective(model::StandardModel)\n\nReturn sparse objective vector for model.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.reaction_annotations-Tuple{StandardModel, String}","page":"Function reference","title":"COBREXA.reaction_annotations","text":"reaction_annotations(model::StandardModel, id::String)::Annotations\n\nReturn the annotation associated with reaction id in model. Return an empty Dict if not present.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.reaction_gene_association-Tuple{StandardModel, String}","page":"Function reference","title":"COBREXA.reaction_gene_association","text":"reaction_gene_association(model::StandardModel, id::String)\n\nReturn the gene reaction rule in string format for reaction with id in model. Return nothing if not available.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.reaction_notes-Tuple{StandardModel, String}","page":"Function reference","title":"COBREXA.reaction_notes","text":"reaction_notes(model::StandardModel, id::String)::Notes\n\nReturn the notes associated with reaction id in model. Return an empty Dict if not present.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.reaction_stoichiometry-Tuple{StandardModel, String}","page":"Function reference","title":"COBREXA.reaction_stoichiometry","text":"reaction_stoichiometry(model::StandardModel, rxn_id::String)::Dict{String, Float64}\n\nReturn the reaction equation of reaction with id rxn_id in model. The reaction equation maps metabolite ids to their stoichiometric coefficients.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.reaction_subsystem-Tuple{StandardModel, String}","page":"Function reference","title":"COBREXA.reaction_subsystem","text":"reaction_subsystem(id::String, model::StandardModel)\n\nReturn the subsystem associated with reaction id in model. Return nothing if not present.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.reactions-Tuple{StandardModel}","page":"Function reference","title":"COBREXA.reactions","text":"reactions(model::StandardModel)\n\nReturn a vector of reaction id strings contained in model. The order of reaction ids returned here matches the order used to construct the stoichiometric matrix.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.stoichiometry-Tuple{StandardModel}","page":"Function reference","title":"COBREXA.stoichiometry","text":"stoichiometry(model::StandardModel)\n\nReturn the stoichiometric matrix associated with model in sparse format.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.upper_bounds-Tuple{StandardModel}","page":"Function reference","title":"COBREXA.upper_bounds","text":"upper_bounds(model::StandardModel)\n\nReturn the upper bounds for all reactions in model in sparse format. Order matches that of the reaction ids returned in reactions().\n\n\n\n\n\n","category":"method"},{"location":"functions/#Base-functions","page":"Function reference","title":"Base functions","text":"","category":"section"},{"location":"functions/","page":"Function reference","title":"Function reference","text":"Modules = [COBREXA]\nPages = map(file -> joinpath(\"base\", file), readdir(\"../src/base\"))","category":"page"},{"location":"functions/#COBREXA._constants","page":"Function reference","title":"COBREXA._constants","text":"A named tuple that contains the magic values that are used globally for whatever purposes.\n\n\n\n\n\n","category":"constant"},{"location":"functions/#COBREXA.get_bound_vectors-Tuple{Any}","page":"Function reference","title":"COBREXA.get_bound_vectors","text":"get_bound_vectors(opt_model)\n\nReturns vectors of the lower and upper bounds of opt_model constraints, where opt_model is a JuMP model constructed by e.g. make_optimization_model or flux_balance_analysis.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.is_solved-Tuple{Any}","page":"Function reference","title":"COBREXA.is_solved","text":"is_solved(optmodel)\n\nReturn true if optmodel solved successfully (solution is optimal or locally optimal). Return false if any other termination status is reached. Termination status is defined in the documentation of JuMP.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.make_optimization_model-Tuple{MetabolicModel, Any}","page":"Function reference","title":"COBREXA.make_optimization_model","text":"make_optimization_model(\n model::MetabolicModel,\n optimizer;\n sense = MOI.MAX_SENSE,\n)\n\nConvert MetabolicModels to a JuMP model, place objectives and the equality constraint.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.optimize_model-Tuple{MetabolicModel, Any}","page":"Function reference","title":"COBREXA.optimize_model","text":"optimize_model(\n model::MetabolicModel,\n optimizer;\n sense = MOI.MIN_SENSE,\n)\n\nUse JuMP to solve an instance of CoreModel\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.set_bound-Tuple{Any, Any}","page":"Function reference","title":"COBREXA.set_bound","text":"set_bound(index, optimization_model;\n ub=_constants.default_reaction_rate,\n lb=-_constants.default_reaction_rate)\n\nHelper function to set the bounds of variables. The JuMP set_normalized_rhs function is a little confusing, so this function simplifies setting constraints. In short, JuMP uses a normalized right hand side representation of constraints, which means that lower bounds have their sign flipped. This function does this for you, so you don't have to remember to do this whenever you change the constraints. \n\nJust supply the constraint index and the JuMP model (opt_model) that will be solved, and the variable's bounds will be set to ub and lb.\n\n\n\n\n\n","category":"method"},{"location":"functions/#File-I/O-and-serialization","page":"Function reference","title":"File I/O and serialization","text":"","category":"section"},{"location":"functions/","page":"Function reference","title":"Function reference","text":"Modules = [COBREXA]\nPages = map(file -> joinpath(\"io\", file), readdir(\"../src/io\"))","category":"page"},{"location":"functions/#COBREXA.load_model-Tuple{String}","page":"Function reference","title":"COBREXA.load_model","text":"load_model(file_name::String)::MetabolicModel\n\nGeneric function for loading models that chooses a specific loader function from the file_name extension, or throws an error.\n\nCurrently, these model types are supported:\n\nSBML models (*.xml, loaded with load_sbml_model)\nJSON models (*.json, loaded with load_json_model)\nMATLAB models (*.mat, loaded with load_mat_model)\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.load_model-Union{Tuple{T}, Tuple{Type{T}, String}} where T<:MetabolicModel","page":"Function reference","title":"COBREXA.load_model","text":"load_model(type::Type{T}, file_name::String)::T where T\n\nHelper function tht loads the model using load_model and return it converted to type.\n\nExample:\n\nload_model(CoreModel, \"mySBMLModel.xml\")\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.save_model-Tuple{MetabolicModel, String}","page":"Function reference","title":"COBREXA.save_model","text":"save_model(model::MetabolicModel, file_name::String)\n\nGeneric function for saving models that chooses a specific writer function from the file_name extension, or throws an error.\n\nCurrently, these model types are supported:\n\nJSON models (*.json, loaded with save_json_model)\nMATLAB models (*.mat, loaded with save_mat_model)\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.load_json_model-Tuple{String}","page":"Function reference","title":"COBREXA.load_json_model","text":"load_json_model(filename::String)::JSONModel\n\nLoad and return a JSON-formatted model that is stored in file_name.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.save_json_model-Tuple{MetabolicModel, String}","page":"Function reference","title":"COBREXA.save_json_model","text":"save_json_model(model::MetabolicModel, file_name::String)\n\nSave a JSONModel in model to a JSON file file_name.\n\nIn case the model is not JSONModel, it will be converted automatically.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.load_mat_model-Tuple{String}","page":"Function reference","title":"COBREXA.load_mat_model","text":"load_mat_model(file_name::String)\n\nLoad and return a MATLAB file file_name that contains a COBRA-compatible model.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.save_mat_model-Tuple{MetabolicModel, String}","page":"Function reference","title":"COBREXA.save_mat_model","text":"save_mat_model(model::MetabolicModel, file_name::String; model_name::String=\"model\")\n\nSave a MATModel in model to a MATLAB file file_name in a format compatible with other MATLAB-based COBRA software.\n\nIn case the model is not MATModel, it will be converted automatically.\n\nmodel_name is the identifier name for the whole model written to the MATLAB file; defaults to just \"model\".\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.load_sbml_model-Tuple{String}","page":"Function reference","title":"COBREXA.load_sbml_model","text":"load_sbml_model(file_name::String)::SBMLModel\n\nLoad and return a SBML XML model in file_name.\n\n\n\n\n\n","category":"method"},{"location":"functions/#Pretty-printing","page":"Function reference","title":"Pretty printing","text":"","category":"section"},{"location":"functions/","page":"Function reference","title":"Function reference","text":"Modules = [COBREXA]\nPages = map(file -> joinpath(\"io\", \"show\", file), readdir(\"../src/io/show\"))","category":"page"},{"location":"functions/#Base.show-Tuple{IO, MIME{Symbol(\"text/plain\")}, MetabolicModel}","page":"Function reference","title":"Base.show","text":"Pretty printing of everything metabolic-modelish.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA._pretty_substances-Tuple{Vector{String}}","page":"Function reference","title":"COBREXA._pretty_substances","text":"_pretty_substances(ss::Vector{String})::String\n\nNicely format a substance list.\n\n\n\n\n\n","category":"method"},{"location":"functions/#Base.show-Union{Tuple{M}, Tuple{IO, MIME{Symbol(\"text/plain\")}, Serialized{M}}} where M","page":"Function reference","title":"Base.show","text":"Base.show(io::IO, ::MIME\"text/plain\", m::Serialized{M}) where {M}\n\nShow the Serialized model without unnecessarily loading it.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA._pretty_print_keyvals-Tuple{Any, String, Any}","page":"Function reference","title":"COBREXA._pretty_print_keyvals","text":"_pretty_print_keyvals(io, def::String, payload; kwargs...)\n\nNicely prints keys and values.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA._pretty_print_keyvals-Tuple{Any, String, Dict}","page":"Function reference","title":"COBREXA._pretty_print_keyvals","text":"_pretty_print_keyvals(\n io,\n def::String,\n payload::Dict\n)\n\nSpecialization of _pretty_print_keyvals for dictionaries.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA._pretty_print_keyvals-Tuple{Any, String, String}","page":"Function reference","title":"COBREXA._pretty_print_keyvals","text":"_pretty_print_keyvals(\n io,\n def::String,\n payload::String\n)\n\nSpecialization of _pretty_print_keyvals for plain strings.\n\n\n\n\n\n","category":"method"},{"location":"functions/#Model-reconstruction","page":"Function reference","title":"Model reconstruction","text":"","category":"section"},{"location":"functions/","page":"Function reference","title":"Function reference","text":"Modules = [COBREXA]\nPages = map(file -> joinpath(\"reconstruction\", file), readdir(\"../src/reconstruction\"))","category":"page"},{"location":"functions/#COBREXA.add_reactions-Tuple{CoreModel, CoreModel}","page":"Function reference","title":"COBREXA.add_reactions","text":"add_reactions(m1::CoreModel, m2::CoreModel; check_consistency = false)\n\nAdd all reactions from m2 to m1.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.add_reactions-Union{Tuple{K}, Tuple{V2}, Tuple{V1}, Tuple{CoreModel, V1, V2, AbstractFloat, AbstractFloat, AbstractFloat, String, K}} where {V1<:AbstractVector{Float64}, V2<:AbstractVector{Float64}, K<:AbstractVector{String}}","page":"Function reference","title":"COBREXA.add_reactions","text":"add_reactions(\n m::CoreModel,\n s::V1,\n b::V2,\n c::AbstractFloat,\n xl::AbstractFloat,\n xu::AbstractFloat,\n rxn::String,\n mets::K;\n check_consistency = false,\n) where {V1<:VecType,V2<:VecType,K<:StringVecType}\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.add_reactions-Union{Tuple{K}, Tuple{V}, Tuple{M}, Tuple{CoreModel, M, V, V, V, V, K, K}} where {M<:AbstractMatrix{Float64}, V<:AbstractVector{Float64}, K<:AbstractVector{String}}","page":"Function reference","title":"COBREXA.add_reactions","text":"add_reactions(\n m::CoreModel,\n Sp::M,\n b::V,\n c::V,\n xl::V,\n xu::V,\n rxns::K,\n mets::K;\n check_consistency = false,\n) where {M<:MatType,V<:VecType,K<:StringVecType}\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.add_reactions-Union{Tuple{V2}, Tuple{V1}, Tuple{CoreModel, V1, V2, AbstractFloat, AbstractFloat, AbstractFloat}} where {V1<:AbstractVector{Float64}, V2<:AbstractVector{Float64}}","page":"Function reference","title":"COBREXA.add_reactions","text":"add_reactions(\n m::CoreModel,\n s::V1,\n b::V2,\n c::AbstractFloat,\n xl::AbstractFloat,\n xu::AbstractFloat;\n check_consistency = false,\n) where {V1<:VecType,V2<:VecType}\n\nAdd reaction(s) to a CoreModel model m.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.add_reactions-Union{Tuple{V}, Tuple{M}, Tuple{CoreModel, M, V, V, V, V}} where {M<:AbstractMatrix{Float64}, V<:AbstractVector{Float64}}","page":"Function reference","title":"COBREXA.add_reactions","text":"add_reactions(\n m::CoreModel,\n Sp::M,\n b::V,\n c::V,\n xl::V,\n xu::V;\n check_consistency = false,\n) where {M<:MatType,V<:VecType}\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.change_bounds!-Union{Tuple{V}, Tuple{CoreModel, Vector{Int64}}} where V<:AbstractVector{Float64}","page":"Function reference","title":"COBREXA.change_bounds!","text":"change_bounds!(\n model::CoreModel,\n rxns::Vector{Int};\n xl::V = Float64[],\n xu::V = Float64[],\n) where {V<:VecType}\n\nChange the lower and/or upper bounds ('xl' and 'xu') for given reactions.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.change_bounds!-Union{Tuple{V}, Tuple{CoreModel, Vector{String}}} where V<:AbstractVector{Float64}","page":"Function reference","title":"COBREXA.change_bounds!","text":"change_bounds!(\n model::CoreModel,\n rxns::Vector{String};\n xl::V = Float64[],\n xu::V = Float64[],\n) where {V<:VecType}\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.remove_reactions-Tuple{CoreModel, Integer}","page":"Function reference","title":"COBREXA.remove_reactions","text":"remove_reactions(m::CoreModel, rxn::Integer)\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.remove_reactions-Tuple{CoreModel, String}","page":"Function reference","title":"COBREXA.remove_reactions","text":"remove_reactions(m::CoreModel, rxn::String)\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.remove_reactions-Tuple{CoreModel, Vector{Int64}}","page":"Function reference","title":"COBREXA.remove_reactions","text":"remove_reactions(m::CoreModel, rxns::Vector{Int})\n\nRemove reaction(s) from a CoreModel.\n\nAlso removes any metabolites not involved in any reaction after the deletion.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.remove_reactions-Tuple{CoreModel, Vector{String}}","page":"Function reference","title":"COBREXA.remove_reactions","text":"remove_reactions(m::CoreModel, rxns::Vector{String})\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.verify_consistency-Union{Tuple{K}, Tuple{V}, Tuple{M}, Tuple{CoreModel, M, V, V, V, V, K, K, Any, Any}} where {M<:AbstractMatrix{Float64}, V<:AbstractVector{Float64}, K<:AbstractVector{String}}","page":"Function reference","title":"COBREXA.verify_consistency","text":"verify_consistency(\n m::CoreModel,\n Sp::M,\n b::V,\n c::V,\n xl::V,\n xu::V,\n names::K,\n mets::K,\n new_reactions,\n new_metabolites,\n) where {M<:MatType,V<:VecType,K<:StringVecType}\n\nCheck the consistency of given reactions with existing reactions in m.\n\nTODO: work in progress, doesn't return consistency status.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.add_coupling_constraints!-Tuple{CoreModelCoupled, AbstractVector{Float64}, AbstractFloat, AbstractFloat}","page":"Function reference","title":"COBREXA.add_coupling_constraints!","text":"add_coupling_constraints!(\n m::CoreModelCoupled,\n c::VecType,\n cl::AbstractFloat,\n cu::AbstractFloat,\n)\n\nOverload for adding a single coupling constraint.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.add_coupling_constraints!-Union{Tuple{V}, Tuple{CoreModelCoupled, AbstractMatrix{Float64}, V, V}} where V<:AbstractVector{Float64}","page":"Function reference","title":"COBREXA.add_coupling_constraints!","text":"add_coupling_constraints!(\n m::CoreModelCoupled,\n C::MatType,\n cl::V,\n cu::V,\n) where {V<:VecType}\n\nIn-place add a single coupling constraint in form\n\n câ‚— ≤ C x ≤ cᵤ\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.add_coupling_constraints-Tuple{CoreModel, Vararg{Any, N} where N}","page":"Function reference","title":"COBREXA.add_coupling_constraints","text":"add_coupling_constraints(m::CoreModel, args...)\n\nAdd coupling constraints to a plain CoreModel (returns a CoreModelCoupled).\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.add_coupling_constraints-Tuple{CoreModelCoupled, Vararg{Any, N} where N}","page":"Function reference","title":"COBREXA.add_coupling_constraints","text":"Add constraints of the following form to a CoreModelCoupled and return a modified one.\n\nAdd constraints to a CoreModelCoupled and return a modified one.\n\nThe arguments are same as for in-place add_coupling_constraints!.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.add_reactions-Tuple{CoreModelCoupled, CoreModel}","page":"Function reference","title":"COBREXA.add_reactions","text":"add_reactions(m1::CoreModelCoupled, m2::CoreModel; check_consistency = false)\n\nAdd all reactions from m2 to m1.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.add_reactions-Union{Tuple{K}, Tuple{V2}, Tuple{V1}, Tuple{CoreModelCoupled, V1, V2, AbstractFloat, AbstractFloat, AbstractFloat, String, K}} where {V1<:AbstractVector{Float64}, V2<:AbstractVector{Float64}, K<:AbstractVector{String}}","page":"Function reference","title":"COBREXA.add_reactions","text":"add_reactions(\n m::CoreModelCoupled,\n s::V1,\n b::V2,\n c::AbstractFloat,\n xl::AbstractFloat,\n xu::AbstractFloat,\n rxn::String,\n mets::K;\n check_consistency = false,\n) where {V1<:VecType,V2<:VecType,K<:StringVecType}\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.add_reactions-Union{Tuple{K}, Tuple{V}, Tuple{M}, Tuple{CoreModelCoupled, M, V, V, V, V, K, K}} where {M<:AbstractMatrix{Float64}, V<:AbstractVector{Float64}, K<:AbstractVector{String}}","page":"Function reference","title":"COBREXA.add_reactions","text":"add_reactions(\n m::CoreModelCoupled,\n Sp::M,\n b::V,\n c::V,\n xl::V,\n xu::V,\n rxns::K,\n mets::K;\n check_consistency = false,\n) where {M<:MatType,V<:VecType,K<:StringVecType}\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.add_reactions-Union{Tuple{V2}, Tuple{V1}, Tuple{CoreModelCoupled, V1, V2, AbstractFloat, AbstractFloat, AbstractFloat}} where {V1<:AbstractVector{Float64}, V2<:AbstractVector{Float64}}","page":"Function reference","title":"COBREXA.add_reactions","text":"add_reactions(\n m::CoreModelCoupled,\n s::V1,\n b::V2,\n c::AbstractFloat,\n xl::AbstractFloat,\n xu::AbstractFloat;\n check_consistency = false,\n) where {V1<:VecType,V2<:VecType}\n\nAdd reaction(s) to a CoreModelCoupled model m.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.add_reactions-Union{Tuple{V}, Tuple{M}, Tuple{CoreModelCoupled, M, V, V, V, V}} where {M<:AbstractMatrix{Float64}, V<:AbstractVector{Float64}}","page":"Function reference","title":"COBREXA.add_reactions","text":"add_reactions(\n m::CoreModelCoupled,\n Sp::M,\n b::V,\n c::V,\n xl::V,\n xu::V;\n check_consistency = false,\n) where {M<:MatType,V<:VecType}\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.change_bounds!-Union{Tuple{V}, Tuple{CoreModelCoupled, Vector{Int64}}} where V<:AbstractVector{Float64}","page":"Function reference","title":"COBREXA.change_bounds!","text":"change_bounds!(\n model::CoreModelCoupled,\n rxns::Vector{Int};\n xl::V = Float64[],\n xu::V = Float64[],\n)\n\nChange the lower and/or upper bounds ('xl' and 'xu') for given reactions.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.change_bounds!-Union{Tuple{V}, Tuple{CoreModelCoupled, Vector{String}}} where V<:AbstractVector{Float64}","page":"Function reference","title":"COBREXA.change_bounds!","text":"change_bounds!(\n model::CoreModelCoupled,\n rxns::Vector{String};\n xl::V = Float64[],\n xu::V = Float64[],\n) where {V<:VecType}\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.change_coupling_bounds!-Union{Tuple{V}, Tuple{CoreModelCoupled, Vector{Int64}}} where V<:AbstractVector{Float64}","page":"Function reference","title":"COBREXA.change_coupling_bounds!","text":"change_coupling_bounds!(\n model::CoreModelCoupled,\n constraints::Vector{Int};\n cl::V = Float64[],\n cu::V = Float64[],\n) where {V<:VecType}\n\nChange the lower and/or upper bounds (cl and cu) for the given list of coupling constraints.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.find_exchange_metabolites-Tuple{CoreModelCoupled}","page":"Function reference","title":"COBREXA.find_exchange_metabolites","text":"find_exchange_metabolites(\n model::CoreModelCoupled;\n exclude_biomass = false,\n biomass_str::String = \"biomass\",\n exc_prefs = [\"EX_\"; \"Exch_\"; \"Ex_\"],\n)\n\nGet indices of exchanged metabolites.\n\nIn practice returns the metabolites consumed by the reactions given by find_exchange_reactions and if called with the same arguments, the two outputs correspond.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.find_exchange_reactions-Tuple{CoreModelCoupled}","page":"Function reference","title":"COBREXA.find_exchange_reactions","text":"find_exchange_reactions(\n model::CoreModelCoupled;\n exclude_biomass = false,\n biomass_str::String = \"biomass\",\n exc_prefs = [\"EX_\"; \"Exch_\"; \"Ex_\"],\n)\n\nGet indices of exchange reactions.\n\nExchange reactions are identified based on most commonly used prefixes.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.remove_coupling_constraints!-Tuple{CoreModelCoupled, Int64}","page":"Function reference","title":"COBREXA.remove_coupling_constraints!","text":"remove_coupling_constraints!(m::CoreModelCoupled, constraint::Int)\n\nRemoves a single coupling constraints from a CoreModelCoupled in-place.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.remove_coupling_constraints!-Tuple{CoreModelCoupled, Vector{Int64}}","page":"Function reference","title":"COBREXA.remove_coupling_constraints!","text":"remove_coupling_constraints!(m::CoreModelCoupled, constraints::Vector{Int})\n\nRemoves a set of coupling constraints from a CoreModelCoupled in-place.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.remove_coupling_constraints-Tuple{CoreModelCoupled, Vararg{Any, N} where N}","page":"Function reference","title":"COBREXA.remove_coupling_constraints","text":"remove_coupling_constraints(m::CoreModelCoupled, args...)\n\nRemove coupling constraints from the linear model, and return the modified model. Arguments are the same as for in-place version remove_coupling_constraints!.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.remove_reactions-Tuple{CoreModelCoupled, Integer}","page":"Function reference","title":"COBREXA.remove_reactions","text":"remove_reactions(m::CoreModelCoupled, rxn::Integer)\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.remove_reactions-Tuple{CoreModelCoupled, String}","page":"Function reference","title":"COBREXA.remove_reactions","text":"remove_reactions(m::CoreModelCoupled, rxn::String)\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.remove_reactions-Tuple{CoreModelCoupled, Vector{Int64}}","page":"Function reference","title":"COBREXA.remove_reactions","text":"remove_reactions(m::CoreModelCoupled, rxns::Vector{Int})\n\nRemove reaction(s) from a CoreModelCoupled.\n\nAlso removes any metabolites not involved in any reaction after the deletion.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.remove_reactions-Tuple{CoreModelCoupled, Vector{String}}","page":"Function reference","title":"COBREXA.remove_reactions","text":"remove_reactions(m::CoreModelCoupled, rxns::Vector{String})\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.:⟵-Tuple{Union{Nothing, Metabolite, MetaboliteWithCoefficient, Vector{MetaboliteWithCoefficient}}, Union{Nothing, Metabolite, MetaboliteWithCoefficient, Vector{MetaboliteWithCoefficient}}}","page":"Function reference","title":"COBREXA.:⟵","text":"⟵(\n substrates::Union{\n Nothing,\n Metabolite,\n MetaboliteWithCoefficient,\n Vector{MetaboliteWithCoefficient},\n },\n products::Union{\n Nothing,\n Metabolite,\n MetaboliteWithCoefficient,\n Vector{MetaboliteWithCoefficient}\n },\n)\n\nMake a reverse-only Reaction from substrates and products. An equivalent alternative is â†.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.:⟶-Tuple{Union{Nothing, Metabolite, MetaboliteWithCoefficient, Vector{MetaboliteWithCoefficient}}, Union{Nothing, Metabolite, MetaboliteWithCoefficient, Vector{MetaboliteWithCoefficient}}}","page":"Function reference","title":"COBREXA.:⟶","text":"⟶(\n substrates::Union{\n Nothing,\n Metabolite,\n MetaboliteWithCoefficient,\n Vector{MetaboliteWithCoefficient},\n },\n products::Union{\n Nothing, \n Metabolite,\n MetaboliteWithCoefficient,\n Vector{MetaboliteWithCoefficient}\n },\n)\n\nMake a forward-only Reaction from substrates and products. An equivalent alternative is →.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.:⟷-Tuple{Union{Nothing, Metabolite, MetaboliteWithCoefficient, Vector{MetaboliteWithCoefficient}}, Union{Nothing, Metabolite, MetaboliteWithCoefficient, Vector{MetaboliteWithCoefficient}}}","page":"Function reference","title":"COBREXA.:⟷","text":"⟷(\n substrates::Union{\n Nothing,\n Metabolite,\n MetaboliteWithCoefficient,\n Vector{MetaboliteWithCoefficient},\n },\n products::Union{\n Nothing,\n Metabolite,\n MetaboliteWithCoefficient,\n Vector{MetaboliteWithCoefficient}\n },\n)\n\nMake a bidirectional (reversible) Reaction from substrates and products. An equivalent alternative is ↔.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.add_gene!-Tuple{StandardModel, Gene}","page":"Function reference","title":"COBREXA.add_gene!","text":"add_gene!(model::StandardModel, genes::Gene)\n\nAdd gene to model based on gene id.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.add_genes!-Tuple{StandardModel, Vector{Gene}}","page":"Function reference","title":"COBREXA.add_genes!","text":"add_genes!(model::StandardModel, genes::Vector{Gene})\n\nAdd genes to model based on gene id.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.add_metabolite!-Tuple{StandardModel, Metabolite}","page":"Function reference","title":"COBREXA.add_metabolite!","text":"add_metabolite!(model::StandardModel, met::Metabolite)\n\nAdd met to model based on metabolite id.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.add_metabolites!-Tuple{StandardModel, Vector{Metabolite}}","page":"Function reference","title":"COBREXA.add_metabolites!","text":"add_metabolites!(model::StandardModel, mets::Vector{Metabolite})\n\nAdd mets to model based on metabolite id.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.add_reaction!-Tuple{StandardModel, Reaction}","page":"Function reference","title":"COBREXA.add_reaction!","text":"add_reaction!(model::StandardModel, rxn::Reaction)\n\nAdd rxn to model based on reaction id.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.add_reactions!-Tuple{StandardModel, Vector{Reaction}}","page":"Function reference","title":"COBREXA.add_reactions!","text":"add_reactions!(model::StandardModel, rxns::Vector{Reaction})\n\nAdd rxns to model based on reaction id.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.remove_gene!-Tuple{StandardModel, String}","page":"Function reference","title":"COBREXA.remove_gene!","text":"remove_gene!(\n model::StandardModel,\n id::Vector{String};\n knockout_reactions::Bool = false,\n)\n\nRemove gene with id from model. If knockout_reactions is true, then also constrain reactions that require the genes to function to carry zero flux.\n\nExample\n\nremove_gene!(model, \"g1\")\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.remove_genes!-Tuple{StandardModel, Vector{String}}","page":"Function reference","title":"COBREXA.remove_genes!","text":"remove_genes!(\n model::StandardModel,\n ids::Vector{String};\n knockout_reactions::Bool = false,\n)\n\nRemove all genes with ids from model. If knockout_reactions is true, then also constrain reactions that require the genes to function to carry zero flux.\n\nExample\n\nremove_genes!(model, [\"g1\", \"g2\"])\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.remove_metabolite!-Tuple{StandardModel, String}","page":"Function reference","title":"COBREXA.remove_metabolite!","text":"remove_metabolite!(model::StandardModel, id::String)\n\nRemove metabolite with id from model. Warning, this could leave the model inconsistent, e.g. a reaction might require the deleted metabolite, in which case analysis functions will error.\n\nExample\n\nremove_metabolite!(model, \"atp_c\")\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.remove_metabolites!-Tuple{StandardModel, Vector{String}}","page":"Function reference","title":"COBREXA.remove_metabolites!","text":"remove_metabolites!(model::StandardModel, ids::Vector{String})\n\nRemove all metabolites with ids from model. Warning, this could leave the model inconsistent, e.g. a reaction might require the deleted metabolite, in which case analysis functions will error.\n\nExample\n\nremove_metabolites!(model, [\"atp_c\", \"adp_c\"])\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.remove_reaction!-Tuple{StandardModel, String}","page":"Function reference","title":"COBREXA.remove_reaction!","text":"remove_reaction!(model::StandardModel, id::String)\n\nRemove reaction with id from model. Note, may result in orphan metabolites.\n\nExample\n\nremove_reaction!(model, \"EX_glc__D_e\")\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.remove_reactions!-Tuple{StandardModel, Vector{String}}","page":"Function reference","title":"COBREXA.remove_reactions!","text":"remove_reactions!(model::StandardModel, ids::Vector{String})\n\nRemove all reactions with ids from model. Note, may result in orphan metabolites.\n\nExample\n\nremove_reactions!(model, [\"EX_glc__D_e\", \"fba\"])\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.@add_reactions!-Tuple{Symbol, Expr}","page":"Function reference","title":"COBREXA.@add_reactions!","text":"@add_reactions!(model::Symbol, ex::Expr)\n\nShortcut to add multiple reactions and their lower and upper bounds\n\nCall variants\n\n@add_reactions! model begin\n reaction_name, reaction\nend\n\n@add_reactions! model begin\n reaction_name, reaction, lower_bound\nend\n\n@add_reactions! model begin\n reaction_name, reaction, lower_bound, upper_bound\nend\n\nExamples\n\n@add_reactions! model begin\n \"v1\", nothing ⟶ A, 0, 500\n \"v2\", A ⟷ B + C, -500\n \"v3\", B + C ⟶ nothing\nend\n\n\n\n\n\n","category":"macro"},{"location":"functions/#Analysis-functions","page":"Function reference","title":"Analysis functions","text":"","category":"section"},{"location":"functions/","page":"Function reference","title":"Function reference","text":"Modules = [COBREXA]\nPages = map(file -> joinpath(\"analysis\", file), readdir(\"../src/analysis\"))","category":"page"},{"location":"functions/#COBREXA.flux_balance_analysis-Union{Tuple{M}, Tuple{M, Any}} where M<:MetabolicModel","page":"Function reference","title":"COBREXA.flux_balance_analysis","text":"flux_balance_analysis(\n model::M,\n optimizer;\n modifications = [],\n) where {M<:MetabolicModel}\n\nRun flux balance analysis (FBA) on the model optionally specifying modifications to the problem. Basically, FBA solves this optimization problem:\n\nmax cáµ€x\ns.t. S x = b\n xâ‚— ≤ x ≤ xᵤ\n\nSee \"Orth, J., Thiele, I. & Palsson, B. What is flux balance analysis?. Nat Biotechnol 28, 245–248 (2010). https://doi.org/10.1038/nbt.1614\" for more information.\n\nThe optimizer must be set to a JuMP-compatible optimizer, such as GLPK.Optimizer or Tulip.Optimizer\n\nOptionally, you may specify one or more modifications to be applied to the model before the analysis, such as change_optimizer_attribute,change_objective, and change_sense.\n\nReturns an optimized JuMP model.\n\nExample\n\nmodel = load_model(StandardModel, \"e_coli_core.json\")\nbiomass = findfirst(model.reactions, \"BIOMASS_Ecoli_core_w_GAM\")\nsolution = flux_balance_analysis(model, GLPK.optimizer; modifications=[change_objective(biomass)])\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.flux_balance_analysis_dict-Tuple{MetabolicModel, Vararg{Any, N} where N}","page":"Function reference","title":"COBREXA.flux_balance_analysis_dict","text":"flux_balance_analysis_dict(model::MetabolicModel, args...)::Union{Dict{String, Float64},Nothing}\n\nA variant of FBA that returns a dictionary assigning fluxes to reactions, if the solution is found. Arguments are passed to flux_balance_analysis.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.flux_balance_analysis_vec-Tuple","page":"Function reference","title":"COBREXA.flux_balance_analysis_vec","text":"flux_balance_analysis_vec(args...)::Union{Vector{Float64},Nothing}\n\nA variant of FBA that returns a vector of fluxes in the same order as reactions of the model, if the solution is found.\n\nArguments are passed to flux_balance_analysis.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA._FVA_add_constraint-NTuple{4, Any}","page":"Function reference","title":"COBREXA._FVA_add_constraint","text":"_FVA_add_constraint(model, c, x, Z)\n\nInternal helper function for adding constraints to a model. Exists mainly because for avoiding namespace problems on remote workers.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA._FVA_optimize_reaction-Tuple{Any, Any, Any}","page":"Function reference","title":"COBREXA._FVA_optimize_reaction","text":"_FVA_get_opt(model, rid)\n\nInternal helper for creating the optimized model on a remote worker, for avoiding namespace problems.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.flux_variability_analysis-Tuple{MetabolicModel, Any}","page":"Function reference","title":"COBREXA.flux_variability_analysis","text":"flux_variability_analysis(\n model::MetabolicModel,\n optimizer;\n kwargs...\n)\n\nA simpler version of flux_variability_analysis that maximizes and minimizes all reactions in the model. Arguments are forwarded.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.flux_variability_analysis-Tuple{MetabolicModel, Vector{Int64}, Any}","page":"Function reference","title":"COBREXA.flux_variability_analysis","text":"flux_variability_analysis(\n model::MetabolicModel,\n reactions::Vector{Int},\n optimizer;\n modifications = [],\n workers = [myid()],\n bounds = z -> (z,z),\n ret = objective_value,\n)::Matrix{Float64}\n\nFlux variability analysis solves a pair of optimization problems in model for each flux listed in reactions:\n\n min,max xáµ¢\ns.t. S x = b\n xâ‚— ≤ x ≤ xᵤ\n cáµ€x ≥ bounds(Zâ‚€)[1]\n cáµ€x ≤ bounds(Zâ‚€)[2]\n\nwhere Zâ‚€:= cáµ€xâ‚€ is the objective value of an optimal solution of the associated FBA problem (see flux_balance_analysis). See \"Gudmundsson, S., Thiele, I. Computationally efficient flux variability analysis. BMC Bioinformatics 11, 489 (2010). https://doi.org/10.1186/1471-2105-11-489\" for more information.\n\nThe bounds 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 -Inf and Inf in first and second pair to remove the limit. Use gamma_bounds and objective_bounds for simple bounds.\n\noptimizer must be set to a JuMP-compatible optimizer. The computation of the individual optimization problems is transparently distributed to workers (see Distributed.workers()).\n\nret is a function used to extract results from optimized JuMP models of the individual reactions. By default, it calls and returns the value of JuMP.objective_value. More information can be extracted e.g. by setting it to a function that returns a more elaborate data structure; such as m -> (JuMP.objective_value(m), JuMP.value.(m[:x])).\n\nReturns a matrix of extracted ret values for minima and maxima, of total size (length(reactions),2). The optimizer result status is checked with is_solved; nothing is returned if the optimization failed for any reason.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.flux_variability_analysis_dict-Tuple{MetabolicModel, Any}","page":"Function reference","title":"COBREXA.flux_variability_analysis_dict","text":"flux_variability_analysis_dict(\n model::MetabolicModel,\n optimizer;\n kwargs...\n)\n\nA variant of flux_variability_analysis that returns the individual maximized and minimized fluxes of all reactions as two dictionaries (of dictionaries). All keyword arguments except ret are passed through.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.parsimonious_flux_balance_analysis-Tuple{MetabolicModel, Any}","page":"Function reference","title":"COBREXA.parsimonious_flux_balance_analysis","text":"parsimonious_flux_balance_analysis(\n model::MetabolicModel,\n optimizer;\n modifications = [],\n qp_modifications = [],\n relax_bounds=[1.0, 0.999999, 0.99999, 0.9999, 0.999, 0.99],\n)\n\nRun parsimonious flux balance analysis (pFBA) on the model. In short, pFBA runs two consecutive optimization problems. The first is traditional FBA:\n\nmax cáµ€x = μ\ns.t. S x = b\n xâ‚— ≤ x ≤ xᵤ\n\nAnd the second is a quadratic optimization problem:\n\nmin Σᵢ xᵢ²\ns.t. S x = b\n xâ‚— ≤ x ≤ xᵤ\n μ = μâ°\n\nWhere 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.\n\npFBA gets the model optimum by standard FBA (using flux_balance_analysis with optimizer and modifications), 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 qp_modifications, which are applied after the FBA.\n\nThhe optimum relaxation sequence can be specified in relax parameter, it defaults to multiplicative range of [1.0, 0.999999, ..., 0.99] of the original bound.\n\nReturns an optimized model that contains the pFBA solution; or nothing if the optimization failed.\n\nExample\n\noptimizer = Gurobi.Optimizer\natts = Dict(\"OutputFlag\" => 0)\nmodel = load_model(StandardModel, \"iJO1366.json\")\nbiomass = findfirst(model.reactions, \"BIOMASS_Ec_iJO1366_WT_53p95M\")\nsol = pfba(model, biomass, Gurobi.optimizer)\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.parsimonious_flux_balance_analysis_dict-Tuple{MetabolicModel, Vararg{Any, N} where N}","page":"Function reference","title":"COBREXA.parsimonious_flux_balance_analysis_dict","text":"parsimonious_flux_balance_analysis_dict(model::MetabolicModel, args...; kwargs...)\n\nPerform parsimonious flux balance analysis on model using optimizer. Returns a dictionary mapping the reaction IDs to fluxes. Arguments are forwarded to parsimonious_flux_balance_analysis internally.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.parsimonious_flux_balance_analysis_vec-Tuple","page":"Function reference","title":"COBREXA.parsimonious_flux_balance_analysis_vec","text":"parsimonious_flux_balance_analysis_vec(args...; kwargs...)\n\nPerform parsimonious flux balance analysis on model using optimizer. Returns a vector of fluxes in the same order as the reactions in model. Arguments are forwarded to parsimonious_flux_balance_analysis internally.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.screen-Union{Tuple{MetabolicModel}, Tuple{N}, Tuple{T}, Tuple{V}} where {V<:(AbstractVector{T} where T), T<:Tuple, N}","page":"Function reference","title":"COBREXA.screen","text":"function screen(\n model::MetabolicModel;\n variants::Maybe{Array{V,N}} = nothing,\n analysis,\n args::Maybe{Array{T,N}} = nothing,\n workers = [myid()],\n)::Array where {V<:AbstractVector, T<:Tuple,N}\n\nTake an array of model-modifying function vectors in variants, and execute the function analysis on all variants of the model specified by variants. The computation is distributed over worker IDs in workers. If args are supplied (as an array of the same size as the variants), they are forwarded as arguments to the corresponding analysis function calls.\n\nThe array of variants must contain vectors of single-parameter functions, these are applied to model in order. The functions must not modify the model, but rather return a modified copy. The copy should be made as shallow as possible, to increase memory efficiency of the process. Variant generators that modify the argument model in-place will cause unpredictable results. Refer to the definition of screen_variant for details.\n\nThe function analysis will receive a single argument (the modified model), together with an expanded tuple of arguments from args.\n\nThe modification and analysis functions are transferred to workers as-is; all packages required to run them (e.g. the optimization solvers) must be loaded there. Typically, you want to use the macro @everywhere using MyFavoriteSolver from Distributed package for loading the solvers.\n\nReturn value\n\nThe results of running analysis are collected in to the resulting array, in a way that preserves the shape of the variants, similarly as with pmap.\n\nThe results of analysis function must be serializable, preferably made only from pure Julia structures, because they may be transferred over the network between the computation nodes. For that reason, functions that return whole JuMP models that contain pointers to allocated C structures (such as flux_balance_analysis used with GLPK or Gurobi otimizers) will generally not in this context.\n\nExample\n\n``` function reverse_reaction(i::Int) (model::CoreModel) -> begin mod = copy(model) mod.S[:,i] .*= -1 # this is unrealistic but sufficient for demonstration mod end end\n\nm = loadmodel(CoreModel, \"ecoli_core.xml\")\n\nscreenvariants(m, [ [reversereaction(5)], [reversereaction(3), reversereaction(6)] ], mod -> mod.S[:,3]) # observe the changes in S\n\nscreenvariants(m, [ [reversereaction(5)], [reversereaction(3), reversereaction(6)] ], mod -> fluxbalanceanalysis_vec(mod, GLPK.Optimizer)) # run analysis\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.screen_variant","page":"Function reference","title":"COBREXA.screen_variant","text":"screen_variant(model::MetabolicModel, variant::Vector, analysis, args = ())\n\nHelper function for screen that applies all single-argument functions in variant to the model (in order from \"first\" to \"last\"), and executes analysis on the result.\n\nCan be used to test model variants locally.\n\n\n\n\n\n","category":"function"},{"location":"functions/#COBREXA.screen_variants-Tuple{Any, Any, Any}","page":"Function reference","title":"COBREXA.screen_variants","text":"screen_variants(model, variants, analysis; workers=[myid()])\n\nA shortcut for screen that only works with model variants.\n\n\n\n\n\n","category":"method"},{"location":"functions/#Analysis-modifications","page":"Function reference","title":"Analysis modifications","text":"","category":"section"},{"location":"functions/","page":"Function reference","title":"Function reference","text":"Modules = [COBREXA]\nPages = map(file -> joinpath(\"analysis\", \"modifications\", file), readdir(\"../src/analysis/modifications\"))","category":"page"},{"location":"functions/#COBREXA._do_knockout-Tuple{MetabolicModel, Any, Vector{String}}","page":"Function reference","title":"COBREXA._do_knockout","text":"_do_knockout(model::MetabolicModel, opt_model)\n\nInternal helper for knockouts on generic MetabolicModels. This can be overloaded so that the knockouts may work differently (more efficiently) with other models.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.knockout-Tuple{String}","page":"Function reference","title":"COBREXA.knockout","text":"knockout(gene_id::String)\n\nA helper variant of knockout for a single gene.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.knockout-Tuple{Vector{String}}","page":"Function reference","title":"COBREXA.knockout","text":"knockout(gene_ids::Vector{String})\n\nA modification that zeroes the bounds of all reactions that would be knocked out by the specified genes (effectively disables the reactions).\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.change_constraint-Tuple{String, Any, Any}","page":"Function reference","title":"COBREXA.change_constraint","text":"change_constraint(id::String, lb, ub)\n\nChange the lower and upper bounds (lb and ub respectively) of reaction id.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.change_objective-Tuple{Union{String, Vector{String}}}","page":"Function reference","title":"COBREXA.change_objective","text":"change_objective(new_objective::Union{String,Vector{String}}; weights=[], sense=MOI.MAX_SENSE)\n\nModification that changes the objective function used in a constraint based analysis function. new_objective can be a single reaction identifier, or an array of reactions identifiers.\n\nOptionally, the objective can be weighted by a vector of weights, and a optimization sense can be set.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.change_optimizer-Tuple{Any}","page":"Function reference","title":"COBREXA.change_optimizer","text":"change_optimizer(optimizer)\n\nChange the JuMP optimizer used to run the optimization.\n\nThis 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 parsimonious_flux_balance_analysis.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.change_optimizer_attribute-Tuple{Any, Any}","page":"Function reference","title":"COBREXA.change_optimizer_attribute","text":"change_optimizer_attribute(attribute_key, value)\n\nChange 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.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.change_sense-Tuple{Any}","page":"Function reference","title":"COBREXA.change_sense","text":"change_sense(objective_sense)\n\nChange the objective sense of optimization. Possible arguments are MOI.MAX_SENSE and MOI.MIN_SENSE.\n\nIf you want to change the objective and sense at the same time, use change_objective instead to do both at once.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.constrain_objective_value-Tuple{Any}","page":"Function reference","title":"COBREXA.constrain_objective_value","text":"constrain_objective_value(tolerance)\n\nLimit the objective value to tolerance-times the current objective value, as with objective_bounds.\n\n\n\n\n\n","category":"method"},{"location":"functions/#Flux-sampling","page":"Function reference","title":"Flux sampling","text":"","category":"section"},{"location":"functions/","page":"Function reference","title":"Function reference","text":"Modules = [COBREXA]\nPages = map(file -> joinpath(\"analysis\", \"sampling\", file), readdir(\"../src/analysis/sampling\"))","category":"page"},{"location":"functions/#COBREXA._affine_hit_and_run_chain-NTuple{5, Any}","page":"Function reference","title":"COBREXA._affine_hit_and_run_chain","text":"_affine_hit_and_run_chain(warmup, lbs, ubs, iters, chain)\n\nInternal helper function for computing a single affine hit-and-run chain. The number of the chain is passed for possible future initialization of stable RNGs.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.affine_hit_and_run-Tuple{Matrix{Float64}, Vector{Float64}, Vector{Float64}}","page":"Function reference","title":"COBREXA.affine_hit_and_run","text":"function affine_hit_and_run(\n warmup_points::Matrix{Float64},\n lbs::Vector{Float64},\n ubs::Vector{Float64};\n sample_iters = 100 .* (1:5),\n workers = [myid()],\n chains = length(workers),\n)\n\nRun a hit-and-run style sampling that starts from warmup_points and uses their affine combinations for generating the run directions to sample the space delimited by lbs and ubs. The points that represent fluxes in warmup_points should be organized in columns, i.e. warmup_points[:,1] is the first warmup flux.\n\nThere are total chains of hit-and-run runs, each on a batch of size(warmup_points, 2) points. The runs are scheduled on workers, for good load balancing chains should be ideally much greater than length(workers).\n\nEach run continues for maximum(sample_iters) iterations; the numbers in sample_iters represent the iterations at which the whole \"current\" batch of points is collected for output. For example, sample_iters=[1,4,5] causes the process run for 5 iterations, returning the sample batch that was produced by 1st, 4th and last (5th) iteration.\n\nReturns a matrix of sampled fluxes (in columns), with all collected samples horizontally concatenated. The total number of samples (columns) will be size(warmup_points,2) * chains * length(sample_iters).\n\nExample\n\nusing COBREXA\nusing Tulip\n\nmodel = load_model(StandardModel, model_path)\n\nwarmup, lbs, ubs = warmup_from_variability(model, Tulip.Optimizer, 100)\nsamples = affine_hit_and_run(warmup, lbs, ubs, sample_iters = 1:3)\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.warmup_from_variability","page":"Function reference","title":"COBREXA.warmup_from_variability","text":"function warmup_from_variability(\n model::MetabolicModel,\n optimizer,\n min_reactions::Vector{Int}=1:n_reactions(model),\n max_reactions::Vector{Int}=1:n_reactions(model);\n modifications = [],\n workers::Vector{Int} = [myid()],\n)::Tuple{Matrix{Float64}, Vector{Float64}, Vector{Float64}}\n\nGenerate 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.\n\n\n\n\n\n","category":"function"},{"location":"functions/#COBREXA.warmup_from_variability-Tuple{MetabolicModel, Any, Int64}","page":"Function reference","title":"COBREXA.warmup_from_variability","text":"warmup_from_variability(\n model::MetabolicModel,\n optimizer,\n n_points::Int;\n kwargs...\n)\n\nGenerates 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.\n\n\n\n\n\n","category":"method"},{"location":"functions/#Miscellaneous-utilities","page":"Function reference","title":"Miscellaneous utilities","text":"","category":"section"},{"location":"functions/","page":"Function reference","title":"Function reference","text":"Modules = [COBREXA]\nPages = map(file -> joinpath(\"base\", \"utils\", file), readdir(\"../src/base/utils\"))","category":"page"},{"location":"functions/#COBREXA.ambiguously_identified_items-Tuple{Dict{String, Dict{String, Set{String}}}}","page":"Function reference","title":"COBREXA.ambiguously_identified_items","text":"ambiguously_identified_items(\n index::Dict{String,Dict{String,[String]}},\n)::Vector{String}\n\nFind items (genes, metabolites, ...) from the annotation index that are identified non-uniquely by at least one of their annotations.\n\nThis often indicates that the items are duplicate or miscategorized.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.annotation_index-Tuple{AbstractDict{String, V} where V}","page":"Function reference","title":"COBREXA.annotation_index","text":"annotation_index(\n xs::AbstractDict{String};\n annotations = _annotations,\n)::Dict{String,Dict{String,[String]}}\n\nExtract annotations from a dictionary of items xs and build an index that maps annotation \"kinds\" (e.g. \"PubChem\") to the mapping from the annotations (e.g. \"COMPOUND_12345\") to item IDs that carry the annotations.\n\nFunction annotations is used to access the Annotations object in the dictionary values.\n\nThis is extremely useful for finding items by annotation data.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.get_atoms-Tuple{Metabolite}","page":"Function reference","title":"COBREXA.get_atoms","text":"get_atoms(met::Metabolite)::MetaboliteFormula\n\nSimple wrapper for getting the atom dictionary count out of a Metabolite.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.check_duplicate_reaction-Tuple{Reaction, OrderedCollections.OrderedDict{String, Reaction}}","page":"Function reference","title":"COBREXA.check_duplicate_reaction","text":"check_duplicate_reaction(rxn::Reaction, rxns::Dict{String, Reaction}; only_metabolites=true)\n\nCheck if rxn already exists in rxns but has another id. If only_metabolites is true then only the metabolite ids are checked. Otherwise, compares metabolite ids and the absolute value of their stoichiometric coefficients to those of rxn. If rxn has the same reaction equation as another reaction in rxns, the return the id. Otherwise return nothing.\n\nSee also: is_mass_balanced\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.is_boundary-Tuple{Reaction}","page":"Function reference","title":"COBREXA.is_boundary","text":"is_boundary(rxn::Reaction)\n\nReturn true if reaction is a boundary reaction, otherwise return false. Checks if boundary by inspecting number of metabolites in reaction equation. Boundary reactions have only one metabolite, e.g. an exchange reaction, or a sink/demand reaction. \n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.is_mass_balanced-Tuple{Reaction, StandardModel}","page":"Function reference","title":"COBREXA.is_mass_balanced","text":"is_mass_balanced(rxn::Reaction, model::StandardModel)\n\nChecks if rxn is atom balanced. Returns a boolean for whether the reaction is balanced, and the associated balance of atoms for convenience (useful if not balanced).\n\nSee also: get_atoms, check_duplicate_reaction\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.serialize_model-Tuple{Serialized, String}","page":"Function reference","title":"COBREXA.serialize_model","text":"serialize_model(model::Serialized, filename::String)::Serialized\n\nSpecialization of serialize_model that prevents nested serialization of already-serialized models.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.serialize_model-Union{Tuple{MM}, Tuple{MM, String}} where MM<:MetabolicModel","page":"Function reference","title":"COBREXA.serialize_model","text":"serialize_model(model::MM, filename::String)::Serialized{MM} where {MM<:MetabolicModel}\n\nSerialize the model to file filename, returning a Serialized model that is able to load itself back automatically upon precaching by precache!.\n\n\n\n\n\n","category":"method"},{"location":"functions/#Base.copy-Tuple{Gene}","page":"Function reference","title":"Base.copy","text":"Base.copy(g::Gene)\n\nShallow copy of a Gene\n\n\n\n\n\n","category":"method"},{"location":"functions/#Base.copy-Tuple{Metabolite}","page":"Function reference","title":"Base.copy","text":"Base.copy(m::Metabolite)\n\nShallow copy of a Metabolite\n\n\n\n\n\n","category":"method"},{"location":"functions/#Base.copy-Tuple{Reaction}","page":"Function reference","title":"Base.copy","text":"Base.copy(r::Reaction)\n\nShallow copy of a Reaction\n\n\n\n\n\n","category":"method"},{"location":"functions/#Base.copy-Tuple{StandardModel}","page":"Function reference","title":"Base.copy","text":"Base.copy(m::StandardModel)\n\nShallow copy of a StandardModel\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.atom_exchange-Tuple{Dict{String, Float64}, StandardModel}","page":"Function reference","title":"COBREXA.atom_exchange","text":"atom_exchange(flux_dict::Dict{String, Float64}, model::StandardModel)\n\nReturn a dictionary mapping the flux of atoms across the boundary of the model given flux_dict (the solution of a constraint based analysis) of reactions in model.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.atom_exchange-Tuple{String, StandardModel}","page":"Function reference","title":"COBREXA.atom_exchange","text":"atom_exchange(rxn_id::String, model::StandardModel)\n\nReturn a dictionary mapping the flux of atoms through a reaction in model.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.metabolite_fluxes-Tuple{Dict{String, Float64}, StandardModel}","page":"Function reference","title":"COBREXA.metabolite_fluxes","text":"metabolite_fluxes(flux_dict::Dict{String, Float64}, model::StandardModel)\n\nReturn two dictionaries of metabolite ids mapped to reactions that consume or produce them given the flux distribution supplied in fluxdict.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.gamma_bounds-Tuple{Any}","page":"Function reference","title":"COBREXA.gamma_bounds","text":"gamma_bounds(gamma)\n\nA bounds-generating function for flux_variability_analysis that limits the objective value to be at least gamma*Zâ‚€, as usual in COBRA packages. Use as the bounds argument:\n\nflux_variability_analysis(model, some_optimizer; bounds = gamma_bounds(0.9))\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.objective_bounds-Tuple{Any}","page":"Function reference","title":"COBREXA.objective_bounds","text":"(tolerance) = z -> begin\n\nA bounds-generating function for flux_variability_analysis that limits the objective value to a small multiple of Zâ‚€. Use as bounds argument, similarly to gamma_bounds.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA._parse_formula-Tuple{String}","page":"Function reference","title":"COBREXA._parse_formula","text":"_parse_formula(f::String)::MetaboliteFormula\n\nParse a formula in format C2H6O into a MetaboliteFormula, which is basically a dictionary of atom counts in the molecule.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA._unparse_formula-Tuple{Dict{String, Int64}}","page":"Function reference","title":"COBREXA._unparse_formula","text":"_unparse_formula(f::MetaboliteFormula)::String\n\nFormat MetaboliteFormula to String.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA._parse_grr-Tuple{SBML.GeneProductAssociation}","page":"Function reference","title":"COBREXA._parse_grr","text":"_parse_grr(gpa::SBML.GeneProductAssociation)::GeneAssociation\n\nParse SBML.GeneProductAssociation structure to the simpler GeneAssociation. The input must be (implicitly) in a positive DNF.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA._parse_grr-Tuple{String}","page":"Function reference","title":"COBREXA._parse_grr","text":"_parse_grr(s::String)::GeneAssociation\n\nParse a DNF gene association rule in format (YIL010W and YLR043C) or (YIL010W and YGR209C) to GeneAssociation. Also acceptsOR,|,||,AND,&, and&&`.\n\nExample\n\njulia> _parse_grr(\"(YIL010W and YLR043C) or (YIL010W and YGR209C)\")\n2-element Array{Array{String,1},1}:\n [\"YIL010W\", \"YLR043C\"]\n [\"YIL010W\", \"YGR209C\"]\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA._unparse_grr-Tuple{Type{SBML.GeneProductAssociation}, Vector{Vector{String}}}","page":"Function reference","title":"COBREXA._unparse_grr","text":"_unparse_grr(\n ::Type{SBML.GeneProductAssociation},\n x::GeneAssociation,\n)::SBML.GeneAssociation\n\nConvert a GeneAssociation to the corresponding SBML.jl structure.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA._unparse_grr-Tuple{Type{String}, Vector{Vector{String}}}","page":"Function reference","title":"COBREXA._unparse_grr","text":"unparse_grr(grr::Vector{Vector{Gene}}\n\nConverts a nested string gene reaction array back into a gene reaction rule string.\n\nExample\n\njulia> _unparse_grr(String, [[\"YIL010W\", \"YLR043C\"], [\"YIL010W\", \"YGR209C\"]])\n\"(YIL010W and YLR043C) or (YIL010W and YGR209C)\"\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA._guesskey-Tuple{Any, Any}","page":"Function reference","title":"COBREXA._guesskey","text":"_guesskey(ks, possibilities)\n\nUnfortunately, many model types that contain dictionares do not have standardized field names, so we need to try a few possibilities and guess the best one. The keys used to look for valid field names should be ideally specified as constants in src/base/constants.jl.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.find_biomass_reaction_ids-Tuple{MetabolicModel}","page":"Function reference","title":"COBREXA.find_biomass_reaction_ids","text":"find_biomass_reaction_ids(m::MetabolicModel; kwargs...)\n\nShortcut for finding biomass reaction names in a model; arguments are forwarded to looks_like_biomass_reaction.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.find_biomass_reactions-Tuple{MetabolicModel}","page":"Function reference","title":"COBREXA.find_biomass_reactions","text":"find_biomass_reactions(m::MetabolicModel; kwargs...)\n\nShortcut for finding biomass reaction indexes in a model; arguments are forwarded to looks_like_biomass_reaction.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.find_exchange_reaction_ids-Tuple{MetabolicModel}","page":"Function reference","title":"COBREXA.find_exchange_reaction_ids","text":"find_exchange_reaction_ids(m::MetabolicModel; kwargs...)\n\nShortcut for finding exchange reaction names in a model; arguments are forwarded to looks_like_exchange_reaction.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.find_exchange_reactions-Tuple{MetabolicModel}","page":"Function reference","title":"COBREXA.find_exchange_reactions","text":"find_exchange_reactions(m::MetabolicModel; kwargs...)\n\nShortcut for finding exchange reaction indexes in a model; arguments are forwarded to looks_like_exchange_reaction.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.looks_like_biomass_reaction-Tuple{String}","page":"Function reference","title":"COBREXA.looks_like_biomass_reaction","text":"looks_like_biomass_reaction(rxn_id::String;\n exclude_exchanges = false,\n exchange_prefixes = _constants.exchange_prefixes,\n biomass_strings = _constants.biomass_strings,\n)::Bool\n\nA predicate that matches reaction identifiers that look like biomass reactions. Biomass reactions are identified by looking for occurences of biomass_strings in the reaction id. If exclude_exchanges is set, the strings that look like exchanges (from looks_like_exchange_reaction) will not match.\n\nExample\n\nfilter(looks_like_biomass_reaction, reactions(model)) # returns strings\nfindall(looks_like_biomass_reaction, reactions(model)) # returns indices\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.looks_like_exchange_metabolite-Tuple{String}","page":"Function reference","title":"COBREXA.looks_like_exchange_metabolite","text":"looks_like_exchange_metabolite(rxn_id::String;\n exchange_suffixes = _constants.exchange_suffixes,\n )::Bool\n\nA predicate that matches metabolite identifiers that look like involved in exchange reactions. Exchange metabolites are identified by exchange_suffixes at the end of the metabolite id.\n\nExample\n\nfilter(looks_like_exchange_metabolite, metabolites(model)) # returns strings\nfindall(looks_like_exchange_metabolite, metabolites(model)) # returns indices\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.looks_like_exchange_reaction-Tuple{String}","page":"Function reference","title":"COBREXA.looks_like_exchange_reaction","text":"looks_like_exchange_reaction(rxn_id::String;\n exclude_biomass = false,\n biomass_strings = _constants.biomass_strings,\n exchange_prefixes = _constants.exchange_prefixes,\n)\n\nA predicate that matches reaction identifiers that look like exchange or biomass reactions, given the usual naming schemes in common model repositories. Exchange reactions are identified based on matching prefixes in the set exchange_prefixes and biomass reactions are identified by looking for occurences of biomass_strings in the reaction id.\n\nAlso see find_exchange_reactions.\n\nExample\n\nfindall(looks_like_exchange_reaction, reactions(model)) # returns indices\nfilter(looks_like_exchange_reaction, reactions(model)) # returns Strings\n\n# to use the optional arguments you need to expand the function's arguments using an anonymous function\nfindall(x -> looks_like_exchange_reaction(x; exclude_biomass=true), reactions(model)) # returns indices\nfilter(x -> looks_like_exchange_reaction(x; exclude_biomass=true), reactions(model)) # returns Strings\n\n\n\n\n\n","category":"method"},{"location":"functions/#Logging-and-debugging-helpers","page":"Function reference","title":"Logging and debugging helpers","text":"","category":"section"},{"location":"functions/","page":"Function reference","title":"Function reference","text":"Modules = [COBREXA]\nPages = map(file -> joinpath(\"base\", \"logging\", file), readdir(\"../src/base/logging\"))","category":"page"},{"location":"functions/#COBREXA.log_io","page":"Function reference","title":"COBREXA.log_io","text":"log_io(enable::Bool=true)\n\nEnable (default) or disable (by passing false) output of messages and warnings from model input/output.\n\n\n\n\n\n","category":"function"},{"location":"functions/#COBREXA.log_models","page":"Function reference","title":"COBREXA.log_models","text":"log_models(enable::Bool=true)\n\nEnable (default) or disable (by passing false) output of model-related messages.\n\n\n\n\n\n","category":"function"},{"location":"functions/#COBREXA.log_perf","page":"Function reference","title":"COBREXA.log_perf","text":"log_perf(enable::Bool=true)\n\nEnable (default) or disable (by passing false) output of performance-related tracing information.\n\n\n\n\n\n","category":"function"},{"location":"functions/#COBREXA.@_make_logging_tag-Tuple{Symbol, String}","page":"Function reference","title":"COBREXA.@_make_logging_tag","text":"macro _make_logging_group(sym::Symbol, doc::String)\n\nThis creates a group of functions that allow masking out topic-related logging actions. A call that goes as follows:\n\n@_make_logging_tag XYZ\n\ncreates the following tools:\n\nglobal variable _XYZ_log_enabled defaulted to false\nfunction log_XYZ that can be called to turn the logging on/off\na masking macro @_XYZ_log that can be prepended to commands that should only happen if the logging of tag XYZ is enabled.\n\nThe masking macro is then used as follows:\n\n@_XYZ_log @info \"This is the extra verbose information you wanted!\" a b c\n\nThe user can direct logging with these:\n\nlog_XYZ()\nlog_XYZ(false)\n\ndoc should be a name of the stuff that is being printed if the corresponding log_XYZ() is enabled – it is used to create a friendly documentation for the logging switch. In this case it could say \"X, Y and Z-related messages\".\n\n\n\n\n\n","category":"macro"},{"location":"advanced/4_advanced_screening/#Advanced-model-screening","page":"Advanced model screening","title":"Advanced model screening","text":"","category":"section"},{"location":"advanced/4_advanced_screening/#Example:-Gene-knockouts","page":"Advanced model screening","title":"Example: Gene knockouts","text":"","category":"section"},{"location":"unmerged/#Generic-interface","page":"Generic interface","title":"Generic interface","text":"","category":"section"},{"location":"unmerged/","page":"Generic interface","title":"Generic interface","text":"The reason you should rather use the generic interface is that the generic interface is supported by all model types in COBREXA, while the internal model structure of each model type varies considerably. For example, MATModels store the stoichiometric matrix directly, so mat_model.mat[\"S\"] would return the stoichiometric matrix. However, JSONModels do not do this, so json_model.m[\"S\"] would throw an error. The COBREXA way of doing this is to use the generic interface, i.e. stoichiometry(json_model) and stoichiometry(mat_model) always return the stoichiometric matrix. ","category":"page"},{"location":"unmerged/","page":"Generic interface","title":"Generic interface","text":"Note, it is possible that the matrix returned by stoichiometry is not exactly the same between models. The order of the reactions (columns) and metabolites (rows) may vary from model type to model type, although they are consistent within each model type. So stoichiometry(json_model) will return a stoichiometric matrix where the columns correspond to the order of reactions listed in reactions(json_model) and the rows corresponds to the order of metabolites listed in metabolites(json_model). The column/reaction and row/metabolite order from the JSONModel is not necessarily consistent with the stoichiometric matrix returned by stoichiometry(mat_model). This is a minor note, but could cause confusion. ","category":"page"},{"location":"unmerged/#Converting-models","page":"Generic interface","title":"Converting models","text":"","category":"section"},{"location":"unmerged/","page":"Generic interface","title":"Generic interface","text":"You might recall that we mentioned that data loss does not occur when models are read into the format corresponding to their file type. This is because the models are read into memory directly in their native formats. So JSONModels contain the dictionary encoded in the .json file, and the same for .mat and .xml files (technically .xml is parsed by SBML.jl).","category":"page"},{"location":"unmerged/","page":"Generic interface","title":"Generic interface","text":"However, this data loss guarantee does not hold once you convert between models. The reason for this is that the convert function uses the generic interface to convert between models. In short, only information accessible through the generic interface will be converted between models. This is most applicable for data stored using non-standard keywords (.mat and to a lesser extent .json models are prone to this type of issue). When in doubt, inspect your models and refer to src/base/constants.jl for the keynames used to access model features if issues occur. However, this should rarely be a problem.","category":"page"},{"location":"unmerged/","page":"Generic interface","title":"Generic interface","text":"COBREXA also has specialized model types: StandardModel, CoreModel, and CoreCoupledModel. These model types are implemented to be as efficient as possible for their purpose. In short, use:","category":"page"},{"location":"unmerged/","page":"Generic interface","title":"Generic interface","text":"StandardModel if keeping all the meta-data associated with a model is important. This includes information like gene reaction rules, annotations, notes, etc. It is a good format to use when you wish to combine many models of different types and are not worried about memory limitations. \nCoreModel if you only care about constraint-based analysis that can be performed using only the stoichiometric matrix and flux bounds. This model stores all its numeric data structures as sparse matrices/vectors and is thus very efficient. It does not store superfluous information, like the gene reaction rules of reactions, annotations etc. Since this model is compact and its data structures efficient, it is ideal for distributed computing.\nCoreModelCoupled if you want to use the functionality of CoreModel but for communities. It also represents the underlying model in a sparse format, but specialized for community models. ","category":"page"},{"location":"unmerged/","page":"Generic interface","title":"Generic interface","text":"Let's load a StandardModel and a CoreModel to compare the two.","category":"page"},{"location":"notebooks/4_basic_core_coupled_usage/","page":"Basic usage of CoreModel and CoreModelCoupled","title":"Basic usage of CoreModel and CoreModelCoupled","text":"EditURL = \"https://github.com/LCSB-BioCore/COBREXA.jl/blob/master/docs/src/notebooks/4_basic_core_coupled_usage.jl\"","category":"page"},{"location":"notebooks/4_basic_core_coupled_usage/#Basic-usage-of-CoreModel-and-CoreModelCoupled","page":"Basic usage of CoreModel and CoreModelCoupled","title":"Basic usage of CoreModel and CoreModelCoupled","text":"","category":"section"},{"location":"notebooks/4_basic_core_coupled_usage/","page":"Basic usage of CoreModel and CoreModelCoupled","title":"Basic usage of CoreModel and CoreModelCoupled","text":"(Image: ) (Image: )","category":"page"},{"location":"notebooks/4_basic_core_coupled_usage/","page":"Basic usage of CoreModel and CoreModelCoupled","title":"Basic usage of CoreModel and CoreModelCoupled","text":"In this tutorial we will introduce COBREXA's CoreModel and CoreModelCoupled. We will use E. coli's toy model to start with.","category":"page"},{"location":"notebooks/4_basic_core_coupled_usage/","page":"Basic usage of CoreModel and CoreModelCoupled","title":"Basic usage of CoreModel and CoreModelCoupled","text":"!isfile(\"e_coli_core.xml\") &&\n download(\"http://bigg.ucsd.edu/static/models/e_coli_core.xml\", \"e_coli_core.xml\")\n\nusing COBREXA","category":"page"},{"location":"notebooks/4_basic_core_coupled_usage/#Loading-a-CoreModel","page":"Basic usage of CoreModel and CoreModelCoupled","title":"Loading a CoreModel","text":"","category":"section"},{"location":"notebooks/4_basic_core_coupled_usage/","page":"Basic usage of CoreModel and CoreModelCoupled","title":"Basic usage of CoreModel and CoreModelCoupled","text":"model = load_model(CoreModel, \"e_coli_core.xml\") # we specifically want to load a CoreModel from the model file","category":"page"},{"location":"notebooks/4_basic_core_coupled_usage/#Basic-analysis-on-CoreModel","page":"Basic usage of CoreModel and CoreModelCoupled","title":"Basic analysis on CoreModel","text":"","category":"section"},{"location":"notebooks/4_basic_core_coupled_usage/","page":"Basic usage of CoreModel and CoreModelCoupled","title":"Basic usage of CoreModel and CoreModelCoupled","text":"As before, for optimization based analysis we need to load an optimizer. Here we will use Tulip.jl to optimize the linear programs of this tutorial. Refer to the constraint-based analysis basics tutorial if you are confused by any functions in this section.","category":"page"},{"location":"notebooks/4_basic_core_coupled_usage/","page":"Basic usage of CoreModel and CoreModelCoupled","title":"Basic usage of CoreModel and CoreModelCoupled","text":"All the normal analysis functions work on CoreModel, due to it also having the same generic accessor interface as all the other model types.","category":"page"},{"location":"notebooks/4_basic_core_coupled_usage/","page":"Basic usage of CoreModel and CoreModelCoupled","title":"Basic usage of CoreModel and CoreModelCoupled","text":"using Tulip\n\ndict_sol = flux_balance_analysis_dict(\n model,\n Tulip.Optimizer;\n modifications = [\n change_objective(\"R_BIOMASS_Ecoli_core_w_GAM\"),\n change_constraint(\"R_EX_glc__D_e\", -12, -12),\n change_constraint(\"R_EX_o2_e\", 0, 0),\n ],\n)","category":"page"},{"location":"notebooks/4_basic_core_coupled_usage/#Structure-of-CoreModel","page":"Basic usage of CoreModel and CoreModelCoupled","title":"Structure of CoreModel","text":"","category":"section"},{"location":"notebooks/4_basic_core_coupled_usage/","page":"Basic usage of CoreModel and CoreModelCoupled","title":"Basic usage of CoreModel and CoreModelCoupled","text":"CoreModel is a special COBREXA type that is optimized for large scale analysis of large models. It stores data in a sparse format where possible.","category":"page"},{"location":"notebooks/4_basic_core_coupled_usage/","page":"Basic usage of CoreModel and CoreModelCoupled","title":"Basic usage of CoreModel and CoreModelCoupled","text":"fieldnames(CoreModel)","category":"page"},{"location":"notebooks/4_basic_core_coupled_usage/","page":"Basic usage of CoreModel and CoreModelCoupled","title":"Basic usage of CoreModel and CoreModelCoupled","text":"model.S","category":"page"},{"location":"notebooks/4_basic_core_coupled_usage/#CoreModelCoupled-adds-coupling-constraints-to-CoreModel","page":"Basic usage of CoreModel and CoreModelCoupled","title":"CoreModelCoupled adds coupling constraints to CoreModel","text":"","category":"section"},{"location":"notebooks/4_basic_core_coupled_usage/","page":"Basic usage of CoreModel and CoreModelCoupled","title":"Basic usage of CoreModel and CoreModelCoupled","text":"CoreModelCoupled extends CoreModel by adding coupling constraints.","category":"page"},{"location":"notebooks/4_basic_core_coupled_usage/","page":"Basic usage of CoreModel and CoreModelCoupled","title":"Basic usage of CoreModel and CoreModelCoupled","text":"fieldnames(CoreModelCoupled)","category":"page"},{"location":"notebooks/4_basic_core_coupled_usage/","page":"Basic usage of CoreModel and CoreModelCoupled","title":"Basic usage of CoreModel and CoreModelCoupled","text":"In short, coupling constraints can be used to ensure that fluxes scale with the growth rate (μ) of a model. This reduces the impact of biologically infeasible cycles from occurring. Here we will model coupling constraints by assuming that they have the form: -γ ≤ váµ¢/μ ≤ γ, where γ is the ratio between each individual flux (váµ¢) in the model and the growth rate.","category":"page"},{"location":"notebooks/4_basic_core_coupled_usage/","page":"Basic usage of CoreModel and CoreModelCoupled","title":"Basic usage of CoreModel and CoreModelCoupled","text":"gamma = 40 # arbitrary\n\nnr = n_reactions(model) # number of reactions\nbiomass_index = first(indexin([\"R_BIOMASS_Ecoli_core_w_GAM\"], reactions(model)))\n\nusing LinearAlgebra, SparseArrays\n\nCf = sparse(1.0I, nr, nr)\nCf[:, biomass_index] .= -gamma\nCb = sparse(1.0I, nr, nr)\nCb[:, biomass_index] .= gamma\nC = [Cf; Cb] # coupling constraint matrix\n\nclb = spzeros(2 * nr)\nclb[1:nr] .= -1000.0\ncub = spzeros(2 * nr)\ncub[nr+1:end] .= 1000\n\ncmodel = CoreModelCoupled(model, C, clb, cub)","category":"page"},{"location":"notebooks/4_basic_core_coupled_usage/","page":"Basic usage of CoreModel and CoreModelCoupled","title":"Basic usage of CoreModel and CoreModelCoupled","text":"d = flux_balance_analysis_dict(model, Tulip.Optimizer)\nd[\"R_BIOMASS_Ecoli_core_w_GAM\"]","category":"page"},{"location":"notebooks/4_basic_core_coupled_usage/","page":"Basic usage of CoreModel and CoreModelCoupled","title":"Basic usage of CoreModel and CoreModelCoupled","text":"dc = flux_balance_analysis_dict(cmodel, Tulip.Optimizer)\ndc[\"R_BIOMASS_Ecoli_core_w_GAM\"]","category":"page"},{"location":"notebooks/4_basic_core_coupled_usage/","page":"Basic usage of CoreModel and CoreModelCoupled","title":"Basic usage of CoreModel and CoreModelCoupled","text":"","category":"page"},{"location":"notebooks/4_basic_core_coupled_usage/","page":"Basic usage of CoreModel and CoreModelCoupled","title":"Basic usage of CoreModel and CoreModelCoupled","text":"This page was generated using Literate.jl.","category":"page"},{"location":"tutorials/4_modifying/#Modifying-and-saving-the-models","page":"Modifying and saving the models","title":"Modifying and saving the models","text":"","category":"section"},{"location":"tutorials/4_modifying/","page":"Modifying and saving the models","title":"Modifying and saving the models","text":"Making a small modification to the model and reanalyzing them is often a useful way to explore how the constraints work together, and to inspect the degrees of freedom in the model.","category":"page"},{"location":"tutorials/4_modifying/","page":"Modifying and saving the models","title":"Modifying and saving the models","text":"With COBREXA.jl, you have two main choices of making model modifications:","category":"page"},{"location":"tutorials/4_modifying/","page":"Modifying and saving the models","title":"Modifying and saving the models","text":"you can manually change the model structures (i.e. permanently change the data in of your model variable)\nyou can use special arguments of analysis functions that allow you to make the modifications in a declarative way and \"on the fly\", without having to manually interact with the model","category":"page"},{"location":"tutorials/4_modifying/","page":"Modifying and saving the models","title":"Modifying and saving the models","text":"tip: Notebook available\nThe available notebooks demonstrate model export and serialization and various model modifications (1, 2, 3).","category":"page"},{"location":"tutorials/4_modifying/#Manual-modifications","page":"Modifying and saving the models","title":"Manual modifications","text":"","category":"section"},{"location":"tutorials/4_modifying/","page":"Modifying and saving the models","title":"Modifying and saving the models","text":"Certain model types, including CoreModel and StandardModel, are built from mutable structs that you are free to modify as you want.","category":"page"},{"location":"tutorials/4_modifying/","page":"Modifying and saving the models","title":"Modifying and saving the models","text":"CoreModel consists of sparse matrices and vectors that describe the model precisely. For example, modifying a bound of the reaction is as simple as writing to the .xl or .xu (lower and upper bound for x) vectors in the structure:","category":"page"},{"location":"tutorials/4_modifying/","page":"Modifying and saving the models","title":"Modifying and saving the models","text":"using COBREXA\nm = load_model(CoreModel, \"e_coli_core.xml\")\nm.xl[3] = 0.0","category":"page"},{"location":"tutorials/4_modifying/","page":"Modifying and saving the models","title":"Modifying and saving the models","text":"The available field names can be listed using e.g. fieldnames(CoreModel), or more conveniently by employing the completion in the shell:","category":"page"},{"location":"tutorials/4_modifying/","page":"Modifying and saving the models","title":"Modifying and saving the models","text":"julia> m. # press [Tab]\nS b c mets rxns xl xu","category":"page"},{"location":"tutorials/4_modifying/","page":"Modifying and saving the models","title":"Modifying and saving the models","text":"With CoreModel, you may need to find the proper metabolites by identifier. For that, you may examine the reactions and metabolites of the model, e.g. using","category":"page"},{"location":"tutorials/4_modifying/","page":"Modifying and saving the models","title":"Modifying and saving the models","text":"indexin([\"M_nadh_c\", \"M_co2_e\"], metabolites(m))","category":"page"},{"location":"tutorials/4_modifying/","page":"Modifying and saving the models","title":"Modifying and saving the models","text":"...which will return the numeric indexes of NADH and COâ‚‚ metabolites. These can be used to, e.g., change the \"balance\" of the metabolites in the model:","category":"page"},{"location":"tutorials/4_modifying/","page":"Modifying and saving the models","title":"Modifying and saving the models","text":"m.b[64] = -1 # model will be losing 1 flux unit of COâ‚‚","category":"page"},{"location":"tutorials/4_modifying/","page":"Modifying and saving the models","title":"Modifying and saving the models","text":"...or to modify existing reaction (here with index 5) directly in stoichiometry matrix:","category":"page"},{"location":"tutorials/4_modifying/","page":"Modifying and saving the models","title":"Modifying and saving the models","text":"m.S[5,8] = -1\nm.S[5,64] = 1","category":"page"},{"location":"tutorials/4_modifying/","page":"Modifying and saving the models","title":"Modifying and saving the models","text":"While this works well if you are used to working with matrix-like representations of the model, it is not really convenient if you want to change the reactions and models in an easy way. StandardModel is structured in a much more user-friendly way, which makes the manual modifications easier.","category":"page"},{"location":"tutorials/4_modifying/","page":"Modifying and saving the models","title":"Modifying and saving the models","text":"In particular, StandardModel consists of dictionaries of Reaction, Metabolite and Gene objects that may be modified and indexed directly using their names. That way, the above modifications may be written in a cleaner, semantic and declarative fashion, as follows:","category":"page"},{"location":"tutorials/4_modifying/","page":"Modifying and saving the models","title":"Modifying and saving the models","text":"m = load_model(StandardModel, \"e_coli_core.xml\")\nm.reactions[\"R_TPI\"].lb = 0.0 # change lower bound of the reaction to 0\nm.reactions[\"R_GLNS\"].metabolites[\"M_nadh_c\"] = -1.0 # update stoichiometry\nm.reactions[\"R_GLNS\"].metabolites[\"M_co2_e\"] = 1.0\n...","category":"page"},{"location":"tutorials/4_modifying/","page":"Modifying and saving the models","title":"Modifying and saving the models","text":"There are other functions that may be used to change the StandardModel in a more systematic way. See the documentation of add!, rm!, @add_reactions!, and set_bound for examples.","category":"page"},{"location":"tutorials/4_modifying/#Analysis-modifiers","page":"Modifying and saving the models","title":"Analysis modifiers","text":"","category":"section"},{"location":"tutorials/4_modifying/","page":"Modifying and saving the models","title":"Modifying and saving the models","text":"Some analysis functions, including flux_balance_analysis and flux_variability_analysis, accept a special argument modifications, which is a list of descriptions of small changes that should be applied to the model before modification.","category":"page"},{"location":"tutorials/4_modifying/","page":"Modifying and saving the models","title":"Modifying and saving the models","text":"These include e.g.:","category":"page"},{"location":"tutorials/4_modifying/","page":"Modifying and saving the models","title":"Modifying and saving the models","text":"change_objective that sets a new optimization objective\nchange_optimizer that chooses a different JuMP.jl optimizer for the analysis\nchange_optimizer_attribute that can set various optimizer parameters\nchange_constraint that changes the flux bounds of a reaction\nknockout that disables reactions that depend on genes","category":"page"},{"location":"tutorials/4_modifying/","page":"Modifying and saving the models","title":"Modifying and saving the models","text":"This way, you can easily check out the model state when maximizing the rate of \"TALA\" (transadenolase A) reaction:","category":"page"},{"location":"tutorials/4_modifying/","page":"Modifying and saving the models","title":"Modifying and saving the models","text":"m = load_model(StandardModel, \"e_coli_core.xml\")\nflux_balance_analysis_dict(\n m, GLPK.Optimizer;\n modifications=[change_objective(\"R_TALA\")])","category":"page"},{"location":"tutorials/4_modifying/","page":"Modifying and saving the models","title":"Modifying and saving the models","text":"...or knock out a gene combination that disables the transadenolase A completely (see m.reactions[\"R_TALA\"].grr):","category":"page"},{"location":"tutorials/4_modifying/","page":"Modifying and saving the models","title":"Modifying and saving the models","text":"flux_balance_analysis_dict(\n m, GLPK.Optimizer;\n modifications=[knockout([\"G_b0008\", \"G_b2464\"])])","category":"page"},{"location":"tutorials/4_modifying/","page":"Modifying and saving the models","title":"Modifying and saving the models","text":"...or do both at once– knock out some other genes, and try to maximize the transadenolase A reaction rate:","category":"page"},{"location":"tutorials/4_modifying/","page":"Modifying and saving the models","title":"Modifying and saving the models","text":"flux_balance_analysis_dict(\n m, GLPK.Optimizer;\n modifications=[\n knockout([\"G_s0001\"]),\n change_objective(\"R_TALA\"),\n ])","category":"page"},{"location":"tutorials/4_modifying/#Exporting-the-modified-models-in-native-formats","page":"Modifying and saving the models","title":"Exporting the modified models in native formats","text":"","category":"section"},{"location":"tutorials/4_modifying/","page":"Modifying and saving the models","title":"Modifying and saving the models","text":"Manually modified models can be exported in standard formats so that they can be examined in other environments, or just made accessible for publication.","category":"page"},{"location":"tutorials/4_modifying/","page":"Modifying and saving the models","title":"Modifying and saving the models","text":"COBREXA.jl supports export of MATLAB-like and JSON models. Simply use save_model:","category":"page"},{"location":"tutorials/4_modifying/","page":"Modifying and saving the models","title":"Modifying and saving the models","text":"save_model(m, \"myModel.json\")\nsave_model(m, \"myModel.mat\")","category":"page"},{"location":"tutorials/4_modifying/","page":"Modifying and saving the models","title":"Modifying and saving the models","text":"The function automatically guesses the appropriate model format to write into the file from the file extension. If required, you can choose the model format manually by using save_json_model and save_mat_model.","category":"page"},{"location":"tutorials/4_modifying/#Using-Serialization-for-quick-and-efficient-model-storage","page":"Modifying and saving the models","title":"Using Serialization for quick & efficient model storage","text":"","category":"section"},{"location":"tutorials/4_modifying/","page":"Modifying and saving the models","title":"Modifying and saving the models","text":"If you save the model \"just for yourself\", such as for the use in an immediately following analysis, it may be inconvenient (and unnecessarily inefficient) to encode and decode the models to and from the external format. Moreover, certain model types (such as CoreModelCoupled) cannot be fully represented in all model formats, thus increasing the chance for accidental data loss.","category":"page"},{"location":"tutorials/4_modifying/","page":"Modifying and saving the models","title":"Modifying and saving the models","text":"Instead of that, we recommend using the Serialization package. It provides a straightforward way to save any Julia data structure to the disk, using a very efficient data format that can be written to and read from the disk very quickly.","category":"page"},{"location":"tutorials/4_modifying/","page":"Modifying and saving the models","title":"Modifying and saving the models","text":"With any model in m, you can write it to disk as follows:","category":"page"},{"location":"tutorials/4_modifying/","page":"Modifying and saving the models","title":"Modifying and saving the models","text":"using Serialization\nopen(f -> serialize(f, m), \"myModel\", \"w\")","category":"page"},{"location":"tutorials/4_modifying/","page":"Modifying and saving the models","title":"Modifying and saving the models","text":"...and read it back with:","category":"page"},{"location":"tutorials/4_modifying/","page":"Modifying and saving the models","title":"Modifying and saving the models","text":"m = deserialize(\"myModel\")","category":"page"},{"location":"tutorials/4_modifying/","page":"Modifying and saving the models","title":"Modifying and saving the models","text":"One great advantage of Serialization is speed – models with millions of reactions are usually loaded and saved with minimal overhead in less than a second.","category":"page"},{"location":"tutorials/4_modifying/","page":"Modifying and saving the models","title":"Modifying and saving the models","text":"warning: Limits of `Serialization`\nSerialized models are great for quickly exchanging data objects between analysis steps. The avoided need for re-encoding can save you a great deal of analysis time that can be used for better purposes. Despite that, do not rely on the stability of the serialized format – it often changes between Julia versions, and the data stored in one version may not open easily after an upgrade. In short, use serialized data within one workflow, and use standard and stable external formats for publishing and storing the data beyond the scope of a single analysis workflow.","category":"page"},{"location":"howToContribute/#Contributing-to-COBREXA.jl","page":"How to contribute","title":"Contributing to COBREXA.jl","text":"","category":"section"},{"location":"howToContribute/","page":"How to contribute","title":"How to contribute","text":":+1::tada: Thanks for taking the time to contribute to COBREXA.jl! :tada::+1:","category":"page"},{"location":"howToContribute/#How-to-report-a-bug-or-suggest-an-enhancement","page":"How to contribute","title":"How to report a bug or suggest an enhancement","text":"","category":"section"},{"location":"howToContribute/","page":"How to contribute","title":"How to contribute","text":"Please use the GitHub issue tracker to report any problems with the software, and discuss any potential questions about COBREXA use.","category":"page"},{"location":"howToContribute/","page":"How to contribute","title":"How to contribute","text":"Before creating bug reports, please check the open issues, you might find out that the issue is already reported and known.","category":"page"},{"location":"howToContribute/","page":"How to contribute","title":"How to contribute","text":"General guidelines for reporting issues:","category":"page"},{"location":"howToContribute/","page":"How to contribute","title":"How to contribute","text":"If creating a bug report, include a complete description of how we can reproduce the bug, including e.g. links to datasets and any external scripts used. Ideally, try to create a code snippet that causes the problem on a fresh installation of COBREXA.jl (often called the \"minimal crashing example\")\nIf possible, use the supplied issue templates and fill in all fields.\nIf your issue is already described in an issue that is \"closed\", do not reopen it. Instead, open a new issue and include a link to the original issue. (The fact that the original issue might have been mistakenly closed may be an issue on its own.)\nEnhancement proposals should refer a viable way for implementing the enhancement. If there are multiple possibilities for implementation, we will welcome a discussion about which one is optimal for COBREXA.jl.","category":"page"},{"location":"howToContribute/#How-to-test-a-development-version-of-the-package?","page":"How to contribute","title":"How to test a development version of the package?","text":"","category":"section"},{"location":"howToContribute/#Step-1:-Load-COBREXA.jl-from-the-source-from-the-git-repository","page":"How to contribute","title":"Step 1: Load COBREXA.jl from the source from the git repository","text":"","category":"section"},{"location":"howToContribute/","page":"How to contribute","title":"How to contribute","text":"There are two ways that you can retrieve a local copy of the development repo: you can either clone the repository manually, or use Julia package manager to get a development version for you.","category":"page"},{"location":"howToContribute/#Option-1:-Using-Julia-package-manager","page":"How to contribute","title":"Option 1: Using Julia package manager","text":"","category":"section"},{"location":"howToContribute/","page":"How to contribute","title":"How to contribute","text":"When you are used to using the Julia package manager for developing or contributing to packages, you can type:","category":"page"},{"location":"howToContribute/","page":"How to contribute","title":"How to contribute","text":"(v1.6) pkg> dev COBREXA","category":"page"},{"location":"howToContribute/","page":"How to contribute","title":"How to contribute","text":"This will install the COBREXA package locally and check it out for development. You can check the location of the package with:","category":"page"},{"location":"howToContribute/","page":"How to contribute","title":"How to contribute","text":"(v1.6) pkg> status\n Status `~/.julia/environments/v1.4/Project.toml`\n [a03a9c34] COBREXA v0.0.5 [`~/.julia/dev/COBREXA`]","category":"page"},{"location":"howToContribute/","page":"How to contribute","title":"How to contribute","text":"The default location of the package is ~/.julia/dev/COBREXA.","category":"page"},{"location":"howToContribute/#Option-2:-Cloning-with-git-manually","page":"How to contribute","title":"Option 2: Cloning with git manually","text":"","category":"section"},{"location":"howToContribute/","page":"How to contribute","title":"How to contribute","text":"You can use git to get the sources as follows:","category":"page"},{"location":"howToContribute/","page":"How to contribute","title":"How to contribute","text":"$ git clone git@github.com:LCSB-BioCore/COBREXA.jl.git","category":"page"},{"location":"howToContribute/","page":"How to contribute","title":"How to contribute","text":"When the cloning process finishes, you shold see the package cloned in a new directory COBREXA.jl. To install this version to your Julia, change to the directory first, and start Julia:","category":"page"},{"location":"howToContribute/","page":"How to contribute","title":"How to contribute","text":"$ cd COBREXA.jl\n$ julia","category":"page"},{"location":"howToContribute/","page":"How to contribute","title":"How to contribute","text":"With Julia, you can install the development version of the package from the directory as follows:","category":"page"},{"location":"howToContribute/","page":"How to contribute","title":"How to contribute","text":"(v1.6) pkg> add .","category":"page"},{"location":"howToContribute/","page":"How to contribute","title":"How to contribute","text":"(press ] to get into the packaging environment)","category":"page"},{"location":"howToContribute/","page":"How to contribute","title":"How to contribute","text":"This adds the COBREXA.jl package and all its dependencies. You can verify that the installation worked by typing:","category":"page"},{"location":"howToContribute/","page":"How to contribute","title":"How to contribute","text":"(v1.6) pkg> status","category":"page"},{"location":"howToContribute/","page":"How to contribute","title":"How to contribute","text":"If you are planning to develop the package, it is often easier to install the package in development mode, with dev command:","category":"page"},{"location":"howToContribute/","page":"How to contribute","title":"How to contribute","text":"(v1.6) pkg> dev .","category":"page"},{"location":"howToContribute/","page":"How to contribute","title":"How to contribute","text":"That causes the package to always load with whatever code changes that you added to the source directory.","category":"page"},{"location":"howToContribute/#Finally:-load-COBREXA.jl","page":"How to contribute","title":"Finally: load COBREXA.jl","text":"","category":"section"},{"location":"howToContribute/","page":"How to contribute","title":"How to contribute","text":"With both of above options, you should get COBREXA.jl installed, which means that the following command should, without errors, load the package and make COBREXA.jl functions available for testing:","category":"page"},{"location":"howToContribute/","page":"How to contribute","title":"How to contribute","text":"julia> using COBREXA","category":"page"},{"location":"howToContribute/","page":"How to contribute","title":"How to contribute","text":"You may now freely modify the code and test the result.","category":"page"},{"location":"howToContribute/","page":"How to contribute","title":"How to contribute","text":"Remember that if you want to work in the environment of the package, you need to activate it. That causes, among other, that the additional dependencies specified with packaging add command will be written automaticaly to Project.toml file of your local COBREXA.jl clone, not to your global environment. Activation is simple: when in the directory of the package, just type the command into the packaging shell:","category":"page"},{"location":"howToContribute/","page":"How to contribute","title":"How to contribute","text":"(v1.6) pkg> activate","category":"page"},{"location":"howToContribute/#Step-2:-Publish-your-changes","page":"How to contribute","title":"Step 2: Publish your changes","text":"","category":"section"},{"location":"howToContribute/","page":"How to contribute","title":"How to contribute","text":"You are expected to make a fork of the main COBREXA.jl repository, and open a pull request from that one to the master branch of the main repository. For creating the fork, just hit the \"Fork\" button on GitHub.","category":"page"},{"location":"howToContribute/","page":"How to contribute","title":"How to contribute","text":"After that, change the directory to your repository and adjust the remotes:","category":"page"},{"location":"howToContribute/","page":"How to contribute","title":"How to contribute","text":"$ cd ~/.julia/dev/COBREXA # or any other directory, as needed\n$ git remote rename origin upstream # renames the origin (the main COBREXA.jl repo) to upstream\n$ git remote add origin git@github.com:yourUsername/COBREXA.jl.git # adds the link to your clone as new origin\n$ git fetch origin # fetches the refs from your repo","category":"page"},{"location":"howToContribute/","page":"How to contribute","title":"How to contribute","text":"In the above code, change yourUsername is your GitHub username.","category":"page"},{"location":"howToContribute/","page":"How to contribute","title":"How to contribute","text":"When the renaming is done, start a new branch at upstream/master. In the code snippet, substitute yn for your initials (Your Name here) and give the new feature a better name than somefeature:","category":"page"},{"location":"howToContribute/","page":"How to contribute","title":"How to contribute","text":"$ git checkout -b yn-somefeature origin/master","category":"page"},{"location":"howToContribute/","page":"How to contribute","title":"How to contribute","text":"Commit any changes and features that you like to the new branch. When the commits look complete to you, push the branch to your repository fork:","category":"page"},{"location":"howToContribute/","page":"How to contribute","title":"How to contribute","text":"$ git push -u origin yn-somefeature","category":"page"},{"location":"howToContribute/","page":"How to contribute","title":"How to contribute","text":"This makes your changes visible in your repository. After that, you can navigate to GitHub's pull request page, where you should immediately see a big green button that helps you to create a pull request for this branch. Read the section below for precise details and guidelines on submitting the pull requests.","category":"page"},{"location":"howToContribute/#How-to-submit-a-pull-request-(PR)-with-your-modification/enhancement?","page":"How to contribute","title":"How to submit a pull request (PR) with your modification/enhancement?","text":"","category":"section"},{"location":"howToContribute/","page":"How to contribute","title":"How to contribute","text":"Make a fork of the repository, commit the modifications in a separate branch and push the branch to your fork.\nMake a pull request where you describe the motivation and expected outcome for the users. Specifically, consider any possible incompatibilities, and the necessity to increment the version number after your changes are applied. Label your pull request with a semantic emoji in the title to indicate what it addresses.\nAfter submitting the pull request, verify that all status checks (tests, documentation) are passing. Make sure any new contribution is properly documented and tested (you may want to check with coverage tools, using test --coverage from the Julia packaging shell)","category":"page"},{"location":"howToContribute/","page":"How to contribute","title":"How to contribute","text":"After you submitted a pull request, a label might be assigned that allows us to track and manage issues and pull requests.","category":"page"},{"location":"howToContribute/","page":"How to contribute","title":"How to contribute","text":"Tip: if you commit many small, partial changes, you may help us save energy by prefixing your commit names with [skip ci], which deactivates the CI trigger on that commit. With each skipped CI, you may save as much as 15Wh of energy. Testing just the \"final\" commit of the pull-request branch is sufficient.","category":"page"},{"location":"howToContribute/#For-developers:-What-is-the-expected-branch-management/workflow?","page":"How to contribute","title":"For developers: What is the expected branch management/workflow?","text":"","category":"section"},{"location":"howToContribute/","page":"How to contribute","title":"How to contribute","text":"The workflow is based on GitLab flow, i.e., a master branch with feature branches being merged into the master branch. Depending on your access rights, you may open the feature branch in this repository, on in your fork.","category":"page"},{"location":"howToContribute/","page":"How to contribute","title":"How to contribute","text":"The guidelines can be summarized as such:","category":"page"},{"location":"howToContribute/","page":"How to contribute","title":"How to contribute","text":"when making a contribution, create one new branch and open one new PR for each new independent feature or bugfix\ndo not push to another branch unless it is your own\ntry to get a review before merging unless the change is trivial and non-impacting\nconsider prefixing your branch names with your initials, so that one can easily see who owns which branch (e.g. ad-somefeature would be committed by Arthur Dent)","category":"page"},{"location":"advanced/3_custom_models_on_hpc/#Using-customized-models-on-HPC","page":"Using customized models on HPC","title":"Using customized models on HPC","text":"","category":"section"},{"location":"notebooks/2_finding_balance/","page":"Finding balance and variability of constraint-based models","title":"Finding balance and variability of constraint-based models","text":"EditURL = \"https://github.com/LCSB-BioCore/COBREXA.jl/blob/master/docs/src/notebooks/2_finding_balance.jl\"","category":"page"},{"location":"notebooks/2_finding_balance/#Finding-balance-and-variability-of-constraint-based-models","page":"Finding balance and variability of constraint-based models","title":"Finding balance and variability of constraint-based models","text":"","category":"section"},{"location":"notebooks/2_finding_balance/","page":"Finding balance and variability of constraint-based models","title":"Finding balance and variability of constraint-based models","text":"(Image: ) (Image: )","category":"page"},{"location":"notebooks/2_finding_balance/","page":"Finding balance and variability of constraint-based models","title":"Finding balance and variability of constraint-based models","text":"Here we use flux_balance_analysis, flux_variability_analysis, and parsimonious_flux_balance_analysis of COBREXA.jl functions to analyze a toy model of E. coli.","category":"page"},{"location":"notebooks/2_finding_balance/","page":"Finding balance and variability of constraint-based models","title":"Finding balance and variability of constraint-based models","text":"If it is not already present, download the model.","category":"page"},{"location":"notebooks/2_finding_balance/","page":"Finding balance and variability of constraint-based models","title":"Finding balance and variability of constraint-based models","text":"!isfile(\"e_coli_core.xml\") &&\n download(\"http://bigg.ucsd.edu/static/models/e_coli_core.xml\", \"e_coli_core.xml\")\n\nusing COBREXA","category":"page"},{"location":"notebooks/2_finding_balance/","page":"Finding balance and variability of constraint-based models","title":"Finding balance and variability of constraint-based models","text":"tip: Tip: use `?` to get quick help about functions\nWhen you are unsure about how a function works, write ? function_name to see the function reference documentation.","category":"page"},{"location":"notebooks/2_finding_balance/","page":"Finding balance and variability of constraint-based models","title":"Finding balance and variability of constraint-based models","text":"model = load_model(\"e_coli_core.xml\")","category":"page"},{"location":"notebooks/2_finding_balance/#Optimization-solvers-in-COBREXA","page":"Finding balance and variability of constraint-based models","title":"Optimization solvers in COBREXA","text":"","category":"section"},{"location":"notebooks/2_finding_balance/","page":"Finding balance and variability of constraint-based models","title":"Finding balance and variability of constraint-based models","text":"To actually perform any optimization based analysis we need to load an optimizer. Any JuMP.jl-supported optimizers will work. Here, we will use Tulip.jl to optimize linear programs and OSQP.jl to optimize quadratic programs.","category":"page"},{"location":"notebooks/2_finding_balance/","page":"Finding balance and variability of constraint-based models","title":"Finding balance and variability of constraint-based models","text":"note: Note: OSQP can be sensitive\nWe recommend reading the docs of OSQP before using it, since it may give inconsistent results depending on what settings you use. Commercial solvers like Gurobi, Mosek, CPLEX, etc. require less user engagement.","category":"page"},{"location":"notebooks/2_finding_balance/","page":"Finding balance and variability of constraint-based models","title":"Finding balance and variability of constraint-based models","text":"import Pkg\nPkg.add(\"Tulip\")\nPkg.add(\"OSQP\")\n\nusing Tulip\nusing OSQP","category":"page"},{"location":"notebooks/2_finding_balance/#Flux-balance-analysis-(FBA)","page":"Finding balance and variability of constraint-based models","title":"Flux balance analysis (FBA)","text":"","category":"section"},{"location":"notebooks/2_finding_balance/","page":"Finding balance and variability of constraint-based models","title":"Finding balance and variability of constraint-based models","text":"Most analysis functions come in several variants that produce different types of output. All of them usually require a model and JuMP.jl-compatible optimizer to work in the model.","category":"page"},{"location":"notebooks/2_finding_balance/","page":"Finding balance and variability of constraint-based models","title":"Finding balance and variability of constraint-based models","text":"In the case of FBA, you may choose from these variants (here using the Tulip optimizer):","category":"page"},{"location":"notebooks/2_finding_balance/","page":"Finding balance and variability of constraint-based models","title":"Finding balance and variability of constraint-based models","text":"vec_soln = flux_balance_analysis_vec(model, Tulip.Optimizer)","category":"page"},{"location":"notebooks/2_finding_balance/","page":"Finding balance and variability of constraint-based models","title":"Finding balance and variability of constraint-based models","text":"dict_soln = flux_balance_analysis_dict(model, Tulip.Optimizer)","category":"page"},{"location":"notebooks/2_finding_balance/#Modifications","page":"Finding balance and variability of constraint-based models","title":"Modifications","text":"","category":"section"},{"location":"notebooks/2_finding_balance/","page":"Finding balance and variability of constraint-based models","title":"Finding balance and variability of constraint-based models","text":"Often it is desirable to add a slight modififaction to the problem before performing analysis, to see e.g. differences of the model behavior caused by the change introduced.","category":"page"},{"location":"notebooks/2_finding_balance/","page":"Finding balance and variability of constraint-based models","title":"Finding balance and variability of constraint-based models","text":"COBREXA.jl supports several modifications by default, which include changing objective sense, optimizer attributes, flux constraints, optimization objective, reaction and gene knockouts, and others.","category":"page"},{"location":"notebooks/2_finding_balance/","page":"Finding balance and variability of constraint-based models","title":"Finding balance and variability of constraint-based models","text":"dict_soln = flux_balance_analysis_dict(\n model,\n OSQP.Optimizer;\n modifications = [ # modifications are applied in order\n # this changes the objective to maximize the biomass production\n change_objective(\"R_BIOMASS_Ecoli_core_w_GAM\"),\n\n # this fixes a specific rate of the glucose exchange\n change_constraint(\"R_EX_glc__D_e\", -12, -12),\n\n # this knocks out two genes, i.e. constrains their associated reactions to zero.\n knockout([\"b0978\", \"b0734\"]), ## the gene IDs are cytochrome oxidase (CYTBD)\n\n # ignore the optimizer specified above and change it to Tulip\n change_optimizer(Tulip.Optimizer),\n\n # set a custom attribute of the Tulip optimizer (see Tulip docs for more possibilities)\n change_optimizer_attribute(\"IPM_IterationsLimit\", 110),\n\n # explicitly tell the optimizer to maximize the new objective\n change_sense(MAX_SENSE),\n ],\n)","category":"page"},{"location":"notebooks/2_finding_balance/#Flux-variability-analysis-(FVA)","page":"Finding balance and variability of constraint-based models","title":"Flux variability analysis (FVA)","text":"","category":"section"},{"location":"notebooks/2_finding_balance/","page":"Finding balance and variability of constraint-based models","title":"Finding balance and variability of constraint-based models","text":"The default FVA in flux_variability_analysis returns maximized and minimized reaction fluxes in a matrix. Here we use the dictionary variant in fluxvariabilityanalysis_dict, to show how to easily access specific fluxes from its results.","category":"page"},{"location":"notebooks/2_finding_balance/","page":"Finding balance and variability of constraint-based models","title":"Finding balance and variability of constraint-based models","text":"fva_mins, fva_maxs = flux_variability_analysis_dict(\n model,\n Tulip.Optimizer;\n bounds = objective_bounds(0.99), # the objective function is allowed to vary by ~1% from the FBA optimum\n modifications = [\n change_optimizer_attribute(\"IPM_IterationsLimit\", 500),\n change_constraint(\"R_EX_glc__D_e\", -10, -10),\n change_constraint(\"R_EX_o2_e\", 0.0, 0.0),\n ],\n)","category":"page"},{"location":"notebooks/2_finding_balance/","page":"Finding balance and variability of constraint-based models","title":"Finding balance and variability of constraint-based models","text":"fva_maxs[\"R_EX_ac_e\"][\"R_EX_ac_e\"] # get the maximal acetate exchange flux","category":"page"},{"location":"notebooks/2_finding_balance/#Parsimonious-flux-balance-analysis-(pFBA)","page":"Finding balance and variability of constraint-based models","title":"Parsimonious flux balance analysis (pFBA)","text":"","category":"section"},{"location":"notebooks/2_finding_balance/","page":"Finding balance and variability of constraint-based models","title":"Finding balance and variability of constraint-based models","text":"Parsimonious flux balance analysis (here in parsimonious_flux_balance_analysis finds a unique flux solution that minimizes the squared sum of fluxes of the system subject, while maintaining the same objective value as the flux balance analysis solution. Since we are optimizing a quadratic objective, we also need to switch to a quadratic optimizer. In this case, OSQP will work. We demonstrate it on the dictionary-returning variant of pFBA, parsimonious_flux_balance_analysis_dict:","category":"page"},{"location":"notebooks/2_finding_balance/","page":"Finding balance and variability of constraint-based models","title":"Finding balance and variability of constraint-based models","text":"dict_soln = parsimonious_flux_balance_analysis_dict(\n model,\n OSQP.Optimizer;\n modifications = [\n change_optimizer_attribute(\"verbose\", false), # silence the optimizer (OSQP is very verbose by default)\n change_constraint(\"R_EX_glc__D_e\", -12, -12),\n ],\n)","category":"page"},{"location":"notebooks/2_finding_balance/","page":"Finding balance and variability of constraint-based models","title":"Finding balance and variability of constraint-based models","text":"The function also has the expectable second variant that returns a vector of solutions, in parsimonious_flux_balance_analysis_vec. Here, we utilize it to show how to use different optimizers for finding the optimum and for solving the quadratic problem. That may be preferable if the optimizer qualities differ for the differing tasks. pFBA allows you to specify qp_modifications that are applied after the original optimum is found, and before the quadratic part of the problem solving begins.","category":"page"},{"location":"notebooks/2_finding_balance/","page":"Finding balance and variability of constraint-based models","title":"Finding balance and variability of constraint-based models","text":"vec_soln = parsimonious_flux_balance_analysis_vec(\n model,\n Tulip.Optimizer; # start with Tulip\n modifications = [\n change_constraint(\"R_EX_glc__D_e\", -12, -12),\n change_optimizer_attribute(\"IPM_IterationsLimit\", 500), # we may change Tulip-specific attributes here\n ],\n qp_modifications = [\n change_optimizer(OSQP.Optimizer), # now switch to OSQP (Tulip wouldn't be able to finish the computation)\n change_optimizer_attribute(\"verbose\", false), # and silence it.\n ],\n)","category":"page"},{"location":"notebooks/2_finding_balance/","page":"Finding balance and variability of constraint-based models","title":"Finding balance and variability of constraint-based models","text":"","category":"page"},{"location":"notebooks/2_finding_balance/","page":"Finding balance and variability of constraint-based models","title":"Finding balance and variability of constraint-based models","text":"This page was generated using Literate.jl.","category":"page"},{"location":"notebooks/1_loading_converting_saving/","page":"Loading, converting, and saving models","title":"Loading, converting, and saving models","text":"EditURL = \"https://github.com/LCSB-BioCore/COBREXA.jl/blob/master/docs/src/notebooks/1_loading_converting_saving.jl\"","category":"page"},{"location":"notebooks/1_loading_converting_saving/#Loading,-converting,-and-saving-models","page":"Loading, converting, and saving models","title":"Loading, converting, and saving models","text":"","category":"section"},{"location":"notebooks/1_loading_converting_saving/","page":"Loading, converting, and saving models","title":"Loading, converting, and saving models","text":"(Image: ) (Image: )","category":"page"},{"location":"notebooks/1_loading_converting_saving/","page":"Loading, converting, and saving models","title":"Loading, converting, and saving models","text":"COBREXA can load models stored in .mat, .json, and .xml formats (with the latter denoting SBML formatted models).","category":"page"},{"location":"notebooks/1_loading_converting_saving/","page":"Loading, converting, and saving models","title":"Loading, converting, and saving models","text":"We will primarily use the E. Coli \"core\" model to demonstrate the utilities found in COBREXA. First, let's download the model in several formats.","category":"page"},{"location":"notebooks/1_loading_converting_saving/","page":"Loading, converting, and saving models","title":"Loading, converting, and saving models","text":"# Downloads the model files if they don't already exist\n!isfile(\"e_coli_core.mat\") &&\n download(\"http://bigg.ucsd.edu/static/models/e_coli_core.mat\", \"e_coli_core.mat\");\n!isfile(\"e_coli_core.json\") &&\n download(\"http://bigg.ucsd.edu/static/models/e_coli_core.json\", \"e_coli_core.json\");\n!isfile(\"e_coli_core.xml\") &&\n download(\"http://bigg.ucsd.edu/static/models/e_coli_core.xml\", \"e_coli_core.xml\");\nnothing #hide","category":"page"},{"location":"notebooks/1_loading_converting_saving/","page":"Loading, converting, and saving models","title":"Loading, converting, and saving models","text":"Now, load the package:","category":"page"},{"location":"notebooks/1_loading_converting_saving/","page":"Loading, converting, and saving models","title":"Loading, converting, and saving models","text":"using COBREXA","category":"page"},{"location":"notebooks/1_loading_converting_saving/","page":"Loading, converting, and saving models","title":"Loading, converting, and saving models","text":"tip: Save bandwidth!\nThe published models usually do not change very often. It is therefore pretty useful to save them to a central location and load them from there. That saves your time, and does not unnecessarily consume the connectivity resources of the model repository.","category":"page"},{"location":"notebooks/1_loading_converting_saving/#Loading-models","page":"Loading, converting, and saving models","title":"Loading models","text":"","category":"section"},{"location":"notebooks/1_loading_converting_saving/","page":"Loading, converting, and saving models","title":"Loading, converting, and saving models","text":"Load the models using the load_model function. Each model is able to \"pretty-print\" itself, hiding the inner complexity.","category":"page"},{"location":"notebooks/1_loading_converting_saving/","page":"Loading, converting, and saving models","title":"Loading, converting, and saving models","text":"mat_model = load_model(\"e_coli_core.mat\")","category":"page"},{"location":"notebooks/1_loading_converting_saving/","page":"Loading, converting, and saving models","title":"Loading, converting, and saving models","text":"json_model = load_model(\"e_coli_core.json\")","category":"page"},{"location":"notebooks/1_loading_converting_saving/","page":"Loading, converting, and saving models","title":"Loading, converting, and saving models","text":"sbml_model = load_model(\"e_coli_core.xml\")","category":"page"},{"location":"notebooks/1_loading_converting_saving/","page":"Loading, converting, and saving models","title":"Loading, converting, and saving models","text":"note: Note: `load_model` infers the output type from the file extension\nNotice how each model was read into memory as a model type corresponding to its file type, i.e. the file ending with .json loaded as a JSONModel, the file ending with .mat loaded as MATModel, and the file ending with .xml loaded as an SBMLModel.","category":"page"},{"location":"notebooks/1_loading_converting_saving/","page":"Loading, converting, and saving models","title":"Loading, converting, and saving models","text":"You can directly inspect the model objects, although only with a specific way for each specific type.","category":"page"},{"location":"notebooks/1_loading_converting_saving/","page":"Loading, converting, and saving models","title":"Loading, converting, and saving models","text":"JSON models contain their corresponding JSON:","category":"page"},{"location":"notebooks/1_loading_converting_saving/","page":"Loading, converting, and saving models","title":"Loading, converting, and saving models","text":"json_model.json","category":"page"},{"location":"notebooks/1_loading_converting_saving/","page":"Loading, converting, and saving models","title":"Loading, converting, and saving models","text":"SBML models contain a complicated structure from SBML.jl package:","category":"page"},{"location":"notebooks/1_loading_converting_saving/","page":"Loading, converting, and saving models","title":"Loading, converting, and saving models","text":"typeof(sbml_model.sbml)","category":"page"},{"location":"notebooks/1_loading_converting_saving/","page":"Loading, converting, and saving models","title":"Loading, converting, and saving models","text":"MAT models contain MATLAB data:","category":"page"},{"location":"notebooks/1_loading_converting_saving/","page":"Loading, converting, and saving models","title":"Loading, converting, and saving models","text":"mat_model.mat","category":"page"},{"location":"notebooks/1_loading_converting_saving/#Using-the-generic-interface-to-access-model-details","page":"Loading, converting, and saving models","title":"Using the generic interface to access model details","text":"","category":"section"},{"location":"notebooks/1_loading_converting_saving/","page":"Loading, converting, and saving models","title":"Loading, converting, and saving models","text":"To prevent the complexities of object representation, COBREXA.jl uses a set of generic interface functions that extract various important information from all supported model types. This approach ensures that the analysis functions can work on any data.","category":"page"},{"location":"notebooks/1_loading_converting_saving/","page":"Loading, converting, and saving models","title":"Loading, converting, and saving models","text":"For example, you can check the reactions and metabolites contained in SBML and JSON models using the same accessor:","category":"page"},{"location":"notebooks/1_loading_converting_saving/","page":"Loading, converting, and saving models","title":"Loading, converting, and saving models","text":"reactions(json_model)","category":"page"},{"location":"notebooks/1_loading_converting_saving/","page":"Loading, converting, and saving models","title":"Loading, converting, and saving models","text":"reactions(sbml_model)","category":"page"},{"location":"notebooks/1_loading_converting_saving/","page":"Loading, converting, and saving models","title":"Loading, converting, and saving models","text":"issetequal(reactions(json_model), reactions(mat_model)) # do models contain the same reactions?","category":"page"},{"location":"notebooks/1_loading_converting_saving/","page":"Loading, converting, and saving models","title":"Loading, converting, and saving models","text":"All accessors are defined in a single file in COBREXA source code; you may therefore get a list of all accessors as follows:","category":"page"},{"location":"notebooks/1_loading_converting_saving/","page":"Loading, converting, and saving models","title":"Loading, converting, and saving models","text":"using InteractiveUtils\n\nfor method in filter(\n x -> endswith(string(x.file), \"MetabolicModel.jl\"),\n InteractiveUtils.methodswith(MetabolicModel, COBREXA),\n)\n println(method.name)\nend","category":"page"},{"location":"notebooks/1_loading_converting_saving/#Converting-between-model-types","page":"Loading, converting, and saving models","title":"Converting between model types","text":"","category":"section"},{"location":"notebooks/1_loading_converting_saving/","page":"Loading, converting, and saving models","title":"Loading, converting, and saving models","text":"It is possible to convert model types to-and-fro. To do this, use the convert function, which is overloaded from Julia's Base.","category":"page"},{"location":"notebooks/1_loading_converting_saving/","page":"Loading, converting, and saving models","title":"Loading, converting, and saving models","text":"danger: Data loss may occur when converting between models\nThe conversion of models only uses the data accessible through the generic accessors. Other data may get lost.","category":"page"},{"location":"notebooks/1_loading_converting_saving/","page":"Loading, converting, and saving models","title":"Loading, converting, and saving models","text":"m = convert(MATModel, json_model)","category":"page"},{"location":"notebooks/1_loading_converting_saving/","page":"Loading, converting, and saving models","title":"Loading, converting, and saving models","text":"m will now contain the MATLAB-style matrix representation of the model:","category":"page"},{"location":"notebooks/1_loading_converting_saving/","page":"Loading, converting, and saving models","title":"Loading, converting, and saving models","text":"Matrix(m.mat[\"S\"])","category":"page"},{"location":"notebooks/1_loading_converting_saving/","page":"Loading, converting, and saving models","title":"Loading, converting, and saving models","text":"The loading and conversion can be combined using a shortcut:","category":"page"},{"location":"notebooks/1_loading_converting_saving/","page":"Loading, converting, and saving models","title":"Loading, converting, and saving models","text":"m = load_model(MATModel, \"e_coli_core.json\")","category":"page"},{"location":"notebooks/1_loading_converting_saving/#Saving-and-exporting-models","page":"Loading, converting, and saving models","title":"Saving and exporting models","text":"","category":"section"},{"location":"notebooks/1_loading_converting_saving/","page":"Loading, converting, and saving models","title":"Loading, converting, and saving models","text":"COBREXA.jl supports exporting the models in JSON and MAT format, using save_model.","category":"page"},{"location":"notebooks/1_loading_converting_saving/","page":"Loading, converting, and saving models","title":"Loading, converting, and saving models","text":"save_model(m, \"converted_model.json\")\nsave_model(m, \"converted_model.mat\")","category":"page"},{"location":"notebooks/1_loading_converting_saving/","page":"Loading, converting, and saving models","title":"Loading, converting, and saving models","text":"If you need a non-standard suffix, use the type-specific saving functions:","category":"page"},{"location":"notebooks/1_loading_converting_saving/","page":"Loading, converting, and saving models","title":"Loading, converting, and saving models","text":"save_json_model(m, \"file.without.a.good.suffix\")\nsave_mat_model(m, \"another.file.matlab\")","category":"page"},{"location":"notebooks/1_loading_converting_saving/","page":"Loading, converting, and saving models","title":"Loading, converting, and saving models","text":"If you are saving the models only for future processing in Julia environment, it is often wasteful to encode the models to external formats and decode them back. Instead, you can use the \"native\" Julia data format, accessible with package Serialization.","category":"page"},{"location":"notebooks/1_loading_converting_saving/","page":"Loading, converting, and saving models","title":"Loading, converting, and saving models","text":"This way, you can use serialize to save even the StandardModel that has no file format associated:","category":"page"},{"location":"notebooks/1_loading_converting_saving/","page":"Loading, converting, and saving models","title":"Loading, converting, and saving models","text":"using Serialization\n\nsm = convert(StandardModel, m)\n\nopen(f -> serialize(f, sm), \"myModel.stdmodel\", \"w\")","category":"page"},{"location":"notebooks/1_loading_converting_saving/","page":"Loading, converting, and saving models","title":"Loading, converting, and saving models","text":"The models can then be loaded back using deserialize:","category":"page"},{"location":"notebooks/1_loading_converting_saving/","page":"Loading, converting, and saving models","title":"Loading, converting, and saving models","text":"sm2 = deserialize(\"myModel.stdmodel\")\nissetequal(metabolites(sm), metabolites(sm2))","category":"page"},{"location":"notebooks/1_loading_converting_saving/","page":"Loading, converting, and saving models","title":"Loading, converting, and saving models","text":"This form of loading operation is usually pretty quick:","category":"page"},{"location":"notebooks/1_loading_converting_saving/","page":"Loading, converting, and saving models","title":"Loading, converting, and saving models","text":"t = @elapsed deserialize(\"myModel.stdmodel\")\n@info \"Deserialization took $t seconds\"","category":"page"},{"location":"notebooks/1_loading_converting_saving/","page":"Loading, converting, and saving models","title":"Loading, converting, and saving models","text":"Notably, large and complicated models with thousands of reactions and annotations can take seconds to decode properly. Serialization allows you to almost completely remove this overhead, and scales well to tens of millions of reactions.","category":"page"},{"location":"notebooks/1_loading_converting_saving/","page":"Loading, converting, and saving models","title":"Loading, converting, and saving models","text":"","category":"page"},{"location":"notebooks/1_loading_converting_saving/","page":"Loading, converting, and saving models","title":"Loading, converting, and saving models","text":"This page was generated using Literate.jl.","category":"page"},{"location":"notebooks/3_basic_stdmodel_usage/","page":"Basic usage of StandardModel","title":"Basic usage of StandardModel","text":"EditURL = \"https://github.com/LCSB-BioCore/COBREXA.jl/blob/master/docs/src/notebooks/3_basic_stdmodel_usage.jl\"","category":"page"},{"location":"notebooks/3_basic_stdmodel_usage/#Basic-usage-of-StandardModel","page":"Basic usage of StandardModel","title":"Basic usage of StandardModel","text":"","category":"section"},{"location":"notebooks/3_basic_stdmodel_usage/","page":"Basic usage of StandardModel","title":"Basic usage of StandardModel","text":"(Image: ) (Image: )","category":"page"},{"location":"notebooks/3_basic_stdmodel_usage/","page":"Basic usage of StandardModel","title":"Basic usage of StandardModel","text":"In this tutorial we will use COBREXA's StandardModel and functions that specifically operate on it. As usual we will use the toy model of E. coli for demonstration.","category":"page"},{"location":"notebooks/3_basic_stdmodel_usage/","page":"Basic usage of StandardModel","title":"Basic usage of StandardModel","text":"!isfile(\"e_coli_core.json\") &&\n download(\"http://bigg.ucsd.edu/static/models/e_coli_core.json\", \"e_coli_core.json\")\n\nusing COBREXA","category":"page"},{"location":"notebooks/3_basic_stdmodel_usage/#Loading-a-model","page":"Basic usage of StandardModel","title":"Loading a model","text":"","category":"section"},{"location":"notebooks/3_basic_stdmodel_usage/","page":"Basic usage of StandardModel","title":"Basic usage of StandardModel","text":"model = load_model(StandardModel, \"e_coli_core.json\") # we specifically want to load a StandardModel from the model file","category":"page"},{"location":"notebooks/3_basic_stdmodel_usage/","page":"Basic usage of StandardModel","title":"Basic usage of StandardModel","text":"note: Note: Loading `StandardModel`s implicitly uses `convert`\nWhen using load_model(StandardModel, file_location) the model at file_location is first loaded into its inferred format and is then converted to a StandardModel using the generic accessor interface. Thus, data loss may occur. Always check your model to ensure that nothing important has been lost.","category":"page"},{"location":"notebooks/3_basic_stdmodel_usage/#Basic-analysis","page":"Basic usage of StandardModel","title":"Basic analysis","text":"","category":"section"},{"location":"notebooks/3_basic_stdmodel_usage/","page":"Basic usage of StandardModel","title":"Basic usage of StandardModel","text":"As before, for optimization based analysis we need to load an optimizer. Here we will use Tulip.jl to solve the linear programs of this tutorial. Refer to the basic constraint-based analysis tutorial for more informaiton.","category":"page"},{"location":"notebooks/3_basic_stdmodel_usage/","page":"Basic usage of StandardModel","title":"Basic usage of StandardModel","text":"All the normal analysis functions work on StandardModel, due to it also having the same generic accessor interface as all the other model types.","category":"page"},{"location":"notebooks/3_basic_stdmodel_usage/","page":"Basic usage of StandardModel","title":"Basic usage of StandardModel","text":"using Tulip\n\ndict_sol = flux_balance_analysis_dict(\n model,\n Tulip.Optimizer;\n modifications = [\n change_objective(\"BIOMASS_Ecoli_core_w_GAM\"),\n change_constraint(\"EX_glc__D_e\", -12, -12),\n change_constraint(\"EX_o2_e\", 0, 0),\n ],\n)","category":"page"},{"location":"notebooks/3_basic_stdmodel_usage/","page":"Basic usage of StandardModel","title":"Basic usage of StandardModel","text":"This is not very exciting yet, since every other model type can also do this. However, deeper inspection of flux results is possible when using StandardModel.","category":"page"},{"location":"notebooks/3_basic_stdmodel_usage/#Inspecting-the-flux-solution:-atom_exchange","page":"Basic usage of StandardModel","title":"Inspecting the flux solution: atom_exchange","text":"","category":"section"},{"location":"notebooks/3_basic_stdmodel_usage/","page":"Basic usage of StandardModel","title":"Basic usage of StandardModel","text":"It is sometimes interesting to keep track of the atoms entering and leaving the system through boundary reactions. This can be inspected by calling atom_exchange.","category":"page"},{"location":"notebooks/3_basic_stdmodel_usage/","page":"Basic usage of StandardModel","title":"Basic usage of StandardModel","text":"atom_exchange(dict_sol, model) # flux of individual atoms entering and leaving the system through boundary reactions (e.g. exchange reactions) based on flux_dict","category":"page"},{"location":"notebooks/3_basic_stdmodel_usage/#Inspecting-the-flux-solution:-metabolite_fluxes","page":"Basic usage of StandardModel","title":"Inspecting the flux solution: metabolite_fluxes","text":"","category":"section"},{"location":"notebooks/3_basic_stdmodel_usage/","page":"Basic usage of StandardModel","title":"Basic usage of StandardModel","text":"Another useful flux result analysis function is metabolite_fluxes. This function keeps track of reactions consuming and producing each metabolite.","category":"page"},{"location":"notebooks/3_basic_stdmodel_usage/","page":"Basic usage of StandardModel","title":"Basic usage of StandardModel","text":"consuming, producing = metabolite_fluxes(dict_sol, model)\n\nconsuming[\"atp_c\"] # reactions consuming atp_c","category":"page"},{"location":"notebooks/3_basic_stdmodel_usage/#Internals-of-StandardModel","page":"Basic usage of StandardModel","title":"Internals of StandardModel","text":"","category":"section"},{"location":"notebooks/3_basic_stdmodel_usage/","page":"Basic usage of StandardModel","title":"Basic usage of StandardModel","text":"Another benefit of StandardModel is that it supports a richer internal infrastructure that can be used to manipulate internal model attributes in a systematic way. Specifically, the genes, reactions, and metabolites with of a model each have a type. This is particularly useful when modifying or even constructing a model from scratch.","category":"page"},{"location":"notebooks/3_basic_stdmodel_usage/#Genes,-Reactions,-and-Metabolites","page":"Basic usage of StandardModel","title":"Genes, Reactions, and Metabolites","text":"","category":"section"},{"location":"notebooks/3_basic_stdmodel_usage/","page":"Basic usage of StandardModel","title":"Basic usage of StandardModel","text":"StandardModel is composed of ordered dictionaries of Genes, Metabolites and Reactions. Ordered dictionaries are used because the order of the reactions and metabolites are important for constructing a stoichiometric matrix since the rows and columns should correspond to the order of the metabolites and reactions returned by calling the accessors metabolites and reactions.","category":"page"},{"location":"notebooks/3_basic_stdmodel_usage/","page":"Basic usage of StandardModel","title":"Basic usage of StandardModel","text":"Each StandardModel is composed of the following fields:","category":"page"},{"location":"notebooks/3_basic_stdmodel_usage/","page":"Basic usage of StandardModel","title":"Basic usage of StandardModel","text":"fieldnames(StandardModel) # fields of a StandardModel","category":"page"},{"location":"notebooks/3_basic_stdmodel_usage/","page":"Basic usage of StandardModel","title":"Basic usage of StandardModel","text":"The :genes field of a StandardModel contains an ordered dictionary of gene ids mapped to Genes.","category":"page"},{"location":"notebooks/3_basic_stdmodel_usage/","page":"Basic usage of StandardModel","title":"Basic usage of StandardModel","text":"model.genes # the keys of this dictionary are the same as genes(model)","category":"page"},{"location":"notebooks/3_basic_stdmodel_usage/","page":"Basic usage of StandardModel","title":"Basic usage of StandardModel","text":"The Gene type is a struct that can be used to store information about genes in a StandardModel. Each Gene is composed of the following fields:","category":"page"},{"location":"notebooks/3_basic_stdmodel_usage/","page":"Basic usage of StandardModel","title":"Basic usage of StandardModel","text":"fieldnames(Gene)","category":"page"},{"location":"notebooks/3_basic_stdmodel_usage/","page":"Basic usage of StandardModel","title":"Basic usage of StandardModel","text":"tip: Tip: Use <tab> complete to explore the structure of types\nUse <tab> to quickly explore the fields of a struct. For example, Gene.<tab> will list all the fields shown above.","category":"page"},{"location":"notebooks/3_basic_stdmodel_usage/","page":"Basic usage of StandardModel","title":"Basic usage of StandardModel","text":"The keys used in the ordered dictionaries in model.genes are the ids returned using the generic accessor genes. Genes have pretty printing, as demonstrated below for a random gene drawn from the model:","category":"page"},{"location":"notebooks/3_basic_stdmodel_usage/","page":"Basic usage of StandardModel","title":"Basic usage of StandardModel","text":"random_gene_id = genes(model)[rand(1:n_genes(model))]\nmodel.genes[random_gene_id]","category":"page"},{"location":"notebooks/3_basic_stdmodel_usage/","page":"Basic usage of StandardModel","title":"Basic usage of StandardModel","text":"The same idea holds for both metabolites (stored as Metabolites) and reactions (stored as Reactions). This is demonstrated below.","category":"page"},{"location":"notebooks/3_basic_stdmodel_usage/","page":"Basic usage of StandardModel","title":"Basic usage of StandardModel","text":"random_metabolite_id = metabolites(model)[rand(1:n_metabolites(model))]\nmodel.metabolites[random_metabolite_id]","category":"page"},{"location":"notebooks/3_basic_stdmodel_usage/","page":"Basic usage of StandardModel","title":"Basic usage of StandardModel","text":"random_reaction_id = reactions(model)[rand(1:n_reactions(model))]\nmodel.reactions[random_reaction_id]","category":"page"},{"location":"notebooks/3_basic_stdmodel_usage/","page":"Basic usage of StandardModel","title":"Basic usage of StandardModel","text":"StandardModel can be used to build your own metabolic model or modify an existing one. One of the main use cases for StandardModel is that it can be used to merge multiple models or parts of multiple models together. Since the internals are uniform inside each StandardModel, attributes of other model types are squashed into the required format (using the generic accessors). This ensures that the internals of all StandardModels are the same - allowing easy systematic evaluation.","category":"page"},{"location":"notebooks/3_basic_stdmodel_usage/","page":"Basic usage of StandardModel","title":"Basic usage of StandardModel","text":"warning: Warning: Combining models with different namespaces is tricky\nCombining models that use different namespaces requires care. For example, in some models the water exchange reaction is called EX_h2o_e, while in others it is called R_EX_h2o_s. This needs to manually addressed (for now) to prevent duplicate, e.g. reactions, from being added.","category":"page"},{"location":"notebooks/3_basic_stdmodel_usage/#Checking-the-internals-of-StandardModels:-annotation_index","page":"Basic usage of StandardModel","title":"Checking the internals of StandardModels: annotation_index","text":"","category":"section"},{"location":"notebooks/3_basic_stdmodel_usage/","page":"Basic usage of StandardModel","title":"Basic usage of StandardModel","text":"Often when models are automatically reconstructed duplicate genes, reactions or metabolites end up in a model. COBREXA exports annotation_index to check for cases where the id of a struct may be different, but the annotations the same (possibly suggesting a duplication). annotation_index builds a dictionary mapping annotation features to the ids of whatever struct you are inspecting. This makes it easy to find structs that share certain annotation features.","category":"page"},{"location":"notebooks/3_basic_stdmodel_usage/","page":"Basic usage of StandardModel","title":"Basic usage of StandardModel","text":"rxn_annotations = annotation_index(model.reactions)","category":"page"},{"location":"notebooks/3_basic_stdmodel_usage/","page":"Basic usage of StandardModel","title":"Basic usage of StandardModel","text":"rxn_annotations[\"ec-code\"]","category":"page"},{"location":"notebooks/3_basic_stdmodel_usage/","page":"Basic usage of StandardModel","title":"Basic usage of StandardModel","text":"The annotation_index function can also be used on Reactions and Genes in the same way.","category":"page"},{"location":"notebooks/3_basic_stdmodel_usage/#Checking-the-internals-of-StandardModels:-check_duplicate_reaction","page":"Basic usage of StandardModel","title":"Checking the internals of StandardModels: check_duplicate_reaction","text":"","category":"section"},{"location":"notebooks/3_basic_stdmodel_usage/","page":"Basic usage of StandardModel","title":"Basic usage of StandardModel","text":"Another useful function is check_duplicate_reaction, which checks for reactions that have duplicate (or similar) reaction equations.","category":"page"},{"location":"notebooks/3_basic_stdmodel_usage/","page":"Basic usage of StandardModel","title":"Basic usage of StandardModel","text":"pgm_duplicate = Reaction()\npgm_duplicate.id = \"pgm2\" # Phosphoglycerate mutase\npgm_duplicate.metabolites = Dict{String,Float64}(\"3pg_c\" => 1, \"2pg_c\" => -1)\npgm_duplicate","category":"page"},{"location":"notebooks/3_basic_stdmodel_usage/","page":"Basic usage of StandardModel","title":"Basic usage of StandardModel","text":"check_duplicate_reaction(pgm_duplicate, model.reactions; only_metabolites = false) # can also just check if only the metabolites are the same but different stoichiometry is used","category":"page"},{"location":"notebooks/3_basic_stdmodel_usage/#Checking-the-internals-of-StandardModels:-is_mass_balanced","page":"Basic usage of StandardModel","title":"Checking the internals of StandardModels: is_mass_balanced","text":"","category":"section"},{"location":"notebooks/3_basic_stdmodel_usage/","page":"Basic usage of StandardModel","title":"Basic usage of StandardModel","text":"Finally, is_mass_balanced can be used to check if a reaction is mass balanced based on the formulas of the reaction equation.","category":"page"},{"location":"notebooks/3_basic_stdmodel_usage/","page":"Basic usage of StandardModel","title":"Basic usage of StandardModel","text":"pgm_duplicate.metabolites = Dict{String,Float64}(\"3pg_c\" => 1, \"2pg_c\" => -1, \"h2o_c\" => 1) # not mass balanced now\nis_bal, extra_atoms = is_mass_balanced(pgm_duplicate, model) # extra_atoms shows which atoms are in excess/deficit","category":"page"},{"location":"notebooks/3_basic_stdmodel_usage/","page":"Basic usage of StandardModel","title":"Basic usage of StandardModel","text":"","category":"page"},{"location":"notebooks/3_basic_stdmodel_usage/","page":"Basic usage of StandardModel","title":"Basic usage of StandardModel","text":"This page was generated using Literate.jl.","category":"page"},{"location":"advanced/5_debugging/#Tracing-and-debugging","page":"Tracing and debugging","title":"Tracing and debugging","text":"","category":"section"},{"location":"","page":"Home","title":"Home","text":"<br>\n<div align=\"center\">\n <img class=\"docs-light-only\" src=\"assets/header.svg?maxAge=0\" width=\"80%\">\n <img class=\"docs-dark-only\" src=\"assets/header-dark.svg?maxAge=0\" width=\"80%\">\n</div>\n<br>","category":"page"},{"location":"#Constraint-Based-Reconstruction-and-EXascale-Analysis","page":"Home","title":"Constraint-Based Reconstruction and EXascale Analysis","text":"","category":"section"},{"location":"","page":"Home","title":"Home","text":"Repository Tests Coverage How to contribute?\n(Image: GitHub) (Image: CI) (Image: codecov) (Image: contrib)","category":"page"},{"location":"","page":"Home","title":"Home","text":"COBREXA is a toolkit for working with large constraint-based metabolic models, and a running very large number of analysis tasks on these models in parallel. Its main purpose is to make the methods of Constraint-based Reconstruction and Analysis (COBRA) scale to problem sizes that require the use of huge computer clusters and HPC environments, which allows them to be realistically applied to pre-exascale-sized models.","category":"page"},{"location":"","page":"Home","title":"Home","text":"In this package, you will find the usual COBRA-like functions that interface to underlying linear programming solvers. We use JuMP.jl as the unified interface for many solvers; you can plug in whichever compatible solver you want, including the popular Tulip.jl, GLPK.jl, OSQP.jl, and Gurobi.jl.","category":"page"},{"location":"","page":"Home","title":"Home","text":"<div align=\"center\">\n<img style=\"width:300px;margin:10px;border-offset:15px;border: 1px solid #eee;border-radius: 50%;padding: 10px;-webkit-border-radius: 50%;-moz-border-radius: 50%;\" src=\"assets/output.gif\" alt=\"history\"><br>\nDevelopment history of COBREXA.jl.\n</div>","category":"page"},{"location":"#Quick-start-guide","page":"Home","title":"Quick start guide","text":"","category":"section"},{"location":"","page":"Home","title":"Home","text":"You can install COBREXA from Julia repositories. Start julia, press ] to switch to the Packaging environment, and type:","category":"page"},{"location":"","page":"Home","title":"Home","text":"add COBREXA","category":"page"},{"location":"","page":"Home","title":"Home","text":"You also need to install your favorite solver supported by JuMP.jl, typing e.g.:","category":"page"},{"location":"","page":"Home","title":"Home","text":"add Tulip","category":"page"},{"location":"","page":"Home","title":"Home","text":"When the packages are installed, switch back to the \"normal\" julia shell by pressing Backspace (the prompt should change color back to green). After that, you can download a SBML model from the internet and perform a flux balance analysis as follows:","category":"page"},{"location":"","page":"Home","title":"Home","text":"using COBREXA # loads the package\nusing Tulip # loads the optimization solver\n\n# download the model\ndownload(\"http://bigg.ucsd.edu/static/models/e_coli_core.xml\", \"e_coli_core.xml\")\n\n# open the SBML file and load the contents\nmodel = load_model(\"e_coli_core.xml\")\n\n# run a FBA\nfluxes = flux_balance_analysis_dict(model, Tulip.Optimizer)","category":"page"},{"location":"","page":"Home","title":"Home","text":"The variable fluxes will now contain a dictionary of the computed optimal flux of each reaction in the model:","category":"page"},{"location":"","page":"Home","title":"Home","text":"Dict{String,Float64} with 95 entries:\n \"R_EX_fum_e\" => 0.0\n \"R_ACONTb\" => 6.00725\n \"R_TPI\" => 7.47738\n \"R_SUCOAS\" => -5.06438\n \"R_GLNS\" => 0.223462\n \"R_EX_pi_e\" => -3.2149\n \"R_PPC\" => 2.50431\n \"R_O2t\" => 21.7995\n \"R_G6PDH2r\" => 4.95999\n \"R_TALA\" => 1.49698\n â‹® => â‹®","category":"page"},{"location":"#Tutorials","page":"Home","title":"Tutorials","text":"","category":"section"},{"location":"","page":"Home","title":"Home","text":"Detailed tutorial content is available here.","category":"page"},{"location":"","page":"Home","title":"Home","text":"Pages = joinpath.(\"tutorials\", filter(x -> endswith(x, \".md\"), readdir(\"tutorials\")))\nDepth = 1","category":"page"},{"location":"#Example-notebooks-and-workflows","page":"Home","title":"Example notebooks and workflows","text":"","category":"section"},{"location":"","page":"Home","title":"Home","text":"Detailed notebook content is available here.","category":"page"},{"location":"","page":"Home","title":"Home","text":"Pages = joinpath.(\"notebooks\", filter(x -> endswith(x, \".md\"), readdir(\"notebooks\")))\nDepth = 1","category":"page"},{"location":"#Functions-reference","page":"Home","title":"Functions reference","text":"","category":"section"},{"location":"","page":"Home","title":"Home","text":"Pages = [\"functions.md\"]","category":"page"},{"location":"#Contribution-guide","page":"Home","title":"Contribution guide","text":"","category":"section"},{"location":"","page":"Home","title":"Home","text":"If you wish to contribute code, patches or improvements to COBREXA.jl, please read the basic contribution guidelines and hints..","category":"page"},{"location":"#Acknowledgements","page":"Home","title":"Acknowledgements","text":"","category":"section"},{"location":"","page":"Home","title":"Home","text":"COBREXA.jl is developed at the Luxembourg Centre for Systems Biomedicine of the University of Luxembourg (uni.lu/lcsb), cooperating with the Institute for Quantitative and Theoretical Biology at the Heinrich Heine University in Düsseldorf (qtb.hhu.de).","category":"page"},{"location":"","page":"Home","title":"Home","text":"The development was supported by European Union's Horizon 2020 Programme under PerMedCoE project (permedcoe.eu) agreement no. 951773.","category":"page"},{"location":"","page":"Home","title":"Home","text":"<img src=\"https://lcsb-biocore.github.io/COBREXA.jl/stable/assets/cobrexa.svg\" alt=\"COBREXA logo\" height=\"64px\" style=\"height:64px; width:auto\">   <img src=\"https://lcsb-biocore.github.io/COBREXA.jl/stable/assets/unilu.svg\" alt=\"Uni.lu logo\" height=\"64px\" style=\"height:64px; width:auto\">   <img src=\"https://lcsb-biocore.github.io/COBREXA.jl/stable/assets/lcsb.svg\" alt=\"LCSB logo\" height=\"64px\" style=\"height:64px; width:auto\">   <img src=\"https://lcsb-biocore.github.io/COBREXA.jl/stable/assets/hhu.svg\" alt=\"HHU logo\" height=\"64px\" style=\"height:64px; width:auto\">   <img src=\"https://lcsb-biocore.github.io/COBREXA.jl/stable/assets/qtb.svg\" alt=\"QTB logo\" height=\"64px\" style=\"height:64px; width:auto\">   <img src=\"https://lcsb-biocore.github.io/COBREXA.jl/stable/assets/permedcoe.svg\" alt=\"PerMedCoE logo\" height=\"64px\" style=\"height:64px; width:auto\">","category":"page"},{"location":"tutorials/1_loading/#Loading-and-converting-model-data","page":"Loading and converting model data","title":"Loading and converting model data","text":"","category":"section"},{"location":"tutorials/1_loading/","page":"Loading and converting model data","title":"Loading and converting model data","text":"COBREXA.jl supports several constraint-based model formats that can be loaded with built-in functions. You can load SBML models that are compatible with libsbml, JSON models (such as the ones from CobraPy), and MATLAB-style models (such as those from COBRA Toolbox).","category":"page"},{"location":"tutorials/1_loading/","page":"Loading and converting model data","title":"Loading and converting model data","text":"These formats are commonly available from many model repositories, such as from BIGG, as seen e.g. on the BIGG entry for the core E. Coli entry. Here, we show how to load the basic formats and work with such models.","category":"page"},{"location":"tutorials/1_loading/","page":"Loading and converting model data","title":"Loading and converting model data","text":"tip: Notebook available!\nExample code for this tutorial is available here.","category":"page"},{"location":"tutorials/1_loading/#Loading-models-from-files","page":"Loading and converting model data","title":"Loading models from files","text":"","category":"section"},{"location":"tutorials/1_loading/","page":"Loading and converting model data","title":"Loading and converting model data","text":"For most purposes, you should be able to open and load any model with load_model, which detects the file type from the extension (.xml, .json and .mat), and calls the appropriate loading function. After loading the COBREXA.jl library with using COBREXA and you may load the downloaded model data into Julia as follows:","category":"page"},{"location":"tutorials/1_loading/","page":"Loading and converting model data","title":"Loading and converting model data","text":"my_model = load_model(\"e_coli_core.xml\")","category":"page"},{"location":"tutorials/1_loading/","page":"Loading and converting model data","title":"Loading and converting model data","text":"You should see some information about the loaded model, possibly looking like this:","category":"page"},{"location":"tutorials/1_loading/","page":"Loading and converting model data","title":"Loading and converting model data","text":"Metabolic model of type JSONModel\n\n [9 , 1] = 1.0\n [51, 1] = 1.0\n â‹®\n [57, 95] = 1.0\n [59, 95] = -1.0\nNumber of reactions: 95\nNumber of metabolites: 72","category":"page"},{"location":"tutorials/1_loading/","page":"Loading and converting model data","title":"Loading and converting model data","text":"If the file type can not be guessed from the file extension, use any of the specific loader functions:","category":"page"},{"location":"tutorials/1_loading/","page":"Loading and converting model data","title":"Loading and converting model data","text":"load_sbml_model for SBML\nload_json_model for JSON\nload_mat_model for MATLAB models","category":"page"},{"location":"tutorials/1_loading/","page":"Loading and converting model data","title":"Loading and converting model data","text":"All formats may store slightly different information. By default, COBREXA attempts not to discard any information unless a conversion to a more strict format is required. For example, the JSONModel (which is returned by load_json_model) still holds the original JSON structure that you can freely access for any specific purposes:","category":"page"},{"location":"tutorials/1_loading/","page":"Loading and converting model data","title":"Loading and converting model data","text":"jm = load_json_model(\"e_coli_core.json\")\njm.json[\"reactions\"][1]","category":"page"},{"location":"tutorials/1_loading/","page":"Loading and converting model data","title":"Loading and converting model data","text":"That should print out the first reaction in the model in a JSON-style scheme, in our case the process catalyzed by phosphofructokinase:","category":"page"},{"location":"tutorials/1_loading/","page":"Loading and converting model data","title":"Loading and converting model data","text":"Dict{String,Any} with 9 entries:\n \"name\" => \"Phosphofructokinase\"\n \"metabolites\" => Dict{String,Any}(\"adp_c\"=>1.0,\"atp_c\"=>-1.0,\"f6p_c\"=>…\n \"lower_bound\" => 0.0\n \"id\" => \"PFK\"\n \"notes\" => Dict{String,Any}(\"original_bigg_ids\"=>Any[\"PFK\"])\n \"gene_reaction_rule\" => \"b3916 or b1723\"\n \"upper_bound\" => 1000.0\n \"subsystem\" => \"Glycolysis/Gluconeogenesis\"\n \"annotation\" => Dict{String,Any}(\"ec-code\"=>Any[\"2.7.1.11\"],\"metanetx…","category":"page"},{"location":"tutorials/1_loading/","page":"Loading and converting model data","title":"Loading and converting model data","text":"MATModel and SBMLModel (returned by the respective loading functions) contain similar \"full\" model information – you can access the whole MATLAB and SBML data and build on them without any restrictions.","category":"page"},{"location":"tutorials/1_loading/#Converting-to-other-model-types","page":"Loading and converting model data","title":"Converting to other model types","text":"","category":"section"},{"location":"tutorials/1_loading/","page":"Loading and converting model data","title":"Loading and converting model data","text":"Despite JSON and SBML are great for storing and exchanging the models, the data representation is not very suitable for analyzing the model and processing it mathematically.","category":"page"},{"location":"tutorials/1_loading/","page":"Loading and converting model data","title":"Loading and converting model data","text":"COBREXA.jl contains several model types that are much better suited for supporting the analysis tasks. You can use the following:","category":"page"},{"location":"tutorials/1_loading/","page":"Loading and converting model data","title":"Loading and converting model data","text":"CoreModel, which represents the \"core\" of the optimization problem and the corresponding linear programming problem – a sparse representation of the stoichiometric matrix, flux bounds vectors, objective vector, etc.\nStandardModel (a \"standard\" for COBREXA.jl), which represents a highly flexible, object-like, dictionary-based representation of a model that contains individual Reactions, Metabolites, Genes, and other things.","category":"page"},{"location":"tutorials/1_loading/","page":"Loading and converting model data","title":"Loading and converting model data","text":"note: Conversion limitations and possible data loss\nBecause of the specifics of the format of each model structure, the conversion is not always able to preserve all information from the source data. You may need to check if any complicated and less-standard annotations are still present. If you require them, and either use a more complicated model, or collect them manually.","category":"page"},{"location":"tutorials/1_loading/","page":"Loading and converting model data","title":"Loading and converting model data","text":"A loaded model can be converted to any other model type using the standard Julia conversion:","category":"page"},{"location":"tutorials/1_loading/","page":"Loading and converting model data","title":"Loading and converting model data","text":"cm = convert(CoreModel, jm)","category":"page"},{"location":"tutorials/1_loading/","page":"Loading and converting model data","title":"Loading and converting model data","text":"You can also use a shortcut in load_model to convert the model to the desired format in one command:","category":"page"},{"location":"tutorials/1_loading/","page":"Loading and converting model data","title":"Loading and converting model data","text":"cm = load_model(CoreModel, \"e_coli_core.xml\")","category":"page"},{"location":"tutorials/1_loading/","page":"Loading and converting model data","title":"Loading and converting model data","text":"With CoreModel, the information is easily accessible in matrix form. For example, cm.S now contains the sparse stoichiometric matrix, which you can convert to a dense matrix and manipulate it in Julia as any other matrix:","category":"page"},{"location":"tutorials/1_loading/","page":"Loading and converting model data","title":"Loading and converting model data","text":"Matrix(cm.S)","category":"page"},{"location":"tutorials/1_loading/","page":"Loading and converting model data","title":"Loading and converting model data","text":"...should show you the (relatively empty) stoichiometry of the model.","category":"page"},{"location":"tutorials/1_loading/","page":"Loading and converting model data","title":"Loading and converting model data","text":"StandardModel is more suitable for fine-grained access to individual items of the model, perhaps closer to the SBML-style models. For example, you can view and set reaction bounds as follows:","category":"page"},{"location":"tutorials/1_loading/","page":"Loading and converting model data","title":"Loading and converting model data","text":"sm = load_model(StandardModel, \"e_coli_core.json\")\nsm.reactions[\"PGI\"].ub","category":"page"},{"location":"tutorials/1_loading/","page":"Loading and converting model data","title":"Loading and converting model data","text":"...this prints the upper bound of the reaction (in this case, 1000.0); you can change it the usual way:","category":"page"},{"location":"tutorials/1_loading/","page":"Loading and converting model data","title":"Loading and converting model data","text":"sm.reactions[\"PGI\"].ub = 500","category":"page"},{"location":"tutorials/1_loading/","page":"Loading and converting model data","title":"Loading and converting model data","text":"This change will naturally project to future analysis results.","category":"page"}] +[{"location":"advanced/1_modifications/#Screening-with-modifications","page":"Screening with modifications","title":"Screening with modifications","text":"","category":"section"},{"location":"tutorials/#COBREXA-Tutorials","page":"Tutorials","title":"COBREXA Tutorials","text":"","category":"section"},{"location":"tutorials/","page":"Tutorials","title":"Tutorials","text":"Pages = joinpath.(\"tutorials\", filter(x -> endswith(x, \".md\"), readdir(\"tutorials\")))\nDepth = 2","category":"page"},{"location":"advanced/2_custom_model/#Custom-models","page":"Custom models","title":"Custom models","text":"","category":"section"},{"location":"tutorials/2_analysis/#Basic-analysis-of-constraint-based-models","page":"Basic analysis of constraint-based models","title":"Basic analysis of constraint-based models","text":"","category":"section"},{"location":"tutorials/2_analysis/","page":"Basic analysis of constraint-based models","title":"Basic analysis of constraint-based models","text":"COBREXA.jl supports several common analysis methods that are often used for exploring the biological models. The currently supported methods include","category":"page"},{"location":"tutorials/2_analysis/","page":"Basic analysis of constraint-based models","title":"Basic analysis of constraint-based models","text":"Flux balance analysis (FBA), in function flux_balance_analysis\nFlux variability analysis (FVA), in flux_variability_analysis\nFlux sampling by hit-and-run algorithm, in hit_and_run\nParsimonious flux balance analysis (pFBA), in parsimonious_flux_balance_analysis","category":"page"},{"location":"tutorials/2_analysis/","page":"Basic analysis of constraint-based models","title":"Basic analysis of constraint-based models","text":"Other analysis methods are either in development and testing, or may be specified or customized by the user. Implementing new analyses is generally feasible; you may want to watch the COBREXA.jl repository for newly incoming analysis methods.","category":"page"},{"location":"tutorials/2_analysis/","page":"Basic analysis of constraint-based models","title":"Basic analysis of constraint-based models","text":"COBREXA.jl additionally exports several helper functions that may help you in running custom analysis methods:","category":"page"},{"location":"tutorials/2_analysis/","page":"Basic analysis of constraint-based models","title":"Basic analysis of constraint-based models","text":"you can convert all types of MetabolicModels to JuMP.jl models using make_optimization_model, then you may explore and analyze the models independently of COBREXA.jl using the tools provided by JuMP.jl\nthere is a system of analysis modifications that allows you to easily specify various adjustments to the existing analysis methods","category":"page"},{"location":"tutorials/2_analysis/","page":"Basic analysis of constraint-based models","title":"Basic analysis of constraint-based models","text":"tip: Notebook available!\nExamples of running the analysis functions are available here.","category":"page"},{"location":"tutorials/2_analysis/#Optimization-problem-solvers","page":"Basic analysis of constraint-based models","title":"Optimization problem solvers","text":"","category":"section"},{"location":"tutorials/2_analysis/","page":"Basic analysis of constraint-based models","title":"Basic analysis of constraint-based models","text":"For solving most analysis tasks, you need an optimization problem solver that is compatible with JuMP.jl. You may refer to the official list of supported solvers, but we generally recommend to use either of these:","category":"page"},{"location":"tutorials/2_analysis/","page":"Basic analysis of constraint-based models","title":"Basic analysis of constraint-based models","text":"Tulip (pure Julia implementation) for linear problems\nGLPK (based on a C library) for linear and mixed-integer problems\nGurobi (based on an external library, but requires a license that is free for academic use) for linear, mixed-integer and quadratic problems","category":"page"},{"location":"tutorials/2_analysis/","page":"Basic analysis of constraint-based models","title":"Basic analysis of constraint-based models","text":"All solvers can be installed using the Julia package manger.","category":"page"},{"location":"tutorials/2_analysis/#Flux-balance-analysis","page":"Basic analysis of constraint-based models","title":"Flux balance analysis","text":"","category":"section"},{"location":"tutorials/2_analysis/","page":"Basic analysis of constraint-based models","title":"Basic analysis of constraint-based models","text":"The above methods generally accept 2 arguments: the model, and the optimizer.","category":"page"},{"location":"tutorials/2_analysis/","page":"Basic analysis of constraint-based models","title":"Basic analysis of constraint-based models","text":"In particular, having installed e.g. GLPK from the above optimizers, you can run FBA on your favorite E. Coli core model as follows:","category":"page"},{"location":"tutorials/2_analysis/","page":"Basic analysis of constraint-based models","title":"Basic analysis of constraint-based models","text":"using COBREXA\nm = load_model(CoreModel, \"e_coli_core.xml\")\n\nusing GLPK\nopt_model = flux_balance_analysis(m, GLPK.Optimizer)","category":"page"},{"location":"tutorials/2_analysis/","page":"Basic analysis of constraint-based models","title":"Basic analysis of constraint-based models","text":"After a short while (the solver machinery usually needs to get precompiled before the first use), you should get opt_model, which is now an optimized JuMP.jl model. It may print out information like this:","category":"page"},{"location":"tutorials/2_analysis/","page":"Basic analysis of constraint-based models","title":"Basic analysis of constraint-based models","text":"A JuMP Model\nMaximization problem with:\nVariables: 95\nObjective function type: JuMP.GenericAffExpr{Float64,JuMP.VariableRef}\n`JuMP.GenericAffExpr{Float64,JuMP.VariableRef}`-in-`MathOptInterface.EqualTo{Float64}`: 73 constraints\n`JuMP.GenericAffExpr{Float64,JuMP.VariableRef}`-in-`MathOptInterface.LessThan{Float64}`: 192 constraints\nModel mode: AUTOMATIC\nCachingOptimizer state: ATTACHED_OPTIMIZER\nSolver name: GLPK\nNames registered in the model: lbs, mb, ubs, x","category":"page"},{"location":"tutorials/2_analysis/","page":"Basic analysis of constraint-based models","title":"Basic analysis of constraint-based models","text":"From that, you can extract the required information with the JuMP interface, loaded with using JuMP. With that,","category":"page"},{"location":"tutorials/2_analysis/","page":"Basic analysis of constraint-based models","title":"Basic analysis of constraint-based models","text":"objective_value(opt_model) prints roughly 0.87,\nvalue.(opt_model[:x]) prints the vector of individual reaction fluxes.","category":"page"},{"location":"tutorials/2_analysis/","page":"Basic analysis of constraint-based models","title":"Basic analysis of constraint-based models","text":"For convenience, you can get the results nicely formatted without manually getting them out of the optimized models:","category":"page"},{"location":"tutorials/2_analysis/","page":"Basic analysis of constraint-based models","title":"Basic analysis of constraint-based models","text":"flux_balance_analysis_vec works like flux_balance_analysis, but returns the vector of fluxes directly (in the same order as in reactions(m))\nflux_balance_analysis_dict returns a dictionary with the fluxes, keyed by reaction identifier","category":"page"},{"location":"tutorials/2_analysis/#Flux-variability-analysis","page":"Basic analysis of constraint-based models","title":"Flux variability analysis","text":"","category":"section"},{"location":"tutorials/2_analysis/","page":"Basic analysis of constraint-based models","title":"Basic analysis of constraint-based models","text":"FVA is implemented in flux_variability_analysis, which returns the usual matrix of minimal and maximal feasible fluxes for each reaction in the model.","category":"page"},{"location":"tutorials/2_analysis/","page":"Basic analysis of constraint-based models","title":"Basic analysis of constraint-based models","text":"The result of calling flux_variability_analysis(m, GLPK.Optimizer) may look like this (possibly showing minor numeric errors in the GLPK optimizer):","category":"page"},{"location":"tutorials/2_analysis/","page":"Basic analysis of constraint-based models","title":"Basic analysis of constraint-based models","text":"95×2 Array{Float64,2}:\n 0.0 0.0\n 6.00725 6.00725\n â‹® \n 3.64414e-13 3.17348e-13\n 3.2149 3.2149","category":"page"},{"location":"tutorials/2_analysis/","page":"Basic analysis of constraint-based models","title":"Basic analysis of constraint-based models","text":"You can relax the optimality requirement of the reactions by specifying a wider objective bound, getting a wider range of reaction fluxes, e.g. using gamma_bounds (for COBRA-like γ-bound) and objective_bounds (for a multiplicative bound around the original optimal objective).","category":"page"},{"location":"tutorials/2_analysis/","page":"Basic analysis of constraint-based models","title":"Basic analysis of constraint-based models","text":"As a result, flux_variability_analysis(m, GLPK.Optimizer; bounds=gamma_bounds(0.8)) will return a much less constrained system:","category":"page"},{"location":"tutorials/2_analysis/","page":"Basic analysis of constraint-based models","title":"Basic analysis of constraint-based models","text":"95×2 Array{Float64,2}:\n 0.0 0.0\n 0.754299 10.1285\n â‹® \n -4.42865 0.0\n 2.57192 3.2149","category":"page"},{"location":"tutorials/2_analysis/","page":"Basic analysis of constraint-based models","title":"Basic analysis of constraint-based models","text":"You may additionally restrict the analysis to a list of reactions (passing the list as the second argument, see documentation of flux_variability_analysis), or retrieve a dictionary of the resulting fluxes with flux_variability_analysis_dict.","category":"page"},{"location":"tutorials/2_analysis/#Parsimonious-flux-balance-analysis","page":"Basic analysis of constraint-based models","title":"Parsimonious flux balance analysis","text":"","category":"section"},{"location":"tutorials/2_analysis/","page":"Basic analysis of constraint-based models","title":"Basic analysis of constraint-based models","text":"Parsimonious flux balance analysis (pFBA) requires a solver that can handle quadratic problems. Some examples include, e.g. OSQP, Gurobi, Mosek, etc.","category":"page"},{"location":"tutorials/2_analysis/","page":"Basic analysis of constraint-based models","title":"Basic analysis of constraint-based models","text":"Otherwise, the function behaves just like flux_balance_analysis:","category":"page"},{"location":"tutorials/2_analysis/","page":"Basic analysis of constraint-based models","title":"Basic analysis of constraint-based models","text":"parsimonious_flux_balance_analysis(m, OSQP.Optimizer) will return a JuMP.jl model optimized to a slightly more realistic (parsimonious) optimum than plain FBA,\nparsimonious_flux_balance_analysis_vec will return the fluxes in a vector,\nparsimonious_flux_balance_analysis_dict will return a reaction-keyed dictionary.","category":"page"},{"location":"tutorials/2_analysis/#Flux-sampling","page":"Basic analysis of constraint-based models","title":"Flux sampling","text":"","category":"section"},{"location":"tutorials/2_analysis/","page":"Basic analysis of constraint-based models","title":"Basic analysis of constraint-based models","text":"For the hit_and_run, you need a previously optimized and constrained model from another analysis function, such as flux_balance_analysis, or created by make_optimization_model. You may need to carefully choose the number of iterations and sample sizes to match your model; see the documentation of hit_and_run for details.","category":"page"},{"location":"tutorials/2_analysis/","page":"Basic analysis of constraint-based models","title":"Basic analysis of constraint-based models","text":"As an example, you can run the sampling for 100 thousand iterations with:","category":"page"},{"location":"tutorials/2_analysis/","page":"Basic analysis of constraint-based models","title":"Basic analysis of constraint-based models","text":"hit_and_run(100_000, make_optimization_model(m, GLPK.Optimizer))","category":"page"},{"location":"tutorials/2_analysis/","page":"Basic analysis of constraint-based models","title":"Basic analysis of constraint-based models","text":"You should receive a matching flux sample with the (default) 1000 samples in a matrix that may look like this one:","category":"page"},{"location":"tutorials/2_analysis/","page":"Basic analysis of constraint-based models","title":"Basic analysis of constraint-based models","text":"95×1000 Array{Float64,2}:\n 0.0 0.0 … 0.0\n 7.82669 9.38895 3.30653\n 7.13016 4.36813 9.64434\n -0.290925 -9.3037 -0.0908829\n 24.1294 17.4794 0.0511032\n â‹® ⋱ \n -16.243 -37.4763 -5.57301\n 0.0 0.0 0.0\n -0.310819 -1.20057e-7 -2.13126\n 5.71597e-5 0.00990677 0.692399","category":"page"},{"location":"notebooks/#Notebooks-and-example-workflows","page":"Examples and notebooks","title":"Notebooks and example workflows","text":"","category":"section"},{"location":"notebooks/","page":"Examples and notebooks","title":"Examples and notebooks","text":"Pages = joinpath.(\"notebooks\", filter(x -> endswith(x, \".md\"), readdir(\"notebooks\")))\nDepth = 2","category":"page"},{"location":"notebooks/5_basic_stdmodel_construction/","page":"Model construction and modification","title":"Model construction and modification","text":"EditURL = \"https://github.com/LCSB-BioCore/COBREXA.jl/blob/master/docs/src/notebooks/5_basic_stdmodel_construction.jl\"","category":"page"},{"location":"notebooks/5_basic_stdmodel_construction/#Model-construction-and-modification","page":"Model construction and modification","title":"Model construction and modification","text":"","category":"section"},{"location":"notebooks/5_basic_stdmodel_construction/","page":"Model construction and modification","title":"Model construction and modification","text":"(Image: ) (Image: )","category":"page"},{"location":"notebooks/5_basic_stdmodel_construction/","page":"Model construction and modification","title":"Model construction and modification","text":"COBREXA can load models stored in .mat, .json, and .xml formats; and convert these into StandardModels. However, it is also possible to construct models from scratch, and modify existing models. This will be demonstrated here.","category":"page"},{"location":"notebooks/5_basic_stdmodel_construction/#Model-construction","page":"Model construction and modification","title":"Model construction","text":"","category":"section"},{"location":"notebooks/5_basic_stdmodel_construction/","page":"Model construction and modification","title":"Model construction and modification","text":"In COBREXA, model construction is primarily supported through StandardModels. To begin, create an empty StandardModel.","category":"page"},{"location":"notebooks/5_basic_stdmodel_construction/","page":"Model construction and modification","title":"Model construction and modification","text":"using COBREXA\n\nmodel = StandardModel(\"FirstModel\") # assign model id = \"FirstModel\"","category":"page"},{"location":"notebooks/5_basic_stdmodel_construction/","page":"Model construction and modification","title":"Model construction and modification","text":"Next, genes, metabolites and reactions need to be added to the model.","category":"page"},{"location":"notebooks/5_basic_stdmodel_construction/#Add-genes-to-the-model","page":"Model construction and modification","title":"Add genes to the model","text":"","category":"section"},{"location":"notebooks/5_basic_stdmodel_construction/","page":"Model construction and modification","title":"Model construction and modification","text":"gene_list = [Gene(string(\"g\", num)) for num = 1:8]","category":"page"},{"location":"notebooks/5_basic_stdmodel_construction/","page":"Model construction and modification","title":"Model construction and modification","text":"warning: Warning: Don't accidentally overwrite the generic accessors\nIt may be tempting to call a variable genes, metabolites, or reactions. However, these names conflict with generic accessors functions and will create problems downstream.","category":"page"},{"location":"notebooks/5_basic_stdmodel_construction/","page":"Model construction and modification","title":"Model construction and modification","text":"add_genes!(model, gene_list)","category":"page"},{"location":"notebooks/5_basic_stdmodel_construction/#Add-metabolites-to-the-model","page":"Model construction and modification","title":"Add metabolites to the model","text":"","category":"section"},{"location":"notebooks/5_basic_stdmodel_construction/","page":"Model construction and modification","title":"Model construction and modification","text":"metabolite_list = [Metabolite(string(\"m\", num)) for num = 1:4]\n\nmetabolite_list[1].formula = \"C6H12O6\" # can edit metabolites, etc. directly\n\nadd_metabolites!(model, metabolite_list)","category":"page"},{"location":"notebooks/5_basic_stdmodel_construction/#Add-reactions-to-the-model","page":"Model construction and modification","title":"Add reactions to the model","text":"","category":"section"},{"location":"notebooks/5_basic_stdmodel_construction/","page":"Model construction and modification","title":"Model construction and modification","text":"There are two ways to create and add reactions to a model. These are using functions, or macros.","category":"page"},{"location":"notebooks/5_basic_stdmodel_construction/","page":"Model construction and modification","title":"Model construction and modification","text":"r_m1 = Reaction(\"EX_m1\", Dict(\"m1\" => -1.0), :bidirectional) # exchange reaction: m1 <-> (is the same as m1 ⟷ nothing)\nr1 = Reaction(\"r1\", Dict(\"m1\" => -1.0, \"m2\" => 1.0), :forward)\nr1.grr = [[\"g1\", \"g2\"], [\"g3\"]] # add some gene reaction rules\nr2 = Reaction(\"r2\", Dict(\"m2\" => -1.0, \"m1\" => 1.0), :backward)\nr3 = Reaction(\"r3\", Dict(\"m2\" => -1.0, \"m3\" => 1.0), :bidirectional)\n\nadd_reactions!(model, [r1, r2, r3, r_m1]) # function approach\n\nm1 = metabolite_list[1]\nm2 = metabolite_list[2]\nm3 = metabolite_list[3]\nm4 = metabolite_list[4]\n\n@add_reactions! model begin # macro approach\n \"r4\", m2 ⟶ m4, 0, 1000\n \"r_m3\", m3 ⟷ nothing, -1000, 1000\n \"r_m4\", m4 ⟶ nothing\n \"r5\", m4 ⟶ m2\nend\n\nmodel.reactions[\"r4\"].grr = [[\"g5\"], [\"g6\", \"g7\"], [\"g8\"]]","category":"page"},{"location":"notebooks/5_basic_stdmodel_construction/","page":"Model construction and modification","title":"Model construction and modification","text":"note: Note: Using reaction arrows\nCOBREXA exports arrows that can be used to construct reactions. Both the long and short arrows (⟶ == →) mean the same thing if they point in the same direction.These arrows are accessible by using the LaTeX completions built into Julia. For example:→ is \\rightarrow<tab>\n⟶ is \\longrightarrow<tab>\n↠is \\leftarrow<tab>\n⟵ is \\longleftarrow<tab>\n↔ is \\leftrightarrow<tab>\n⟷ is \\longleftrightarrow<tab>","category":"page"},{"location":"notebooks/5_basic_stdmodel_construction/","page":"Model construction and modification","title":"Model construction and modification","text":"The constructed model can now be inspected.","category":"page"},{"location":"notebooks/5_basic_stdmodel_construction/","page":"Model construction and modification","title":"Model construction and modification","text":"model","category":"page"},{"location":"notebooks/5_basic_stdmodel_construction/#Modifying-existing-models","page":"Model construction and modification","title":"Modifying existing models","text":"","category":"section"},{"location":"notebooks/5_basic_stdmodel_construction/","page":"Model construction and modification","title":"Model construction and modification","text":"It is also possible to modify a model by deleting certain genes. This is simply achieved by calling remove_genes!.","category":"page"},{"location":"notebooks/5_basic_stdmodel_construction/","page":"Model construction and modification","title":"Model construction and modification","text":"remove_genes!(model, [\"g1\", \"g2\"]; knockout_reactions = false)\nmodel","category":"page"},{"location":"notebooks/5_basic_stdmodel_construction/","page":"Model construction and modification","title":"Model construction and modification","text":"","category":"page"},{"location":"notebooks/5_basic_stdmodel_construction/","page":"Model construction and modification","title":"Model construction and modification","text":"This page was generated using Literate.jl.","category":"page"},{"location":"tutorials/3_hpc/#Distributed-processing-and-HPC-environments","page":"Distributed processing and HPC environments","title":"Distributed processing and HPC environments","text":"","category":"section"},{"location":"tutorials/3_hpc/","page":"Distributed processing and HPC environments","title":"Distributed processing and HPC environments","text":"Distributed processing in Julia is represented mainly by the package Distributed.jl.","category":"page"},{"location":"tutorials/3_hpc/","page":"Distributed processing and HPC environments","title":"Distributed processing and HPC environments","text":"COBREXA.jl is able to utilize this existing system to almost transparently run the large parallelizable analyses on multiple CPU cores and multiple computers connected through the network. Ultimately, the approach scales to thousands of computing nodes in large HPC facilities.","category":"page"},{"location":"tutorials/3_hpc/","page":"Distributed processing and HPC environments","title":"Distributed processing and HPC environments","text":"Here, we give a short overview of how to work in the distributed environment and utilize the resources for COBREXA.jl analyses.","category":"page"},{"location":"tutorials/3_hpc/#Starting-the-distributed-workers","page":"Distributed processing and HPC environments","title":"Starting the distributed workers","text":"","category":"section"},{"location":"tutorials/3_hpc/","page":"Distributed processing and HPC environments","title":"Distributed processing and HPC environments","text":"COBREXA.jl follows the structure imposed by the Distributed package: You operate a main (usually called \"master\") computation node, connect to multiple other computers and start worker Julia processes there, and distribute the workload across this cluster.","category":"page"},{"location":"tutorials/3_hpc/","page":"Distributed processing and HPC environments","title":"Distributed processing and HPC environments","text":"To start, you need to load the package and add a few processes. This starts 5 processes locally:","category":"page"},{"location":"tutorials/3_hpc/","page":"Distributed processing and HPC environments","title":"Distributed processing and HPC environments","text":"using Distributed\naddprocs(5)","category":"page"},{"location":"tutorials/3_hpc/","page":"Distributed processing and HPC environments","title":"Distributed processing and HPC environments","text":"note: `Distributed.jl` installation\nDistributed.jl usually comes pre-installed with Julia distribution, but you may still need to \"enable\" it by typing ] add Distributed.","category":"page"},{"location":"tutorials/3_hpc/","page":"Distributed processing and HPC environments","title":"Distributed processing and HPC environments","text":"You may check that the workers are really there, using workers(). In this case, it should give you a vector of worker IDs, very likely equal to [2,3,4,5,6].","category":"page"},{"location":"tutorials/3_hpc/","page":"Distributed processing and HPC environments","title":"Distributed processing and HPC environments","text":"If you have compute resources available via a network, you may connect these as well, provided you have a secure shell (ssh) access to them. You will likely want to establish a key-based authentication (refer to ssh documentation) to make the connection easier.","category":"page"},{"location":"tutorials/3_hpc/","page":"Distributed processing and HPC environments","title":"Distributed processing and HPC environments","text":"With shell, check that you can ssh to a remote node and run Julia there:","category":"page"},{"location":"tutorials/3_hpc/","page":"Distributed processing and HPC environments","title":"Distributed processing and HPC environments","text":"user@pc> ssh server\n...\nuser@server> julia\n...\njulia> _","category":"page"},{"location":"tutorials/3_hpc/","page":"Distributed processing and HPC environments","title":"Distributed processing and HPC environments","text":"top: Running shell commands from Julia\nIf you don't want to quit your Julia session to try out the ssh connection from the shell, press ; in the Julia prompt on the beginning of the line. The interpreter will execute your next line as a shell command.","category":"page"},{"location":"tutorials/3_hpc/","page":"Distributed processing and HPC environments","title":"Distributed processing and HPC environments","text":"If this works for you, you can add some workers that run on the server from your Julia shell running on your pc. For example, the following starts 20 workers on the remote server and 10 workers on your friend's computer called joe_pc:","category":"page"},{"location":"tutorials/3_hpc/","page":"Distributed processing and HPC environments","title":"Distributed processing and HPC environments","text":"addprocs([('server', 20), ('joe_pc', 10)])","category":"page"},{"location":"tutorials/3_hpc/","page":"Distributed processing and HPC environments","title":"Distributed processing and HPC environments","text":"With this, you can schedule various computation on the workers; see the Julia manual of Distributed for basic details. You may try various convenience packages, such as DistributedArrays.jl and DistributedData.jl, to process any data in a distributed fashion.","category":"page"},{"location":"tutorials/3_hpc/#Running-a-distributed-analysis","page":"Distributed processing and HPC environments","title":"Running a distributed analysis","text":"","category":"section"},{"location":"tutorials/3_hpc/","page":"Distributed processing and HPC environments","title":"Distributed processing and HPC environments","text":"While not all COBREXA functions may be parallelized naturally, these that do will accept a special workers argument that specifies a list of worker IDs where the computation should be distributed. For the value, you can specify your desired worker IDs manually (e.g. [2,3,4]), or simply use workers().","category":"page"},{"location":"tutorials/3_hpc/","page":"Distributed processing and HPC environments","title":"Distributed processing and HPC environments","text":"For example, flux_variability_analysis can naturally parallelize the computation of all reactions's minima and maxima to finish the computation faster. To enable the parallelization, you first need to make sure that all workers have loaded both the COBREXA package and the optimizer:","category":"page"},{"location":"tutorials/3_hpc/","page":"Distributed processing and HPC environments","title":"Distributed processing and HPC environments","text":"using COBREXA, GLPK, Distributed\naddprocs(10) # add any kind and number of processes here\n@everywhere using COBREXA, GLPK # loads the necessary packages on all workers","category":"page"},{"location":"tutorials/3_hpc/","page":"Distributed processing and HPC environments","title":"Distributed processing and HPC environments","text":"When the package is loaded and precompiled everywhere, you may load your model and run the FVA with the workers parameter:","category":"page"},{"location":"tutorials/3_hpc/","page":"Distributed processing and HPC environments","title":"Distributed processing and HPC environments","text":"model = load_model(\"e_coli_core.xml\")\nresult = flux_variability_analysis(model, GLPK.Optimizer; workers=workers())","category":"page"},{"location":"tutorials/3_hpc/","page":"Distributed processing and HPC environments","title":"Distributed processing and HPC environments","text":"With the extra computing capacity from N workers available, the FVA should be computed roughly N-times faster.","category":"page"},{"location":"tutorials/3_hpc/","page":"Distributed processing and HPC environments","title":"Distributed processing and HPC environments","text":"note: Distribution and parallelization overhead\nCommunication of the workers with your Julia shell is not free. If the task that you are parallelizing is small and the model structure is very large, the distributed computation will actually spend most computation time just distributing the large model to the workers, and almost no time in executing the small parallel task. In such case, the performance will not improve by adding additional resources. You may want to check that the computation task is sufficiently large before investing the extra resources into the distributed execution. Amdahl's and Gustafson's laws can give you a better overview of the consequences of this overhead.","category":"page"},{"location":"tutorials/3_hpc/#Interacting-with-HPC-schedulers","page":"Distributed processing and HPC environments","title":"Interacting with HPC schedulers","text":"","category":"section"},{"location":"tutorials/3_hpc/","page":"Distributed processing and HPC environments","title":"Distributed processing and HPC environments","text":"Many researchers have access to institutional HPC facilities that allow time-sharing of the capacity of a large computer cluster between many researchers. Julia and COBREXA.jl work well within this environment; but your programs require some additional customization to be able to find and utilize the resources available from the HPC.","category":"page"},{"location":"tutorials/3_hpc/","page":"Distributed processing and HPC environments","title":"Distributed processing and HPC environments","text":"In our case, this reduces to a relatively complex task: You need to find out how many resources were allocated for your task, and you need to add the remote workers precisely at places that were allocated for your. Fortunately, the package ClusterManagers.jl can do precisely that.","category":"page"},{"location":"tutorials/3_hpc/","page":"Distributed processing and HPC environments","title":"Distributed processing and HPC environments","text":"For simplicily, we will assume that your HPC is scheduled by Slurm.","category":"page"},{"location":"tutorials/3_hpc/","page":"Distributed processing and HPC environments","title":"Distributed processing and HPC environments","text":"Adding of the workers from Slurm is done as follows:","category":"page"},{"location":"tutorials/3_hpc/","page":"Distributed processing and HPC environments","title":"Distributed processing and HPC environments","text":"you import the ClusterManagers package\nyou find how many processes to spawn from the environment from SLURM_NTASKS environment variable\nyou use the function addprocs_slurm to precisely connect to your allocated computational resources","category":"page"},{"location":"tutorials/3_hpc/","page":"Distributed processing and HPC environments","title":"Distributed processing and HPC environments","text":"The Julia script that does a parallel analysis may then start as follows:","category":"page"},{"location":"tutorials/3_hpc/","page":"Distributed processing and HPC environments","title":"Distributed processing and HPC environments","text":"using COBREXA, Distributed, ClusterManagers\n\navailable_workers = parse(Int, ENV[\"SLURM_NTASKS\"])\n\naddprocs_slurm(available_workers)\n\n...\nresult = flux_variability_analysis(...; workers=workers())\n...","category":"page"},{"location":"tutorials/3_hpc/","page":"Distributed processing and HPC environments","title":"Distributed processing and HPC environments","text":"After adding the Slurm workers, you may continue as if the workers were added using normal addprocs, and (for example) run the flux_variability_analysis as shown above.","category":"page"},{"location":"tutorials/3_hpc/","page":"Distributed processing and HPC environments","title":"Distributed processing and HPC environments","text":"tip: What about the other HPC schedulers?\nClusterManagers.jl supports many other common HPC scheduling systems, including LFS, Sun Grid, SGE, PBS, and Scyld, in a way almost identical to Slurm. See the package documentation for details.","category":"page"},{"location":"tutorials/3_hpc/#Wrapping-your-script-in-a-Slurm-job","page":"Distributed processing and HPC environments","title":"Wrapping your script in a Slurm job","text":"","category":"section"},{"location":"tutorials/3_hpc/","page":"Distributed processing and HPC environments","title":"Distributed processing and HPC environments","text":"To be able to submit your script for later processing using the sbatch Slurm command, you need to wrap it in a small \"batch\" script that tells Slurm how many resources the process needs.","category":"page"},{"location":"tutorials/3_hpc/","page":"Distributed processing and HPC environments","title":"Distributed processing and HPC environments","text":"Assuming you have a Julia computation script written down in myJob.jl and saved on your HPC cluster's access node, the corresponding Slurm batch script (let's call it myJob.sbatch) may look as follows:","category":"page"},{"location":"tutorials/3_hpc/","page":"Distributed processing and HPC environments","title":"Distributed processing and HPC environments","text":"#!/bin/bash -l\n#SBATCH -n 100 # the job will require 100 individual workers\n#SBATCH -c 1 # each worker will sit on a single CPU\n#SBATCH -t 30 # the whole job will take less than 30 minutes\n#SBATCH -J myJob # the name of the job\n\nmodule load lang/Julia # this is usually required to make Julia available to your job\n\njulia myJob.jl","category":"page"},{"location":"tutorials/3_hpc/","page":"Distributed processing and HPC environments","title":"Distributed processing and HPC environments","text":"To run the computation, simply run sbatch myJob.sbatch on the access node. The job will be scheduled and eventually executed. You may watch sacct and squeue in the meantime, to see the progress.","category":"page"},{"location":"tutorials/3_hpc/","page":"Distributed processing and HPC environments","title":"Distributed processing and HPC environments","text":"Remember that you need to explicitly save the result of your Julia script computation to files, to be able to retrieve them later. Standard outputs of the jobs are often mangled and discarded. If you still want to collect the standard output, you may change the last line of the batch script to","category":"page"},{"location":"tutorials/3_hpc/","page":"Distributed processing and HPC environments","title":"Distributed processing and HPC environments","text":"julia myJob.jl > myJob.log","category":"page"},{"location":"tutorials/3_hpc/","page":"Distributed processing and HPC environments","title":"Distributed processing and HPC environments","text":"and collect the output from the log later. This is convenient especially if logging various computation details using the @info and similar macros.","category":"page"},{"location":"functions/#Functions","page":"Function reference","title":"Functions","text":"","category":"section"},{"location":"functions/#Base-Types","page":"Function reference","title":"Base Types","text":"","category":"section"},{"location":"functions/","page":"Function reference","title":"Function reference","text":"Modules = [COBREXA]\nPages = map(file -> joinpath(\"base\", \"types\", \"abstract\", file), readdir(\"../src/base/types/abstract\"))","category":"page"},{"location":"functions/#COBREXA.Maybe","page":"Function reference","title":"COBREXA.Maybe","text":"Maybe{T} = Union{Nothing, T}\n\nA nice name for \"nullable\" type.\n\n\n\n\n\n","category":"type"},{"location":"functions/#COBREXA._default-Union{Tuple{T}, Tuple{T, Union{Nothing, T}}} where T","page":"Function reference","title":"COBREXA._default","text":"_default(d::T, x::Maybe{T})::T where {T}\n\nFold the Maybe{T} down to T by defaulting.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA._maybemap-Tuple{Any, Union{Nothing, T} where T}","page":"Function reference","title":"COBREXA._maybemap","text":"_maybemap(f, x::Maybe)::Maybe\n\nApply a function to x only if it is not nothing.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.Annotations","page":"Function reference","title":"COBREXA.Annotations","text":"Annotations = Dict{String,Vector{String}}\n\nDictionary used to store (possible multiple) standardized annotations of something, such as a Metabolite and a Reaction.\n\nExample\n\nAnnotations(\"PubChem\" => [\"CID12345\", \"CID54321\"])\n\n\n\n\n\n","category":"type"},{"location":"functions/#COBREXA.GeneAssociation","page":"Function reference","title":"COBREXA.GeneAssociation","text":"GeneAssociation = Vector{Vector{String}}\n\nAn association to genes, represented as a logical formula in a positive disjunctive normal form (DNF). (The 2nd-level vectors of strings are connected by \"and\" to form conjunctions, and the 1st-level vectors of these conjunctions are connected by \"or\" to form the DNF.)\n\n\n\n\n\n","category":"type"},{"location":"functions/#COBREXA.MetabolicModel","page":"Function reference","title":"COBREXA.MetabolicModel","text":"abstract type MetabolicModel end\n\nA helper supertype that wraps everything usable as a linear-like model for COBREXA functions.\n\nIf you want your model type to work with COBREXA, add the MetabolicModel as its supertype, and implement the accessor functions. Accessors reactions, metabolites, stoichiometry, bounds and objective must be implemented; others are not mandatory and default to safe \"empty\" values.\n\n\n\n\n\n","category":"type"},{"location":"functions/#COBREXA.MetaboliteFormula","page":"Function reference","title":"COBREXA.MetaboliteFormula","text":"MetaboliteFormula = Dict{String,Int}\n\nDictionary of atoms and their abundances in a molecule.\n\n\n\n\n\n","category":"type"},{"location":"functions/#COBREXA.Notes","page":"Function reference","title":"COBREXA.Notes","text":"Notes = Dict{String,Vector{String}}\n\nFree-form notes about something (e.g. a Gene), categorized by \"topic\".\n\n\n\n\n\n","category":"type"},{"location":"functions/#COBREXA.balance-Tuple{MetabolicModel}","page":"Function reference","title":"COBREXA.balance","text":"balance(a::MetabolicModel)::SparseVec\n\nGet the sparse balance vector of a model (ie. the b from S x = b).\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.bounds-Tuple{MetabolicModel}","page":"Function reference","title":"COBREXA.bounds","text":"bounds(a::MetabolicModel)::Tuple{SparseVec,SparseVec}\n\nGet the lower and upper flux bounds of a model.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.coupling-Tuple{MetabolicModel}","page":"Function reference","title":"COBREXA.coupling","text":"coupling(a::MetabolicModel)::SparseMat\n\nGet a matrix of coupling constraint definitions of a model. By default, there is no coupling in the models.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.coupling_bounds-Tuple{MetabolicModel}","page":"Function reference","title":"COBREXA.coupling_bounds","text":"coupling_bounds(a::MetabolicModel)::Tuple{SparseVec,SparseVec}\n\nGet the lower and upper bounds for each coupling bound in a model, as specified by coupling. By default, the model does not have any coupling bounds.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.gene_annotations-Tuple{MetabolicModel, String}","page":"Function reference","title":"COBREXA.gene_annotations","text":"gene_annotations(a::MetabolicModel, gene_id::String)::Annotations\n\nReturn standardized names that identify the corresponding gene or product. The dictionary assigns vectors of possible identifiers to identifier system names, e.g. \"PDB\" => [\"PROT01\"].\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.gene_notes-Tuple{MetabolicModel, String}","page":"Function reference","title":"COBREXA.gene_notes","text":"gene_notes(model::MetabolicModel, gene_id::String)::Notes\n\nReturn the notes associated with the gene gene_id in model.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.genes-Tuple{MetabolicModel}","page":"Function reference","title":"COBREXA.genes","text":"genes(a::MetabolicModel)::Vector{String}\n\nReturn identifiers of all genes contained in the model. By default, there are no genes.\n\nIn SBML, these are usually called \"gene products\" but we write genes for simplicity.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.metabolite_annotations-Tuple{MetabolicModel, String}","page":"Function reference","title":"COBREXA.metabolite_annotations","text":"metabolite_annotations(a::MetabolicModel, metabolite_id::String)::Annotations\n\nReturn standardized names that may help to reliably identify the metabolite. The dictionary assigns vectors of possible identifiers to identifier system names, e.g. \"ChEMBL\" => [\"123\"] or \"PubChem\" => [\"CID123\", \"CID654645645\"].\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.metabolite_charge-Tuple{MetabolicModel, String}","page":"Function reference","title":"COBREXA.metabolite_charge","text":"metabolitecharge(model::MetabolicModel, metaboliteid::String)::Maybe{Int}\n\nReturn the charge associated with metabolite metabolite_id in model. Returns nothing if charge not present.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.metabolite_compartment-Tuple{MetabolicModel, String}","page":"Function reference","title":"COBREXA.metabolite_compartment","text":"metabolite_compartment(model::MetabolicModel, metabolite_id::String)::Maybe{String}\n\nReturn the compartment of metabolite metabolite_id in model if it is assigned. If not, return nothing. \n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.metabolite_formula-Tuple{MetabolicModel, String}","page":"Function reference","title":"COBREXA.metabolite_formula","text":"metabolite_formula(\n a::MetabolicModel,\n metabolite_id::String,\n)::Maybe{MetaboliteFormula}\n\nReturn the formula of metabolite metabolite_id in model. Return nothing in case the formula is not known or irrelevant.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.metabolite_notes-Tuple{MetabolicModel, String}","page":"Function reference","title":"COBREXA.metabolite_notes","text":"metabolite_notes(model::MetabolicModel, metabolite_id::String)::Notes\n\nReturn the notes associated with metabolite reaction_id in model.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.metabolites-Tuple{MetabolicModel}","page":"Function reference","title":"COBREXA.metabolites","text":"metabolites(a::MetabolicModel)::Vector{String}\n\nReturn a vector of metabolite identifiers in a model.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.n_coupling_constraints-Tuple{MetabolicModel}","page":"Function reference","title":"COBREXA.n_coupling_constraints","text":"n_coupling_constraints(a::MetabolicModel)::Int\n\nGet the number of coupling constraints in a model.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.n_genes-Tuple{MetabolicModel}","page":"Function reference","title":"COBREXA.n_genes","text":"n_genes(a::MetabolicModel)::Int\n\nReturn the number of genes in the model (as returned by genes). If you just need the number of the genes, this may be much more efficient than calling genes and measuring the array.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.n_metabolites-Tuple{MetabolicModel}","page":"Function reference","title":"COBREXA.n_metabolites","text":"n_metabolites(a::MetabolicModel)::Int\n\nGet the number of metabolites in a model.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.n_reactions-Tuple{MetabolicModel}","page":"Function reference","title":"COBREXA.n_reactions","text":"n_reactions(a::MetabolicModel)::Int\n\nGet the number of reactions in a model.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.objective-Tuple{MetabolicModel}","page":"Function reference","title":"COBREXA.objective","text":"objective(a::MetabolicModel)::SparseVec\n\nGet the objective vector of a model.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.precache!-Tuple{MetabolicModel}","page":"Function reference","title":"COBREXA.precache!","text":"precache!(a::MetabolicModel)::Nothing\n\nDo whatever is feasible to get the model into a state that can be read from as-quickly-as-possible. This may include e.g. generating helper index structures and loading delayed parts of the model from disk. The model should be modified \"transparently\" in-place. Analysis functions call this right before applying modifications or converting the model to the optimization model using make_optimization_model; usually on the same machine where the optimizers (and, generally, the core analysis algorithms) will run. The calls are done in a good hope that the performance will be improved.\n\nBy default, it should be safe to do nothing.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.reaction_annotations-Tuple{MetabolicModel, String}","page":"Function reference","title":"COBREXA.reaction_annotations","text":"reaction_annotations(a::MetabolicModel, reaction_id::String)::Annotations\n\nReturn standardized names that may help identifying the reaction. The dictionary assigns vectors of possible identifiers to identifier system names, e.g. \"Reactome\" => [\"reactomeID123\"].\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.reaction_gene_association-Tuple{MetabolicModel, String}","page":"Function reference","title":"COBREXA.reaction_gene_association","text":"reaction_gene_association(a::MetabolicModel, gene_id::String)::Maybe{GeneAssociation}\n\nReturns the sets of genes that need to be present so that the reaction can work (technically, a DNF on gene availability, with positive atoms only).\n\nFor simplicity, nothing may be returned, meaning that the reaction always takes place. (in DNF, that would be equivalent to returning [[]].)\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.reaction_notes-Tuple{MetabolicModel, String}","page":"Function reference","title":"COBREXA.reaction_notes","text":"reaction_notes(model::MetabolicModel, reaction_id::String)::Notes\n\nReturn the notes associated with reaction reaction_id in model.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.reaction_stoichiometry-Tuple{MetabolicModel, String}","page":"Function reference","title":"COBREXA.reaction_stoichiometry","text":"reaction_stoichiometry(model::MetaboliteModel, rxn_id::String)::Dict{String, Float64}\n\nReturn the reaction equation of reaction with id rxn_id in model. The reaction equation maps metabolite ids to their stoichiometric coefficients.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.reaction_subsystem-Tuple{MetabolicModel, String}","page":"Function reference","title":"COBREXA.reaction_subsystem","text":"reaction_subsystem(model::MetabolicModel, reaction_id::String)::Maybe{String}\n\nReturn the subsystem of reaction reaction_id in model if it is assigned. If not, return nothing.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.reactions-Tuple{MetabolicModel}","page":"Function reference","title":"COBREXA.reactions","text":"reactions(a::MetabolicModel)::Vector{String}\n\nReturn a vector of reaction identifiers in a model.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.stoichiometry-Tuple{MetabolicModel}","page":"Function reference","title":"COBREXA.stoichiometry","text":"stoichiometry(a::MetabolicModel)::SparseMat\n\nGet the sparse stoichiometry matrix of a model.\n\n\n\n\n\n","category":"method"},{"location":"functions/#Model-types-and-contents","page":"Function reference","title":"Model types and contents","text":"","category":"section"},{"location":"functions/","page":"Function reference","title":"Function reference","text":"Modules = [COBREXA]\nPages = map(file -> joinpath(\"base\", \"types\", file), readdir(\"../src/base/types\"))","category":"page"},{"location":"functions/#COBREXA.CoreModel","page":"Function reference","title":"COBREXA.CoreModel","text":"struct CoreModel <: MetabolicModel\n\nA \"bare bones\" core linear optimization problem of the form, with reaction and metabolite names.\n\nmin c^T x\ns.t. S x = b\n xâ‚— ≤ x ≤ xᵤ\n\n\n\n\n\n","category":"type"},{"location":"functions/#Base.convert-Union{Tuple{M}, Tuple{Type{CoreModel}, M}} where M<:MetabolicModel","page":"Function reference","title":"Base.convert","text":"Base.convert(::Type{CoreModel}, m::M) where {M <: MetabolicModel}\n\nMake a CoreModel out of any compatible model type.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.balance-Tuple{CoreModel}","page":"Function reference","title":"COBREXA.balance","text":"balance(a::CoreModel)::SparseVec\n\nCoreModel target flux balance.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.bounds-Tuple{CoreModel}","page":"Function reference","title":"COBREXA.bounds","text":"bounds(a::CoreModel)::Tuple{SparseVec,SparseVec}\n\nCoreModel flux bounds.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.metabolites-Tuple{CoreModel}","page":"Function reference","title":"COBREXA.metabolites","text":"metabolites(a::CoreModel)::Vector{String}\n\nMetabolites in a CoreModel.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.objective-Tuple{CoreModel}","page":"Function reference","title":"COBREXA.objective","text":"objective(a::CoreModel)::SparseVec\n\nCoreModel objective vector.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.reaction_stoichiometry-Tuple{CoreModel, Int64}","page":"Function reference","title":"COBREXA.reaction_stoichiometry","text":"reaction_stoichiometry(model::CoreModel, rxn_id::String)::Dict{String, Float64}\n\nReturn the reaction equation of reaction with id rxn_ind in model. The reaction equation maps metabolite ids to their stoichiometric coefficients.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.reaction_stoichiometry-Tuple{CoreModel, String}","page":"Function reference","title":"COBREXA.reaction_stoichiometry","text":"reaction_stoichiometry(model::CoreModel, rxn_id::String)::Dict{String, Float64}\n\nReturn the reaction equation of reaction with id rxn_id in model. The reaction equation maps metabolite ids to their stoichiometric coefficients.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.reactions-Tuple{CoreModel}","page":"Function reference","title":"COBREXA.reactions","text":"reactions(a::CoreModel)::Vector{String}\n\nGet the reactions in a CoreModel.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.stoichiometry-Tuple{CoreModel}","page":"Function reference","title":"COBREXA.stoichiometry","text":"stoichiometry(a::CoreModel)::SparseMat\n\nCoreModel stoichiometry matrix.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.CoreModelCoupled","page":"Function reference","title":"COBREXA.CoreModelCoupled","text":"struct CoreModelCoupled <: MetabolicModel\n\nThe linear model with additional coupling constraints in the form\n\n câ‚— ≤ C x ≤ cᵤ\n\n\n\n\n\n","category":"type"},{"location":"functions/#Base.convert-Tuple{Type{CoreModelCoupled}, MetabolicModel}","page":"Function reference","title":"Base.convert","text":"Base.convert(::Type{CoreModelCoupled}, mm::MetabolicModel)\n\nMake a CoreModelCoupled out of any compatible model type.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.balance-Tuple{CoreModelCoupled}","page":"Function reference","title":"COBREXA.balance","text":"balance(a::CoreModelCoupled)\n\nExtract balance from CoreModelCoupled (uses the internal CoreModel).\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.bounds-Tuple{CoreModelCoupled}","page":"Function reference","title":"COBREXA.bounds","text":"bounds(a::CoreModelCoupled)\n\nExtract bounds from CoreModelCoupled (uses the internal CoreModel).\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.coupling-Tuple{CoreModelCoupled}","page":"Function reference","title":"COBREXA.coupling","text":"coupling(a::CoreModelCoupled)::SparseMat\n\nCoupling constraint matrix for a CoreModelCoupled.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.coupling_bounds-Tuple{CoreModelCoupled}","page":"Function reference","title":"COBREXA.coupling_bounds","text":"coupling_bounds(a::CoreModelCoupled)::Tuple{SparseVec,SparseVec}\n\nCoupling bounds for a CoreModelCoupled.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.metabolites-Tuple{CoreModelCoupled}","page":"Function reference","title":"COBREXA.metabolites","text":"metabolites(a::CoreModelCoupled)\n\nExtract metabolites from CoreModelCoupled (uses the internal CoreModel).\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.n_coupling_constraints-Tuple{CoreModelCoupled}","page":"Function reference","title":"COBREXA.n_coupling_constraints","text":"n_coupling_constraints(a::CoreModelCoupled)::Int\n\nThe number of coupling constraints in a CoreModelCoupled.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.objective-Tuple{CoreModelCoupled}","page":"Function reference","title":"COBREXA.objective","text":"objective(a::CoreModelCoupled)\n\nExtract objective from CoreModelCoupled (uses the internal CoreModel).\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.reaction_stoichiometry-Tuple{CoreModelCoupled, Int64}","page":"Function reference","title":"COBREXA.reaction_stoichiometry","text":"reaction_stoichiometry(model::CoreModelCoupled, rxn_ind::Int)::Dict{String, Float64}\n\nReturn the reaction equation of reaction with id rxn_ind in model. The reaction equation maps metabolite ids to their stoichiometric coefficients.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.reaction_stoichiometry-Tuple{CoreModelCoupled, String}","page":"Function reference","title":"COBREXA.reaction_stoichiometry","text":"reaction_stoichiometry(model::CoreModelCoupled, rxn_id::String)::Dict{String, Float64}\n\nReturn the reaction equation of reaction with id rxn_id in model. The reaction equation maps metabolite ids to their stoichiometric coefficients.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.reactions-Tuple{CoreModelCoupled}","page":"Function reference","title":"COBREXA.reactions","text":"reactions(a::CoreModelCoupled)\n\nExtract reactions from CoreModelCoupled (uses the internal CoreModel).\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.stoichiometry-Tuple{CoreModelCoupled}","page":"Function reference","title":"COBREXA.stoichiometry","text":"stoichiometry(a::CoreModelCoupled)\n\nExtract stoichiometry from CoreModelCoupled (uses the internal CoreModel).\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.Gene","page":"Function reference","title":"COBREXA.Gene","text":"Gene struct.\n\nFields\n\nid :: String\nname :: Union{String, Nothing}\nnotes :: Dict{String, Vector{String}}\nannotation :: Dict{String, Union{Vector{String}, String}}\n\n\n\n\n\n","category":"type"},{"location":"functions/#COBREXA.JSONModel","page":"Function reference","title":"COBREXA.JSONModel","text":"struct JSONModel <: MetabolicModel\n json::Dict{String,Any}\nend\n\nA struct used to store the contents of a JSON model, i.e. a model read from a file ending with .json. These model files typically store all the model parameters in arrays of JSON objects (i.e. Julia dictionaries).\n\nUsually, not all of the fields of the input JSON can be easily represented when converting to other models, care should be taken to avoid losing information.\n\nDirect work on this precise model type is not very efficient, as the accessor functions need to repeatedly find the information in the JSON tree. This gets very slow especially if calling many accessor functions sequentially. To avoid that, convert to e.g. StandardModel as soon as possible.\n\nExample\n\nmodel = load_json_model(\"some_model.json\")\nmodel.json # see the actual underlying JSON\nreactions(model) # see the list of reactions\n\n\n\n\n\n","category":"type"},{"location":"functions/#Base.convert-Tuple{Type{JSONModel}, MetabolicModel}","page":"Function reference","title":"Base.convert","text":"Base.convert(::Type{JSONModel}, mm::MetabolicModel)\n\nConvert any MetabolicModel to JSONModel.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.bounds-Tuple{JSONModel}","page":"Function reference","title":"COBREXA.bounds","text":"bounds(model::JSONModel)\n\nGet the bounds for reactions, assuming the information is stored in .lower_bound and .upper_bound.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.gene_annotations-Tuple{JSONModel, String}","page":"Function reference","title":"COBREXA.gene_annotations","text":"gene_annotations(model::JSONModel, gid::String)::Annotations\n\nGene annotations from the JSONModel.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.gene_notes-Tuple{JSONModel, String}","page":"Function reference","title":"COBREXA.gene_notes","text":"gene_notes(model::JSONModel, gid::String)::Notes\n\nGene notes from the JSONModel.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.genes-Tuple{JSONModel}","page":"Function reference","title":"COBREXA.genes","text":"genes(model::JSONModel)\n\nExtract gene names from a JSON model.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.metabolite_annotations-Tuple{JSONModel, String}","page":"Function reference","title":"COBREXA.metabolite_annotations","text":"metabolite_annotations(model::JSONModel, mid::String)::Annotations\n\nMetabolite annotations from the JSONModel.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.metabolite_charge-Tuple{JSONModel, String}","page":"Function reference","title":"COBREXA.metabolite_charge","text":"metabolite_charge(model::JSONModel, mid::String)\n\nReturn the metabolite .charge\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.metabolite_compartment-Tuple{JSONModel, String}","page":"Function reference","title":"COBREXA.metabolite_compartment","text":"metabolite_compartment(model::JSONModel, mid::String)\n\nReturn the metabolite .compartment\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.metabolite_formula-Tuple{JSONModel, String}","page":"Function reference","title":"COBREXA.metabolite_formula","text":"metabolite_formula(model::JSONModel, mid::String)\n\nParse and return the metabolite .formula\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.metabolite_notes-Tuple{JSONModel, String}","page":"Function reference","title":"COBREXA.metabolite_notes","text":"metabolite_notes(model::JSONModel, mid::String)::Notes\n\nMetabolite notes from the JSONModel.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.metabolites-Tuple{JSONModel}","page":"Function reference","title":"COBREXA.metabolites","text":"metabolites(model::JSONModel)\n\nExtract metabolite names (stored as .id) from JSON model.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.objective-Tuple{JSONModel}","page":"Function reference","title":"COBREXA.objective","text":"objective(model::JSONModel)\n\nCollect .objective_coefficient keys from model reactions.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.reaction_annotations-Tuple{JSONModel, String}","page":"Function reference","title":"COBREXA.reaction_annotations","text":"reaction_annotations(model::JSONModel, rid::String)::Annotations\n\nReaction annotations from the JSONModel.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.reaction_gene_association-Tuple{JSONModel, String}","page":"Function reference","title":"COBREXA.reaction_gene_association","text":"reaction_gene_associaton(model::JSONModel, rid::String)\n\nParses the .gene_reaction_rule from reactions.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.reaction_notes-Tuple{JSONModel, String}","page":"Function reference","title":"COBREXA.reaction_notes","text":"reaction_notes(model::JSONModel, rid::String)::Notes\n\nReaction notes from the JSONModel.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.reaction_stoichiometry-Tuple{JSONModel, String}","page":"Function reference","title":"COBREXA.reaction_stoichiometry","text":"reaction_stoichiometry(model::JSONModel, rxn_id::String)::Dict{String, Float64}\n\nReturn the reaction equation of reaction with id rxn_id in model. The reaction equation maps metabolite ids to their stoichiometric coefficients.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.reaction_subsystem-Tuple{JSONModel, String}","page":"Function reference","title":"COBREXA.reaction_subsystem","text":"reaction_subsystem(model::JSONModel, rid::String)\n\nParses the .subsystem out from reactions.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.reactions-Tuple{JSONModel}","page":"Function reference","title":"COBREXA.reactions","text":"reactions(model::JSONModel)\n\nExtract reaction names (stored as .id) from JSON model.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.stoichiometry-Tuple{JSONModel}","page":"Function reference","title":"COBREXA.stoichiometry","text":"stoichiometry(model::JSONModel)\n\nGet the stoichiometry. Assuming the information is stored in reaction object under key .metabolites.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.MATModel","page":"Function reference","title":"COBREXA.MATModel","text":"struct MATModel\n\nWrapper around the models loaded in dictionaries from the MATLAB representation.\n\n\n\n\n\n","category":"type"},{"location":"functions/#Base.convert-Tuple{Type{MATModel}, MetabolicModel}","page":"Function reference","title":"Base.convert","text":"Base.convert(::Type{MATModel}, m::MetabolicModel)\n\nConvert any metabolic model to MATModel.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA._mat_has_squashed_coupling-Tuple{Any}","page":"Function reference","title":"COBREXA._mat_has_squashed_coupling","text":"_mat_has_squashed_coupling(mat)\n\nGuesses whether C in the MAT file is stored in A=[S;C].\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.balance-Tuple{MATModel}","page":"Function reference","title":"COBREXA.balance","text":"balance(m::MATModel)\n\nExtracts balance from the MAT model, defaulting to zeroes if not present.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.bounds-Tuple{MATModel}","page":"Function reference","title":"COBREXA.bounds","text":"bounds(m::MATModel)\n\nExtracts bounds from the MAT file, saved under lb and ub.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.coupling-Tuple{MATModel}","page":"Function reference","title":"COBREXA.coupling","text":"coupling(m::MATModel)\n\nExtract coupling matrix stored, in C key.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.coupling_bounds-Tuple{MATModel}","page":"Function reference","title":"COBREXA.coupling_bounds","text":"coupling_bounds(m::MATModel)\n\nExtracts the coupling constraints. Currently, there are several accepted ways to store these in MATLAB models; this takes the constraints from vectors cl and cu.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.genes-Tuple{MATModel}","page":"Function reference","title":"COBREXA.genes","text":"genes(m::MATModel)\n\nExtracts the possible gene list from genes key.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.metabolite_charge-Tuple{MATModel, String}","page":"Function reference","title":"COBREXA.metabolite_charge","text":"metabolite_charge(m::MATModel, mid::String)\n\nExtract metabolite charge from metCharge or metCharges.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.metabolite_compartment-Tuple{MATModel, String}","page":"Function reference","title":"COBREXA.metabolite_compartment","text":"metabolite_compartment(m::MATModel, mid::String)\n\nExtract metabolite compartment from metCompartment or metCompartments.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.metabolite_formula-Tuple{MATModel, String}","page":"Function reference","title":"COBREXA.metabolite_formula","text":"metabolite_formula(m::MATModel, mid::String)\n\nExtract metabolite formula from key metFormula or metFormulas.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.metabolites-Tuple{MATModel}","page":"Function reference","title":"COBREXA.metabolites","text":"metabolites(m::MATModel)::Vector{String}\n\nExtracts metabolite names from mets key in the MAT file.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.objective-Tuple{MATModel}","page":"Function reference","title":"COBREXA.objective","text":"objective(m::MATModel)\n\nExtracts the objective from the MAT model (defaults to zeroes).\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.reaction_gene_association-Tuple{MATModel, String}","page":"Function reference","title":"COBREXA.reaction_gene_association","text":"reaction_gene_association(m::MATModel, rid::String)\n\nExtracts the associations from grRules key, if present.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.reaction_stoichiometry-Tuple{MATModel, Any}","page":"Function reference","title":"COBREXA.reaction_stoichiometry","text":"reaction_stoichiometry(model::MATModel, rxn_index)::Dict{String, Float64}\n\nReturn the reaction equation of reaction with index rxn_index in model. The reaction equation maps metabolite ids to their stoichiometric coefficients. Note, rxn_index can be any suitable type that can index into an array.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.reaction_stoichiometry-Tuple{MATModel, String}","page":"Function reference","title":"COBREXA.reaction_stoichiometry","text":"reaction_stoichiometry(model::MATModel, rxn_id::String)::Dict{String, Float64}\n\nReturn the reaction equation of reaction with id rxn_id in model. The reaction equation maps metabolite ids to their stoichiometric coefficients.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.reactions-Tuple{MATModel}","page":"Function reference","title":"COBREXA.reactions","text":"reactions(m::MATModel)::Vector{String}\n\nExtracts reaction names from rxns key in the MAT file.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.stoichiometry-Tuple{MATModel}","page":"Function reference","title":"COBREXA.stoichiometry","text":"stoichiometry(m::MATModel)\n\nExtract the stoichiometry matrix, stored under key S.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.Metabolite","page":"Function reference","title":"COBREXA.Metabolite","text":"Metabolite structure.\n\nFields\n\nid :: String\nname :: String\nformula :: String\ncharge :: Int\ncompartment :: String\nnotes :: Dict{String, Vector{String}}\nannotation :: Dict{String, Union{Vector{String}, String}}\n\n\n\n\n\n","category":"type"},{"location":"functions/#COBREXA.Reaction","page":"Function reference","title":"COBREXA.Reaction","text":"Reaction struct.\n\nFields\n\nid :: String\nname :: String\nmetabolites :: Dict{Metabolite, Float64}\nlb :: Float64\nub :: Float64\ngrr :: Vector{Vector{Gene}}\nsubsystem :: String\nnotes :: Dict{String, Vector{String}}\nannotation :: Dict{String, Union{Vector{String}, String}}\nobjective_coefficient :: Float64\n\n\n\n\n\n","category":"type"},{"location":"functions/#COBREXA.ReactionStatus","page":"Function reference","title":"COBREXA.ReactionStatus","text":"Used for concise reporting of modeling results.\n\n\n\n\n\n","category":"type"},{"location":"functions/#COBREXA.SBMLModel","page":"Function reference","title":"COBREXA.SBMLModel","text":"struct SBMLModel\n\nThin wrapper around the model from SBML.jl library. Allows easy conversion from SBML to any other model format.\n\n\n\n\n\n","category":"type"},{"location":"functions/#Base.convert-Tuple{Type{SBMLModel}, MetabolicModel}","page":"Function reference","title":"Base.convert","text":"Base.convert(::Type{SBMLModel}, mm::MetabolicModel)\n\nConvert any metabolic model to SBMLModel.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.balance-Tuple{SBMLModel}","page":"Function reference","title":"COBREXA.balance","text":"balance(model::SBMLModel)::SparseVec\n\nBalance vector of a SBMLModel. This is always zero.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.bounds-Tuple{SBMLModel}","page":"Function reference","title":"COBREXA.bounds","text":"bounds(model::SBMLModel)::Tuple{SparseVec,SparseVec}\n\nGet the lower and upper flux bounds of model SBMLModel. Throws DomainError in case if the SBML contains mismatching units.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.genes-Tuple{SBMLModel}","page":"Function reference","title":"COBREXA.genes","text":"genes(model::SBMLModel)::Vector{String}\n\nGet genes of a SBMLModel.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.metabolite_charge-Tuple{SBMLModel, String}","page":"Function reference","title":"COBREXA.metabolite_charge","text":"metabolite_charge(model::SBMLModel, mid::String)::Maybe{Int}\n\nGet charge of a chosen metabolite from SBMLModel.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.metabolite_formula-Tuple{SBMLModel, String}","page":"Function reference","title":"COBREXA.metabolite_formula","text":"metabolite_formula(model::SBMLModel, mid::String)::Maybe{MetaboliteFormula}\n\nGet MetaboliteFormula from a chosen metabolite from SBMLModel.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.metabolites-Tuple{SBMLModel}","page":"Function reference","title":"COBREXA.metabolites","text":"metabolites(model::SBMLModel)::Vector{String}\n\nGet metabolites from a SBMLModel.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.n_genes-Tuple{SBMLModel}","page":"Function reference","title":"COBREXA.n_genes","text":"n_genes(model::SBMLModel)::Int\n\nGet number of genes in SBMLModel.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.n_metabolites-Tuple{SBMLModel}","page":"Function reference","title":"COBREXA.n_metabolites","text":"n_metabolites(model::SBMLModel)::Int\n\nEfficient counting of metabolites in SBMLModel.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.n_reactions-Tuple{SBMLModel}","page":"Function reference","title":"COBREXA.n_reactions","text":"n_reactions(model::SBMLModel)::Int\n\nEfficient counting of reactions in SBMLModel.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.objective-Tuple{SBMLModel}","page":"Function reference","title":"COBREXA.objective","text":"objective(model::SBMLModel)::SparseVec\n\nObjective of the SBMLModel. \n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.reaction_gene_association-Tuple{SBMLModel, String}","page":"Function reference","title":"COBREXA.reaction_gene_association","text":"reaction_gene_association(model::SBMLModel, rid::String)::Maybe{GeneAssociation}\n\nRetrieve the GeneAssociation from SBMLModel.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.reaction_stoichiometry-Tuple{SBMLModel, String}","page":"Function reference","title":"COBREXA.reaction_stoichiometry","text":"reaction_stoichiometry(model::SBMLModel, rxn_id::String)::Dict{String, Float64}\n\nReturn the reaction equation of reaction with id rxn_id in model. The reaction equation maps metabolite ids to their stoichiometric coefficients.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.reactions-Tuple{SBMLModel}","page":"Function reference","title":"COBREXA.reactions","text":"reactions(model::SBMLModel)::Vector{String}\n\nGet reactions from a SBMLModel.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.stoichiometry-Tuple{SBMLModel}","page":"Function reference","title":"COBREXA.stoichiometry","text":"stoichiometry(model::SBMLModel)::SparseMat\n\nRecreate the stoichiometry matrix from the SBMLModel.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.Serialized","page":"Function reference","title":"COBREXA.Serialized","text":"mutable struct Serialized{M <: MetabolicModel}\n m::Maybe{M}\n filename::String\nend\n\nA meta-model that represents a model that is serialized on the disk. The internal model will be loaded on-demand by using any accessor, or by calling precache! directly.\n\n\n\n\n\n","category":"type"},{"location":"functions/#COBREXA.precache!-Tuple{Serialized}","page":"Function reference","title":"COBREXA.precache!","text":"precache!(model::Serialized{MetabolicModel})::Nothing\n\nLoad the Serialized model from disk in case it's not alreadly loaded.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.StandardModel","page":"Function reference","title":"COBREXA.StandardModel","text":"mutable struct StandardModel\n\nStandardModel is used to store a constraint based metabolic model with meta-information. Meta-information is defined as annotation details, which include gene-reaction-rules, formulas, etc.\n\nThis model type seeks to keep as much meta-information as possible, as opposed to CoreModel and CoreModelCoupled, which keep the bare neccessities only. When merging models and keeping meta-information is important, use this as the model type. If meta-information is not important, use the more efficient core model types. See CoreModel and CoreModelCoupled for comparison.\n\nIn this model, reactions, metabolites, and genes are stored in ordered dictionaries indexed by each struct's id field. For example, model.reactions[\"rxn1_id\"] returns a Reaction where the field id equals \"rxn1_id\". This makes adding and removing reactions efficient. \n\nNote that the stoichiometric matrix (or any other core data, e.g. flux bounds) is not stored directly as in CoreModel. When this model type is used in analysis functions, these core data structures are built from scratch each time an analysis function is called. This can cause performance issues if you run many small analysis functions sequentially. Consider using the core model types if performance is critical.\n\nSee also: Reaction, Metabolite, Gene\n\nFields\n\nid :: String\nreactions :: OrderedDict{String, Reaction}\nmetabolites :: OrderedDict{String, Metabolite}\ngenes :: OrderedDict{String, Gene}\n\nExample\n\nmodel = load_model(StandardModel, \"model_location\")\n\n\n\n\n\n","category":"type"},{"location":"functions/#Base.convert-Tuple{Type{StandardModel}, MetabolicModel}","page":"Function reference","title":"Base.convert","text":"Base.convert(::Type{StandardModel}, model::MetabolicModel)\n\nConvert any MetabolicModel into a StandardModel. Note, some data loss may occur since only the generic interface is used during the conversion process.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.balance-Tuple{StandardModel}","page":"Function reference","title":"COBREXA.balance","text":"balance(model::StandardModel)\n\nReturn the balance of the linear problem, i.e. b in Sv = 0 where S is the stoichiometric matrix and v is the flux vector.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.bounds-Tuple{StandardModel}","page":"Function reference","title":"COBREXA.bounds","text":"bounds(model::StandardModel)\n\nReturn the lower and upper bounds, respectively, for reactions in model. Order matches that of the reaction ids returned in reactions().\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.gene_annotations-Tuple{StandardModel, String}","page":"Function reference","title":"COBREXA.gene_annotations","text":"gene_annotations(model::StandardModel, id::String)::Annotations\n\nReturn the annotation associated with gene id in model. Return an empty Dict if not present.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.gene_notes-Tuple{StandardModel, String}","page":"Function reference","title":"COBREXA.gene_notes","text":"gene_notes(model::StandardModel, id::String)::Notes\n\nReturn the notes associated with gene id in model. Return an empty Dict if not present.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.genes-Tuple{StandardModel}","page":"Function reference","title":"COBREXA.genes","text":"genes(model::StandardModel)\n\nReturn a vector of gene id strings in model.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.lower_bounds-Tuple{StandardModel}","page":"Function reference","title":"COBREXA.lower_bounds","text":"lower_bounds(model::StandardModel)\n\nReturn the lower bounds for all reactions in model in sparse format.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.metabolite_annotations-Tuple{StandardModel, String}","page":"Function reference","title":"COBREXA.metabolite_annotations","text":"metabolite_annotations(model::StandardModel, id::String)::Annotations\n\nReturn the annotation associated with metabolite id in model. Return an empty Dict if not present.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.metabolite_charge-Tuple{StandardModel, String}","page":"Function reference","title":"COBREXA.metabolite_charge","text":"metabolite_charge(model::StandardModel, id::String)\n\nReturn the charge associated with metabolite id in model. Return nothing if not present.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.metabolite_compartment-Tuple{StandardModel, String}","page":"Function reference","title":"COBREXA.metabolite_compartment","text":"metabolite_compartment(model::StandardModel, id::String)\n\nReturn compartment associated with metabolite id in model. Return nothing if not present.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.metabolite_formula-Tuple{StandardModel, String}","page":"Function reference","title":"COBREXA.metabolite_formula","text":"metabolite_formula(model::StandardModel, id::String)\n\nReturn the formula of reaction id in model. Return nothing if not present.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.metabolite_notes-Tuple{StandardModel, String}","page":"Function reference","title":"COBREXA.metabolite_notes","text":"metabolite_notes(model::StandardModel, id::String)::Notes\n\nReturn the notes associated with metabolite id in model. Return an empty Dict if not present.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.metabolites-Tuple{StandardModel}","page":"Function reference","title":"COBREXA.metabolites","text":"metabolites(model::StandardModel)\n\nReturn a vector of metabolite id strings contained in model. The order of metabolite strings returned here matches the order used to construct the stoichiometric matrix.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.n_genes-Tuple{StandardModel}","page":"Function reference","title":"COBREXA.n_genes","text":"n_genes(model::StandardModel)\n\nReturn the number of genes in model.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.n_metabolites-Tuple{StandardModel}","page":"Function reference","title":"COBREXA.n_metabolites","text":"n_metabolites(model::StandardModel)\n\nReturn the number of metabolites in model.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.n_reactions-Tuple{StandardModel}","page":"Function reference","title":"COBREXA.n_reactions","text":"n_reactions(model::StandardModel)\n\nReturn the number of reactions contained in model.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.objective-Tuple{StandardModel}","page":"Function reference","title":"COBREXA.objective","text":"objective(model::StandardModel)\n\nReturn sparse objective vector for model.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.reaction_annotations-Tuple{StandardModel, String}","page":"Function reference","title":"COBREXA.reaction_annotations","text":"reaction_annotations(model::StandardModel, id::String)::Annotations\n\nReturn the annotation associated with reaction id in model. Return an empty Dict if not present.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.reaction_gene_association-Tuple{StandardModel, String}","page":"Function reference","title":"COBREXA.reaction_gene_association","text":"reaction_gene_association(model::StandardModel, id::String)\n\nReturn the gene reaction rule in string format for reaction with id in model. Return nothing if not available.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.reaction_notes-Tuple{StandardModel, String}","page":"Function reference","title":"COBREXA.reaction_notes","text":"reaction_notes(model::StandardModel, id::String)::Notes\n\nReturn the notes associated with reaction id in model. Return an empty Dict if not present.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.reaction_stoichiometry-Tuple{StandardModel, String}","page":"Function reference","title":"COBREXA.reaction_stoichiometry","text":"reaction_stoichiometry(model::StandardModel, rxn_id::String)::Dict{String, Float64}\n\nReturn the reaction equation of reaction with id rxn_id in model. The reaction equation maps metabolite ids to their stoichiometric coefficients.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.reaction_subsystem-Tuple{StandardModel, String}","page":"Function reference","title":"COBREXA.reaction_subsystem","text":"reaction_subsystem(id::String, model::StandardModel)\n\nReturn the subsystem associated with reaction id in model. Return nothing if not present.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.reactions-Tuple{StandardModel}","page":"Function reference","title":"COBREXA.reactions","text":"reactions(model::StandardModel)\n\nReturn a vector of reaction id strings contained in model. The order of reaction ids returned here matches the order used to construct the stoichiometric matrix.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.stoichiometry-Tuple{StandardModel}","page":"Function reference","title":"COBREXA.stoichiometry","text":"stoichiometry(model::StandardModel)\n\nReturn the stoichiometric matrix associated with model in sparse format.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.upper_bounds-Tuple{StandardModel}","page":"Function reference","title":"COBREXA.upper_bounds","text":"upper_bounds(model::StandardModel)\n\nReturn the upper bounds for all reactions in model in sparse format. Order matches that of the reaction ids returned in reactions().\n\n\n\n\n\n","category":"method"},{"location":"functions/#Base-functions","page":"Function reference","title":"Base functions","text":"","category":"section"},{"location":"functions/","page":"Function reference","title":"Function reference","text":"Modules = [COBREXA]\nPages = map(file -> joinpath(\"base\", file), readdir(\"../src/base\"))","category":"page"},{"location":"functions/#COBREXA._constants","page":"Function reference","title":"COBREXA._constants","text":"A named tuple that contains the magic values that are used globally for whatever purposes.\n\n\n\n\n\n","category":"constant"},{"location":"functions/#COBREXA.get_bound_vectors-Tuple{Any}","page":"Function reference","title":"COBREXA.get_bound_vectors","text":"get_bound_vectors(opt_model)\n\nReturns vectors of the lower and upper bounds of opt_model constraints, where opt_model is a JuMP model constructed by e.g. make_optimization_model or flux_balance_analysis.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.is_solved-Tuple{Any}","page":"Function reference","title":"COBREXA.is_solved","text":"is_solved(optmodel)\n\nReturn true if optmodel solved successfully (solution is optimal or locally optimal). Return false if any other termination status is reached. Termination status is defined in the documentation of JuMP.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.make_optimization_model-Tuple{MetabolicModel, Any}","page":"Function reference","title":"COBREXA.make_optimization_model","text":"make_optimization_model(\n model::MetabolicModel,\n optimizer;\n sense = MOI.MAX_SENSE,\n)\n\nConvert MetabolicModels to a JuMP model, place objectives and the equality constraint.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.optimize_model-Tuple{MetabolicModel, Any}","page":"Function reference","title":"COBREXA.optimize_model","text":"optimize_model(\n model::MetabolicModel,\n optimizer;\n sense = MOI.MIN_SENSE,\n)\n\nUse JuMP to solve an instance of CoreModel\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.set_bound-Tuple{Any, Any}","page":"Function reference","title":"COBREXA.set_bound","text":"set_bound(index, optimization_model;\n ub=_constants.default_reaction_rate,\n lb=-_constants.default_reaction_rate)\n\nHelper function to set the bounds of variables. The JuMP set_normalized_rhs function is a little confusing, so this function simplifies setting constraints. In short, JuMP uses a normalized right hand side representation of constraints, which means that lower bounds have their sign flipped. This function does this for you, so you don't have to remember to do this whenever you change the constraints. \n\nJust supply the constraint index and the JuMP model (opt_model) that will be solved, and the variable's bounds will be set to ub and lb.\n\n\n\n\n\n","category":"method"},{"location":"functions/#File-I/O-and-serialization","page":"Function reference","title":"File I/O and serialization","text":"","category":"section"},{"location":"functions/","page":"Function reference","title":"Function reference","text":"Modules = [COBREXA]\nPages = map(file -> joinpath(\"io\", file), readdir(\"../src/io\"))","category":"page"},{"location":"functions/#COBREXA.load_model-Tuple{String}","page":"Function reference","title":"COBREXA.load_model","text":"load_model(file_name::String)::MetabolicModel\n\nGeneric function for loading models that chooses a specific loader function from the file_name extension, or throws an error.\n\nCurrently, these model types are supported:\n\nSBML models (*.xml, loaded with load_sbml_model)\nJSON models (*.json, loaded with load_json_model)\nMATLAB models (*.mat, loaded with load_mat_model)\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.load_model-Union{Tuple{T}, Tuple{Type{T}, String}} where T<:MetabolicModel","page":"Function reference","title":"COBREXA.load_model","text":"load_model(type::Type{T}, file_name::String)::T where T\n\nHelper function tht loads the model using load_model and return it converted to type.\n\nExample:\n\nload_model(CoreModel, \"mySBMLModel.xml\")\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.save_model-Tuple{MetabolicModel, String}","page":"Function reference","title":"COBREXA.save_model","text":"save_model(model::MetabolicModel, file_name::String)\n\nGeneric function for saving models that chooses a specific writer function from the file_name extension, or throws an error.\n\nCurrently, these model types are supported:\n\nJSON models (*.json, loaded with save_json_model)\nMATLAB models (*.mat, loaded with save_mat_model)\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.load_json_model-Tuple{String}","page":"Function reference","title":"COBREXA.load_json_model","text":"load_json_model(filename::String)::JSONModel\n\nLoad and return a JSON-formatted model that is stored in file_name.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.save_json_model-Tuple{MetabolicModel, String}","page":"Function reference","title":"COBREXA.save_json_model","text":"save_json_model(model::MetabolicModel, file_name::String)\n\nSave a JSONModel in model to a JSON file file_name.\n\nIn case the model is not JSONModel, it will be converted automatically.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.load_mat_model-Tuple{String}","page":"Function reference","title":"COBREXA.load_mat_model","text":"load_mat_model(file_name::String)\n\nLoad and return a MATLAB file file_name that contains a COBRA-compatible model.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.save_mat_model-Tuple{MetabolicModel, String}","page":"Function reference","title":"COBREXA.save_mat_model","text":"save_mat_model(model::MetabolicModel, file_name::String; model_name::String=\"model\")\n\nSave a MATModel in model to a MATLAB file file_name in a format compatible with other MATLAB-based COBRA software.\n\nIn case the model is not MATModel, it will be converted automatically.\n\nmodel_name is the identifier name for the whole model written to the MATLAB file; defaults to just \"model\".\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.load_sbml_model-Tuple{String}","page":"Function reference","title":"COBREXA.load_sbml_model","text":"load_sbml_model(file_name::String)::SBMLModel\n\nLoad and return a SBML XML model in file_name.\n\n\n\n\n\n","category":"method"},{"location":"functions/#Pretty-printing","page":"Function reference","title":"Pretty printing","text":"","category":"section"},{"location":"functions/","page":"Function reference","title":"Function reference","text":"Modules = [COBREXA]\nPages = map(file -> joinpath(\"io\", \"show\", file), readdir(\"../src/io/show\"))","category":"page"},{"location":"functions/#Base.show-Tuple{IO, MIME{Symbol(\"text/plain\")}, MetabolicModel}","page":"Function reference","title":"Base.show","text":"Pretty printing of everything metabolic-modelish.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA._pretty_substances-Tuple{Vector{String}}","page":"Function reference","title":"COBREXA._pretty_substances","text":"_pretty_substances(ss::Vector{String})::String\n\nNicely format a substance list.\n\n\n\n\n\n","category":"method"},{"location":"functions/#Base.show-Union{Tuple{M}, Tuple{IO, MIME{Symbol(\"text/plain\")}, Serialized{M}}} where M","page":"Function reference","title":"Base.show","text":"Base.show(io::IO, ::MIME\"text/plain\", m::Serialized{M}) where {M}\n\nShow the Serialized model without unnecessarily loading it.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA._pretty_print_keyvals-Tuple{Any, String, Any}","page":"Function reference","title":"COBREXA._pretty_print_keyvals","text":"_pretty_print_keyvals(io, def::String, payload; kwargs...)\n\nNicely prints keys and values.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA._pretty_print_keyvals-Tuple{Any, String, Dict}","page":"Function reference","title":"COBREXA._pretty_print_keyvals","text":"_pretty_print_keyvals(\n io,\n def::String,\n payload::Dict\n)\n\nSpecialization of _pretty_print_keyvals for dictionaries.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA._pretty_print_keyvals-Tuple{Any, String, String}","page":"Function reference","title":"COBREXA._pretty_print_keyvals","text":"_pretty_print_keyvals(\n io,\n def::String,\n payload::String\n)\n\nSpecialization of _pretty_print_keyvals for plain strings.\n\n\n\n\n\n","category":"method"},{"location":"functions/#Model-reconstruction","page":"Function reference","title":"Model reconstruction","text":"","category":"section"},{"location":"functions/","page":"Function reference","title":"Function reference","text":"Modules = [COBREXA]\nPages = map(file -> joinpath(\"reconstruction\", file), readdir(\"../src/reconstruction\"))","category":"page"},{"location":"functions/#COBREXA.add_reactions-Tuple{CoreModel, CoreModel}","page":"Function reference","title":"COBREXA.add_reactions","text":"add_reactions(m1::CoreModel, m2::CoreModel; check_consistency = false)\n\nAdd all reactions from m2 to m1.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.add_reactions-Union{Tuple{K}, Tuple{V2}, Tuple{V1}, Tuple{CoreModel, V1, V2, AbstractFloat, AbstractFloat, AbstractFloat, String, K}} where {V1<:AbstractVector{Float64}, V2<:AbstractVector{Float64}, K<:AbstractVector{String}}","page":"Function reference","title":"COBREXA.add_reactions","text":"add_reactions(\n m::CoreModel,\n s::V1,\n b::V2,\n c::AbstractFloat,\n xl::AbstractFloat,\n xu::AbstractFloat,\n rxn::String,\n mets::K;\n check_consistency = false,\n) where {V1<:VecType,V2<:VecType,K<:StringVecType}\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.add_reactions-Union{Tuple{K}, Tuple{V}, Tuple{M}, Tuple{CoreModel, M, V, V, V, V, K, K}} where {M<:AbstractMatrix{Float64}, V<:AbstractVector{Float64}, K<:AbstractVector{String}}","page":"Function reference","title":"COBREXA.add_reactions","text":"add_reactions(\n m::CoreModel,\n Sp::M,\n b::V,\n c::V,\n xl::V,\n xu::V,\n rxns::K,\n mets::K;\n check_consistency = false,\n) where {M<:MatType,V<:VecType,K<:StringVecType}\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.add_reactions-Union{Tuple{V2}, Tuple{V1}, Tuple{CoreModel, V1, V2, AbstractFloat, AbstractFloat, AbstractFloat}} where {V1<:AbstractVector{Float64}, V2<:AbstractVector{Float64}}","page":"Function reference","title":"COBREXA.add_reactions","text":"add_reactions(\n m::CoreModel,\n s::V1,\n b::V2,\n c::AbstractFloat,\n xl::AbstractFloat,\n xu::AbstractFloat;\n check_consistency = false,\n) where {V1<:VecType,V2<:VecType}\n\nAdd reaction(s) to a CoreModel model m.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.add_reactions-Union{Tuple{V}, Tuple{M}, Tuple{CoreModel, M, V, V, V, V}} where {M<:AbstractMatrix{Float64}, V<:AbstractVector{Float64}}","page":"Function reference","title":"COBREXA.add_reactions","text":"add_reactions(\n m::CoreModel,\n Sp::M,\n b::V,\n c::V,\n xl::V,\n xu::V;\n check_consistency = false,\n) where {M<:MatType,V<:VecType}\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.change_bounds!-Union{Tuple{V}, Tuple{CoreModel, Vector{Int64}}} where V<:AbstractVector{Float64}","page":"Function reference","title":"COBREXA.change_bounds!","text":"change_bounds!(\n model::CoreModel,\n rxns::Vector{Int};\n xl::V = Float64[],\n xu::V = Float64[],\n) where {V<:VecType}\n\nChange the lower and/or upper bounds ('xl' and 'xu') for given reactions.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.change_bounds!-Union{Tuple{V}, Tuple{CoreModel, Vector{String}}} where V<:AbstractVector{Float64}","page":"Function reference","title":"COBREXA.change_bounds!","text":"change_bounds!(\n model::CoreModel,\n rxns::Vector{String};\n xl::V = Float64[],\n xu::V = Float64[],\n) where {V<:VecType}\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.remove_metabolites-Tuple{CoreModel, Any}","page":"Function reference","title":"COBREXA.remove_metabolites","text":"remove_metabolites(model::CoreModel, metabolites)\n\nRemoves a set of metabolites from the model of type CoreModel and returns a new CoreModel without those metabolites. Here, metabolites can be either a string, a vector of strings, an index or a vector of indices. Also removes any reactions that have no associated metabolites after the metabolites have been removed.\n\nExample\n\nmodel = load_model(CoreModel, \"e_coli_core.json\")\n\nm1 = remove_metabolites(model, [\"glc__D_e\", \"for_c\"])\nm2 = remove_metabolites(model, \"glc__D_e\")\nm3 = remove_metabolites(model, indexin([\"glc__D_e\", \"for_c\"], metabolites(model)))\nm4 = remove_metabolites(model, first(indexin([\"glc__D_e\"], metabolites(model))))\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.remove_reactions-Tuple{CoreModel, Integer}","page":"Function reference","title":"COBREXA.remove_reactions","text":"remove_reactions(m::CoreModel, rxn::Integer)\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.remove_reactions-Tuple{CoreModel, String}","page":"Function reference","title":"COBREXA.remove_reactions","text":"remove_reactions(m::CoreModel, rxn::String)\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.remove_reactions-Tuple{CoreModel, Vector{Int64}}","page":"Function reference","title":"COBREXA.remove_reactions","text":"Removes a set of reactions from a CoreModel. Also removes the metabolites not involved in any reaction.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.remove_reactions-Tuple{CoreModel, Vector{String}}","page":"Function reference","title":"COBREXA.remove_reactions","text":"remove_reactions(m::CoreModel, rxns::Vector{String})\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.verify_consistency-Union{Tuple{K}, Tuple{V}, Tuple{M}, Tuple{CoreModel, M, V, V, V, V, K, K, Any, Any}} where {M<:AbstractMatrix{Float64}, V<:AbstractVector{Float64}, K<:AbstractVector{String}}","page":"Function reference","title":"COBREXA.verify_consistency","text":"verify_consistency(\n m::CoreModel,\n Sp::M,\n b::V,\n c::V,\n xl::V,\n xu::V,\n names::K,\n mets::K,\n new_reactions,\n new_metabolites,\n) where {M<:MatType,V<:VecType,K<:StringVecType}\n\nCheck the consistency of given reactions with existing reactions in m.\n\nTODO: work in progress, doesn't return consistency status.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.add_coupling_constraints!-Tuple{CoreModelCoupled, AbstractVector{Float64}, AbstractFloat, AbstractFloat}","page":"Function reference","title":"COBREXA.add_coupling_constraints!","text":"add_coupling_constraints!(\n m::CoreModelCoupled,\n c::VecType,\n cl::AbstractFloat,\n cu::AbstractFloat,\n)\n\nOverload for adding a single coupling constraint.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.add_coupling_constraints!-Union{Tuple{V}, Tuple{CoreModelCoupled, AbstractMatrix{Float64}, V, V}} where V<:AbstractVector{Float64}","page":"Function reference","title":"COBREXA.add_coupling_constraints!","text":"add_coupling_constraints!(\n m::CoreModelCoupled,\n C::MatType,\n cl::V,\n cu::V,\n) where {V<:VecType}\n\nIn-place add a single coupling constraint in form\n\n câ‚— ≤ C x ≤ cᵤ\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.add_coupling_constraints-Tuple{CoreModel, Vararg{Any, N} where N}","page":"Function reference","title":"COBREXA.add_coupling_constraints","text":"add_coupling_constraints(m::CoreModel, args...)\n\nAdd coupling constraints to a plain CoreModel (returns a CoreModelCoupled).\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.add_coupling_constraints-Tuple{CoreModelCoupled, Vararg{Any, N} where N}","page":"Function reference","title":"COBREXA.add_coupling_constraints","text":"Add constraints of the following form to a CoreModelCoupled and return a modified one.\n\nAdd constraints to a CoreModelCoupled and return a modified one.\n\nThe arguments are same as for in-place add_coupling_constraints!.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.add_reactions-Tuple{CoreModelCoupled, CoreModel}","page":"Function reference","title":"COBREXA.add_reactions","text":"add_reactions(m1::CoreModelCoupled, m2::CoreModel; check_consistency = false)\n\nAdd all reactions from m2 to m1.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.add_reactions-Union{Tuple{K}, Tuple{V2}, Tuple{V1}, Tuple{CoreModelCoupled, V1, V2, AbstractFloat, AbstractFloat, AbstractFloat, String, K}} where {V1<:AbstractVector{Float64}, V2<:AbstractVector{Float64}, K<:AbstractVector{String}}","page":"Function reference","title":"COBREXA.add_reactions","text":"add_reactions(\n m::CoreModelCoupled,\n s::V1,\n b::V2,\n c::AbstractFloat,\n xl::AbstractFloat,\n xu::AbstractFloat,\n rxn::String,\n mets::K;\n check_consistency = false,\n) where {V1<:VecType,V2<:VecType,K<:StringVecType}\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.add_reactions-Union{Tuple{K}, Tuple{V}, Tuple{M}, Tuple{CoreModelCoupled, M, V, V, V, V, K, K}} where {M<:AbstractMatrix{Float64}, V<:AbstractVector{Float64}, K<:AbstractVector{String}}","page":"Function reference","title":"COBREXA.add_reactions","text":"add_reactions(\n m::CoreModelCoupled,\n Sp::M,\n b::V,\n c::V,\n xl::V,\n xu::V,\n rxns::K,\n mets::K;\n check_consistency = false,\n) where {M<:MatType,V<:VecType,K<:StringVecType}\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.add_reactions-Union{Tuple{V2}, Tuple{V1}, Tuple{CoreModelCoupled, V1, V2, AbstractFloat, AbstractFloat, AbstractFloat}} where {V1<:AbstractVector{Float64}, V2<:AbstractVector{Float64}}","page":"Function reference","title":"COBREXA.add_reactions","text":"add_reactions(\n m::CoreModelCoupled,\n s::V1,\n b::V2,\n c::AbstractFloat,\n xl::AbstractFloat,\n xu::AbstractFloat;\n check_consistency = false,\n) where {V1<:VecType,V2<:VecType}\n\nAdd reaction(s) to a CoreModelCoupled model m.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.add_reactions-Union{Tuple{V}, Tuple{M}, Tuple{CoreModelCoupled, M, V, V, V, V}} where {M<:AbstractMatrix{Float64}, V<:AbstractVector{Float64}}","page":"Function reference","title":"COBREXA.add_reactions","text":"add_reactions(\n m::CoreModelCoupled,\n Sp::M,\n b::V,\n c::V,\n xl::V,\n xu::V;\n check_consistency = false,\n) where {M<:MatType,V<:VecType}\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.change_bounds!-Union{Tuple{V}, Tuple{CoreModelCoupled, Vector{Int64}}} where V<:AbstractVector{Float64}","page":"Function reference","title":"COBREXA.change_bounds!","text":"change_bounds!(\n model::CoreModelCoupled,\n rxns::Vector{Int};\n xl::V = Float64[],\n xu::V = Float64[],\n)\n\nChange the lower and/or upper bounds ('xl' and 'xu') for given reactions.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.change_bounds!-Union{Tuple{V}, Tuple{CoreModelCoupled, Vector{String}}} where V<:AbstractVector{Float64}","page":"Function reference","title":"COBREXA.change_bounds!","text":"change_bounds!(\n model::CoreModelCoupled,\n rxns::Vector{String};\n xl::V = Float64[],\n xu::V = Float64[],\n) where {V<:VecType}\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.change_coupling_bounds!-Union{Tuple{V}, Tuple{CoreModelCoupled, Vector{Int64}}} where V<:AbstractVector{Float64}","page":"Function reference","title":"COBREXA.change_coupling_bounds!","text":"change_coupling_bounds!(\n model::CoreModelCoupled,\n constraints::Vector{Int};\n cl::V = Float64[],\n cu::V = Float64[],\n) where {V<:VecType}\n\nChange the lower and/or upper bounds (cl and cu) for the given list of coupling constraints.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.find_exchange_metabolites-Tuple{CoreModelCoupled}","page":"Function reference","title":"COBREXA.find_exchange_metabolites","text":"find_exchange_metabolites(\n model::CoreModelCoupled;\n exclude_biomass = false,\n biomass_str::String = \"biomass\",\n exc_prefs = [\"EX_\"; \"Exch_\"; \"Ex_\"],\n)\n\nGet indices of exchanged metabolites.\n\nIn practice returns the metabolites consumed by the reactions given by find_exchange_reactions and if called with the same arguments, the two outputs correspond.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.find_exchange_reactions-Tuple{CoreModelCoupled}","page":"Function reference","title":"COBREXA.find_exchange_reactions","text":"find_exchange_reactions(\n model::CoreModelCoupled;\n exclude_biomass = false,\n biomass_str::String = \"biomass\",\n exc_prefs = [\"EX_\"; \"Exch_\"; \"Ex_\"],\n)\n\nGet indices of exchange reactions.\n\nExchange reactions are identified based on most commonly used prefixes.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.remove_coupling_constraints!-Tuple{CoreModelCoupled, Int64}","page":"Function reference","title":"COBREXA.remove_coupling_constraints!","text":"remove_coupling_constraints!(m::CoreModelCoupled, constraint::Int)\n\nRemoves a single coupling constraints from a CoreModelCoupled in-place.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.remove_coupling_constraints!-Tuple{CoreModelCoupled, Vector{Int64}}","page":"Function reference","title":"COBREXA.remove_coupling_constraints!","text":"remove_coupling_constraints!(m::CoreModelCoupled, constraints::Vector{Int})\n\nRemoves a set of coupling constraints from a CoreModelCoupled in-place.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.remove_coupling_constraints-Tuple{CoreModelCoupled, Vararg{Any, N} where N}","page":"Function reference","title":"COBREXA.remove_coupling_constraints","text":"remove_coupling_constraints(m::CoreModelCoupled, args...)\n\nRemove coupling constraints from the linear model, and return the modified model. Arguments are the same as for in-place version remove_coupling_constraints!.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.remove_reactions-Tuple{CoreModelCoupled, Integer}","page":"Function reference","title":"COBREXA.remove_reactions","text":"remove_reactions(m::CoreModelCoupled, rxn::Integer)\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.remove_reactions-Tuple{CoreModelCoupled, String}","page":"Function reference","title":"COBREXA.remove_reactions","text":"remove_reactions(m::CoreModelCoupled, rxn::String)\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.remove_reactions-Tuple{CoreModelCoupled, Vector{Int64}}","page":"Function reference","title":"COBREXA.remove_reactions","text":"remove_reactions(m::CoreModelCoupled, rxns::Vector{Int})\n\nRemove reaction(s) from a CoreModelCoupled.\n\nAlso removes any metabolites not involved in any reaction after the deletion.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.remove_reactions-Tuple{CoreModelCoupled, Vector{String}}","page":"Function reference","title":"COBREXA.remove_reactions","text":"remove_reactions(m::CoreModelCoupled, rxns::Vector{String})\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.:⟵-Tuple{Union{Nothing, Metabolite, MetaboliteWithCoefficient, Vector{MetaboliteWithCoefficient}}, Union{Nothing, Metabolite, MetaboliteWithCoefficient, Vector{MetaboliteWithCoefficient}}}","page":"Function reference","title":"COBREXA.:⟵","text":"⟵(\n substrates::Union{\n Nothing,\n Metabolite,\n MetaboliteWithCoefficient,\n Vector{MetaboliteWithCoefficient},\n },\n products::Union{\n Nothing,\n Metabolite,\n MetaboliteWithCoefficient,\n Vector{MetaboliteWithCoefficient}\n },\n)\n\nMake a reverse-only Reaction from substrates and products. An equivalent alternative is â†.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.:⟶-Tuple{Union{Nothing, Metabolite, MetaboliteWithCoefficient, Vector{MetaboliteWithCoefficient}}, Union{Nothing, Metabolite, MetaboliteWithCoefficient, Vector{MetaboliteWithCoefficient}}}","page":"Function reference","title":"COBREXA.:⟶","text":"⟶(\n substrates::Union{\n Nothing,\n Metabolite,\n MetaboliteWithCoefficient,\n Vector{MetaboliteWithCoefficient},\n },\n products::Union{\n Nothing, \n Metabolite,\n MetaboliteWithCoefficient,\n Vector{MetaboliteWithCoefficient}\n },\n)\n\nMake a forward-only Reaction from substrates and products. An equivalent alternative is →.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.:⟷-Tuple{Union{Nothing, Metabolite, MetaboliteWithCoefficient, Vector{MetaboliteWithCoefficient}}, Union{Nothing, Metabolite, MetaboliteWithCoefficient, Vector{MetaboliteWithCoefficient}}}","page":"Function reference","title":"COBREXA.:⟷","text":"⟷(\n substrates::Union{\n Nothing,\n Metabolite,\n MetaboliteWithCoefficient,\n Vector{MetaboliteWithCoefficient},\n },\n products::Union{\n Nothing,\n Metabolite,\n MetaboliteWithCoefficient,\n Vector{MetaboliteWithCoefficient}\n },\n)\n\nMake a bidirectional (reversible) Reaction from substrates and products. An equivalent alternative is ↔.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.add_gene!-Tuple{StandardModel, Gene}","page":"Function reference","title":"COBREXA.add_gene!","text":"add_gene!(model::StandardModel, genes::Gene)\n\nAdd gene to model based on gene id.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.add_genes!-Tuple{StandardModel, Vector{Gene}}","page":"Function reference","title":"COBREXA.add_genes!","text":"add_genes!(model::StandardModel, genes::Vector{Gene})\n\nAdd genes to model based on gene id.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.add_metabolite!-Tuple{StandardModel, Metabolite}","page":"Function reference","title":"COBREXA.add_metabolite!","text":"add_metabolite!(model::StandardModel, met::Metabolite)\n\nAdd met to model based on metabolite id.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.add_metabolites!-Tuple{StandardModel, Vector{Metabolite}}","page":"Function reference","title":"COBREXA.add_metabolites!","text":"add_metabolites!(model::StandardModel, mets::Vector{Metabolite})\n\nAdd mets to model based on metabolite id.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.add_reaction!-Tuple{StandardModel, Reaction}","page":"Function reference","title":"COBREXA.add_reaction!","text":"add_reaction!(model::StandardModel, rxn::Reaction)\n\nAdd rxn to model based on reaction id.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.add_reactions!-Tuple{StandardModel, Vector{Reaction}}","page":"Function reference","title":"COBREXA.add_reactions!","text":"add_reactions!(model::StandardModel, rxns::Vector{Reaction})\n\nAdd rxns to model based on reaction id.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.remove_gene!-Tuple{StandardModel, String}","page":"Function reference","title":"COBREXA.remove_gene!","text":"remove_gene!(\n model::StandardModel,\n id::Vector{String};\n knockout_reactions::Bool = false,\n)\n\nRemove gene with id from model. If knockout_reactions is true, then also constrain reactions that require the genes to function to carry zero flux.\n\nExample\n\nremove_gene!(model, \"g1\")\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.remove_genes!-Tuple{StandardModel, Vector{String}}","page":"Function reference","title":"COBREXA.remove_genes!","text":"remove_genes!(\n model::StandardModel,\n ids::Vector{String};\n knockout_reactions::Bool = false,\n)\n\nRemove all genes with ids from model. If knockout_reactions is true, then also constrain reactions that require the genes to function to carry zero flux.\n\nExample\n\nremove_genes!(model, [\"g1\", \"g2\"])\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.remove_metabolite!-Tuple{StandardModel, String}","page":"Function reference","title":"COBREXA.remove_metabolite!","text":"remove_metabolite!(model::StandardModel, id::String)\n\nRemove metabolite with id from model. Warning, this could leave the model inconsistent, e.g. a reaction might require the deleted metabolite, in which case analysis functions will error.\n\nExample\n\nremove_metabolite!(model, \"atp_c\")\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.remove_metabolites!-Tuple{StandardModel, Vector{String}}","page":"Function reference","title":"COBREXA.remove_metabolites!","text":"remove_metabolites!(model::StandardModel, ids::Vector{String})\n\nRemove all metabolites with ids from model. Warning, this could leave the model inconsistent, e.g. a reaction might require the deleted metabolite, in which case analysis functions will error.\n\nExample\n\nremove_metabolites!(model, [\"atp_c\", \"adp_c\"])\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.remove_reaction!-Tuple{StandardModel, String}","page":"Function reference","title":"COBREXA.remove_reaction!","text":"remove_reaction!(model::StandardModel, id::String)\n\nRemove reaction with id from model. Note, may result in orphan metabolites.\n\nExample\n\nremove_reaction!(model, \"EX_glc__D_e\")\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.remove_reactions!-Tuple{StandardModel, Vector{String}}","page":"Function reference","title":"COBREXA.remove_reactions!","text":"remove_reactions!(model::StandardModel, ids::Vector{String})\n\nRemove all reactions with ids from model. Note, may result in orphan metabolites.\n\nExample\n\nremove_reactions!(model, [\"EX_glc__D_e\", \"fba\"])\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.@add_reactions!-Tuple{Symbol, Expr}","page":"Function reference","title":"COBREXA.@add_reactions!","text":"@add_reactions!(model::Symbol, ex::Expr)\n\nShortcut to add multiple reactions and their lower and upper bounds\n\nCall variants\n\n@add_reactions! model begin\n reaction_name, reaction\nend\n\n@add_reactions! model begin\n reaction_name, reaction, lower_bound\nend\n\n@add_reactions! model begin\n reaction_name, reaction, lower_bound, upper_bound\nend\n\nExamples\n\n@add_reactions! model begin\n \"v1\", nothing ⟶ A, 0, 500\n \"v2\", A ⟷ B + C, -500\n \"v3\", B + C ⟶ nothing\nend\n\n\n\n\n\n","category":"macro"},{"location":"functions/#COBREXA.add_model_with_exchanges-Tuple{CoreModel, MetabolicModel, Vector{String}, Vector{String}}","page":"Function reference","title":"COBREXA.add_model_with_exchanges","text":"add_model_with_exchanges(\n community::CoreModel,\n model::MetabolicModel,\n exchange_rxn_ids::Vector{String},\n exchange_met_ids::Vector{String};\n model_name = \"unknown_species\",\n biomass_id = nothing,\n)::CoreModel\n\nAdd model to community, which is a pre-existing community model with exchange_rxn_ids and exchange_met_ids. The model_name is appended to each reaction and metabolite, see join. If biomass_id is specified then a biomass metabolite for model is also added to the resulting model. The column corresponding to the biomass_id reaction then produces this new biomass metabolite with unit coefficient. Note, exchange_rxn_ids and exchange_met_ids must already exist in the community model.\n\nExample\n\ncommunity = add_model_with_exchanges(community, model, exchange_rxn_ids, exchange_met_ids; model_name=\"species_2\", biomass_id=\"BIOMASS_Ecoli_core_w_GAM\")\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.add_objective!-Tuple{CoreModel, Vector{String}}","page":"Function reference","title":"COBREXA.add_objective!","text":"add_objective!(\n community::CoreModel,\n objective_mets::Vector{String};\n objective_weights = Float64[],\n objective_column_index = 0,\n)\n\nAdd an objective to the community model. Supply the string names of the objective metabolites in objective_mets. Optionally specify the weight to assign each metabolite in the objective function, if unassigned then equal weight is assumed. Also, optionally specify whether the objective already exists in the model by assigning objective_column_index. If unassigned then an objective column will be added, otherwise the column at objective_column_index will be updated.\n\nNote, the weights are negated inside the function so that the objective metabolites are seen as reagents/substrates, not products in the reaction equation. \n\nExample\n\nadd_objective!(model, [\"met1\", \"met2\"]) # adds a new column with weights = [1,1]\nadd_objective!(model, [\"met1\", \"met2\"]; objective_weights=[0.1, 0.9]) # adds a new column\nadd_objective!(model, [\"met1\", \"met2\"]; objective_weights=[0.1, 0.9], objective_column_index=10) # updates column 10\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.join_with_exchanges-Union{Tuple{M}, Tuple{Vector{M}, Vector{String}, Vector{String}}} where M<:MetabolicModel","page":"Function reference","title":"COBREXA.join_with_exchanges","text":"join_with_exchanges(models::Vector{M}, \n exchange_rxn_ids::Vector{String}, \n exchange_met_ids::Vector{String}; \n add_biomass_objective=false, \n biomass_ids::Vector{String}, \n model_names=String[]\n)\n\nReturn a CoreModel representing the community model of models joined through their exchange_rxn_ids and exchange_met_ids. These exchange reactions and metabolites link to environmental metabolites and reactions. Optionally specify model_names to append a specific name to each reaction and metabolite of an organism for easier reference (default is species_i for each model index i in models). Note, the bounds of the environmental variables are all set to zero. Thus, to run a simulation you need to constrain them appropriately. All the other bounds are inherited from the models used to construct the community model.\n\nIf add_biomass_objective is true then biomass_ids needs to be supplied as well. This creates a model with an extra reaction added to the end of the stoichiometric matrix (last column) that can be assigned as the objective reaction. It also creates biomass \"metabolites\" that can be used in this objective reaction. Note, this reaction is unspecified, further action needs to be taken to specify it, e.g. assign weights to the last column of the stoichiometric matrix in the rows corresponding to the biomass metabolites.\n\nTo further clarify how this join works. Suppose you have 2 organisms with stoichiometric matrices Sâ‚ and Sâ‚‚ and you want to link them with exchange_met_ids = [emâ‚, emâ‚‚, em₃, ...] and exchange_rxn_ids = [erâ‚, erâ‚‚, er₃, ...]. Then a new community stoichiometric matrix is constructed that looks like this:\n\n _ erâ‚ erâ‚‚ er₃ ... b_\n |Sâ‚ |\n | Sâ‚‚ |\n emâ‚| |\nS = emâ‚‚| |\n em₃| |\n ...| |\n bmâ‚| | \n bmâ‚‚|_ _|\n\n\nThe exchange reactions in each model get linked to environmental metabolites, emáµ¢, and these get linked to environmental exchanges, eráµ¢. These eráµ¢ behave like normal single organism exchange reactions. When add_biomass_objective is true each model's biomass becomes a pseudo-metabolite (bmáµ¢). These can be weighted in column b, called the community_biomass reaction in the community model, if desired. Refer to the tutorial if this is unclear.\n\nExample\n\nm1 = load_model(core_model_path)\nm2 = load_model(CoreModel, core_model_path)\n\n# need to list ALL the exchanges that will form part of the entire model\nexchange_rxn_ids = filter(looks_like_exchange_reaction, reactions(m1))\nexchange_met_ids = [first(keys(reaction_stoichiometry(m1, ex_rxn))) for ex_rxn in exchange_rxn_ids]\n\nbiomass_ids = [\"BIOMASS_Ecoli_core_w_GAM\", \"BIOMASS_Ecoli_core_w_GAM\"]\n\ncommunity = join_with_exchanges(\n [m1, m2],\n exchange_rxn_ids,\n exchange_met_ids;\n add_biomass_objective = true,\n biomass_ids = biomass_ids,\n)\n\n\n\n\n\n","category":"method"},{"location":"functions/#Analysis-functions","page":"Function reference","title":"Analysis functions","text":"","category":"section"},{"location":"functions/","page":"Function reference","title":"Function reference","text":"Modules = [COBREXA]\nPages = map(file -> joinpath(\"analysis\", file), readdir(\"../src/analysis\"))","category":"page"},{"location":"functions/#COBREXA.flux_balance_analysis-Union{Tuple{M}, Tuple{M, Any}} where M<:MetabolicModel","page":"Function reference","title":"COBREXA.flux_balance_analysis","text":"flux_balance_analysis(\n model::M,\n optimizer;\n modifications = [],\n) where {M<:MetabolicModel}\n\nRun flux balance analysis (FBA) on the model optionally specifying modifications to the problem. Basically, FBA solves this optimization problem:\n\nmax cáµ€x\ns.t. S x = b\n xâ‚— ≤ x ≤ xᵤ\n\nSee \"Orth, J., Thiele, I. & Palsson, B. What is flux balance analysis?. Nat Biotechnol 28, 245–248 (2010). https://doi.org/10.1038/nbt.1614\" for more information.\n\nThe optimizer must be set to a JuMP-compatible optimizer, such as GLPK.Optimizer or Tulip.Optimizer\n\nOptionally, you may specify one or more modifications to be applied to the model before the analysis, such as change_optimizer_attribute,change_objective, and change_sense.\n\nReturns an optimized JuMP model.\n\nExample\n\nmodel = load_model(StandardModel, \"e_coli_core.json\")\nbiomass = findfirst(model.reactions, \"BIOMASS_Ecoli_core_w_GAM\")\nsolution = flux_balance_analysis(model, GLPK.optimizer; modifications=[change_objective(biomass)])\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.flux_balance_analysis_dict-Tuple{MetabolicModel, Vararg{Any, N} where N}","page":"Function reference","title":"COBREXA.flux_balance_analysis_dict","text":"flux_balance_analysis_dict(model::MetabolicModel, args...)::Union{Dict{String, Float64},Nothing}\n\nA variant of FBA that returns a dictionary assigning fluxes to reactions, if the solution is found. Arguments are passed to flux_balance_analysis.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.flux_balance_analysis_vec-Tuple","page":"Function reference","title":"COBREXA.flux_balance_analysis_vec","text":"flux_balance_analysis_vec(args...)::Union{Vector{Float64},Nothing}\n\nA variant of FBA that returns a vector of fluxes in the same order as reactions of the model, if the solution is found.\n\nArguments are passed to flux_balance_analysis.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA._FVA_add_constraint-NTuple{4, Any}","page":"Function reference","title":"COBREXA._FVA_add_constraint","text":"_FVA_add_constraint(model, c, x, Z)\n\nInternal helper function for adding constraints to a model. Exists mainly because for avoiding namespace problems on remote workers.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA._FVA_optimize_reaction-Tuple{Any, Any, Any}","page":"Function reference","title":"COBREXA._FVA_optimize_reaction","text":"_FVA_get_opt(model, rid)\n\nInternal helper for creating the optimized model on a remote worker, for avoiding namespace problems.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.flux_variability_analysis-Tuple{MetabolicModel, Any}","page":"Function reference","title":"COBREXA.flux_variability_analysis","text":"flux_variability_analysis(\n model::MetabolicModel,\n optimizer;\n kwargs...\n)\n\nA simpler version of flux_variability_analysis that maximizes and minimizes all reactions in the model. Arguments are forwarded.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.flux_variability_analysis-Tuple{MetabolicModel, Vector{Int64}, Any}","page":"Function reference","title":"COBREXA.flux_variability_analysis","text":"flux_variability_analysis(\n model::MetabolicModel,\n reactions::Vector{Int},\n optimizer;\n modifications = [],\n workers = [myid()],\n bounds = z -> (z,z),\n ret = objective_value,\n)::Matrix{Float64}\n\nFlux variability analysis solves a pair of optimization problems in model for each flux listed in reactions:\n\n min,max xáµ¢\ns.t. S x = b\n xâ‚— ≤ x ≤ xᵤ\n cáµ€x ≥ bounds(Zâ‚€)[1]\n cáµ€x ≤ bounds(Zâ‚€)[2]\n\nwhere Zâ‚€:= cáµ€xâ‚€ is the objective value of an optimal solution of the associated FBA problem (see flux_balance_analysis). See \"Gudmundsson, S., Thiele, I. Computationally efficient flux variability analysis. BMC Bioinformatics 11, 489 (2010). https://doi.org/10.1186/1471-2105-11-489\" for more information.\n\nThe bounds 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 -Inf and Inf in first and second pair to remove the limit. Use gamma_bounds and objective_bounds for simple bounds.\n\noptimizer must be set to a JuMP-compatible optimizer. The computation of the individual optimization problems is transparently distributed to workers (see Distributed.workers()).\n\nret is a function used to extract results from optimized JuMP models of the individual reactions. By default, it calls and returns the value of JuMP.objective_value. More information can be extracted e.g. by setting it to a function that returns a more elaborate data structure; such as m -> (JuMP.objective_value(m), JuMP.value.(m[:x])).\n\nReturns a matrix of extracted ret values for minima and maxima, of total size (length(reactions),2). The optimizer result status is checked with is_solved; nothing is returned if the optimization failed for any reason.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.flux_variability_analysis_dict-Tuple{MetabolicModel, Any}","page":"Function reference","title":"COBREXA.flux_variability_analysis_dict","text":"flux_variability_analysis_dict(\n model::MetabolicModel,\n optimizer;\n kwargs...\n)\n\nA variant of flux_variability_analysis that returns the individual maximized and minimized fluxes of all reactions as two dictionaries (of dictionaries). All keyword arguments except ret are passed through.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.parsimonious_flux_balance_analysis-Tuple{MetabolicModel, Any}","page":"Function reference","title":"COBREXA.parsimonious_flux_balance_analysis","text":"parsimonious_flux_balance_analysis(\n model::MetabolicModel,\n optimizer;\n modifications = [],\n qp_modifications = [],\n relax_bounds=[1.0, 0.999999, 0.99999, 0.9999, 0.999, 0.99],\n)\n\nRun parsimonious flux balance analysis (pFBA) on the model. In short, pFBA runs two consecutive optimization problems. The first is traditional FBA:\n\nmax cáµ€x = μ\ns.t. S x = b\n xâ‚— ≤ x ≤ xᵤ\n\nAnd the second is a quadratic optimization problem:\n\nmin Σᵢ xᵢ²\ns.t. S x = b\n xâ‚— ≤ x ≤ xᵤ\n μ = μâ°\n\nWhere 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.\n\npFBA gets the model optimum by standard FBA (using flux_balance_analysis with optimizer and modifications), 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 qp_modifications, which are applied after the FBA.\n\nThhe optimum relaxation sequence can be specified in relax parameter, it defaults to multiplicative range of [1.0, 0.999999, ..., 0.99] of the original bound.\n\nReturns an optimized model that contains the pFBA solution; or nothing if the optimization failed.\n\nExample\n\noptimizer = Gurobi.Optimizer\natts = Dict(\"OutputFlag\" => 0)\nmodel = load_model(StandardModel, \"iJO1366.json\")\nbiomass = findfirst(model.reactions, \"BIOMASS_Ec_iJO1366_WT_53p95M\")\nsol = pfba(model, biomass, Gurobi.optimizer)\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.parsimonious_flux_balance_analysis_dict-Tuple{MetabolicModel, Vararg{Any, N} where N}","page":"Function reference","title":"COBREXA.parsimonious_flux_balance_analysis_dict","text":"parsimonious_flux_balance_analysis_dict(model::MetabolicModel, args...; kwargs...)\n\nPerform parsimonious flux balance analysis on model using optimizer. Returns a dictionary mapping the reaction IDs to fluxes. Arguments are forwarded to parsimonious_flux_balance_analysis internally.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.parsimonious_flux_balance_analysis_vec-Tuple","page":"Function reference","title":"COBREXA.parsimonious_flux_balance_analysis_vec","text":"parsimonious_flux_balance_analysis_vec(args...; kwargs...)\n\nPerform parsimonious flux balance analysis on model using optimizer. Returns a vector of fluxes in the same order as the reactions in model. Arguments are forwarded to parsimonious_flux_balance_analysis internally.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.screen-Union{Tuple{MetabolicModel}, Tuple{N}, Tuple{T}, Tuple{V}} where {V<:(AbstractVector{T} where T), T<:Tuple, N}","page":"Function reference","title":"COBREXA.screen","text":"function screen(\n model::MetabolicModel;\n variants::Maybe{Array{V,N}} = nothing,\n analysis,\n args::Maybe{Array{T,N}} = nothing,\n workers = [myid()],\n)::Array where {V<:AbstractVector, T<:Tuple,N}\n\nTake an array of model-modifying function vectors in variants, and execute the function analysis on all variants of the model specified by variants. The computation is distributed over worker IDs in workers. If args are supplied (as an array of the same size as the variants), they are forwarded as arguments to the corresponding analysis function calls.\n\nThe array of variants must contain vectors of single-parameter functions, these are applied to model in order. The functions must not modify the model, but rather return a modified copy. The copy should be made as shallow as possible, to increase memory efficiency of the process. Variant generators that modify the argument model in-place will cause unpredictable results. Refer to the definition of screen_variant for details.\n\nThe function analysis will receive a single argument (the modified model), together with an expanded tuple of arguments from args.\n\nThe modification and analysis functions are transferred to workers as-is; all packages required to run them (e.g. the optimization solvers) must be loaded there. Typically, you want to use the macro @everywhere using MyFavoriteSolver from Distributed package for loading the solvers.\n\nReturn value\n\nThe results of running analysis are collected in to the resulting array, in a way that preserves the shape of the variants, similarly as with pmap.\n\nThe results of analysis function must be serializable, preferably made only from pure Julia structures, because they may be transferred over the network between the computation nodes. For that reason, functions that return whole JuMP models that contain pointers to allocated C structures (such as flux_balance_analysis used with GLPK or Gurobi otimizers) will generally not in this context.\n\nExample\n\n``` function reverse_reaction(i::Int) (model::CoreModel) -> begin mod = copy(model) mod.S[:,i] .*= -1 # this is unrealistic but sufficient for demonstration mod end end\n\nm = loadmodel(CoreModel, \"ecoli_core.xml\")\n\nscreenvariants(m, [ [reversereaction(5)], [reversereaction(3), reversereaction(6)] ], mod -> mod.S[:,3]) # observe the changes in S\n\nscreenvariants(m, [ [reversereaction(5)], [reversereaction(3), reversereaction(6)] ], mod -> fluxbalanceanalysis_vec(mod, GLPK.Optimizer)) # run analysis\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.screen_variant","page":"Function reference","title":"COBREXA.screen_variant","text":"screen_variant(model::MetabolicModel, variant::Vector, analysis, args = ())\n\nHelper function for screen that applies all single-argument functions in variant to the model (in order from \"first\" to \"last\"), and executes analysis on the result.\n\nCan be used to test model variants locally.\n\n\n\n\n\n","category":"function"},{"location":"functions/#COBREXA.screen_variants-Tuple{Any, Any, Any}","page":"Function reference","title":"COBREXA.screen_variants","text":"screen_variants(model, variants, analysis; workers=[myid()])\n\nA shortcut for screen that only works with model variants.\n\n\n\n\n\n","category":"method"},{"location":"functions/#Analysis-modifications","page":"Function reference","title":"Analysis modifications","text":"","category":"section"},{"location":"functions/","page":"Function reference","title":"Function reference","text":"Modules = [COBREXA]\nPages = map(file -> joinpath(\"analysis\", \"modifications\", file), readdir(\"../src/analysis/modifications\"))","category":"page"},{"location":"functions/#COBREXA._do_knockout-Tuple{MetabolicModel, Any, Vector{String}}","page":"Function reference","title":"COBREXA._do_knockout","text":"_do_knockout(model::MetabolicModel, opt_model)\n\nInternal helper for knockouts on generic MetabolicModels. This can be overloaded so that the knockouts may work differently (more efficiently) with other models.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.knockout-Tuple{String}","page":"Function reference","title":"COBREXA.knockout","text":"knockout(gene_id::String)\n\nA helper variant of knockout for a single gene.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.knockout-Tuple{Vector{String}}","page":"Function reference","title":"COBREXA.knockout","text":"knockout(gene_ids::Vector{String})\n\nA modification that zeroes the bounds of all reactions that would be knocked out by the specified genes (effectively disables the reactions).\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.change_constraint-Tuple{String, Any, Any}","page":"Function reference","title":"COBREXA.change_constraint","text":"change_constraint(id::String, lb, ub)\n\nChange the lower and upper bounds (lb and ub respectively) of reaction id.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.change_objective-Tuple{Union{String, Vector{String}}}","page":"Function reference","title":"COBREXA.change_objective","text":"change_objective(new_objective::Union{String,Vector{String}}; weights=[], sense=MOI.MAX_SENSE)\n\nModification that changes the objective function used in a constraint based analysis function. new_objective can be a single reaction identifier, or an array of reactions identifiers.\n\nOptionally, the objective can be weighted by a vector of weights, and a optimization sense can be set.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.change_optimizer-Tuple{Any}","page":"Function reference","title":"COBREXA.change_optimizer","text":"change_optimizer(optimizer)\n\nChange the JuMP optimizer used to run the optimization.\n\nThis 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 parsimonious_flux_balance_analysis.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.change_optimizer_attribute-Tuple{Any, Any}","page":"Function reference","title":"COBREXA.change_optimizer_attribute","text":"change_optimizer_attribute(attribute_key, value)\n\nChange 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.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.change_sense-Tuple{Any}","page":"Function reference","title":"COBREXA.change_sense","text":"change_sense(objective_sense)\n\nChange the objective sense of optimization. Possible arguments are MOI.MAX_SENSE and MOI.MIN_SENSE.\n\nIf you want to change the objective and sense at the same time, use change_objective instead to do both at once.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.constrain_objective_value-Tuple{Any}","page":"Function reference","title":"COBREXA.constrain_objective_value","text":"constrain_objective_value(tolerance)\n\nLimit the objective value to tolerance-times the current objective value, as with objective_bounds.\n\n\n\n\n\n","category":"method"},{"location":"functions/#Flux-sampling","page":"Function reference","title":"Flux sampling","text":"","category":"section"},{"location":"functions/","page":"Function reference","title":"Function reference","text":"Modules = [COBREXA]\nPages = map(file -> joinpath(\"analysis\", \"sampling\", file), readdir(\"../src/analysis/sampling\"))","category":"page"},{"location":"functions/#COBREXA._affine_hit_and_run_chain-NTuple{5, Any}","page":"Function reference","title":"COBREXA._affine_hit_and_run_chain","text":"_affine_hit_and_run_chain(warmup, lbs, ubs, iters, chain)\n\nInternal helper function for computing a single affine hit-and-run chain. The number of the chain is passed for possible future initialization of stable RNGs.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.affine_hit_and_run-Tuple{Matrix{Float64}, Vector{Float64}, Vector{Float64}}","page":"Function reference","title":"COBREXA.affine_hit_and_run","text":"function affine_hit_and_run(\n warmup_points::Matrix{Float64},\n lbs::Vector{Float64},\n ubs::Vector{Float64};\n sample_iters = 100 .* (1:5),\n workers = [myid()],\n chains = length(workers),\n)\n\nRun a hit-and-run style sampling that starts from warmup_points and uses their affine combinations for generating the run directions to sample the space delimited by lbs and ubs. The points that represent fluxes in warmup_points should be organized in columns, i.e. warmup_points[:,1] is the first warmup flux.\n\nThere are total chains of hit-and-run runs, each on a batch of size(warmup_points, 2) points. The runs are scheduled on workers, for good load balancing chains should be ideally much greater than length(workers).\n\nEach run continues for maximum(sample_iters) iterations; the numbers in sample_iters represent the iterations at which the whole \"current\" batch of points is collected for output. For example, sample_iters=[1,4,5] causes the process run for 5 iterations, returning the sample batch that was produced by 1st, 4th and last (5th) iteration.\n\nReturns a matrix of sampled fluxes (in columns), with all collected samples horizontally concatenated. The total number of samples (columns) will be size(warmup_points,2) * chains * length(sample_iters).\n\nExample\n\nusing COBREXA\nusing Tulip\n\nmodel = load_model(StandardModel, model_path)\n\nwarmup, lbs, ubs = warmup_from_variability(model, Tulip.Optimizer, 100)\nsamples = affine_hit_and_run(warmup, lbs, ubs, sample_iters = 1:3)\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.warmup_from_variability","page":"Function reference","title":"COBREXA.warmup_from_variability","text":"function warmup_from_variability(\n model::MetabolicModel,\n optimizer,\n min_reactions::Vector{Int}=1:n_reactions(model),\n max_reactions::Vector{Int}=1:n_reactions(model);\n modifications = [],\n workers::Vector{Int} = [myid()],\n)::Tuple{Matrix{Float64}, Vector{Float64}, Vector{Float64}}\n\nGenerate 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.\n\n\n\n\n\n","category":"function"},{"location":"functions/#COBREXA.warmup_from_variability-Tuple{MetabolicModel, Any, Int64}","page":"Function reference","title":"COBREXA.warmup_from_variability","text":"warmup_from_variability(\n model::MetabolicModel,\n optimizer,\n n_points::Int;\n kwargs...\n)\n\nGenerates 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.\n\n\n\n\n\n","category":"method"},{"location":"functions/#Miscellaneous-utilities","page":"Function reference","title":"Miscellaneous utilities","text":"","category":"section"},{"location":"functions/","page":"Function reference","title":"Function reference","text":"Modules = [COBREXA]\nPages = map(file -> joinpath(\"base\", \"utils\", file), readdir(\"../src/base/utils\"))","category":"page"},{"location":"functions/#COBREXA.ambiguously_identified_items-Tuple{Dict{String, Dict{String, Set{String}}}}","page":"Function reference","title":"COBREXA.ambiguously_identified_items","text":"ambiguously_identified_items(\n index::Dict{String,Dict{String,[String]}},\n)::Vector{String}\n\nFind items (genes, metabolites, ...) from the annotation index that are identified non-uniquely by at least one of their annotations.\n\nThis often indicates that the items are duplicate or miscategorized.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.annotation_index-Tuple{AbstractDict{String, V} where V}","page":"Function reference","title":"COBREXA.annotation_index","text":"annotation_index(\n xs::AbstractDict{String};\n annotations = _annotations,\n)::Dict{String,Dict{String,[String]}}\n\nExtract annotations from a dictionary of items xs and build an index that maps annotation \"kinds\" (e.g. \"PubChem\") to the mapping from the annotations (e.g. \"COMPOUND_12345\") to item IDs that carry the annotations.\n\nFunction annotations is used to access the Annotations object in the dictionary values.\n\nThis is extremely useful for finding items by annotation data.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.get_atoms-Tuple{Metabolite}","page":"Function reference","title":"COBREXA.get_atoms","text":"get_atoms(met::Metabolite)::MetaboliteFormula\n\nSimple wrapper for getting the atom dictionary count out of a Metabolite.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.check_duplicate_reaction-Tuple{Reaction, OrderedCollections.OrderedDict{String, Reaction}}","page":"Function reference","title":"COBREXA.check_duplicate_reaction","text":"check_duplicate_reaction(rxn::Reaction, rxns::Dict{String, Reaction}; only_metabolites=true)\n\nCheck if rxn already exists in rxns but has another id. If only_metabolites is true then only the metabolite ids are checked. Otherwise, compares metabolite ids and the absolute value of their stoichiometric coefficients to those of rxn. If rxn has the same reaction equation as another reaction in rxns, the return the id. Otherwise return nothing.\n\nSee also: is_mass_balanced\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.is_boundary-Tuple{Reaction}","page":"Function reference","title":"COBREXA.is_boundary","text":"is_boundary(rxn::Reaction)\n\nReturn true if reaction is a boundary reaction, otherwise return false. Checks if boundary by inspecting number of metabolites in reaction equation. Boundary reactions have only one metabolite, e.g. an exchange reaction, or a sink/demand reaction. \n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.is_mass_balanced-Tuple{Reaction, StandardModel}","page":"Function reference","title":"COBREXA.is_mass_balanced","text":"is_mass_balanced(rxn::Reaction, model::StandardModel)\n\nChecks if rxn is atom balanced. Returns a boolean for whether the reaction is balanced, and the associated balance of atoms for convenience (useful if not balanced).\n\nSee also: get_atoms, check_duplicate_reaction\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.serialize_model-Tuple{Serialized, String}","page":"Function reference","title":"COBREXA.serialize_model","text":"serialize_model(model::Serialized, filename::String)::Serialized\n\nSpecialization of serialize_model that prevents nested serialization of already-serialized models.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.serialize_model-Union{Tuple{MM}, Tuple{MM, String}} where MM<:MetabolicModel","page":"Function reference","title":"COBREXA.serialize_model","text":"serialize_model(model::MM, filename::String)::Serialized{MM} where {MM<:MetabolicModel}\n\nSerialize the model to file filename, returning a Serialized model that is able to load itself back automatically upon precaching by precache!.\n\n\n\n\n\n","category":"method"},{"location":"functions/#Base.copy-Tuple{Gene}","page":"Function reference","title":"Base.copy","text":"Base.copy(g::Gene)\n\nShallow copy of a Gene\n\n\n\n\n\n","category":"method"},{"location":"functions/#Base.copy-Tuple{Metabolite}","page":"Function reference","title":"Base.copy","text":"Base.copy(m::Metabolite)\n\nShallow copy of a Metabolite\n\n\n\n\n\n","category":"method"},{"location":"functions/#Base.copy-Tuple{Reaction}","page":"Function reference","title":"Base.copy","text":"Base.copy(r::Reaction)\n\nShallow copy of a Reaction\n\n\n\n\n\n","category":"method"},{"location":"functions/#Base.copy-Tuple{StandardModel}","page":"Function reference","title":"Base.copy","text":"Base.copy(m::StandardModel)\n\nShallow copy of a StandardModel\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.atom_exchange-Tuple{Dict{String, Float64}, StandardModel}","page":"Function reference","title":"COBREXA.atom_exchange","text":"atom_exchange(flux_dict::Dict{String, Float64}, model::StandardModel)\n\nReturn a dictionary mapping the flux of atoms across the boundary of the model given flux_dict (the solution of a constraint based analysis) of reactions in model.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.atom_exchange-Tuple{String, StandardModel}","page":"Function reference","title":"COBREXA.atom_exchange","text":"atom_exchange(rxn_id::String, model::StandardModel)\n\nReturn a dictionary mapping the flux of atoms through a reaction in model.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.metabolite_fluxes-Tuple{Dict{String, Float64}, StandardModel}","page":"Function reference","title":"COBREXA.metabolite_fluxes","text":"metabolite_fluxes(flux_dict::Dict{String, Float64}, model::StandardModel)\n\nReturn two dictionaries of metabolite ids mapped to reactions that consume or produce them given the flux distribution supplied in fluxdict.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.gamma_bounds-Tuple{Any}","page":"Function reference","title":"COBREXA.gamma_bounds","text":"gamma_bounds(gamma)\n\nA bounds-generating function for flux_variability_analysis that limits the objective value to be at least gamma*Zâ‚€, as usual in COBRA packages. Use as the bounds argument:\n\nflux_variability_analysis(model, some_optimizer; bounds = gamma_bounds(0.9))\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.objective_bounds-Tuple{Any}","page":"Function reference","title":"COBREXA.objective_bounds","text":"(tolerance) = z -> begin\n\nA bounds-generating function for flux_variability_analysis that limits the objective value to a small multiple of Zâ‚€. Use as bounds argument, similarly to gamma_bounds.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA._parse_formula-Tuple{String}","page":"Function reference","title":"COBREXA._parse_formula","text":"_parse_formula(f::String)::MetaboliteFormula\n\nParse a formula in format C2H6O into a MetaboliteFormula, which is basically a dictionary of atom counts in the molecule.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA._unparse_formula-Tuple{Dict{String, Int64}}","page":"Function reference","title":"COBREXA._unparse_formula","text":"_unparse_formula(f::MetaboliteFormula)::String\n\nFormat MetaboliteFormula to String.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA._parse_grr-Tuple{SBML.GeneProductAssociation}","page":"Function reference","title":"COBREXA._parse_grr","text":"_parse_grr(gpa::SBML.GeneProductAssociation)::GeneAssociation\n\nParse SBML.GeneProductAssociation structure to the simpler GeneAssociation. The input must be (implicitly) in a positive DNF.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA._parse_grr-Tuple{String}","page":"Function reference","title":"COBREXA._parse_grr","text":"_parse_grr(s::String)::GeneAssociation\n\nParse a DNF gene association rule in format (YIL010W and YLR043C) or (YIL010W and YGR209C) to GeneAssociation. Also acceptsOR,|,||,AND,&, and&&`.\n\nExample\n\njulia> _parse_grr(\"(YIL010W and YLR043C) or (YIL010W and YGR209C)\")\n2-element Array{Array{String,1},1}:\n [\"YIL010W\", \"YLR043C\"]\n [\"YIL010W\", \"YGR209C\"]\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA._unparse_grr-Tuple{Type{SBML.GeneProductAssociation}, Vector{Vector{String}}}","page":"Function reference","title":"COBREXA._unparse_grr","text":"_unparse_grr(\n ::Type{SBML.GeneProductAssociation},\n x::GeneAssociation,\n)::SBML.GeneAssociation\n\nConvert a GeneAssociation to the corresponding SBML.jl structure.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA._unparse_grr-Tuple{Type{String}, Vector{Vector{String}}}","page":"Function reference","title":"COBREXA._unparse_grr","text":"unparse_grr(grr::Vector{Vector{Gene}}\n\nConverts a nested string gene reaction array back into a gene reaction rule string.\n\nExample\n\njulia> _unparse_grr(String, [[\"YIL010W\", \"YLR043C\"], [\"YIL010W\", \"YGR209C\"]])\n\"(YIL010W and YLR043C) or (YIL010W and YGR209C)\"\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA._guesskey-Tuple{Any, Any}","page":"Function reference","title":"COBREXA._guesskey","text":"_guesskey(ks, possibilities)\n\nUnfortunately, many model types that contain dictionares do not have standardized field names, so we need to try a few possibilities and guess the best one. The keys used to look for valid field names should be ideally specified as constants in src/base/constants.jl.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.find_biomass_reaction_ids-Tuple{MetabolicModel}","page":"Function reference","title":"COBREXA.find_biomass_reaction_ids","text":"find_biomass_reaction_ids(m::MetabolicModel; kwargs...)\n\nShortcut for finding biomass reaction names in a model; arguments are forwarded to looks_like_biomass_reaction.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.find_biomass_reactions-Tuple{MetabolicModel}","page":"Function reference","title":"COBREXA.find_biomass_reactions","text":"find_biomass_reactions(m::MetabolicModel; kwargs...)\n\nShortcut for finding biomass reaction indexes in a model; arguments are forwarded to looks_like_biomass_reaction.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.find_exchange_reaction_ids-Tuple{MetabolicModel}","page":"Function reference","title":"COBREXA.find_exchange_reaction_ids","text":"find_exchange_reaction_ids(m::MetabolicModel; kwargs...)\n\nShortcut for finding exchange reaction names in a model; arguments are forwarded to looks_like_exchange_reaction.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.find_exchange_reactions-Tuple{MetabolicModel}","page":"Function reference","title":"COBREXA.find_exchange_reactions","text":"find_exchange_reactions(m::MetabolicModel; kwargs...)\n\nShortcut for finding exchange reaction indexes in a model; arguments are forwarded to looks_like_exchange_reaction.\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.looks_like_biomass_reaction-Tuple{String}","page":"Function reference","title":"COBREXA.looks_like_biomass_reaction","text":"looks_like_biomass_reaction(rxn_id::String;\n exclude_exchanges = false,\n exchange_prefixes = _constants.exchange_prefixes,\n biomass_strings = _constants.biomass_strings,\n)::Bool\n\nA predicate that matches reaction identifiers that look like biomass reactions. Biomass reactions are identified by looking for occurences of biomass_strings in the reaction id. If exclude_exchanges is set, the strings that look like exchanges (from looks_like_exchange_reaction) will not match.\n\nExample\n\nfilter(looks_like_biomass_reaction, reactions(model)) # returns strings\nfindall(looks_like_biomass_reaction, reactions(model)) # returns indices\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.looks_like_exchange_metabolite-Tuple{String}","page":"Function reference","title":"COBREXA.looks_like_exchange_metabolite","text":"looks_like_exchange_metabolite(rxn_id::String;\n exchange_suffixes = _constants.exchange_suffixes,\n )::Bool\n\nA predicate that matches metabolite identifiers that look like involved in exchange reactions. Exchange metabolites are identified by exchange_suffixes at the end of the metabolite id.\n\nExample\n\nfilter(looks_like_exchange_metabolite, metabolites(model)) # returns strings\nfindall(looks_like_exchange_metabolite, metabolites(model)) # returns indices\n\n\n\n\n\n","category":"method"},{"location":"functions/#COBREXA.looks_like_exchange_reaction-Tuple{String}","page":"Function reference","title":"COBREXA.looks_like_exchange_reaction","text":"looks_like_exchange_reaction(rxn_id::String;\n exclude_biomass = false,\n biomass_strings = _constants.biomass_strings,\n exchange_prefixes = _constants.exchange_prefixes,\n)\n\nA predicate that matches reaction identifiers that look like exchange or biomass reactions, given the usual naming schemes in common model repositories. Exchange reactions are identified based on matching prefixes in the set exchange_prefixes and biomass reactions are identified by looking for occurences of biomass_strings in the reaction id.\n\nAlso see find_exchange_reactions.\n\nExample\n\nfindall(looks_like_exchange_reaction, reactions(model)) # returns indices\nfilter(looks_like_exchange_reaction, reactions(model)) # returns Strings\n\n# to use the optional arguments you need to expand the function's arguments using an anonymous function\nfindall(x -> looks_like_exchange_reaction(x; exclude_biomass=true), reactions(model)) # returns indices\nfilter(x -> looks_like_exchange_reaction(x; exclude_biomass=true), reactions(model)) # returns Strings\n\n\n\n\n\n","category":"method"},{"location":"functions/#Logging-and-debugging-helpers","page":"Function reference","title":"Logging and debugging helpers","text":"","category":"section"},{"location":"functions/","page":"Function reference","title":"Function reference","text":"Modules = [COBREXA]\nPages = map(file -> joinpath(\"base\", \"logging\", file), readdir(\"../src/base/logging\"))","category":"page"},{"location":"functions/#COBREXA.log_io","page":"Function reference","title":"COBREXA.log_io","text":"log_io(enable::Bool=true)\n\nEnable (default) or disable (by passing false) output of messages and warnings from model input/output.\n\n\n\n\n\n","category":"function"},{"location":"functions/#COBREXA.log_models","page":"Function reference","title":"COBREXA.log_models","text":"log_models(enable::Bool=true)\n\nEnable (default) or disable (by passing false) output of model-related messages.\n\n\n\n\n\n","category":"function"},{"location":"functions/#COBREXA.log_perf","page":"Function reference","title":"COBREXA.log_perf","text":"log_perf(enable::Bool=true)\n\nEnable (default) or disable (by passing false) output of performance-related tracing information.\n\n\n\n\n\n","category":"function"},{"location":"functions/#COBREXA.@_make_logging_tag-Tuple{Symbol, String}","page":"Function reference","title":"COBREXA.@_make_logging_tag","text":"macro _make_logging_group(sym::Symbol, doc::String)\n\nThis creates a group of functions that allow masking out topic-related logging actions. A call that goes as follows:\n\n@_make_logging_tag XYZ\n\ncreates the following tools:\n\nglobal variable _XYZ_log_enabled defaulted to false\nfunction log_XYZ that can be called to turn the logging on/off\na masking macro @_XYZ_log that can be prepended to commands that should only happen if the logging of tag XYZ is enabled.\n\nThe masking macro is then used as follows:\n\n@_XYZ_log @info \"This is the extra verbose information you wanted!\" a b c\n\nThe user can direct logging with these:\n\nlog_XYZ()\nlog_XYZ(false)\n\ndoc should be a name of the stuff that is being printed if the corresponding log_XYZ() is enabled – it is used to create a friendly documentation for the logging switch. In this case it could say \"X, Y and Z-related messages\".\n\n\n\n\n\n","category":"macro"},{"location":"advanced/4_advanced_screening/#Advanced-model-screening","page":"Advanced model screening","title":"Advanced model screening","text":"","category":"section"},{"location":"advanced/4_advanced_screening/#Example:-Gene-knockouts","page":"Advanced model screening","title":"Example: Gene knockouts","text":"","category":"section"},{"location":"unmerged/#Generic-interface","page":"Generic interface","title":"Generic interface","text":"","category":"section"},{"location":"unmerged/","page":"Generic interface","title":"Generic interface","text":"The reason you should rather use the generic interface is that the generic interface is supported by all model types in COBREXA, while the internal model structure of each model type varies considerably. For example, MATModels store the stoichiometric matrix directly, so mat_model.mat[\"S\"] would return the stoichiometric matrix. However, JSONModels do not do this, so json_model.m[\"S\"] would throw an error. The COBREXA way of doing this is to use the generic interface, i.e. stoichiometry(json_model) and stoichiometry(mat_model) always return the stoichiometric matrix. ","category":"page"},{"location":"unmerged/","page":"Generic interface","title":"Generic interface","text":"Note, it is possible that the matrix returned by stoichiometry is not exactly the same between models. The order of the reactions (columns) and metabolites (rows) may vary from model type to model type, although they are consistent within each model type. So stoichiometry(json_model) will return a stoichiometric matrix where the columns correspond to the order of reactions listed in reactions(json_model) and the rows corresponds to the order of metabolites listed in metabolites(json_model). The column/reaction and row/metabolite order from the JSONModel is not necessarily consistent with the stoichiometric matrix returned by stoichiometry(mat_model). This is a minor note, but could cause confusion. ","category":"page"},{"location":"unmerged/#Converting-models","page":"Generic interface","title":"Converting models","text":"","category":"section"},{"location":"unmerged/","page":"Generic interface","title":"Generic interface","text":"You might recall that we mentioned that data loss does not occur when models are read into the format corresponding to their file type. This is because the models are read into memory directly in their native formats. So JSONModels contain the dictionary encoded in the .json file, and the same for .mat and .xml files (technically .xml is parsed by SBML.jl).","category":"page"},{"location":"unmerged/","page":"Generic interface","title":"Generic interface","text":"However, this data loss guarantee does not hold once you convert between models. The reason for this is that the convert function uses the generic interface to convert between models. In short, only information accessible through the generic interface will be converted between models. This is most applicable for data stored using non-standard keywords (.mat and to a lesser extent .json models are prone to this type of issue). When in doubt, inspect your models and refer to src/base/constants.jl for the keynames used to access model features if issues occur. However, this should rarely be a problem.","category":"page"},{"location":"unmerged/","page":"Generic interface","title":"Generic interface","text":"COBREXA also has specialized model types: StandardModel, CoreModel, and CoreCoupledModel. These model types are implemented to be as efficient as possible for their purpose. In short, use:","category":"page"},{"location":"unmerged/","page":"Generic interface","title":"Generic interface","text":"StandardModel if keeping all the meta-data associated with a model is important. This includes information like gene reaction rules, annotations, notes, etc. It is a good format to use when you wish to combine many models of different types and are not worried about memory limitations. \nCoreModel if you only care about constraint-based analysis that can be performed using only the stoichiometric matrix and flux bounds. This model stores all its numeric data structures as sparse matrices/vectors and is thus very efficient. It does not store superfluous information, like the gene reaction rules of reactions, annotations etc. Since this model is compact and its data structures efficient, it is ideal for distributed computing.\nCoreModelCoupled if you want to use the functionality of CoreModel but for communities. It also represents the underlying model in a sparse format, but specialized for community models. ","category":"page"},{"location":"unmerged/","page":"Generic interface","title":"Generic interface","text":"Let's load a StandardModel and a CoreModel to compare the two.","category":"page"},{"location":"notebooks/4_basic_core_coupled_usage/","page":"Basic usage of CoreModel and CoreModelCoupled","title":"Basic usage of CoreModel and CoreModelCoupled","text":"EditURL = \"https://github.com/LCSB-BioCore/COBREXA.jl/blob/master/docs/src/notebooks/4_basic_core_coupled_usage.jl\"","category":"page"},{"location":"notebooks/4_basic_core_coupled_usage/#Basic-usage-of-CoreModel-and-CoreModelCoupled","page":"Basic usage of CoreModel and CoreModelCoupled","title":"Basic usage of CoreModel and CoreModelCoupled","text":"","category":"section"},{"location":"notebooks/4_basic_core_coupled_usage/","page":"Basic usage of CoreModel and CoreModelCoupled","title":"Basic usage of CoreModel and CoreModelCoupled","text":"(Image: ) (Image: )","category":"page"},{"location":"notebooks/4_basic_core_coupled_usage/","page":"Basic usage of CoreModel and CoreModelCoupled","title":"Basic usage of CoreModel and CoreModelCoupled","text":"In this tutorial we will introduce COBREXA's CoreModel and CoreModelCoupled. We will use E. coli's toy model to start with.","category":"page"},{"location":"notebooks/4_basic_core_coupled_usage/","page":"Basic usage of CoreModel and CoreModelCoupled","title":"Basic usage of CoreModel and CoreModelCoupled","text":"!isfile(\"e_coli_core.xml\") &&\n download(\"http://bigg.ucsd.edu/static/models/e_coli_core.xml\", \"e_coli_core.xml\")\n\nusing COBREXA","category":"page"},{"location":"notebooks/4_basic_core_coupled_usage/#Loading-a-CoreModel","page":"Basic usage of CoreModel and CoreModelCoupled","title":"Loading a CoreModel","text":"","category":"section"},{"location":"notebooks/4_basic_core_coupled_usage/","page":"Basic usage of CoreModel and CoreModelCoupled","title":"Basic usage of CoreModel and CoreModelCoupled","text":"model = load_model(CoreModel, \"e_coli_core.xml\") # we specifically want to load a CoreModel from the model file","category":"page"},{"location":"notebooks/4_basic_core_coupled_usage/#Basic-analysis-on-CoreModel","page":"Basic usage of CoreModel and CoreModelCoupled","title":"Basic analysis on CoreModel","text":"","category":"section"},{"location":"notebooks/4_basic_core_coupled_usage/","page":"Basic usage of CoreModel and CoreModelCoupled","title":"Basic usage of CoreModel and CoreModelCoupled","text":"As before, for optimization based analysis we need to load an optimizer. Here we will use Tulip.jl to optimize the linear programs of this tutorial. Refer to the constraint-based analysis basics tutorial if you are confused by any functions in this section.","category":"page"},{"location":"notebooks/4_basic_core_coupled_usage/","page":"Basic usage of CoreModel and CoreModelCoupled","title":"Basic usage of CoreModel and CoreModelCoupled","text":"All the normal analysis functions work on CoreModel, due to it also having the same generic accessor interface as all the other model types.","category":"page"},{"location":"notebooks/4_basic_core_coupled_usage/","page":"Basic usage of CoreModel and CoreModelCoupled","title":"Basic usage of CoreModel and CoreModelCoupled","text":"using Tulip\n\ndict_sol = flux_balance_analysis_dict(\n model,\n Tulip.Optimizer;\n modifications = [\n change_objective(\"R_BIOMASS_Ecoli_core_w_GAM\"),\n change_constraint(\"R_EX_glc__D_e\", -12, -12),\n change_constraint(\"R_EX_o2_e\", 0, 0),\n ],\n)","category":"page"},{"location":"notebooks/4_basic_core_coupled_usage/#Structure-of-CoreModel","page":"Basic usage of CoreModel and CoreModelCoupled","title":"Structure of CoreModel","text":"","category":"section"},{"location":"notebooks/4_basic_core_coupled_usage/","page":"Basic usage of CoreModel and CoreModelCoupled","title":"Basic usage of CoreModel and CoreModelCoupled","text":"CoreModel is a special COBREXA type that is optimized for large scale analysis of large models. It stores data in a sparse format where possible.","category":"page"},{"location":"notebooks/4_basic_core_coupled_usage/","page":"Basic usage of CoreModel and CoreModelCoupled","title":"Basic usage of CoreModel and CoreModelCoupled","text":"fieldnames(CoreModel)","category":"page"},{"location":"notebooks/4_basic_core_coupled_usage/","page":"Basic usage of CoreModel and CoreModelCoupled","title":"Basic usage of CoreModel and CoreModelCoupled","text":"model.S","category":"page"},{"location":"notebooks/4_basic_core_coupled_usage/#CoreModelCoupled-adds-coupling-constraints-to-CoreModel","page":"Basic usage of CoreModel and CoreModelCoupled","title":"CoreModelCoupled adds coupling constraints to CoreModel","text":"","category":"section"},{"location":"notebooks/4_basic_core_coupled_usage/","page":"Basic usage of CoreModel and CoreModelCoupled","title":"Basic usage of CoreModel and CoreModelCoupled","text":"CoreModelCoupled extends CoreModel by adding coupling constraints.","category":"page"},{"location":"notebooks/4_basic_core_coupled_usage/","page":"Basic usage of CoreModel and CoreModelCoupled","title":"Basic usage of CoreModel and CoreModelCoupled","text":"fieldnames(CoreModelCoupled)","category":"page"},{"location":"notebooks/4_basic_core_coupled_usage/","page":"Basic usage of CoreModel and CoreModelCoupled","title":"Basic usage of CoreModel and CoreModelCoupled","text":"In short, coupling constraints can be used to ensure that fluxes scale with the growth rate (μ) of a model. This reduces the impact of biologically infeasible cycles from occurring. Here we will model coupling constraints by assuming that they have the form: -γ ≤ vᵢ/μ ≤ γ, where γ is the ratio between each individual flux (vᵢ) in the model and the growth rate.","category":"page"},{"location":"notebooks/4_basic_core_coupled_usage/","page":"Basic usage of CoreModel and CoreModelCoupled","title":"Basic usage of CoreModel and CoreModelCoupled","text":"gamma = 40 # arbitrary\n\nnr = n_reactions(model) # number of reactions\nbiomass_index = first(indexin([\"R_BIOMASS_Ecoli_core_w_GAM\"], reactions(model)))\n\nusing LinearAlgebra, SparseArrays\n\nCf = sparse(1.0I, nr, nr)\nCf[:, biomass_index] .= -gamma\nCb = sparse(1.0I, nr, nr)\nCb[:, biomass_index] .= gamma\nC = [Cf; Cb] # coupling constraint matrix\n\nclb = spzeros(2 * nr)\nclb[1:nr] .= -1000.0\ncub = spzeros(2 * nr)\ncub[nr+1:end] .= 1000\n\ncmodel = CoreModelCoupled(model, C, clb, cub)","category":"page"},{"location":"notebooks/4_basic_core_coupled_usage/","page":"Basic usage of CoreModel and CoreModelCoupled","title":"Basic usage of CoreModel and CoreModelCoupled","text":"d = flux_balance_analysis_dict(model, Tulip.Optimizer)\nd[\"R_BIOMASS_Ecoli_core_w_GAM\"]","category":"page"},{"location":"notebooks/4_basic_core_coupled_usage/","page":"Basic usage of CoreModel and CoreModelCoupled","title":"Basic usage of CoreModel and CoreModelCoupled","text":"dc = flux_balance_analysis_dict(cmodel, Tulip.Optimizer)\ndc[\"R_BIOMASS_Ecoli_core_w_GAM\"]","category":"page"},{"location":"notebooks/4_basic_core_coupled_usage/","page":"Basic usage of CoreModel and CoreModelCoupled","title":"Basic usage of CoreModel and CoreModelCoupled","text":"","category":"page"},{"location":"notebooks/4_basic_core_coupled_usage/","page":"Basic usage of CoreModel and CoreModelCoupled","title":"Basic usage of CoreModel and CoreModelCoupled","text":"This page was generated using Literate.jl.","category":"page"},{"location":"tutorials/4_modifying/#Modifying-and-saving-the-models","page":"Modifying and saving the models","title":"Modifying and saving the models","text":"","category":"section"},{"location":"tutorials/4_modifying/","page":"Modifying and saving the models","title":"Modifying and saving the models","text":"Making a small modification to the model and reanalyzing them is often a useful way to explore how the constraints work together, and to inspect the degrees of freedom in the model.","category":"page"},{"location":"tutorials/4_modifying/","page":"Modifying and saving the models","title":"Modifying and saving the models","text":"With COBREXA.jl, you have two main choices of making model modifications:","category":"page"},{"location":"tutorials/4_modifying/","page":"Modifying and saving the models","title":"Modifying and saving the models","text":"you can manually change the model structures (i.e. permanently change the data in of your model variable)\nyou can use special arguments of analysis functions that allow you to make the modifications in a declarative way and \"on the fly\", without having to manually interact with the model","category":"page"},{"location":"tutorials/4_modifying/","page":"Modifying and saving the models","title":"Modifying and saving the models","text":"tip: Notebook available\nThe available notebooks demonstrate model export and serialization and various model modifications (1, 2, 3).","category":"page"},{"location":"tutorials/4_modifying/#Manual-modifications","page":"Modifying and saving the models","title":"Manual modifications","text":"","category":"section"},{"location":"tutorials/4_modifying/","page":"Modifying and saving the models","title":"Modifying and saving the models","text":"Certain model types, including CoreModel and StandardModel, are built from mutable structs that you are free to modify as you want.","category":"page"},{"location":"tutorials/4_modifying/","page":"Modifying and saving the models","title":"Modifying and saving the models","text":"CoreModel consists of sparse matrices and vectors that describe the model precisely. For example, modifying a bound of the reaction is as simple as writing to the .xl or .xu (lower and upper bound for x) vectors in the structure:","category":"page"},{"location":"tutorials/4_modifying/","page":"Modifying and saving the models","title":"Modifying and saving the models","text":"using COBREXA\nm = load_model(CoreModel, \"e_coli_core.xml\")\nm.xl[3] = 0.0","category":"page"},{"location":"tutorials/4_modifying/","page":"Modifying and saving the models","title":"Modifying and saving the models","text":"The available field names can be listed using e.g. fieldnames(CoreModel), or more conveniently by employing the completion in the shell:","category":"page"},{"location":"tutorials/4_modifying/","page":"Modifying and saving the models","title":"Modifying and saving the models","text":"julia> m. # press [Tab]\nS b c mets rxns xl xu","category":"page"},{"location":"tutorials/4_modifying/","page":"Modifying and saving the models","title":"Modifying and saving the models","text":"With CoreModel, you may need to find the proper metabolites by identifier. For that, you may examine the reactions and metabolites of the model, e.g. using","category":"page"},{"location":"tutorials/4_modifying/","page":"Modifying and saving the models","title":"Modifying and saving the models","text":"indexin([\"M_nadh_c\", \"M_co2_e\"], metabolites(m))","category":"page"},{"location":"tutorials/4_modifying/","page":"Modifying and saving the models","title":"Modifying and saving the models","text":"...which will return the numeric indexes of NADH and CO₂ metabolites. These can be used to, e.g., change the \"balance\" of the metabolites in the model:","category":"page"},{"location":"tutorials/4_modifying/","page":"Modifying and saving the models","title":"Modifying and saving the models","text":"m.b[64] = -1 # model will be losing 1 flux unit of CO₂","category":"page"},{"location":"tutorials/4_modifying/","page":"Modifying and saving the models","title":"Modifying and saving the models","text":"...or to modify existing reaction (here with index 5) directly in stoichiometry matrix:","category":"page"},{"location":"tutorials/4_modifying/","page":"Modifying and saving the models","title":"Modifying and saving the models","text":"m.S[5,8] = -1\nm.S[5,64] = 1","category":"page"},{"location":"tutorials/4_modifying/","page":"Modifying and saving the models","title":"Modifying and saving the models","text":"While this works well if you are used to working with matrix-like representations of the model, it is not really convenient if you want to change the reactions and models in an easy way. StandardModel is structured in a much more user-friendly way, which makes the manual modifications easier.","category":"page"},{"location":"tutorials/4_modifying/","page":"Modifying and saving the models","title":"Modifying and saving the models","text":"In particular, StandardModel consists of dictionaries of Reaction, Metabolite and Gene objects that may be modified and indexed directly using their names. That way, the above modifications may be written in a cleaner, semantic and declarative fashion, as follows:","category":"page"},{"location":"tutorials/4_modifying/","page":"Modifying and saving the models","title":"Modifying and saving the models","text":"m = load_model(StandardModel, \"e_coli_core.xml\")\nm.reactions[\"R_TPI\"].lb = 0.0 # change lower bound of the reaction to 0\nm.reactions[\"R_GLNS\"].metabolites[\"M_nadh_c\"] = -1.0 # update stoichiometry\nm.reactions[\"R_GLNS\"].metabolites[\"M_co2_e\"] = 1.0\n...","category":"page"},{"location":"tutorials/4_modifying/","page":"Modifying and saving the models","title":"Modifying and saving the models","text":"There are other functions that may be used to change the StandardModel in a more systematic way. See the documentation of add!, rm!, @add_reactions!, and set_bound for examples.","category":"page"},{"location":"tutorials/4_modifying/#Analysis-modifiers","page":"Modifying and saving the models","title":"Analysis modifiers","text":"","category":"section"},{"location":"tutorials/4_modifying/","page":"Modifying and saving the models","title":"Modifying and saving the models","text":"Some analysis functions, including flux_balance_analysis and flux_variability_analysis, accept a special argument modifications, which is a list of descriptions of small changes that should be applied to the model before modification.","category":"page"},{"location":"tutorials/4_modifying/","page":"Modifying and saving the models","title":"Modifying and saving the models","text":"These include e.g.:","category":"page"},{"location":"tutorials/4_modifying/","page":"Modifying and saving the models","title":"Modifying and saving the models","text":"change_objective that sets a new optimization objective\nchange_optimizer that chooses a different JuMP.jl optimizer for the analysis\nchange_optimizer_attribute that can set various optimizer parameters\nchange_constraint that changes the flux bounds of a reaction\nknockout that disables reactions that depend on genes","category":"page"},{"location":"tutorials/4_modifying/","page":"Modifying and saving the models","title":"Modifying and saving the models","text":"This way, you can easily check out the model state when maximizing the rate of \"TALA\" (transadenolase A) reaction:","category":"page"},{"location":"tutorials/4_modifying/","page":"Modifying and saving the models","title":"Modifying and saving the models","text":"m = load_model(StandardModel, \"e_coli_core.xml\")\nflux_balance_analysis_dict(\n m, GLPK.Optimizer;\n modifications=[change_objective(\"R_TALA\")])","category":"page"},{"location":"tutorials/4_modifying/","page":"Modifying and saving the models","title":"Modifying and saving the models","text":"...or knock out a gene combination that disables the transadenolase A completely (see m.reactions[\"R_TALA\"].grr):","category":"page"},{"location":"tutorials/4_modifying/","page":"Modifying and saving the models","title":"Modifying and saving the models","text":"flux_balance_analysis_dict(\n m, GLPK.Optimizer;\n modifications=[knockout([\"G_b0008\", \"G_b2464\"])])","category":"page"},{"location":"tutorials/4_modifying/","page":"Modifying and saving the models","title":"Modifying and saving the models","text":"...or do both at once– knock out some other genes, and try to maximize the transadenolase A reaction rate:","category":"page"},{"location":"tutorials/4_modifying/","page":"Modifying and saving the models","title":"Modifying and saving the models","text":"flux_balance_analysis_dict(\n m, GLPK.Optimizer;\n modifications=[\n knockout([\"G_s0001\"]),\n change_objective(\"R_TALA\"),\n ])","category":"page"},{"location":"tutorials/4_modifying/#Exporting-the-modified-models-in-native-formats","page":"Modifying and saving the models","title":"Exporting the modified models in native formats","text":"","category":"section"},{"location":"tutorials/4_modifying/","page":"Modifying and saving the models","title":"Modifying and saving the models","text":"Manually modified models can be exported in standard formats so that they can be examined in other environments, or just made accessible for publication.","category":"page"},{"location":"tutorials/4_modifying/","page":"Modifying and saving the models","title":"Modifying and saving the models","text":"COBREXA.jl supports export of MATLAB-like and JSON models. Simply use save_model:","category":"page"},{"location":"tutorials/4_modifying/","page":"Modifying and saving the models","title":"Modifying and saving the models","text":"save_model(m, \"myModel.json\")\nsave_model(m, \"myModel.mat\")","category":"page"},{"location":"tutorials/4_modifying/","page":"Modifying and saving the models","title":"Modifying and saving the models","text":"The function automatically guesses the appropriate model format to write into the file from the file extension. If required, you can choose the model format manually by using save_json_model and save_mat_model.","category":"page"},{"location":"tutorials/4_modifying/#Using-Serialization-for-quick-and-efficient-model-storage","page":"Modifying and saving the models","title":"Using Serialization for quick & efficient model storage","text":"","category":"section"},{"location":"tutorials/4_modifying/","page":"Modifying and saving the models","title":"Modifying and saving the models","text":"If you save the model \"just for yourself\", such as for the use in an immediately following analysis, it may be inconvenient (and unnecessarily inefficient) to encode and decode the models to and from the external format. Moreover, certain model types (such as CoreModelCoupled) cannot be fully represented in all model formats, thus increasing the chance for accidental data loss.","category":"page"},{"location":"tutorials/4_modifying/","page":"Modifying and saving the models","title":"Modifying and saving the models","text":"Instead of that, we recommend using the Serialization package. It provides a straightforward way to save any Julia data structure to the disk, using a very efficient data format that can be written to and read from the disk very quickly.","category":"page"},{"location":"tutorials/4_modifying/","page":"Modifying and saving the models","title":"Modifying and saving the models","text":"With any model in m, you can write it to disk as follows:","category":"page"},{"location":"tutorials/4_modifying/","page":"Modifying and saving the models","title":"Modifying and saving the models","text":"using Serialization\nopen(f -> serialize(f, m), \"myModel\", \"w\")","category":"page"},{"location":"tutorials/4_modifying/","page":"Modifying and saving the models","title":"Modifying and saving the models","text":"...and read it back with:","category":"page"},{"location":"tutorials/4_modifying/","page":"Modifying and saving the models","title":"Modifying and saving the models","text":"m = deserialize(\"myModel\")","category":"page"},{"location":"tutorials/4_modifying/","page":"Modifying and saving the models","title":"Modifying and saving the models","text":"One great advantage of Serialization is speed – models with millions of reactions are usually loaded and saved with minimal overhead in less than a second.","category":"page"},{"location":"tutorials/4_modifying/","page":"Modifying and saving the models","title":"Modifying and saving the models","text":"warning: Limits of `Serialization`\nSerialized models are great for quickly exchanging data objects between analysis steps. The avoided need for re-encoding can save you a great deal of analysis time that can be used for better purposes. Despite that, do not rely on the stability of the serialized format – it often changes between Julia versions, and the data stored in one version may not open easily after an upgrade. In short, use serialized data within one workflow, and use standard and stable external formats for publishing and storing the data beyond the scope of a single analysis workflow.","category":"page"},{"location":"howToContribute/#Contributing-to-COBREXA.jl","page":"How to contribute","title":"Contributing to COBREXA.jl","text":"","category":"section"},{"location":"howToContribute/","page":"How to contribute","title":"How to contribute","text":":+1::tada: Thanks for taking the time to contribute to COBREXA.jl! :tada::+1:","category":"page"},{"location":"howToContribute/#How-to-report-a-bug-or-suggest-an-enhancement","page":"How to contribute","title":"How to report a bug or suggest an enhancement","text":"","category":"section"},{"location":"howToContribute/","page":"How to contribute","title":"How to contribute","text":"Please use the GitHub issue tracker to report any problems with the software, and discuss any potential questions about COBREXA use.","category":"page"},{"location":"howToContribute/","page":"How to contribute","title":"How to contribute","text":"Before creating bug reports, please check the open issues, you might find out that the issue is already reported and known.","category":"page"},{"location":"howToContribute/","page":"How to contribute","title":"How to contribute","text":"General guidelines for reporting issues:","category":"page"},{"location":"howToContribute/","page":"How to contribute","title":"How to contribute","text":"If creating a bug report, include a complete description of how we can reproduce the bug, including e.g. links to datasets and any external scripts used. Ideally, try to create a code snippet that causes the problem on a fresh installation of COBREXA.jl (often called the \"minimal crashing example\")\nIf possible, use the supplied issue templates and fill in all fields.\nIf your issue is already described in an issue that is \"closed\", do not reopen it. Instead, open a new issue and include a link to the original issue. (The fact that the original issue might have been mistakenly closed may be an issue on its own.)\nEnhancement proposals should refer a viable way for implementing the enhancement. If there are multiple possibilities for implementation, we will welcome a discussion about which one is optimal for COBREXA.jl.","category":"page"},{"location":"howToContribute/#How-to-test-a-development-version-of-the-package?","page":"How to contribute","title":"How to test a development version of the package?","text":"","category":"section"},{"location":"howToContribute/#Step-1:-Load-COBREXA.jl-from-the-source-from-the-git-repository","page":"How to contribute","title":"Step 1: Load COBREXA.jl from the source from the git repository","text":"","category":"section"},{"location":"howToContribute/","page":"How to contribute","title":"How to contribute","text":"There are two ways that you can retrieve a local copy of the development repo: you can either clone the repository manually, or use Julia package manager to get a development version for you.","category":"page"},{"location":"howToContribute/#Option-1:-Using-Julia-package-manager","page":"How to contribute","title":"Option 1: Using Julia package manager","text":"","category":"section"},{"location":"howToContribute/","page":"How to contribute","title":"How to contribute","text":"When you are used to using the Julia package manager for developing or contributing to packages, you can type:","category":"page"},{"location":"howToContribute/","page":"How to contribute","title":"How to contribute","text":"(v1.6) pkg> dev COBREXA","category":"page"},{"location":"howToContribute/","page":"How to contribute","title":"How to contribute","text":"This will install the COBREXA package locally and check it out for development. You can check the location of the package with:","category":"page"},{"location":"howToContribute/","page":"How to contribute","title":"How to contribute","text":"(v1.6) pkg> status\n Status `~/.julia/environments/v1.4/Project.toml`\n [a03a9c34] COBREXA v0.0.5 [`~/.julia/dev/COBREXA`]","category":"page"},{"location":"howToContribute/","page":"How to contribute","title":"How to contribute","text":"The default location of the package is ~/.julia/dev/COBREXA.","category":"page"},{"location":"howToContribute/#Option-2:-Cloning-with-git-manually","page":"How to contribute","title":"Option 2: Cloning with git manually","text":"","category":"section"},{"location":"howToContribute/","page":"How to contribute","title":"How to contribute","text":"You can use git to get the sources as follows:","category":"page"},{"location":"howToContribute/","page":"How to contribute","title":"How to contribute","text":"$ git clone git@github.com:LCSB-BioCore/COBREXA.jl.git","category":"page"},{"location":"howToContribute/","page":"How to contribute","title":"How to contribute","text":"When the cloning process finishes, you shold see the package cloned in a new directory COBREXA.jl. To install this version to your Julia, change to the directory first, and start Julia:","category":"page"},{"location":"howToContribute/","page":"How to contribute","title":"How to contribute","text":"$ cd COBREXA.jl\n$ julia","category":"page"},{"location":"howToContribute/","page":"How to contribute","title":"How to contribute","text":"With Julia, you can install the development version of the package from the directory as follows:","category":"page"},{"location":"howToContribute/","page":"How to contribute","title":"How to contribute","text":"(v1.6) pkg> add .","category":"page"},{"location":"howToContribute/","page":"How to contribute","title":"How to contribute","text":"(press ] to get into the packaging environment)","category":"page"},{"location":"howToContribute/","page":"How to contribute","title":"How to contribute","text":"This adds the COBREXA.jl package and all its dependencies. You can verify that the installation worked by typing:","category":"page"},{"location":"howToContribute/","page":"How to contribute","title":"How to contribute","text":"(v1.6) pkg> status","category":"page"},{"location":"howToContribute/","page":"How to contribute","title":"How to contribute","text":"If you are planning to develop the package, it is often easier to install the package in development mode, with dev command:","category":"page"},{"location":"howToContribute/","page":"How to contribute","title":"How to contribute","text":"(v1.6) pkg> dev .","category":"page"},{"location":"howToContribute/","page":"How to contribute","title":"How to contribute","text":"That causes the package to always load with whatever code changes that you added to the source directory.","category":"page"},{"location":"howToContribute/#Finally:-load-COBREXA.jl","page":"How to contribute","title":"Finally: load COBREXA.jl","text":"","category":"section"},{"location":"howToContribute/","page":"How to contribute","title":"How to contribute","text":"With both of above options, you should get COBREXA.jl installed, which means that the following command should, without errors, load the package and make COBREXA.jl functions available for testing:","category":"page"},{"location":"howToContribute/","page":"How to contribute","title":"How to contribute","text":"julia> using COBREXA","category":"page"},{"location":"howToContribute/","page":"How to contribute","title":"How to contribute","text":"You may now freely modify the code and test the result.","category":"page"},{"location":"howToContribute/","page":"How to contribute","title":"How to contribute","text":"Remember that if you want to work in the environment of the package, you need to activate it. That causes, among other, that the additional dependencies specified with packaging add command will be written automaticaly to Project.toml file of your local COBREXA.jl clone, not to your global environment. Activation is simple: when in the directory of the package, just type the command into the packaging shell:","category":"page"},{"location":"howToContribute/","page":"How to contribute","title":"How to contribute","text":"(v1.6) pkg> activate","category":"page"},{"location":"howToContribute/#Step-2:-Publish-your-changes","page":"How to contribute","title":"Step 2: Publish your changes","text":"","category":"section"},{"location":"howToContribute/","page":"How to contribute","title":"How to contribute","text":"You are expected to make a fork of the main COBREXA.jl repository, and open a pull request from that one to the master branch of the main repository. For creating the fork, just hit the \"Fork\" button on GitHub.","category":"page"},{"location":"howToContribute/","page":"How to contribute","title":"How to contribute","text":"After that, change the directory to your repository and adjust the remotes:","category":"page"},{"location":"howToContribute/","page":"How to contribute","title":"How to contribute","text":"$ cd ~/.julia/dev/COBREXA # or any other directory, as needed\n$ git remote rename origin upstream # renames the origin (the main COBREXA.jl repo) to upstream\n$ git remote add origin git@github.com:yourUsername/COBREXA.jl.git # adds the link to your clone as new origin\n$ git fetch origin # fetches the refs from your repo","category":"page"},{"location":"howToContribute/","page":"How to contribute","title":"How to contribute","text":"In the above code, change yourUsername is your GitHub username.","category":"page"},{"location":"howToContribute/","page":"How to contribute","title":"How to contribute","text":"When the renaming is done, start a new branch at upstream/master. In the code snippet, substitute yn for your initials (Your Name here) and give the new feature a better name than somefeature:","category":"page"},{"location":"howToContribute/","page":"How to contribute","title":"How to contribute","text":"$ git checkout -b yn-somefeature origin/master","category":"page"},{"location":"howToContribute/","page":"How to contribute","title":"How to contribute","text":"Commit any changes and features that you like to the new branch. When the commits look complete to you, push the branch to your repository fork:","category":"page"},{"location":"howToContribute/","page":"How to contribute","title":"How to contribute","text":"$ git push -u origin yn-somefeature","category":"page"},{"location":"howToContribute/","page":"How to contribute","title":"How to contribute","text":"This makes your changes visible in your repository. After that, you can navigate to GitHub's pull request page, where you should immediately see a big green button that helps you to create a pull request for this branch. Read the section below for precise details and guidelines on submitting the pull requests.","category":"page"},{"location":"howToContribute/#How-to-submit-a-pull-request-(PR)-with-your-modification/enhancement?","page":"How to contribute","title":"How to submit a pull request (PR) with your modification/enhancement?","text":"","category":"section"},{"location":"howToContribute/","page":"How to contribute","title":"How to contribute","text":"Make a fork of the repository, commit the modifications in a separate branch and push the branch to your fork.\nMake a pull request where you describe the motivation and expected outcome for the users. Specifically, consider any possible incompatibilities, and the necessity to increment the version number after your changes are applied. Label your pull request with a semantic emoji in the title to indicate what it addresses.\nAfter submitting the pull request, verify that all status checks (tests, documentation) are passing. Make sure any new contribution is properly documented and tested (you may want to check with coverage tools, using test --coverage from the Julia packaging shell)","category":"page"},{"location":"howToContribute/","page":"How to contribute","title":"How to contribute","text":"After you submitted a pull request, a label might be assigned that allows us to track and manage issues and pull requests.","category":"page"},{"location":"howToContribute/","page":"How to contribute","title":"How to contribute","text":"Tip: if you commit many small, partial changes, you may help us save energy by prefixing your commit names with [skip ci], which deactivates the CI trigger on that commit. With each skipped CI, you may save as much as 15Wh of energy. Testing just the \"final\" commit of the pull-request branch is sufficient.","category":"page"},{"location":"howToContribute/#For-developers:-What-is-the-expected-branch-management/workflow?","page":"How to contribute","title":"For developers: What is the expected branch management/workflow?","text":"","category":"section"},{"location":"howToContribute/","page":"How to contribute","title":"How to contribute","text":"The workflow is based on GitLab flow, i.e., a master branch with feature branches being merged into the master branch. Depending on your access rights, you may open the feature branch in this repository, on in your fork.","category":"page"},{"location":"howToContribute/","page":"How to contribute","title":"How to contribute","text":"The guidelines can be summarized as such:","category":"page"},{"location":"howToContribute/","page":"How to contribute","title":"How to contribute","text":"when making a contribution, create one new branch and open one new PR for each new independent feature or bugfix\ndo not push to another branch unless it is your own\ntry to get a review before merging unless the change is trivial and non-impacting\nconsider prefixing your branch names with your initials, so that one can easily see who owns which branch (e.g. ad-somefeature would be committed by Arthur Dent)","category":"page"},{"location":"advanced/3_custom_models_on_hpc/#Using-customized-models-on-HPC","page":"Using customized models on HPC","title":"Using customized models on HPC","text":"","category":"section"},{"location":"notebooks/2_finding_balance/","page":"Finding balance and variability of constraint-based models","title":"Finding balance and variability of constraint-based models","text":"EditURL = \"https://github.com/LCSB-BioCore/COBREXA.jl/blob/master/docs/src/notebooks/2_finding_balance.jl\"","category":"page"},{"location":"notebooks/2_finding_balance/#Finding-balance-and-variability-of-constraint-based-models","page":"Finding balance and variability of constraint-based models","title":"Finding balance and variability of constraint-based models","text":"","category":"section"},{"location":"notebooks/2_finding_balance/","page":"Finding balance and variability of constraint-based models","title":"Finding balance and variability of constraint-based models","text":"(Image: ) (Image: )","category":"page"},{"location":"notebooks/2_finding_balance/","page":"Finding balance and variability of constraint-based models","title":"Finding balance and variability of constraint-based models","text":"Here we use flux_balance_analysis, flux_variability_analysis, and parsimonious_flux_balance_analysis of COBREXA.jl functions to analyze a toy model of E. coli.","category":"page"},{"location":"notebooks/2_finding_balance/","page":"Finding balance and variability of constraint-based models","title":"Finding balance and variability of constraint-based models","text":"If it is not already present, download the model.","category":"page"},{"location":"notebooks/2_finding_balance/","page":"Finding balance and variability of constraint-based models","title":"Finding balance and variability of constraint-based models","text":"!isfile(\"e_coli_core.xml\") &&\n download(\"http://bigg.ucsd.edu/static/models/e_coli_core.xml\", \"e_coli_core.xml\")\n\nusing COBREXA","category":"page"},{"location":"notebooks/2_finding_balance/","page":"Finding balance and variability of constraint-based models","title":"Finding balance and variability of constraint-based models","text":"tip: Tip: use `?` to get quick help about functions\nWhen you are unsure about how a function works, write ? function_name to see the function reference documentation.","category":"page"},{"location":"notebooks/2_finding_balance/","page":"Finding balance and variability of constraint-based models","title":"Finding balance and variability of constraint-based models","text":"model = load_model(\"e_coli_core.xml\")","category":"page"},{"location":"notebooks/2_finding_balance/#Optimization-solvers-in-COBREXA","page":"Finding balance and variability of constraint-based models","title":"Optimization solvers in COBREXA","text":"","category":"section"},{"location":"notebooks/2_finding_balance/","page":"Finding balance and variability of constraint-based models","title":"Finding balance and variability of constraint-based models","text":"To actually perform any optimization based analysis we need to load an optimizer. Any JuMP.jl-supported optimizers will work. Here, we will use Tulip.jl to optimize linear programs and OSQP.jl to optimize quadratic programs.","category":"page"},{"location":"notebooks/2_finding_balance/","page":"Finding balance and variability of constraint-based models","title":"Finding balance and variability of constraint-based models","text":"note: Note: OSQP can be sensitive\nWe recommend reading the docs of OSQP before using it, since it may give inconsistent results depending on what settings you use. Commercial solvers like Gurobi, Mosek, CPLEX, etc. require less user engagement.","category":"page"},{"location":"notebooks/2_finding_balance/","page":"Finding balance and variability of constraint-based models","title":"Finding balance and variability of constraint-based models","text":"import Pkg\nPkg.add(\"Tulip\")\nPkg.add(\"OSQP\")\n\nusing Tulip\nusing OSQP","category":"page"},{"location":"notebooks/2_finding_balance/#Flux-balance-analysis-(FBA)","page":"Finding balance and variability of constraint-based models","title":"Flux balance analysis (FBA)","text":"","category":"section"},{"location":"notebooks/2_finding_balance/","page":"Finding balance and variability of constraint-based models","title":"Finding balance and variability of constraint-based models","text":"Most analysis functions come in several variants that produce different types of output. All of them usually require a model and JuMP.jl-compatible optimizer to work in the model.","category":"page"},{"location":"notebooks/2_finding_balance/","page":"Finding balance and variability of constraint-based models","title":"Finding balance and variability of constraint-based models","text":"In the case of FBA, you may choose from these variants (here using the Tulip optimizer):","category":"page"},{"location":"notebooks/2_finding_balance/","page":"Finding balance and variability of constraint-based models","title":"Finding balance and variability of constraint-based models","text":"vec_soln = flux_balance_analysis_vec(model, Tulip.Optimizer)","category":"page"},{"location":"notebooks/2_finding_balance/","page":"Finding balance and variability of constraint-based models","title":"Finding balance and variability of constraint-based models","text":"dict_soln = flux_balance_analysis_dict(model, Tulip.Optimizer)","category":"page"},{"location":"notebooks/2_finding_balance/#Modifications","page":"Finding balance and variability of constraint-based models","title":"Modifications","text":"","category":"section"},{"location":"notebooks/2_finding_balance/","page":"Finding balance and variability of constraint-based models","title":"Finding balance and variability of constraint-based models","text":"Often it is desirable to add a slight modififaction to the problem before performing analysis, to see e.g. differences of the model behavior caused by the change introduced.","category":"page"},{"location":"notebooks/2_finding_balance/","page":"Finding balance and variability of constraint-based models","title":"Finding balance and variability of constraint-based models","text":"COBREXA.jl supports several modifications by default, which include changing objective sense, optimizer attributes, flux constraints, optimization objective, reaction and gene knockouts, and others.","category":"page"},{"location":"notebooks/2_finding_balance/","page":"Finding balance and variability of constraint-based models","title":"Finding balance and variability of constraint-based models","text":"dict_soln = flux_balance_analysis_dict(\n model,\n OSQP.Optimizer;\n modifications = [ # modifications are applied in order\n # this changes the objective to maximize the biomass production\n change_objective(\"R_BIOMASS_Ecoli_core_w_GAM\"),\n\n # this fixes a specific rate of the glucose exchange\n change_constraint(\"R_EX_glc__D_e\", -12, -12),\n\n # this knocks out two genes, i.e. constrains their associated reactions to zero.\n knockout([\"b0978\", \"b0734\"]), ## the gene IDs are cytochrome oxidase (CYTBD)\n\n # ignore the optimizer specified above and change it to Tulip\n change_optimizer(Tulip.Optimizer),\n\n # set a custom attribute of the Tulip optimizer (see Tulip docs for more possibilities)\n change_optimizer_attribute(\"IPM_IterationsLimit\", 110),\n\n # explicitly tell the optimizer to maximize the new objective\n change_sense(MAX_SENSE),\n ],\n)","category":"page"},{"location":"notebooks/2_finding_balance/#Flux-variability-analysis-(FVA)","page":"Finding balance and variability of constraint-based models","title":"Flux variability analysis (FVA)","text":"","category":"section"},{"location":"notebooks/2_finding_balance/","page":"Finding balance and variability of constraint-based models","title":"Finding balance and variability of constraint-based models","text":"The default FVA in flux_variability_analysis returns maximized and minimized reaction fluxes in a matrix. Here we use the dictionary variant in fluxvariabilityanalysis_dict, to show how to easily access specific fluxes from its results.","category":"page"},{"location":"notebooks/2_finding_balance/","page":"Finding balance and variability of constraint-based models","title":"Finding balance and variability of constraint-based models","text":"fva_mins, fva_maxs = flux_variability_analysis_dict(\n model,\n Tulip.Optimizer;\n bounds = objective_bounds(0.99), # the objective function is allowed to vary by ~1% from the FBA optimum\n modifications = [\n change_optimizer_attribute(\"IPM_IterationsLimit\", 500),\n change_constraint(\"R_EX_glc__D_e\", -10, -10),\n change_constraint(\"R_EX_o2_e\", 0.0, 0.0),\n ],\n)","category":"page"},{"location":"notebooks/2_finding_balance/","page":"Finding balance and variability of constraint-based models","title":"Finding balance and variability of constraint-based models","text":"fva_maxs[\"R_EX_ac_e\"][\"R_EX_ac_e\"] # get the maximal acetate exchange flux","category":"page"},{"location":"notebooks/2_finding_balance/#Parsimonious-flux-balance-analysis-(pFBA)","page":"Finding balance and variability of constraint-based models","title":"Parsimonious flux balance analysis (pFBA)","text":"","category":"section"},{"location":"notebooks/2_finding_balance/","page":"Finding balance and variability of constraint-based models","title":"Finding balance and variability of constraint-based models","text":"Parsimonious flux balance analysis (here in parsimonious_flux_balance_analysis finds a unique flux solution that minimizes the squared sum of fluxes of the system subject, while maintaining the same objective value as the flux balance analysis solution. Since we are optimizing a quadratic objective, we also need to switch to a quadratic optimizer. In this case, OSQP will work. We demonstrate it on the dictionary-returning variant of pFBA, parsimonious_flux_balance_analysis_dict:","category":"page"},{"location":"notebooks/2_finding_balance/","page":"Finding balance and variability of constraint-based models","title":"Finding balance and variability of constraint-based models","text":"dict_soln = parsimonious_flux_balance_analysis_dict(\n model,\n OSQP.Optimizer;\n modifications = [\n change_optimizer_attribute(\"verbose\", false), # silence the optimizer (OSQP is very verbose by default)\n change_constraint(\"R_EX_glc__D_e\", -12, -12),\n ],\n)","category":"page"},{"location":"notebooks/2_finding_balance/","page":"Finding balance and variability of constraint-based models","title":"Finding balance and variability of constraint-based models","text":"The function also has the expectable second variant that returns a vector of solutions, in parsimonious_flux_balance_analysis_vec. Here, we utilize it to show how to use different optimizers for finding the optimum and for solving the quadratic problem. That may be preferable if the optimizer qualities differ for the differing tasks. pFBA allows you to specify qp_modifications that are applied after the original optimum is found, and before the quadratic part of the problem solving begins.","category":"page"},{"location":"notebooks/2_finding_balance/","page":"Finding balance and variability of constraint-based models","title":"Finding balance and variability of constraint-based models","text":"vec_soln = parsimonious_flux_balance_analysis_vec(\n model,\n Tulip.Optimizer; # start with Tulip\n modifications = [\n change_constraint(\"R_EX_glc__D_e\", -12, -12),\n change_optimizer_attribute(\"IPM_IterationsLimit\", 500), # we may change Tulip-specific attributes here\n ],\n qp_modifications = [\n change_optimizer(OSQP.Optimizer), # now switch to OSQP (Tulip wouldn't be able to finish the computation)\n change_optimizer_attribute(\"verbose\", false), # and silence it.\n ],\n)","category":"page"},{"location":"notebooks/2_finding_balance/","page":"Finding balance and variability of constraint-based models","title":"Finding balance and variability of constraint-based models","text":"","category":"page"},{"location":"notebooks/2_finding_balance/","page":"Finding balance and variability of constraint-based models","title":"Finding balance and variability of constraint-based models","text":"This page was generated using Literate.jl.","category":"page"},{"location":"notebooks/1_loading_converting_saving/","page":"Loading, converting, and saving models","title":"Loading, converting, and saving models","text":"EditURL = \"https://github.com/LCSB-BioCore/COBREXA.jl/blob/master/docs/src/notebooks/1_loading_converting_saving.jl\"","category":"page"},{"location":"notebooks/1_loading_converting_saving/#Loading,-converting,-and-saving-models","page":"Loading, converting, and saving models","title":"Loading, converting, and saving models","text":"","category":"section"},{"location":"notebooks/1_loading_converting_saving/","page":"Loading, converting, and saving models","title":"Loading, converting, and saving models","text":"(Image: ) (Image: )","category":"page"},{"location":"notebooks/1_loading_converting_saving/","page":"Loading, converting, and saving models","title":"Loading, converting, and saving models","text":"COBREXA can load models stored in .mat, .json, and .xml formats (with the latter denoting SBML formatted models).","category":"page"},{"location":"notebooks/1_loading_converting_saving/","page":"Loading, converting, and saving models","title":"Loading, converting, and saving models","text":"We will primarily use the E. Coli \"core\" model to demonstrate the utilities found in COBREXA. First, let's download the model in several formats.","category":"page"},{"location":"notebooks/1_loading_converting_saving/","page":"Loading, converting, and saving models","title":"Loading, converting, and saving models","text":"# Downloads the model files if they don't already exist\n!isfile(\"e_coli_core.mat\") &&\n download(\"http://bigg.ucsd.edu/static/models/e_coli_core.mat\", \"e_coli_core.mat\");\n!isfile(\"e_coli_core.json\") &&\n download(\"http://bigg.ucsd.edu/static/models/e_coli_core.json\", \"e_coli_core.json\");\n!isfile(\"e_coli_core.xml\") &&\n download(\"http://bigg.ucsd.edu/static/models/e_coli_core.xml\", \"e_coli_core.xml\");\nnothing #hide","category":"page"},{"location":"notebooks/1_loading_converting_saving/","page":"Loading, converting, and saving models","title":"Loading, converting, and saving models","text":"Now, load the package:","category":"page"},{"location":"notebooks/1_loading_converting_saving/","page":"Loading, converting, and saving models","title":"Loading, converting, and saving models","text":"using COBREXA","category":"page"},{"location":"notebooks/1_loading_converting_saving/","page":"Loading, converting, and saving models","title":"Loading, converting, and saving models","text":"tip: Save bandwidth!\nThe published models usually do not change very often. It is therefore pretty useful to save them to a central location and load them from there. That saves your time, and does not unnecessarily consume the connectivity resources of the model repository.","category":"page"},{"location":"notebooks/1_loading_converting_saving/#Loading-models","page":"Loading, converting, and saving models","title":"Loading models","text":"","category":"section"},{"location":"notebooks/1_loading_converting_saving/","page":"Loading, converting, and saving models","title":"Loading, converting, and saving models","text":"Load the models using the load_model function. Each model is able to \"pretty-print\" itself, hiding the inner complexity.","category":"page"},{"location":"notebooks/1_loading_converting_saving/","page":"Loading, converting, and saving models","title":"Loading, converting, and saving models","text":"mat_model = load_model(\"e_coli_core.mat\")","category":"page"},{"location":"notebooks/1_loading_converting_saving/","page":"Loading, converting, and saving models","title":"Loading, converting, and saving models","text":"json_model = load_model(\"e_coli_core.json\")","category":"page"},{"location":"notebooks/1_loading_converting_saving/","page":"Loading, converting, and saving models","title":"Loading, converting, and saving models","text":"sbml_model = load_model(\"e_coli_core.xml\")","category":"page"},{"location":"notebooks/1_loading_converting_saving/","page":"Loading, converting, and saving models","title":"Loading, converting, and saving models","text":"note: Note: `load_model` infers the output type from the file extension\nNotice how each model was read into memory as a model type corresponding to its file type, i.e. the file ending with .json loaded as a JSONModel, the file ending with .mat loaded as MATModel, and the file ending with .xml loaded as an SBMLModel.","category":"page"},{"location":"notebooks/1_loading_converting_saving/","page":"Loading, converting, and saving models","title":"Loading, converting, and saving models","text":"You can directly inspect the model objects, although only with a specific way for each specific type.","category":"page"},{"location":"notebooks/1_loading_converting_saving/","page":"Loading, converting, and saving models","title":"Loading, converting, and saving models","text":"JSON models contain their corresponding JSON:","category":"page"},{"location":"notebooks/1_loading_converting_saving/","page":"Loading, converting, and saving models","title":"Loading, converting, and saving models","text":"json_model.json","category":"page"},{"location":"notebooks/1_loading_converting_saving/","page":"Loading, converting, and saving models","title":"Loading, converting, and saving models","text":"SBML models contain a complicated structure from SBML.jl package:","category":"page"},{"location":"notebooks/1_loading_converting_saving/","page":"Loading, converting, and saving models","title":"Loading, converting, and saving models","text":"typeof(sbml_model.sbml)","category":"page"},{"location":"notebooks/1_loading_converting_saving/","page":"Loading, converting, and saving models","title":"Loading, converting, and saving models","text":"MAT models contain MATLAB data:","category":"page"},{"location":"notebooks/1_loading_converting_saving/","page":"Loading, converting, and saving models","title":"Loading, converting, and saving models","text":"mat_model.mat","category":"page"},{"location":"notebooks/1_loading_converting_saving/#Using-the-generic-interface-to-access-model-details","page":"Loading, converting, and saving models","title":"Using the generic interface to access model details","text":"","category":"section"},{"location":"notebooks/1_loading_converting_saving/","page":"Loading, converting, and saving models","title":"Loading, converting, and saving models","text":"To prevent the complexities of object representation, COBREXA.jl uses a set of generic interface functions that extract various important information from all supported model types. This approach ensures that the analysis functions can work on any data.","category":"page"},{"location":"notebooks/1_loading_converting_saving/","page":"Loading, converting, and saving models","title":"Loading, converting, and saving models","text":"For example, you can check the reactions and metabolites contained in SBML and JSON models using the same accessor:","category":"page"},{"location":"notebooks/1_loading_converting_saving/","page":"Loading, converting, and saving models","title":"Loading, converting, and saving models","text":"reactions(json_model)","category":"page"},{"location":"notebooks/1_loading_converting_saving/","page":"Loading, converting, and saving models","title":"Loading, converting, and saving models","text":"reactions(sbml_model)","category":"page"},{"location":"notebooks/1_loading_converting_saving/","page":"Loading, converting, and saving models","title":"Loading, converting, and saving models","text":"issetequal(reactions(json_model), reactions(mat_model)) # do models contain the same reactions?","category":"page"},{"location":"notebooks/1_loading_converting_saving/","page":"Loading, converting, and saving models","title":"Loading, converting, and saving models","text":"All accessors are defined in a single file in COBREXA source code; you may therefore get a list of all accessors as follows:","category":"page"},{"location":"notebooks/1_loading_converting_saving/","page":"Loading, converting, and saving models","title":"Loading, converting, and saving models","text":"using InteractiveUtils\n\nfor method in filter(\n x -> endswith(string(x.file), \"MetabolicModel.jl\"),\n InteractiveUtils.methodswith(MetabolicModel, COBREXA),\n)\n println(method.name)\nend","category":"page"},{"location":"notebooks/1_loading_converting_saving/#Converting-between-model-types","page":"Loading, converting, and saving models","title":"Converting between model types","text":"","category":"section"},{"location":"notebooks/1_loading_converting_saving/","page":"Loading, converting, and saving models","title":"Loading, converting, and saving models","text":"It is possible to convert model types to-and-fro. To do this, use the convert function, which is overloaded from Julia's Base.","category":"page"},{"location":"notebooks/1_loading_converting_saving/","page":"Loading, converting, and saving models","title":"Loading, converting, and saving models","text":"danger: Data loss may occur when converting between models\nThe conversion of models only uses the data accessible through the generic accessors. Other data may get lost.","category":"page"},{"location":"notebooks/1_loading_converting_saving/","page":"Loading, converting, and saving models","title":"Loading, converting, and saving models","text":"m = convert(MATModel, json_model)","category":"page"},{"location":"notebooks/1_loading_converting_saving/","page":"Loading, converting, and saving models","title":"Loading, converting, and saving models","text":"m will now contain the MATLAB-style matrix representation of the model:","category":"page"},{"location":"notebooks/1_loading_converting_saving/","page":"Loading, converting, and saving models","title":"Loading, converting, and saving models","text":"Matrix(m.mat[\"S\"])","category":"page"},{"location":"notebooks/1_loading_converting_saving/","page":"Loading, converting, and saving models","title":"Loading, converting, and saving models","text":"The loading and conversion can be combined using a shortcut:","category":"page"},{"location":"notebooks/1_loading_converting_saving/","page":"Loading, converting, and saving models","title":"Loading, converting, and saving models","text":"m = load_model(MATModel, \"e_coli_core.json\")","category":"page"},{"location":"notebooks/1_loading_converting_saving/#Saving-and-exporting-models","page":"Loading, converting, and saving models","title":"Saving and exporting models","text":"","category":"section"},{"location":"notebooks/1_loading_converting_saving/","page":"Loading, converting, and saving models","title":"Loading, converting, and saving models","text":"COBREXA.jl supports exporting the models in JSON and MAT format, using save_model.","category":"page"},{"location":"notebooks/1_loading_converting_saving/","page":"Loading, converting, and saving models","title":"Loading, converting, and saving models","text":"save_model(m, \"converted_model.json\")\nsave_model(m, \"converted_model.mat\")","category":"page"},{"location":"notebooks/1_loading_converting_saving/","page":"Loading, converting, and saving models","title":"Loading, converting, and saving models","text":"If you need a non-standard suffix, use the type-specific saving functions:","category":"page"},{"location":"notebooks/1_loading_converting_saving/","page":"Loading, converting, and saving models","title":"Loading, converting, and saving models","text":"save_json_model(m, \"file.without.a.good.suffix\")\nsave_mat_model(m, \"another.file.matlab\")","category":"page"},{"location":"notebooks/1_loading_converting_saving/","page":"Loading, converting, and saving models","title":"Loading, converting, and saving models","text":"If you are saving the models only for future processing in Julia environment, it is often wasteful to encode the models to external formats and decode them back. Instead, you can use the \"native\" Julia data format, accessible with package Serialization.","category":"page"},{"location":"notebooks/1_loading_converting_saving/","page":"Loading, converting, and saving models","title":"Loading, converting, and saving models","text":"This way, you can use serialize to save even the StandardModel that has no file format associated:","category":"page"},{"location":"notebooks/1_loading_converting_saving/","page":"Loading, converting, and saving models","title":"Loading, converting, and saving models","text":"using Serialization\n\nsm = convert(StandardModel, m)\n\nopen(f -> serialize(f, sm), \"myModel.stdmodel\", \"w\")","category":"page"},{"location":"notebooks/1_loading_converting_saving/","page":"Loading, converting, and saving models","title":"Loading, converting, and saving models","text":"The models can then be loaded back using deserialize:","category":"page"},{"location":"notebooks/1_loading_converting_saving/","page":"Loading, converting, and saving models","title":"Loading, converting, and saving models","text":"sm2 = deserialize(\"myModel.stdmodel\")\nissetequal(metabolites(sm), metabolites(sm2))","category":"page"},{"location":"notebooks/1_loading_converting_saving/","page":"Loading, converting, and saving models","title":"Loading, converting, and saving models","text":"This form of loading operation is usually pretty quick:","category":"page"},{"location":"notebooks/1_loading_converting_saving/","page":"Loading, converting, and saving models","title":"Loading, converting, and saving models","text":"t = @elapsed deserialize(\"myModel.stdmodel\")\n@info \"Deserialization took $t seconds\"","category":"page"},{"location":"notebooks/1_loading_converting_saving/","page":"Loading, converting, and saving models","title":"Loading, converting, and saving models","text":"Notably, large and complicated models with thousands of reactions and annotations can take seconds to decode properly. Serialization allows you to almost completely remove this overhead, and scales well to tens of millions of reactions.","category":"page"},{"location":"notebooks/1_loading_converting_saving/","page":"Loading, converting, and saving models","title":"Loading, converting, and saving models","text":"","category":"page"},{"location":"notebooks/1_loading_converting_saving/","page":"Loading, converting, and saving models","title":"Loading, converting, and saving models","text":"This page was generated using Literate.jl.","category":"page"},{"location":"notebooks/3_basic_stdmodel_usage/","page":"Basic usage of StandardModel","title":"Basic usage of StandardModel","text":"EditURL = \"https://github.com/LCSB-BioCore/COBREXA.jl/blob/master/docs/src/notebooks/3_basic_stdmodel_usage.jl\"","category":"page"},{"location":"notebooks/3_basic_stdmodel_usage/#Basic-usage-of-StandardModel","page":"Basic usage of StandardModel","title":"Basic usage of StandardModel","text":"","category":"section"},{"location":"notebooks/3_basic_stdmodel_usage/","page":"Basic usage of StandardModel","title":"Basic usage of StandardModel","text":"(Image: ) (Image: )","category":"page"},{"location":"notebooks/3_basic_stdmodel_usage/","page":"Basic usage of StandardModel","title":"Basic usage of StandardModel","text":"In this tutorial we will use COBREXA's StandardModel and functions that specifically operate on it. As usual we will use the toy model of E. coli for demonstration.","category":"page"},{"location":"notebooks/3_basic_stdmodel_usage/","page":"Basic usage of StandardModel","title":"Basic usage of StandardModel","text":"!isfile(\"e_coli_core.json\") &&\n download(\"http://bigg.ucsd.edu/static/models/e_coli_core.json\", \"e_coli_core.json\")\n\nusing COBREXA","category":"page"},{"location":"notebooks/3_basic_stdmodel_usage/#Loading-a-model","page":"Basic usage of StandardModel","title":"Loading a model","text":"","category":"section"},{"location":"notebooks/3_basic_stdmodel_usage/","page":"Basic usage of StandardModel","title":"Basic usage of StandardModel","text":"model = load_model(StandardModel, \"e_coli_core.json\") # we specifically want to load a StandardModel from the model file","category":"page"},{"location":"notebooks/3_basic_stdmodel_usage/","page":"Basic usage of StandardModel","title":"Basic usage of StandardModel","text":"note: Note: Loading `StandardModel`s implicitly uses `convert`\nWhen using load_model(StandardModel, file_location) the model at file_location is first loaded into its inferred format and is then converted to a StandardModel using the generic accessor interface. Thus, data loss may occur. Always check your model to ensure that nothing important has been lost.","category":"page"},{"location":"notebooks/3_basic_stdmodel_usage/#Basic-analysis","page":"Basic usage of StandardModel","title":"Basic analysis","text":"","category":"section"},{"location":"notebooks/3_basic_stdmodel_usage/","page":"Basic usage of StandardModel","title":"Basic usage of StandardModel","text":"As before, for optimization based analysis we need to load an optimizer. Here we will use Tulip.jl to solve the linear programs of this tutorial. Refer to the basic constraint-based analysis tutorial for more informaiton.","category":"page"},{"location":"notebooks/3_basic_stdmodel_usage/","page":"Basic usage of StandardModel","title":"Basic usage of StandardModel","text":"All the normal analysis functions work on StandardModel, due to it also having the same generic accessor interface as all the other model types.","category":"page"},{"location":"notebooks/3_basic_stdmodel_usage/","page":"Basic usage of StandardModel","title":"Basic usage of StandardModel","text":"using Tulip\n\ndict_sol = flux_balance_analysis_dict(\n model,\n Tulip.Optimizer;\n modifications = [\n change_objective(\"BIOMASS_Ecoli_core_w_GAM\"),\n change_constraint(\"EX_glc__D_e\", -12, -12),\n change_constraint(\"EX_o2_e\", 0, 0),\n ],\n)","category":"page"},{"location":"notebooks/3_basic_stdmodel_usage/","page":"Basic usage of StandardModel","title":"Basic usage of StandardModel","text":"This is not very exciting yet, since every other model type can also do this. However, deeper inspection of flux results is possible when using StandardModel.","category":"page"},{"location":"notebooks/3_basic_stdmodel_usage/#Inspecting-the-flux-solution:-atom_exchange","page":"Basic usage of StandardModel","title":"Inspecting the flux solution: atom_exchange","text":"","category":"section"},{"location":"notebooks/3_basic_stdmodel_usage/","page":"Basic usage of StandardModel","title":"Basic usage of StandardModel","text":"It is sometimes interesting to keep track of the atoms entering and leaving the system through boundary reactions. This can be inspected by calling atom_exchange.","category":"page"},{"location":"notebooks/3_basic_stdmodel_usage/","page":"Basic usage of StandardModel","title":"Basic usage of StandardModel","text":"atom_exchange(dict_sol, model) # flux of individual atoms entering and leaving the system through boundary reactions (e.g. exchange reactions) based on flux_dict","category":"page"},{"location":"notebooks/3_basic_stdmodel_usage/#Inspecting-the-flux-solution:-metabolite_fluxes","page":"Basic usage of StandardModel","title":"Inspecting the flux solution: metabolite_fluxes","text":"","category":"section"},{"location":"notebooks/3_basic_stdmodel_usage/","page":"Basic usage of StandardModel","title":"Basic usage of StandardModel","text":"Another useful flux result analysis function is metabolite_fluxes. This function keeps track of reactions consuming and producing each metabolite.","category":"page"},{"location":"notebooks/3_basic_stdmodel_usage/","page":"Basic usage of StandardModel","title":"Basic usage of StandardModel","text":"consuming, producing = metabolite_fluxes(dict_sol, model)\n\nconsuming[\"atp_c\"] # reactions consuming atp_c","category":"page"},{"location":"notebooks/3_basic_stdmodel_usage/#Internals-of-StandardModel","page":"Basic usage of StandardModel","title":"Internals of StandardModel","text":"","category":"section"},{"location":"notebooks/3_basic_stdmodel_usage/","page":"Basic usage of StandardModel","title":"Basic usage of StandardModel","text":"Another benefit of StandardModel is that it supports a richer internal infrastructure that can be used to manipulate internal model attributes in a systematic way. Specifically, the genes, reactions, and metabolites with of a model each have a type. This is particularly useful when modifying or even constructing a model from scratch.","category":"page"},{"location":"notebooks/3_basic_stdmodel_usage/#Genes,-Reactions,-and-Metabolites","page":"Basic usage of StandardModel","title":"Genes, Reactions, and Metabolites","text":"","category":"section"},{"location":"notebooks/3_basic_stdmodel_usage/","page":"Basic usage of StandardModel","title":"Basic usage of StandardModel","text":"StandardModel is composed of ordered dictionaries of Genes, Metabolites and Reactions. Ordered dictionaries are used because the order of the reactions and metabolites are important for constructing a stoichiometric matrix since the rows and columns should correspond to the order of the metabolites and reactions returned by calling the accessors metabolites and reactions.","category":"page"},{"location":"notebooks/3_basic_stdmodel_usage/","page":"Basic usage of StandardModel","title":"Basic usage of StandardModel","text":"Each StandardModel is composed of the following fields:","category":"page"},{"location":"notebooks/3_basic_stdmodel_usage/","page":"Basic usage of StandardModel","title":"Basic usage of StandardModel","text":"fieldnames(StandardModel) # fields of a StandardModel","category":"page"},{"location":"notebooks/3_basic_stdmodel_usage/","page":"Basic usage of StandardModel","title":"Basic usage of StandardModel","text":"The :genes field of a StandardModel contains an ordered dictionary of gene ids mapped to Genes.","category":"page"},{"location":"notebooks/3_basic_stdmodel_usage/","page":"Basic usage of StandardModel","title":"Basic usage of StandardModel","text":"model.genes # the keys of this dictionary are the same as genes(model)","category":"page"},{"location":"notebooks/3_basic_stdmodel_usage/","page":"Basic usage of StandardModel","title":"Basic usage of StandardModel","text":"The Gene type is a struct that can be used to store information about genes in a StandardModel. Each Gene is composed of the following fields:","category":"page"},{"location":"notebooks/3_basic_stdmodel_usage/","page":"Basic usage of StandardModel","title":"Basic usage of StandardModel","text":"fieldnames(Gene)","category":"page"},{"location":"notebooks/3_basic_stdmodel_usage/","page":"Basic usage of StandardModel","title":"Basic usage of StandardModel","text":"tip: Tip: Use <tab> complete to explore the structure of types\nUse <tab> to quickly explore the fields of a struct. For example, Gene.<tab> will list all the fields shown above.","category":"page"},{"location":"notebooks/3_basic_stdmodel_usage/","page":"Basic usage of StandardModel","title":"Basic usage of StandardModel","text":"The keys used in the ordered dictionaries in model.genes are the ids returned using the generic accessor genes. Genes have pretty printing, as demonstrated below for a random gene drawn from the model:","category":"page"},{"location":"notebooks/3_basic_stdmodel_usage/","page":"Basic usage of StandardModel","title":"Basic usage of StandardModel","text":"random_gene_id = genes(model)[rand(1:n_genes(model))]\nmodel.genes[random_gene_id]","category":"page"},{"location":"notebooks/3_basic_stdmodel_usage/","page":"Basic usage of StandardModel","title":"Basic usage of StandardModel","text":"The same idea holds for both metabolites (stored as Metabolites) and reactions (stored as Reactions). This is demonstrated below.","category":"page"},{"location":"notebooks/3_basic_stdmodel_usage/","page":"Basic usage of StandardModel","title":"Basic usage of StandardModel","text":"random_metabolite_id = metabolites(model)[rand(1:n_metabolites(model))]\nmodel.metabolites[random_metabolite_id]","category":"page"},{"location":"notebooks/3_basic_stdmodel_usage/","page":"Basic usage of StandardModel","title":"Basic usage of StandardModel","text":"random_reaction_id = reactions(model)[rand(1:n_reactions(model))]\nmodel.reactions[random_reaction_id]","category":"page"},{"location":"notebooks/3_basic_stdmodel_usage/","page":"Basic usage of StandardModel","title":"Basic usage of StandardModel","text":"StandardModel can be used to build your own metabolic model or modify an existing one. One of the main use cases for StandardModel is that it can be used to merge multiple models or parts of multiple models together. Since the internals are uniform inside each StandardModel, attributes of other model types are squashed into the required format (using the generic accessors). This ensures that the internals of all StandardModels are the same - allowing easy systematic evaluation.","category":"page"},{"location":"notebooks/3_basic_stdmodel_usage/","page":"Basic usage of StandardModel","title":"Basic usage of StandardModel","text":"warning: Warning: Combining models with different namespaces is tricky\nCombining models that use different namespaces requires care. For example, in some models the water exchange reaction is called EX_h2o_e, while in others it is called R_EX_h2o_s. This needs to manually addressed (for now) to prevent duplicate, e.g. reactions, from being added.","category":"page"},{"location":"notebooks/3_basic_stdmodel_usage/#Checking-the-internals-of-StandardModels:-annotation_index","page":"Basic usage of StandardModel","title":"Checking the internals of StandardModels: annotation_index","text":"","category":"section"},{"location":"notebooks/3_basic_stdmodel_usage/","page":"Basic usage of StandardModel","title":"Basic usage of StandardModel","text":"Often when models are automatically reconstructed duplicate genes, reactions or metabolites end up in a model. COBREXA exports annotation_index to check for cases where the id of a struct may be different, but the annotations the same (possibly suggesting a duplication). annotation_index builds a dictionary mapping annotation features to the ids of whatever struct you are inspecting. This makes it easy to find structs that share certain annotation features.","category":"page"},{"location":"notebooks/3_basic_stdmodel_usage/","page":"Basic usage of StandardModel","title":"Basic usage of StandardModel","text":"rxn_annotations = annotation_index(model.reactions)","category":"page"},{"location":"notebooks/3_basic_stdmodel_usage/","page":"Basic usage of StandardModel","title":"Basic usage of StandardModel","text":"rxn_annotations[\"ec-code\"]","category":"page"},{"location":"notebooks/3_basic_stdmodel_usage/","page":"Basic usage of StandardModel","title":"Basic usage of StandardModel","text":"The annotation_index function can also be used on Reactions and Genes in the same way.","category":"page"},{"location":"notebooks/3_basic_stdmodel_usage/#Checking-the-internals-of-StandardModels:-check_duplicate_reaction","page":"Basic usage of StandardModel","title":"Checking the internals of StandardModels: check_duplicate_reaction","text":"","category":"section"},{"location":"notebooks/3_basic_stdmodel_usage/","page":"Basic usage of StandardModel","title":"Basic usage of StandardModel","text":"Another useful function is check_duplicate_reaction, which checks for reactions that have duplicate (or similar) reaction equations.","category":"page"},{"location":"notebooks/3_basic_stdmodel_usage/","page":"Basic usage of StandardModel","title":"Basic usage of StandardModel","text":"pgm_duplicate = Reaction()\npgm_duplicate.id = \"pgm2\" # Phosphoglycerate mutase\npgm_duplicate.metabolites = Dict{String,Float64}(\"3pg_c\" => 1, \"2pg_c\" => -1)\npgm_duplicate","category":"page"},{"location":"notebooks/3_basic_stdmodel_usage/","page":"Basic usage of StandardModel","title":"Basic usage of StandardModel","text":"check_duplicate_reaction(pgm_duplicate, model.reactions; only_metabolites = false) # can also just check if only the metabolites are the same but different stoichiometry is used","category":"page"},{"location":"notebooks/3_basic_stdmodel_usage/#Checking-the-internals-of-StandardModels:-is_mass_balanced","page":"Basic usage of StandardModel","title":"Checking the internals of StandardModels: is_mass_balanced","text":"","category":"section"},{"location":"notebooks/3_basic_stdmodel_usage/","page":"Basic usage of StandardModel","title":"Basic usage of StandardModel","text":"Finally, is_mass_balanced can be used to check if a reaction is mass balanced based on the formulas of the reaction equation.","category":"page"},{"location":"notebooks/3_basic_stdmodel_usage/","page":"Basic usage of StandardModel","title":"Basic usage of StandardModel","text":"pgm_duplicate.metabolites = Dict{String,Float64}(\"3pg_c\" => 1, \"2pg_c\" => -1, \"h2o_c\" => 1) # not mass balanced now\nis_bal, extra_atoms = is_mass_balanced(pgm_duplicate, model) # extra_atoms shows which atoms are in excess/deficit","category":"page"},{"location":"notebooks/3_basic_stdmodel_usage/","page":"Basic usage of StandardModel","title":"Basic usage of StandardModel","text":"","category":"page"},{"location":"notebooks/3_basic_stdmodel_usage/","page":"Basic usage of StandardModel","title":"Basic usage of StandardModel","text":"This page was generated using Literate.jl.","category":"page"},{"location":"advanced/5_debugging/#Tracing-and-debugging","page":"Tracing and debugging","title":"Tracing and debugging","text":"","category":"section"},{"location":"","page":"Home","title":"Home","text":"<br>\n<div align=\"center\">\n <img class=\"docs-light-only\" src=\"assets/header.svg?maxAge=0\" width=\"80%\">\n <img class=\"docs-dark-only\" src=\"assets/header-dark.svg?maxAge=0\" width=\"80%\">\n</div>\n<br>","category":"page"},{"location":"#Constraint-Based-Reconstruction-and-EXascale-Analysis","page":"Home","title":"Constraint-Based Reconstruction and EXascale Analysis","text":"","category":"section"},{"location":"","page":"Home","title":"Home","text":"Repository Tests Coverage How to contribute?\n(Image: GitHub) (Image: CI) (Image: codecov) (Image: contrib)","category":"page"},{"location":"","page":"Home","title":"Home","text":"COBREXA is a toolkit for working with large constraint-based metabolic models, and a running very large number of analysis tasks on these models in parallel. Its main purpose is to make the methods of Constraint-based Reconstruction and Analysis (COBRA) scale to problem sizes that require the use of huge computer clusters and HPC environments, which allows them to be realistically applied to pre-exascale-sized models.","category":"page"},{"location":"","page":"Home","title":"Home","text":"In this package, you will find the usual COBRA-like functions that interface to underlying linear programming solvers. We use JuMP.jl as the unified interface for many solvers; you can plug in whichever compatible solver you want, including the popular Tulip.jl, GLPK.jl, OSQP.jl, and Gurobi.jl.","category":"page"},{"location":"","page":"Home","title":"Home","text":"<div align=\"center\">\n<img style=\"width:300px;margin:10px;border-offset:15px;border: 1px solid #eee;border-radius: 50%;padding: 10px;-webkit-border-radius: 50%;-moz-border-radius: 50%;\" src=\"assets/output.gif\" alt=\"history\"><br>\nDevelopment history of COBREXA.jl.\n</div>","category":"page"},{"location":"#Quick-start-guide","page":"Home","title":"Quick start guide","text":"","category":"section"},{"location":"","page":"Home","title":"Home","text":"You can install COBREXA from Julia repositories. Start julia, press ] to switch to the Packaging environment, and type:","category":"page"},{"location":"","page":"Home","title":"Home","text":"add COBREXA","category":"page"},{"location":"","page":"Home","title":"Home","text":"You also need to install your favorite solver supported by JuMP.jl, typing e.g.:","category":"page"},{"location":"","page":"Home","title":"Home","text":"add Tulip","category":"page"},{"location":"","page":"Home","title":"Home","text":"When the packages are installed, switch back to the \"normal\" julia shell by pressing Backspace (the prompt should change color back to green). After that, you can download a SBML model from the internet and perform a flux balance analysis as follows:","category":"page"},{"location":"","page":"Home","title":"Home","text":"using COBREXA # loads the package\nusing Tulip # loads the optimization solver\n\n# download the model\ndownload(\"http://bigg.ucsd.edu/static/models/e_coli_core.xml\", \"e_coli_core.xml\")\n\n# open the SBML file and load the contents\nmodel = load_model(\"e_coli_core.xml\")\n\n# run a FBA\nfluxes = flux_balance_analysis_dict(model, Tulip.Optimizer)","category":"page"},{"location":"","page":"Home","title":"Home","text":"The variable fluxes will now contain a dictionary of the computed optimal flux of each reaction in the model:","category":"page"},{"location":"","page":"Home","title":"Home","text":"Dict{String,Float64} with 95 entries:\n \"R_EX_fum_e\" => 0.0\n \"R_ACONTb\" => 6.00725\n \"R_TPI\" => 7.47738\n \"R_SUCOAS\" => -5.06438\n \"R_GLNS\" => 0.223462\n \"R_EX_pi_e\" => -3.2149\n \"R_PPC\" => 2.50431\n \"R_O2t\" => 21.7995\n \"R_G6PDH2r\" => 4.95999\n \"R_TALA\" => 1.49698\n ⋮ => ⋮","category":"page"},{"location":"#Tutorials","page":"Home","title":"Tutorials","text":"","category":"section"},{"location":"","page":"Home","title":"Home","text":"Detailed tutorial content is available here.","category":"page"},{"location":"","page":"Home","title":"Home","text":"Pages = joinpath.(\"tutorials\", filter(x -> endswith(x, \".md\"), readdir(\"tutorials\")))\nDepth = 1","category":"page"},{"location":"#Example-notebooks-and-workflows","page":"Home","title":"Example notebooks and workflows","text":"","category":"section"},{"location":"","page":"Home","title":"Home","text":"Detailed notebook content is available here.","category":"page"},{"location":"","page":"Home","title":"Home","text":"Pages = joinpath.(\"notebooks\", filter(x -> endswith(x, \".md\"), readdir(\"notebooks\")))\nDepth = 1","category":"page"},{"location":"#Functions-reference","page":"Home","title":"Functions reference","text":"","category":"section"},{"location":"","page":"Home","title":"Home","text":"Pages = [\"functions.md\"]","category":"page"},{"location":"#Contribution-guide","page":"Home","title":"Contribution guide","text":"","category":"section"},{"location":"","page":"Home","title":"Home","text":"If you wish to contribute code, patches or improvements to COBREXA.jl, please read the basic contribution guidelines and hints..","category":"page"},{"location":"#Acknowledgements","page":"Home","title":"Acknowledgements","text":"","category":"section"},{"location":"","page":"Home","title":"Home","text":"COBREXA.jl is developed at the Luxembourg Centre for Systems Biomedicine of the University of Luxembourg (uni.lu/lcsb), cooperating with the Institute for Quantitative and Theoretical Biology at the Heinrich Heine University in Düsseldorf (qtb.hhu.de).","category":"page"},{"location":"","page":"Home","title":"Home","text":"The development was supported by European Union's Horizon 2020 Programme under PerMedCoE project (permedcoe.eu) agreement no. 951773.","category":"page"},{"location":"","page":"Home","title":"Home","text":"<img src=\"https://lcsb-biocore.github.io/COBREXA.jl/stable/assets/cobrexa.svg\" alt=\"COBREXA logo\" height=\"64px\" style=\"height:64px; width:auto\">   <img src=\"https://lcsb-biocore.github.io/COBREXA.jl/stable/assets/unilu.svg\" alt=\"Uni.lu logo\" height=\"64px\" style=\"height:64px; width:auto\">   <img src=\"https://lcsb-biocore.github.io/COBREXA.jl/stable/assets/lcsb.svg\" alt=\"LCSB logo\" height=\"64px\" style=\"height:64px; width:auto\">   <img src=\"https://lcsb-biocore.github.io/COBREXA.jl/stable/assets/hhu.svg\" alt=\"HHU logo\" height=\"64px\" style=\"height:64px; width:auto\">   <img src=\"https://lcsb-biocore.github.io/COBREXA.jl/stable/assets/qtb.svg\" alt=\"QTB logo\" height=\"64px\" style=\"height:64px; width:auto\">   <img src=\"https://lcsb-biocore.github.io/COBREXA.jl/stable/assets/permedcoe.svg\" alt=\"PerMedCoE logo\" height=\"64px\" style=\"height:64px; width:auto\">","category":"page"},{"location":"tutorials/1_loading/#Loading-and-converting-model-data","page":"Loading and converting model data","title":"Loading and converting model data","text":"","category":"section"},{"location":"tutorials/1_loading/","page":"Loading and converting model data","title":"Loading and converting model data","text":"COBREXA.jl supports several constraint-based model formats that can be loaded with built-in functions. You can load SBML models that are compatible with libsbml, JSON models (such as the ones from CobraPy), and MATLAB-style models (such as those from COBRA Toolbox).","category":"page"},{"location":"tutorials/1_loading/","page":"Loading and converting model data","title":"Loading and converting model data","text":"These formats are commonly available from many model repositories, such as from BIGG, as seen e.g. on the BIGG entry for the core E. Coli entry. Here, we show how to load the basic formats and work with such models.","category":"page"},{"location":"tutorials/1_loading/","page":"Loading and converting model data","title":"Loading and converting model data","text":"tip: Notebook available!\nExample code for this tutorial is available here.","category":"page"},{"location":"tutorials/1_loading/#Loading-models-from-files","page":"Loading and converting model data","title":"Loading models from files","text":"","category":"section"},{"location":"tutorials/1_loading/","page":"Loading and converting model data","title":"Loading and converting model data","text":"For most purposes, you should be able to open and load any model with load_model, which detects the file type from the extension (.xml, .json and .mat), and calls the appropriate loading function. After loading the COBREXA.jl library with using COBREXA and you may load the downloaded model data into Julia as follows:","category":"page"},{"location":"tutorials/1_loading/","page":"Loading and converting model data","title":"Loading and converting model data","text":"my_model = load_model(\"e_coli_core.xml\")","category":"page"},{"location":"tutorials/1_loading/","page":"Loading and converting model data","title":"Loading and converting model data","text":"You should see some information about the loaded model, possibly looking like this:","category":"page"},{"location":"tutorials/1_loading/","page":"Loading and converting model data","title":"Loading and converting model data","text":"Metabolic model of type JSONModel\n\n [9 , 1] = 1.0\n [51, 1] = 1.0\n ⋮\n [57, 95] = 1.0\n [59, 95] = -1.0\nNumber of reactions: 95\nNumber of metabolites: 72","category":"page"},{"location":"tutorials/1_loading/","page":"Loading and converting model data","title":"Loading and converting model data","text":"If the file type can not be guessed from the file extension, use any of the specific loader functions:","category":"page"},{"location":"tutorials/1_loading/","page":"Loading and converting model data","title":"Loading and converting model data","text":"load_sbml_model for SBML\nload_json_model for JSON\nload_mat_model for MATLAB models","category":"page"},{"location":"tutorials/1_loading/","page":"Loading and converting model data","title":"Loading and converting model data","text":"All formats may store slightly different information. By default, COBREXA attempts not to discard any information unless a conversion to a more strict format is required. For example, the JSONModel (which is returned by load_json_model) still holds the original JSON structure that you can freely access for any specific purposes:","category":"page"},{"location":"tutorials/1_loading/","page":"Loading and converting model data","title":"Loading and converting model data","text":"jm = load_json_model(\"e_coli_core.json\")\njm.json[\"reactions\"][1]","category":"page"},{"location":"tutorials/1_loading/","page":"Loading and converting model data","title":"Loading and converting model data","text":"That should print out the first reaction in the model in a JSON-style scheme, in our case the process catalyzed by phosphofructokinase:","category":"page"},{"location":"tutorials/1_loading/","page":"Loading and converting model data","title":"Loading and converting model data","text":"Dict{String,Any} with 9 entries:\n \"name\" => \"Phosphofructokinase\"\n \"metabolites\" => Dict{String,Any}(\"adp_c\"=>1.0,\"atp_c\"=>-1.0,\"f6p_c\"=>…\n \"lower_bound\" => 0.0\n \"id\" => \"PFK\"\n \"notes\" => Dict{String,Any}(\"original_bigg_ids\"=>Any[\"PFK\"])\n \"gene_reaction_rule\" => \"b3916 or b1723\"\n \"upper_bound\" => 1000.0\n \"subsystem\" => \"Glycolysis/Gluconeogenesis\"\n \"annotation\" => Dict{String,Any}(\"ec-code\"=>Any[\"2.7.1.11\"],\"metanetx…","category":"page"},{"location":"tutorials/1_loading/","page":"Loading and converting model data","title":"Loading and converting model data","text":"MATModel and SBMLModel (returned by the respective loading functions) contain similar \"full\" model information – you can access the whole MATLAB and SBML data and build on them without any restrictions.","category":"page"},{"location":"tutorials/1_loading/#Converting-to-other-model-types","page":"Loading and converting model data","title":"Converting to other model types","text":"","category":"section"},{"location":"tutorials/1_loading/","page":"Loading and converting model data","title":"Loading and converting model data","text":"Despite JSON and SBML are great for storing and exchanging the models, the data representation is not very suitable for analyzing the model and processing it mathematically.","category":"page"},{"location":"tutorials/1_loading/","page":"Loading and converting model data","title":"Loading and converting model data","text":"COBREXA.jl contains several model types that are much better suited for supporting the analysis tasks. You can use the following:","category":"page"},{"location":"tutorials/1_loading/","page":"Loading and converting model data","title":"Loading and converting model data","text":"CoreModel, which represents the \"core\" of the optimization problem and the corresponding linear programming problem – a sparse representation of the stoichiometric matrix, flux bounds vectors, objective vector, etc.\nStandardModel (a \"standard\" for COBREXA.jl), which represents a highly flexible, object-like, dictionary-based representation of a model that contains individual Reactions, Metabolites, Genes, and other things.","category":"page"},{"location":"tutorials/1_loading/","page":"Loading and converting model data","title":"Loading and converting model data","text":"note: Conversion limitations and possible data loss\nBecause of the specifics of the format of each model structure, the conversion is not always able to preserve all information from the source data. You may need to check if any complicated and less-standard annotations are still present. If you require them, and either use a more complicated model, or collect them manually.","category":"page"},{"location":"tutorials/1_loading/","page":"Loading and converting model data","title":"Loading and converting model data","text":"A loaded model can be converted to any other model type using the standard Julia conversion:","category":"page"},{"location":"tutorials/1_loading/","page":"Loading and converting model data","title":"Loading and converting model data","text":"cm = convert(CoreModel, jm)","category":"page"},{"location":"tutorials/1_loading/","page":"Loading and converting model data","title":"Loading and converting model data","text":"You can also use a shortcut in load_model to convert the model to the desired format in one command:","category":"page"},{"location":"tutorials/1_loading/","page":"Loading and converting model data","title":"Loading and converting model data","text":"cm = load_model(CoreModel, \"e_coli_core.xml\")","category":"page"},{"location":"tutorials/1_loading/","page":"Loading and converting model data","title":"Loading and converting model data","text":"With CoreModel, the information is easily accessible in matrix form. For example, cm.S now contains the sparse stoichiometric matrix, which you can convert to a dense matrix and manipulate it in Julia as any other matrix:","category":"page"},{"location":"tutorials/1_loading/","page":"Loading and converting model data","title":"Loading and converting model data","text":"Matrix(cm.S)","category":"page"},{"location":"tutorials/1_loading/","page":"Loading and converting model data","title":"Loading and converting model data","text":"...should show you the (relatively empty) stoichiometry of the model.","category":"page"},{"location":"tutorials/1_loading/","page":"Loading and converting model data","title":"Loading and converting model data","text":"StandardModel is more suitable for fine-grained access to individual items of the model, perhaps closer to the SBML-style models. For example, you can view and set reaction bounds as follows:","category":"page"},{"location":"tutorials/1_loading/","page":"Loading and converting model data","title":"Loading and converting model data","text":"sm = load_model(StandardModel, \"e_coli_core.json\")\nsm.reactions[\"PGI\"].ub","category":"page"},{"location":"tutorials/1_loading/","page":"Loading and converting model data","title":"Loading and converting model data","text":"...this prints the upper bound of the reaction (in this case, 1000.0); you can change it the usual way:","category":"page"},{"location":"tutorials/1_loading/","page":"Loading and converting model data","title":"Loading and converting model data","text":"sm.reactions[\"PGI\"].ub = 500","category":"page"},{"location":"tutorials/1_loading/","page":"Loading and converting model data","title":"Loading and converting model data","text":"This change will naturally project to future analysis results.","category":"page"}] } diff --git a/dev/tutorials/1_loading/index.html b/dev/tutorials/1_loading/index.html index 74e853cde76c4d3336310797339aad8757174e73..2cd4353d6e8e0497dca9c32dc0b1b570dd3121c7 100644 --- a/dev/tutorials/1_loading/index.html +++ b/dev/tutorials/1_loading/index.html @@ -18,4 +18,4 @@ jm.json["reactions"][1]</code></pre><p>That should print out the first "upper_bound" => 1000.0 "subsystem" => "Glycolysis/Gluconeogenesis" "annotation" => Dict{String,Any}("ec-code"=>Any["2.7.1.11"],"metanetx…</code></pre><p><a href="../../functions/#COBREXA.MATModel"><code>MATModel</code></a> and <a href="../../functions/#COBREXA.SBMLModel"><code>SBMLModel</code></a> (returned by the respective loading functions) contain similar "full" model information – you can access the whole MATLAB and SBML data and build on them without any restrictions.</p><h2 id="Converting-to-other-model-types"><a class="docs-heading-anchor" href="#Converting-to-other-model-types">Converting to other model types</a><a id="Converting-to-other-model-types-1"></a><a class="docs-heading-anchor-permalink" href="#Converting-to-other-model-types" title="Permalink"></a></h2><p>Despite JSON and SBML are great for storing and exchanging the models, the data representation is not very suitable for analyzing the model and processing it mathematically.</p><p>COBREXA.jl contains several model types that are much better suited for supporting the analysis tasks. You can use the following:</p><ul><li><a href="../../functions/#COBREXA.CoreModel"><code>CoreModel</code></a>, which represents the "core" of the optimization problem and the corresponding linear programming problem – a sparse representation of the stoichiometric matrix, flux bounds vectors, objective vector, etc.</li><li><a href="../../functions/#COBREXA.StandardModel"><code>StandardModel</code></a> (a "standard" for COBREXA.jl), which represents a highly flexible, object-like, dictionary-based representation of a model that contains individual <a href="../../functions/#COBREXA.Reaction"><code>Reaction</code></a>s, <a href="../../functions/#COBREXA.Metabolite"><code>Metabolite</code></a>s, <a href="../../functions/#COBREXA.Gene"><code>Gene</code></a>s, and other things.</li></ul><div class="admonition is-info"><header class="admonition-header">Conversion limitations and possible data loss</header><div class="admonition-body"><p>Because of the specifics of the format of each model structure, the conversion is not always able to preserve all information from the source data. You may need to check if any complicated and less-standard annotations are still present. If you require them, and either use a more complicated model, or collect them manually.</p></div></div><p>A loaded model can be converted to any other model type using the standard Julia conversion:</p><pre><code class="language-none">cm = convert(CoreModel, jm)</code></pre><p>You can also use a shortcut in <a href="../../functions/#COBREXA.load_model-Tuple{String}"><code>load_model</code></a> to convert the model to the desired format in one command:</p><pre><code class="language-none">cm = load_model(CoreModel, "e_coli_core.xml")</code></pre><p>With <a href="../../functions/#COBREXA.CoreModel"><code>CoreModel</code></a>, the information is easily accessible in matrix form. For example, <code>cm.S</code> now contains the sparse stoichiometric matrix, which you can convert to a dense matrix and manipulate it in Julia as any other matrix:</p><pre><code class="language-none">Matrix(cm.S)</code></pre><p>...should show you the (relatively empty) stoichiometry of the model.</p><p><a href="../../functions/#COBREXA.StandardModel"><code>StandardModel</code></a> is more suitable for fine-grained access to individual items of the model, perhaps closer to the SBML-style models. For example, you can view and set reaction bounds as follows:</p><pre><code class="language-none">sm = load_model(StandardModel, "e_coli_core.json") -sm.reactions["PGI"].ub</code></pre><p>...this prints the upper bound of the reaction (in this case, <code>1000.0</code>); you can change it the usual way:</p><pre><code class="language-none">sm.reactions["PGI"].ub = 500</code></pre><p>This change will naturally project to future analysis results.</p></article><nav class="docs-footer"><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> on <span class="colophon-date" title="Tuesday 8 June 2021 15:38">Tuesday 8 June 2021</span>. Using Julia version 1.6.0.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html> +sm.reactions["PGI"].ub</code></pre><p>...this prints the upper bound of the reaction (in this case, <code>1000.0</code>); you can change it the usual way:</p><pre><code class="language-none">sm.reactions["PGI"].ub = 500</code></pre><p>This change will naturally project to future analysis results.</p></article><nav class="docs-footer"><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> on <span class="colophon-date" title="Tuesday 8 June 2021 16:00">Tuesday 8 June 2021</span>. Using Julia version 1.6.0.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html> diff --git a/dev/tutorials/2_analysis/index.html b/dev/tutorials/2_analysis/index.html index 581a18818b6e539f1150243458503fa2ede8d9a5..b64828628a11d36d7cd72408bb5be73aa8badf2f 100644 --- a/dev/tutorials/2_analysis/index.html +++ b/dev/tutorials/2_analysis/index.html @@ -32,4 +32,4 @@ Names registered in the model: lbs, mb, ubs, x</code></pre><p>From that, you can -16.243 -37.4763 -5.57301 0.0 0.0 0.0 -0.310819 -1.20057e-7 -2.13126 - 5.71597e-5 0.00990677 0.692399</code></pre></article><nav class="docs-footer"><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> on <span class="colophon-date" title="Tuesday 8 June 2021 15:38">Tuesday 8 June 2021</span>. Using Julia version 1.6.0.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html> + 5.71597e-5 0.00990677 0.692399</code></pre></article><nav class="docs-footer"><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> on <span class="colophon-date" title="Tuesday 8 June 2021 16:00">Tuesday 8 June 2021</span>. Using Julia version 1.6.0.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html> diff --git a/dev/tutorials/3_hpc/index.html b/dev/tutorials/3_hpc/index.html index 79d138700803ff1f37bf2977e01720ce02584dab..706a4decb6753f6b24a1fbd13427d577228b590a 100644 --- a/dev/tutorials/3_hpc/index.html +++ b/dev/tutorials/3_hpc/index.html @@ -23,4 +23,4 @@ result = flux_variability_analysis(...; workers=workers()) module load lang/Julia # this is usually required to make Julia available to your job -julia myJob.jl</code></pre><p>To run the computation, simply run <code>sbatch myJob.sbatch</code> on the access node. The job will be scheduled and eventually executed. You may watch <code>sacct</code> and <code>squeue</code> in the meantime, to see the progress.</p><p>Remember that you need to explicitly save the result of your Julia script computation to files, to be able to retrieve them later. Standard outputs of the jobs are often mangled and discarded. If you still want to collect the standard output, you may change the last line of the batch script to</p><pre><code class="language-none">julia myJob.jl > myJob.log</code></pre><p>and collect the output from the log later. This is convenient especially if logging various computation details using the <code>@info</code> and similar macros.</p></article><nav class="docs-footer"><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> on <span class="colophon-date" title="Tuesday 8 June 2021 15:38">Tuesday 8 June 2021</span>. Using Julia version 1.6.0.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html> +julia myJob.jl</code></pre><p>To run the computation, simply run <code>sbatch myJob.sbatch</code> on the access node. The job will be scheduled and eventually executed. You may watch <code>sacct</code> and <code>squeue</code> in the meantime, to see the progress.</p><p>Remember that you need to explicitly save the result of your Julia script computation to files, to be able to retrieve them later. Standard outputs of the jobs are often mangled and discarded. If you still want to collect the standard output, you may change the last line of the batch script to</p><pre><code class="language-none">julia myJob.jl > myJob.log</code></pre><p>and collect the output from the log later. This is convenient especially if logging various computation details using the <code>@info</code> and similar macros.</p></article><nav class="docs-footer"><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> on <span class="colophon-date" title="Tuesday 8 June 2021 16:00">Tuesday 8 June 2021</span>. Using Julia version 1.6.0.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html> diff --git a/dev/tutorials/4_modifying/index.html b/dev/tutorials/4_modifying/index.html index 6537e8209c5d36cb07d9a7a5fefb0d4d6476ba23..653d3a3c250cb7e59ce7d166b67e40c8b14ca07c 100644 --- a/dev/tutorials/4_modifying/index.html +++ b/dev/tutorials/4_modifying/index.html @@ -19,4 +19,4 @@ flux_balance_analysis_dict( change_objective("R_TALA"), ])</code></pre><h2 id="Exporting-the-modified-models-in-native-formats"><a class="docs-heading-anchor" href="#Exporting-the-modified-models-in-native-formats">Exporting the modified models in native formats</a><a id="Exporting-the-modified-models-in-native-formats-1"></a><a class="docs-heading-anchor-permalink" href="#Exporting-the-modified-models-in-native-formats" title="Permalink"></a></h2><p>Manually modified models can be exported in standard formats so that they can be examined in other environments, or just made accessible for publication.</p><p><code>COBREXA.jl</code> supports export of MATLAB-like and JSON models. Simply use <a href="../../functions/#COBREXA.save_model-Tuple{MetabolicModel, String}"><code>save_model</code></a>:</p><pre><code class="language-none">save_model(m, "myModel.json") save_model(m, "myModel.mat")</code></pre><p>The function automatically guesses the appropriate model format to write into the file from the file extension. If required, you can choose the model format manually by using <a href="../../functions/#COBREXA.save_json_model-Tuple{MetabolicModel, String}"><code>save_json_model</code></a> and <a href="../../functions/#COBREXA.save_mat_model-Tuple{MetabolicModel, String}"><code>save_mat_model</code></a>.</p><h2 id="Using-Serialization-for-quick-and-efficient-model-storage"><a class="docs-heading-anchor" href="#Using-Serialization-for-quick-and-efficient-model-storage">Using <code>Serialization</code> for quick & efficient model storage</a><a id="Using-Serialization-for-quick-and-efficient-model-storage-1"></a><a class="docs-heading-anchor-permalink" href="#Using-Serialization-for-quick-and-efficient-model-storage" title="Permalink"></a></h2><p>If you save the model "just for yourself", such as for the use in an immediately following analysis, it may be inconvenient (and unnecessarily inefficient) to encode and decode the models to and from the external format. Moreover, certain model types (such as <a href="../../functions/#COBREXA.CoreModelCoupled"><code>CoreModelCoupled</code></a>) cannot be fully represented in all model formats, thus increasing the chance for accidental data loss.</p><p>Instead of that, we recommend using the <code>Serialization</code> package. It provides a straightforward way to save <em>any</em> Julia data structure to the disk, using a very efficient data format that can be written to and read from the disk very quickly.</p><p>With any model in <code>m</code>, you can write it to disk as follows:</p><pre><code class="language-none">using Serialization -open(f -> serialize(f, m), "myModel", "w")</code></pre><p>...and read it back with:</p><pre><code class="language-none">m = deserialize("myModel")</code></pre><p>One great advantage of <code>Serialization</code> is speed – models with millions of reactions are usually loaded and saved with minimal overhead in less than a second.</p><div class="admonition is-warning"><header class="admonition-header">Limits of `Serialization`</header><div class="admonition-body"><p>Serialized models are great for quickly exchanging data objects between analysis steps. The avoided need for re-encoding can save you a great deal of analysis time that can be used for better purposes. Despite that, do not rely on the stability of the serialized format – it often changes between Julia versions, and the data stored in one version may not open easily after an upgrade. In short, use serialized data within one workflow, and use standard and stable external formats for publishing and storing the data beyond the scope of a single analysis workflow.</p></div></div></article><nav class="docs-footer"><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> on <span class="colophon-date" title="Tuesday 8 June 2021 15:38">Tuesday 8 June 2021</span>. Using Julia version 1.6.0.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html> +open(f -> serialize(f, m), "myModel", "w")</code></pre><p>...and read it back with:</p><pre><code class="language-none">m = deserialize("myModel")</code></pre><p>One great advantage of <code>Serialization</code> is speed – models with millions of reactions are usually loaded and saved with minimal overhead in less than a second.</p><div class="admonition is-warning"><header class="admonition-header">Limits of `Serialization`</header><div class="admonition-body"><p>Serialized models are great for quickly exchanging data objects between analysis steps. The avoided need for re-encoding can save you a great deal of analysis time that can be used for better purposes. Despite that, do not rely on the stability of the serialized format – it often changes between Julia versions, and the data stored in one version may not open easily after an upgrade. In short, use serialized data within one workflow, and use standard and stable external formats for publishing and storing the data beyond the scope of a single analysis workflow.</p></div></div></article><nav class="docs-footer"><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> on <span class="colophon-date" title="Tuesday 8 June 2021 16:00">Tuesday 8 June 2021</span>. Using Julia version 1.6.0.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html> diff --git a/dev/tutorials/index.html b/dev/tutorials/index.html index c7391356f892d4f3660592e71644d66b22dfd5d4..4d4f2ba0c2236033a41e595ecf53e04f688d6b47 100644 --- a/dev/tutorials/index.html +++ b/dev/tutorials/index.html @@ -1,2 +1,2 @@ <!DOCTYPE html> -<html lang="en"><head><meta charset="UTF-8"/><meta name="viewport" content="width=device-width, initial-scale=1.0"/><title>Tutorials · COBREXA.jl</title><link href="https://fonts.googleapis.com/css?family=Lato|Roboto+Mono" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.0/css/fontawesome.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.0/css/solid.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.0/css/brands.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.11.1/katex.min.css" rel="stylesheet" type="text/css"/><script>documenterBaseURL=".."</script><script src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.6/require.min.js" data-main="../assets/documenter.js"></script><script src="../siteinfo.js"></script><script src="../../versions.js"></script><link class="docs-theme-link" rel="stylesheet" type="text/css" href="../assets/themes/documenter-dark.css" data-theme-name="documenter-dark" data-theme-primary-dark/><link class="docs-theme-link" rel="stylesheet" type="text/css" href="../assets/themes/documenter-light.css" data-theme-name="documenter-light" data-theme-primary/><script src="../assets/themeswap.js"></script><link href="../assets/favicon.ico" rel="icon" type="image/x-icon"/></head><body><div id="documenter"><nav class="docs-sidebar"><a class="docs-logo" href="../"><img class="docs-light-only" src="../assets/logo.svg" alt="COBREXA.jl logo"/><img class="docs-dark-only" src="../assets/logo-dark.svg" alt="COBREXA.jl logo"/></a><div class="docs-package-name"><span class="docs-autofit">COBREXA.jl</span></div><form class="docs-search" action="../search/"><input class="docs-search-query" id="documenter-search-query" name="q" type="text" placeholder="Search docs"/></form><ul class="docs-menu"><li><a class="tocitem" href="../">Home</a></li><li class="is-active"><a class="tocitem" href>Tutorials</a></li><li><a class="tocitem" href="../notebooks/">Examples and notebooks</a></li><li><a class="tocitem" href="../functions/">Function reference</a></li><li><a class="tocitem" href="../howToContribute/">How to contribute</a></li></ul><div class="docs-version-selector field has-addons"><div class="control"><span class="docs-label button is-static is-size-7">Version</span></div><div class="docs-selector control is-expanded"><div class="select is-fullwidth is-size-7"><select id="documenter-version-selector"></select></div></div></div></nav><div class="docs-main"><header class="docs-navbar"><nav class="breadcrumb"><ul class="is-hidden-mobile"><li class="is-active"><a href>Tutorials</a></li></ul><ul class="is-hidden-tablet"><li class="is-active"><a href>Tutorials</a></li></ul></nav><div class="docs-right"><a class="docs-edit-link" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/master/docs/src/tutorials.md" title="Edit on GitHub"><span class="docs-icon fab"></span><span class="docs-label is-hidden-touch">Edit on GitHub</span></a><a class="docs-settings-button fas fa-cog" id="documenter-settings-button" href="#" title="Settings"></a><a class="docs-sidebar-button fa fa-bars is-hidden-desktop" id="documenter-sidebar-button" href="#"></a></div></header><article class="content" id="documenter-page"><h1 id="COBREXA-Tutorials"><a class="docs-heading-anchor" href="#COBREXA-Tutorials">COBREXA Tutorials</a><a id="COBREXA-Tutorials-1"></a><a class="docs-heading-anchor-permalink" href="#COBREXA-Tutorials" title="Permalink"></a></h1><ul><li><a href="1_loading/#Loading-and-converting-model-data">Loading and converting model data</a></li><ul><li><a href="1_loading/#Loading-models-from-files">Loading models from files</a></li><li><a href="1_loading/#Converting-to-other-model-types">Converting to other model types</a></li></ul><li><a href="2_analysis/#Basic-analysis-of-constraint-based-models">Basic analysis of constraint-based models</a></li><ul><li><a href="2_analysis/#Optimization-problem-solvers">Optimization problem solvers</a></li><li><a href="2_analysis/#Flux-balance-analysis">Flux balance analysis</a></li><li><a href="2_analysis/#Flux-variability-analysis">Flux variability analysis</a></li><li><a href="2_analysis/#Parsimonious-flux-balance-analysis">Parsimonious flux balance analysis</a></li><li><a href="2_analysis/#Flux-sampling">Flux sampling</a></li></ul><li><a href="3_hpc/#Distributed-processing-and-HPC-environments">Distributed processing and HPC environments</a></li><ul><li><a href="3_hpc/#Starting-the-distributed-workers">Starting the distributed workers</a></li><li><a href="3_hpc/#Running-a-distributed-analysis">Running a distributed analysis</a></li><li><a href="3_hpc/#Interacting-with-HPC-schedulers">Interacting with HPC schedulers</a></li><li><a href="3_hpc/#Wrapping-your-script-in-a-Slurm-job">Wrapping your script in a Slurm job</a></li></ul><li><a href="4_modifying/#Modifying-and-saving-the-models">Modifying and saving the models</a></li><ul><li><a href="4_modifying/#Manual-modifications">Manual modifications</a></li><li><a href="4_modifying/#Analysis-modifiers">Analysis modifiers</a></li><li><a href="4_modifying/#Exporting-the-modified-models-in-native-formats">Exporting the modified models in native formats</a></li><li><a href="4_modifying/#Using-Serialization-for-quick-and-efficient-model-storage">Using <code>Serialization</code> for quick & efficient model storage</a></li></ul></ul></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../">« Home</a><a class="docs-footer-nextpage" href="../notebooks/">Examples and notebooks »</a><div class="flexbox-break"></div><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> on <span class="colophon-date" title="Tuesday 8 June 2021 15:38">Tuesday 8 June 2021</span>. Using Julia version 1.6.0.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html> +<html lang="en"><head><meta charset="UTF-8"/><meta name="viewport" content="width=device-width, initial-scale=1.0"/><title>Tutorials · COBREXA.jl</title><link href="https://fonts.googleapis.com/css?family=Lato|Roboto+Mono" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.0/css/fontawesome.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.0/css/solid.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.0/css/brands.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.11.1/katex.min.css" rel="stylesheet" type="text/css"/><script>documenterBaseURL=".."</script><script src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.6/require.min.js" data-main="../assets/documenter.js"></script><script src="../siteinfo.js"></script><script src="../../versions.js"></script><link class="docs-theme-link" rel="stylesheet" type="text/css" href="../assets/themes/documenter-dark.css" data-theme-name="documenter-dark" data-theme-primary-dark/><link class="docs-theme-link" rel="stylesheet" type="text/css" href="../assets/themes/documenter-light.css" data-theme-name="documenter-light" data-theme-primary/><script src="../assets/themeswap.js"></script><link href="../assets/favicon.ico" rel="icon" type="image/x-icon"/></head><body><div id="documenter"><nav class="docs-sidebar"><a class="docs-logo" href="../"><img class="docs-light-only" src="../assets/logo.svg" alt="COBREXA.jl logo"/><img class="docs-dark-only" src="../assets/logo-dark.svg" alt="COBREXA.jl logo"/></a><div class="docs-package-name"><span class="docs-autofit">COBREXA.jl</span></div><form class="docs-search" action="../search/"><input class="docs-search-query" id="documenter-search-query" name="q" type="text" placeholder="Search docs"/></form><ul class="docs-menu"><li><a class="tocitem" href="../">Home</a></li><li class="is-active"><a class="tocitem" href>Tutorials</a></li><li><a class="tocitem" href="../notebooks/">Examples and notebooks</a></li><li><a class="tocitem" href="../functions/">Function reference</a></li><li><a class="tocitem" href="../howToContribute/">How to contribute</a></li></ul><div class="docs-version-selector field has-addons"><div class="control"><span class="docs-label button is-static is-size-7">Version</span></div><div class="docs-selector control is-expanded"><div class="select is-fullwidth is-size-7"><select id="documenter-version-selector"></select></div></div></div></nav><div class="docs-main"><header class="docs-navbar"><nav class="breadcrumb"><ul class="is-hidden-mobile"><li class="is-active"><a href>Tutorials</a></li></ul><ul class="is-hidden-tablet"><li class="is-active"><a href>Tutorials</a></li></ul></nav><div class="docs-right"><a class="docs-edit-link" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/master/docs/src/tutorials.md" title="Edit on GitHub"><span class="docs-icon fab"></span><span class="docs-label is-hidden-touch">Edit on GitHub</span></a><a class="docs-settings-button fas fa-cog" id="documenter-settings-button" href="#" title="Settings"></a><a class="docs-sidebar-button fa fa-bars is-hidden-desktop" id="documenter-sidebar-button" href="#"></a></div></header><article class="content" id="documenter-page"><h1 id="COBREXA-Tutorials"><a class="docs-heading-anchor" href="#COBREXA-Tutorials">COBREXA Tutorials</a><a id="COBREXA-Tutorials-1"></a><a class="docs-heading-anchor-permalink" href="#COBREXA-Tutorials" title="Permalink"></a></h1><ul><li><a href="1_loading/#Loading-and-converting-model-data">Loading and converting model data</a></li><ul><li><a href="1_loading/#Loading-models-from-files">Loading models from files</a></li><li><a href="1_loading/#Converting-to-other-model-types">Converting to other model types</a></li></ul><li><a href="2_analysis/#Basic-analysis-of-constraint-based-models">Basic analysis of constraint-based models</a></li><ul><li><a href="2_analysis/#Optimization-problem-solvers">Optimization problem solvers</a></li><li><a href="2_analysis/#Flux-balance-analysis">Flux balance analysis</a></li><li><a href="2_analysis/#Flux-variability-analysis">Flux variability analysis</a></li><li><a href="2_analysis/#Parsimonious-flux-balance-analysis">Parsimonious flux balance analysis</a></li><li><a href="2_analysis/#Flux-sampling">Flux sampling</a></li></ul><li><a href="3_hpc/#Distributed-processing-and-HPC-environments">Distributed processing and HPC environments</a></li><ul><li><a href="3_hpc/#Starting-the-distributed-workers">Starting the distributed workers</a></li><li><a href="3_hpc/#Running-a-distributed-analysis">Running a distributed analysis</a></li><li><a href="3_hpc/#Interacting-with-HPC-schedulers">Interacting with HPC schedulers</a></li><li><a href="3_hpc/#Wrapping-your-script-in-a-Slurm-job">Wrapping your script in a Slurm job</a></li></ul><li><a href="4_modifying/#Modifying-and-saving-the-models">Modifying and saving the models</a></li><ul><li><a href="4_modifying/#Manual-modifications">Manual modifications</a></li><li><a href="4_modifying/#Analysis-modifiers">Analysis modifiers</a></li><li><a href="4_modifying/#Exporting-the-modified-models-in-native-formats">Exporting the modified models in native formats</a></li><li><a href="4_modifying/#Using-Serialization-for-quick-and-efficient-model-storage">Using <code>Serialization</code> for quick & efficient model storage</a></li></ul></ul></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../">« Home</a><a class="docs-footer-nextpage" href="../notebooks/">Examples and notebooks »</a><div class="flexbox-break"></div><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> on <span class="colophon-date" title="Tuesday 8 June 2021 16:00">Tuesday 8 June 2021</span>. Using Julia version 1.6.0.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html> diff --git a/dev/unmerged/index.html b/dev/unmerged/index.html index e71d27b570345cc13a134ec9d0e43f550cb887eb..4e05b88b894ae559bc413092b073f567fb5c52c2 100644 --- a/dev/unmerged/index.html +++ b/dev/unmerged/index.html @@ -1,2 +1,2 @@ <!DOCTYPE html> -<html lang="en"><head><meta charset="UTF-8"/><meta name="viewport" content="width=device-width, initial-scale=1.0"/><title>Generic interface · COBREXA.jl</title><link href="https://fonts.googleapis.com/css?family=Lato|Roboto+Mono" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.0/css/fontawesome.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.0/css/solid.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.0/css/brands.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.11.1/katex.min.css" rel="stylesheet" type="text/css"/><script>documenterBaseURL=".."</script><script src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.6/require.min.js" data-main="../assets/documenter.js"></script><script src="../siteinfo.js"></script><script src="../../versions.js"></script><link class="docs-theme-link" rel="stylesheet" type="text/css" href="../assets/themes/documenter-dark.css" data-theme-name="documenter-dark" data-theme-primary-dark/><link class="docs-theme-link" rel="stylesheet" type="text/css" href="../assets/themes/documenter-light.css" data-theme-name="documenter-light" data-theme-primary/><script src="../assets/themeswap.js"></script><link href="../assets/favicon.ico" rel="icon" type="image/x-icon"/></head><body><div id="documenter"><nav class="docs-sidebar"><a class="docs-logo" href="../"><img class="docs-light-only" src="../assets/logo.svg" alt="COBREXA.jl logo"/><img class="docs-dark-only" src="../assets/logo-dark.svg" alt="COBREXA.jl logo"/></a><div class="docs-package-name"><span class="docs-autofit">COBREXA.jl</span></div><form class="docs-search" action="../search/"><input class="docs-search-query" id="documenter-search-query" name="q" type="text" placeholder="Search docs"/></form><ul class="docs-menu"><li><a class="tocitem" href="../">Home</a></li><li><a class="tocitem" href="../tutorials/">Tutorials</a></li><li><a class="tocitem" href="../notebooks/">Examples and notebooks</a></li><li><a class="tocitem" href="../functions/">Function reference</a></li><li><a class="tocitem" href="../howToContribute/">How to contribute</a></li></ul><div class="docs-version-selector field has-addons"><div class="control"><span class="docs-label button is-static is-size-7">Version</span></div><div class="docs-selector control is-expanded"><div class="select is-fullwidth is-size-7"><select id="documenter-version-selector"></select></div></div></div></nav><div class="docs-main"><header class="docs-navbar"><nav class="breadcrumb"><ul class="is-hidden-mobile"><li class="is-active"><a href>Generic interface</a></li></ul><ul class="is-hidden-tablet"><li class="is-active"><a href>Generic interface</a></li></ul></nav><div class="docs-right"><a class="docs-edit-link" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/master/docs/src/unmerged.md" title="Edit on GitHub"><span class="docs-icon fab"></span><span class="docs-label is-hidden-touch">Edit on GitHub</span></a><a class="docs-settings-button fas fa-cog" id="documenter-settings-button" href="#" title="Settings"></a><a class="docs-sidebar-button fa fa-bars is-hidden-desktop" id="documenter-sidebar-button" href="#"></a></div></header><article class="content" id="documenter-page"><h1 id="Generic-interface"><a class="docs-heading-anchor" href="#Generic-interface">Generic interface</a><a id="Generic-interface-1"></a><a class="docs-heading-anchor-permalink" href="#Generic-interface" title="Permalink"></a></h1><p>The reason you should rather use the generic interface is that the generic interface is supported by all model types in <code>COBREXA</code>, while the internal model structure of each model type varies considerably. For example, <code>MATModel</code>s store the stoichiometric matrix directly, so <code>mat_model.mat["S"]</code> would return the stoichiometric matrix. However, <code>JSONModel</code>s do not do this, so <code>json_model.m["S"]</code> would throw an error. The <code>COBREXA</code> way of doing this is to use the generic interface, i.e. <code>stoichiometry(json_model)</code> and <code>stoichiometry(mat_model)</code> always return the stoichiometric matrix. </p><p>Note, it is possible that the matrix returned by <code>stoichiometry</code> is not exactly the same <strong>between</strong> models. The order of the reactions (columns) and metabolites (rows) may vary from model type to model type, although they are consistent <strong>within</strong> each model type. So <code>stoichiometry(json_model)</code> will return a stoichiometric matrix where the columns correspond to the order of reactions listed in <code>reactions(json_model)</code> and the rows corresponds to the order of metabolites listed in <code>metabolites(json_model)</code>. The column/reaction and row/metabolite order from the <code>JSONModel</code> is not <em>necessarily</em> consistent with the stoichiometric matrix returned by <code>stoichiometry(mat_model)</code>. This is a minor note, but could cause confusion. </p><h1 id="Converting-models"><a class="docs-heading-anchor" href="#Converting-models">Converting models</a><a id="Converting-models-1"></a><a class="docs-heading-anchor-permalink" href="#Converting-models" title="Permalink"></a></h1><p>You might recall that we mentioned that data loss does not occur when models are read into the format corresponding to their file type. This is because the models are read into memory directly in their native formats. So <code>JSONModel</code>s contain the dictionary encoded in the <code>.json</code> file, and the same for <code>.mat</code> and <code>.xml</code> files (technically <code>.xml</code> is parsed by <code>SBML.jl</code>).</p><p>However, this data loss guarantee does <strong>not</strong> hold once you convert between models. The reason for this is that the <code>convert</code> function uses the generic interface to convert between models. In short, only information accessible through the generic interface will be converted between models. This is most applicable for data stored using non-standard keywords (<code>.mat</code> and to a lesser extent <code>.json</code> models are prone to this type of issue). When in doubt, inspect your models and refer to <code>src/base/constants.jl</code> for the <code>keynames</code> used to access model features if issues occur. However, this should rarely be a problem.</p><p><code>COBREXA</code> also has specialized model types: <code>StandardModel</code>, <code>CoreModel</code>, and <code>CoreCoupledModel</code>. These model types are implemented to be as efficient as possible for their purpose. In short, use:</p><ol><li><code>StandardModel</code> if keeping all the meta-data associated with a model is important. This includes information like gene reaction rules, annotations, notes, etc. It is a good format to use when you wish to combine many models of different types and are not worried about memory limitations. </li><li><code>CoreModel</code> if you only care about constraint-based analysis that can be performed using only the stoichiometric matrix and flux bounds. This model stores all its numeric data structures as sparse matrices/vectors and is thus very efficient. It does not store superfluous information, like the gene reaction rules of reactions, annotations etc. Since this model is compact and its data structures efficient, it is ideal for distributed computing.</li><li><code>CoreModelCoupled</code> if you want to use the functionality of <code>CoreModel</code> but for communities. It also represents the underlying model in a sparse format, but specialized for community models. </li></ol><p>Let's load a <code>StandardModel</code> and a <code>CoreModel</code> to compare the two.</p></article><nav class="docs-footer"><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> on <span class="colophon-date" title="Tuesday 8 June 2021 15:38">Tuesday 8 June 2021</span>. Using Julia version 1.6.0.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html> +<html lang="en"><head><meta charset="UTF-8"/><meta name="viewport" content="width=device-width, initial-scale=1.0"/><title>Generic interface · COBREXA.jl</title><link href="https://fonts.googleapis.com/css?family=Lato|Roboto+Mono" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.0/css/fontawesome.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.0/css/solid.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.0/css/brands.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.11.1/katex.min.css" rel="stylesheet" type="text/css"/><script>documenterBaseURL=".."</script><script src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.6/require.min.js" data-main="../assets/documenter.js"></script><script src="../siteinfo.js"></script><script src="../../versions.js"></script><link class="docs-theme-link" rel="stylesheet" type="text/css" href="../assets/themes/documenter-dark.css" data-theme-name="documenter-dark" data-theme-primary-dark/><link class="docs-theme-link" rel="stylesheet" type="text/css" href="../assets/themes/documenter-light.css" data-theme-name="documenter-light" data-theme-primary/><script src="../assets/themeswap.js"></script><link href="../assets/favicon.ico" rel="icon" type="image/x-icon"/></head><body><div id="documenter"><nav class="docs-sidebar"><a class="docs-logo" href="../"><img class="docs-light-only" src="../assets/logo.svg" alt="COBREXA.jl logo"/><img class="docs-dark-only" src="../assets/logo-dark.svg" alt="COBREXA.jl logo"/></a><div class="docs-package-name"><span class="docs-autofit">COBREXA.jl</span></div><form class="docs-search" action="../search/"><input class="docs-search-query" id="documenter-search-query" name="q" type="text" placeholder="Search docs"/></form><ul class="docs-menu"><li><a class="tocitem" href="../">Home</a></li><li><a class="tocitem" href="../tutorials/">Tutorials</a></li><li><a class="tocitem" href="../notebooks/">Examples and notebooks</a></li><li><a class="tocitem" href="../functions/">Function reference</a></li><li><a class="tocitem" href="../howToContribute/">How to contribute</a></li></ul><div class="docs-version-selector field has-addons"><div class="control"><span class="docs-label button is-static is-size-7">Version</span></div><div class="docs-selector control is-expanded"><div class="select is-fullwidth is-size-7"><select id="documenter-version-selector"></select></div></div></div></nav><div class="docs-main"><header class="docs-navbar"><nav class="breadcrumb"><ul class="is-hidden-mobile"><li class="is-active"><a href>Generic interface</a></li></ul><ul class="is-hidden-tablet"><li class="is-active"><a href>Generic interface</a></li></ul></nav><div class="docs-right"><a class="docs-edit-link" href="https://github.com/LCSB-BioCore/COBREXA.jl/blob/master/docs/src/unmerged.md" title="Edit on GitHub"><span class="docs-icon fab"></span><span class="docs-label is-hidden-touch">Edit on GitHub</span></a><a class="docs-settings-button fas fa-cog" id="documenter-settings-button" href="#" title="Settings"></a><a class="docs-sidebar-button fa fa-bars is-hidden-desktop" id="documenter-sidebar-button" href="#"></a></div></header><article class="content" id="documenter-page"><h1 id="Generic-interface"><a class="docs-heading-anchor" href="#Generic-interface">Generic interface</a><a id="Generic-interface-1"></a><a class="docs-heading-anchor-permalink" href="#Generic-interface" title="Permalink"></a></h1><p>The reason you should rather use the generic interface is that the generic interface is supported by all model types in <code>COBREXA</code>, while the internal model structure of each model type varies considerably. For example, <code>MATModel</code>s store the stoichiometric matrix directly, so <code>mat_model.mat["S"]</code> would return the stoichiometric matrix. However, <code>JSONModel</code>s do not do this, so <code>json_model.m["S"]</code> would throw an error. The <code>COBREXA</code> way of doing this is to use the generic interface, i.e. <code>stoichiometry(json_model)</code> and <code>stoichiometry(mat_model)</code> always return the stoichiometric matrix. </p><p>Note, it is possible that the matrix returned by <code>stoichiometry</code> is not exactly the same <strong>between</strong> models. The order of the reactions (columns) and metabolites (rows) may vary from model type to model type, although they are consistent <strong>within</strong> each model type. So <code>stoichiometry(json_model)</code> will return a stoichiometric matrix where the columns correspond to the order of reactions listed in <code>reactions(json_model)</code> and the rows corresponds to the order of metabolites listed in <code>metabolites(json_model)</code>. The column/reaction and row/metabolite order from the <code>JSONModel</code> is not <em>necessarily</em> consistent with the stoichiometric matrix returned by <code>stoichiometry(mat_model)</code>. This is a minor note, but could cause confusion. </p><h1 id="Converting-models"><a class="docs-heading-anchor" href="#Converting-models">Converting models</a><a id="Converting-models-1"></a><a class="docs-heading-anchor-permalink" href="#Converting-models" title="Permalink"></a></h1><p>You might recall that we mentioned that data loss does not occur when models are read into the format corresponding to their file type. This is because the models are read into memory directly in their native formats. So <code>JSONModel</code>s contain the dictionary encoded in the <code>.json</code> file, and the same for <code>.mat</code> and <code>.xml</code> files (technically <code>.xml</code> is parsed by <code>SBML.jl</code>).</p><p>However, this data loss guarantee does <strong>not</strong> hold once you convert between models. The reason for this is that the <code>convert</code> function uses the generic interface to convert between models. In short, only information accessible through the generic interface will be converted between models. This is most applicable for data stored using non-standard keywords (<code>.mat</code> and to a lesser extent <code>.json</code> models are prone to this type of issue). When in doubt, inspect your models and refer to <code>src/base/constants.jl</code> for the <code>keynames</code> used to access model features if issues occur. However, this should rarely be a problem.</p><p><code>COBREXA</code> also has specialized model types: <code>StandardModel</code>, <code>CoreModel</code>, and <code>CoreCoupledModel</code>. These model types are implemented to be as efficient as possible for their purpose. In short, use:</p><ol><li><code>StandardModel</code> if keeping all the meta-data associated with a model is important. This includes information like gene reaction rules, annotations, notes, etc. It is a good format to use when you wish to combine many models of different types and are not worried about memory limitations. </li><li><code>CoreModel</code> if you only care about constraint-based analysis that can be performed using only the stoichiometric matrix and flux bounds. This model stores all its numeric data structures as sparse matrices/vectors and is thus very efficient. It does not store superfluous information, like the gene reaction rules of reactions, annotations etc. Since this model is compact and its data structures efficient, it is ideal for distributed computing.</li><li><code>CoreModelCoupled</code> if you want to use the functionality of <code>CoreModel</code> but for communities. It also represents the underlying model in a sparse format, but specialized for community models. </li></ol><p>Let's load a <code>StandardModel</code> and a <code>CoreModel</code> to compare the two.</p></article><nav class="docs-footer"><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> on <span class="colophon-date" title="Tuesday 8 June 2021 16:00">Tuesday 8 June 2021</span>. Using Julia version 1.6.0.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>