Commit fc54aa92 authored by Documenter.jl's avatar Documenter.jl
Browse files

build based on 3ee30322

parent bd2a2813
<!DOCTYPE html>
<html lang="en"><head><meta charset="UTF-8"/><meta name="viewport" content="width=device-width, initial-scale=1.0"/><title>Documentation · SBML.jl</title><script data-outdated-warner src="assets/warner.js"></script><link rel="canonical" href="https://lcsb-biocore.github.io/DistributedData.jl/stable/"/><link href="https://cdnjs.cloudflare.com/ajax/libs/lato-font/3.0.0/css/lato-font.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/juliamono/0.039/juliamono-regular.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.3/css/fontawesome.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.3/css/solid.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.3/css/brands.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.13.11/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></head><body><div id="documenter"><nav class="docs-sidebar"><a class="docs-logo" href><img src="assets/logo.svg" alt="SBML.jl logo"/></a><div class="docs-package-name"><span class="docs-autofit"><a href>SBML.jl</a></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 class="is-active"><a class="tocitem" href>Documentation</a><ul class="internal"><li class="toplevel"><a class="tocitem" href="#Function-reference"><span>Function reference</span></a></li><li><a class="tocitem" href="#Data-structures"><span>Data structures</span></a></li><li><a class="tocitem" href="#Base-functions"><span>Base functions</span></a></li><li><a class="tocitem" href="#libsbml-representation-converters"><span><code>libsbml</code> representation converters</span></a></li><li><a class="tocitem" href="#Data-helpers"><span>Data helpers</span></a></li><li><a class="tocitem" href="#Math-and-Symbolics.jl-compatibility"><span>Math and <code>Symbolics.jl</code> compatibility</span></a></li></ul></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>Documentation</a></li></ul><ul class="is-hidden-tablet"><li class="is-active"><a href>Documentation</a></li></ul></nav><div class="docs-right"><a class="docs-edit-link" href="https://github.com/LCSB-BioCore/SBML.jl/blob/master/docs/src/index.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="SBML.jl-—-load-systems-biology-models-from-SBML-files"><a class="docs-heading-anchor" href="#SBML.jl-—-load-systems-biology-models-from-SBML-files">SBML.jl — load systems biology models from SBML files</a><a id="SBML.jl-—-load-systems-biology-models-from-SBML-files-1"></a><a class="docs-heading-anchor-permalink" href="#SBML.jl-—-load-systems-biology-models-from-SBML-files" title="Permalink"></a></h1><p>This package provides a straightforward way to load model- and simulation-relevant information from SBML files.</p><p>The library provides a single function <a href="#SBML.readSBML"><code>readSBML</code></a> to load a <a href="#SBML.Model"><code>SBML.Model</code></a>:</p><pre><code class="language-julia">julia&gt; using SBML
<html lang="en"><head><meta charset="UTF-8"/><meta name="viewport" content="width=device-width, initial-scale=1.0"/><title>Documentation · SBML.jl</title><script data-outdated-warner src="assets/warner.js"></script><link rel="canonical" href="https://lcsb-biocore.github.io/DistributedData.jl/stable/"/><link href="https://cdnjs.cloudflare.com/ajax/libs/lato-font/3.0.0/css/lato-font.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/juliamono/0.039/juliamono-regular.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.3/css/fontawesome.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.3/css/solid.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.3/css/brands.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.13.11/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></head><body><div id="documenter"><nav class="docs-sidebar"><a class="docs-logo" href><img src="assets/logo.svg" alt="SBML.jl logo"/></a><div class="docs-package-name"><span class="docs-autofit"><a href>SBML.jl</a></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 class="is-active"><a class="tocitem" href>Documentation</a><ul class="internal"><li class="toplevel"><a class="tocitem" href="#Function-reference"><span>Function reference</span></a></li><li><a class="tocitem" href="#Helper-types"><span>Helper types</span></a></li><li><a class="tocitem" href="#Data-structures"><span>Data structures</span></a></li><li><a class="tocitem" href="#Base-functions"><span>Base functions</span></a></li><li><a class="tocitem" href="#libsbml-representation-converters"><span><code>libsbml</code> representation converters</span></a></li><li><a class="tocitem" href="#Data-helpers"><span>Data helpers</span></a></li><li><a class="tocitem" href="#Math-and-Symbolics.jl-compatibility"><span>Math and <code>Symbolics.jl</code> compatibility</span></a></li></ul></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>Documentation</a></li></ul><ul class="is-hidden-tablet"><li class="is-active"><a href>Documentation</a></li></ul></nav><div class="docs-right"><a class="docs-edit-link" href="https://github.com/LCSB-BioCore/SBML.jl/blob/master/docs/src/index.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="SBML.jl-—-load-systems-biology-models-from-SBML-files"><a class="docs-heading-anchor" href="#SBML.jl-—-load-systems-biology-models-from-SBML-files">SBML.jl — load systems biology models from SBML files</a><a id="SBML.jl-—-load-systems-biology-models-from-SBML-files-1"></a><a class="docs-heading-anchor-permalink" href="#SBML.jl-—-load-systems-biology-models-from-SBML-files" title="Permalink"></a></h1><p>This package provides a straightforward way to load model- and simulation-relevant information from SBML files.</p><p>The library provides a single function <a href="#SBML.readSBML"><code>readSBML</code></a> to load a <a href="#SBML.Model"><code>SBML.Model</code></a>:</p><pre><code class="language-julia">julia&gt; using SBML
julia&gt; mdl = readSBML(&quot;Ec_core_flux1.xml&quot;)
SBML.Model(…)
......@@ -38,20 +38,20 @@ julia&gt; Matrix(S)
0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 -1.0 0.0 0.0 0.0 0.0 0.0
⋮ ⋮ ⋱ ⋮ ⋮ </code></pre><h1 id="Function-reference"><a class="docs-heading-anchor" href="#Function-reference">Function reference</a><a id="Function-reference-1"></a><a class="docs-heading-anchor-permalink" href="#Function-reference" title="Permalink"></a></h1><h2 id="Data-structures"><a class="docs-heading-anchor" href="#Data-structures">Data structures</a><a id="Data-structures-1"></a><a class="docs-heading-anchor-permalink" href="#Data-structures" title="Permalink"></a></h2><article class="docstring"><header><a class="docstring-binding" id="SBML.Maybe" href="#SBML.Maybe"><code>SBML.Maybe</code></a><span class="docstring-category">Type</span></header><section><div><pre><code class="language-julia">Maybe{X}</code></pre><p>Type shortcut for &quot;<code>X</code> or nothing&quot; or &quot;nullable <code>X</code>&quot; in javaspeak. Name got inspired by our functional friends.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/SBML.jl/blob/9604c34aca43738d55ce50e4103c371af51239f6/src/structs.jl#L2-L7">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="SBML.Compartment" href="#SBML.Compartment"><code>SBML.Compartment</code></a><span class="docstring-category">Type</span></header><section><div><p>SBML Compartment with sizing information.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/SBML.jl/blob/9604c34aca43738d55ce50e4103c371af51239f6/src/structs.jl#L109-L111">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="SBML.FunctionDefinition" href="#SBML.FunctionDefinition"><code>SBML.FunctionDefinition</code></a><span class="docstring-category">Type</span></header><section><div><p>Custom function definition.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/SBML.jl/blob/9604c34aca43738d55ce50e4103c371af51239f6/src/structs.jl#L173-L175">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="SBML.GPAAnd" href="#SBML.GPAAnd"><code>SBML.GPAAnd</code></a><span class="docstring-category">Type</span></header><section><div><p>Boolean binary &quot;and&quot; in the association expression</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/SBML.jl/blob/9604c34aca43738d55ce50e4103c371af51239f6/src/structs.jl#L44-L46">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="SBML.GPAOr" href="#SBML.GPAOr"><code>SBML.GPAOr</code></a><span class="docstring-category">Type</span></header><section><div><p>Boolean binary &quot;or&quot; in the association expression</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/SBML.jl/blob/9604c34aca43738d55ce50e4103c371af51239f6/src/structs.jl#L51-L53">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="SBML.GPARef" href="#SBML.GPARef"><code>SBML.GPARef</code></a><span class="docstring-category">Type</span></header><section><div><p>Gene product reference in the association expression</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/SBML.jl/blob/9604c34aca43738d55ce50e4103c371af51239f6/src/structs.jl#L37-L39">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="SBML.GeneProduct" href="#SBML.GeneProduct"><code>SBML.GeneProduct</code></a><span class="docstring-category">Type</span></header><section><div><p>Gene product metadata.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/SBML.jl/blob/9604c34aca43738d55ce50e4103c371af51239f6/src/structs.jl#L162-L164">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="SBML.GeneProductAssociation" href="#SBML.GeneProductAssociation"><code>SBML.GeneProductAssociation</code></a><span class="docstring-category">Type</span></header><section><div><p>Abstract type for all kinds of gene product associations</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/SBML.jl/blob/9604c34aca43738d55ce50e4103c371af51239f6/src/structs.jl#L32-L34">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="SBML.Math" href="#SBML.Math"><code>SBML.Math</code></a><span class="docstring-category">Type</span></header><section><div><p>A simplified representation of MathML-specified math AST</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/SBML.jl/blob/9604c34aca43738d55ce50e4103c371af51239f6/src/structs.jl#L58-L60">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="SBML.MathApply" href="#SBML.MathApply"><code>SBML.MathApply</code></a><span class="docstring-category">Type</span></header><section><div><p>Function application (&quot;call by name&quot;, no tricks allowed) in mathematical expression</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/SBML.jl/blob/9604c34aca43738d55ce50e4103c371af51239f6/src/structs.jl#L93-L95">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="SBML.MathConst" href="#SBML.MathConst"><code>SBML.MathConst</code></a><span class="docstring-category">Type</span></header><section><div><p>A constant identified by name (usually something like <code>pi</code>, <code>e</code> or <code>true</code>) in mathematical expression</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/SBML.jl/blob/9604c34aca43738d55ce50e4103c371af51239f6/src/structs.jl#L77-L80">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="SBML.MathIdent" href="#SBML.MathIdent"><code>SBML.MathIdent</code></a><span class="docstring-category">Type</span></header><section><div><p>An identifier (usually a variable name) in mathematical expression</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/SBML.jl/blob/9604c34aca43738d55ce50e4103c371af51239f6/src/structs.jl#L70-L72">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="SBML.MathLambda" href="#SBML.MathLambda"><code>SBML.MathLambda</code></a><span class="docstring-category">Type</span></header><section><div><p>Function definition (aka &quot;lambda&quot;) in mathematical expression</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/SBML.jl/blob/9604c34aca43738d55ce50e4103c371af51239f6/src/structs.jl#L101-L103">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="SBML.MathTime" href="#SBML.MathTime"><code>SBML.MathTime</code></a><span class="docstring-category">Type</span></header><section><div><p>A special value representing the current time of the simulation, with a special name.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/SBML.jl/blob/9604c34aca43738d55ce50e4103c371af51239f6/src/structs.jl#L85-L88">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="SBML.MathVal" href="#SBML.MathVal"><code>SBML.MathVal</code></a><span class="docstring-category">Type</span></header><section><div><p>A literal value (usually a numeric constant) in mathematical expression</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/SBML.jl/blob/9604c34aca43738d55ce50e4103c371af51239f6/src/structs.jl#L63-L65">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="SBML.Model" href="#SBML.Model"><code>SBML.Model</code></a><span class="docstring-category">Type</span></header><section><div><p>Structure that collects the model-related data. Contains <code>parameters</code>, <code>units</code>, <code>compartments</code>, <code>species</code> and <code>reactions</code> and <code>gene_products</code>, and additional <code>notes</code> and <code>annotation</code> (also present internally in some of the data fields). The contained dictionaries are indexed by identifiers of the corresponding objects.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/SBML.jl/blob/9604c34aca43738d55ce50e4103c371af51239f6/src/structs.jl#L184-L190">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="SBML.Reaction" href="#SBML.Reaction"><code>SBML.Reaction</code></a><span class="docstring-category">Type</span></header><section><div><p>Reaction with stoichiometry that assigns reactants and products their relative consumption/production rates (accessible in field <code>stoichiometry</code>), lower/upper bounds (in tuples <code>lb</code> and <code>ub</code>, with unit names), and objective coefficient (<code>oc</code>). Also may contains <code>notes</code> and <code>annotation</code>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/SBML.jl/blob/9604c34aca43738d55ce50e4103c371af51239f6/src/structs.jl#L123-L128">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="SBML.Species" href="#SBML.Species"><code>SBML.Species</code></a><span class="docstring-category">Type</span></header><section><div><p>Species metadata – contains a human-readable <code>name</code>, a <code>compartment</code> identifier, <code>formula</code>, <code>charge</code>, and additional <code>notes</code> and <code>annotation</code>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/SBML.jl/blob/9604c34aca43738d55ce50e4103c371af51239f6/src/structs.jl#L143-L146">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="SBML.UnitPart" href="#SBML.UnitPart"><code>SBML.UnitPart</code></a><span class="docstring-category">Type</span></header><section><div><p>Part of a measurement unit definition that corresponds to the SBML definition of <code>Unit</code>. For example, the unit &quot;per square megahour&quot;, Mh^(-2), is written as:</p><pre><code class="nohighlight">SBML.UnitPart(&quot;second&quot;, # base SI unit, this says we are measuring time
⋮ ⋮ ⋱ ⋮ ⋮ </code></pre><h1 id="Function-reference"><a class="docs-heading-anchor" href="#Function-reference">Function reference</a><a id="Function-reference-1"></a><a class="docs-heading-anchor-permalink" href="#Function-reference" title="Permalink"></a></h1><h2 id="Helper-types"><a class="docs-heading-anchor" href="#Helper-types">Helper types</a><a id="Helper-types-1"></a><a class="docs-heading-anchor-permalink" href="#Helper-types" title="Permalink"></a></h2><article class="docstring"><header><a class="docstring-binding" id="SBML.Maybe" href="#SBML.Maybe"><code>SBML.Maybe</code></a><span class="docstring-category">Type</span></header><section><div><pre><code class="language-julia">Maybe{X}</code></pre><p>Type shortcut for &quot;<code>X</code> or nothing&quot; or &quot;nullable <code>X</code>&quot; in javaspeak. Name got inspired by our functional friends.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/SBML.jl/blob/3ee30322df7d4b5fc124b5f0499a62e04a85a7e8/src/types.jl#L2-L7">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="SBML.VPtr" href="#SBML.VPtr"><code>SBML.VPtr</code></a><span class="docstring-category">Type</span></header><section><div><pre><code class="language-julia">VPtr</code></pre><p>A convenience wrapper for &quot;any&quot; (C <code>void</code>) pointer.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/SBML.jl/blob/3ee30322df7d4b5fc124b5f0499a62e04a85a7e8/src/types.jl#L10-L14">source</a></section></article><h2 id="Data-structures"><a class="docs-heading-anchor" href="#Data-structures">Data structures</a><a id="Data-structures-1"></a><a class="docs-heading-anchor-permalink" href="#Data-structures" title="Permalink"></a></h2><article class="docstring"><header><a class="docstring-binding" id="SBML.Compartment" href="#SBML.Compartment"><code>SBML.Compartment</code></a><span class="docstring-category">Type</span></header><section><div><p>SBML Compartment with sizing information.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/SBML.jl/blob/3ee30322df7d4b5fc124b5f0499a62e04a85a7e8/src/structs.jl#L101-L103">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="SBML.FunctionDefinition" href="#SBML.FunctionDefinition"><code>SBML.FunctionDefinition</code></a><span class="docstring-category">Type</span></header><section><div><p>Custom function definition.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/SBML.jl/blob/3ee30322df7d4b5fc124b5f0499a62e04a85a7e8/src/structs.jl#L165-L167">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="SBML.GPAAnd" href="#SBML.GPAAnd"><code>SBML.GPAAnd</code></a><span class="docstring-category">Type</span></header><section><div><p>Boolean binary &quot;and&quot; in the association expression</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/SBML.jl/blob/3ee30322df7d4b5fc124b5f0499a62e04a85a7e8/src/structs.jl#L36-L38">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="SBML.GPAOr" href="#SBML.GPAOr"><code>SBML.GPAOr</code></a><span class="docstring-category">Type</span></header><section><div><p>Boolean binary &quot;or&quot; in the association expression</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/SBML.jl/blob/3ee30322df7d4b5fc124b5f0499a62e04a85a7e8/src/structs.jl#L43-L45">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="SBML.GPARef" href="#SBML.GPARef"><code>SBML.GPARef</code></a><span class="docstring-category">Type</span></header><section><div><p>Gene product reference in the association expression</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/SBML.jl/blob/3ee30322df7d4b5fc124b5f0499a62e04a85a7e8/src/structs.jl#L29-L31">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="SBML.GeneProduct" href="#SBML.GeneProduct"><code>SBML.GeneProduct</code></a><span class="docstring-category">Type</span></header><section><div><p>Gene product metadata.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/SBML.jl/blob/3ee30322df7d4b5fc124b5f0499a62e04a85a7e8/src/structs.jl#L154-L156">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="SBML.GeneProductAssociation" href="#SBML.GeneProductAssociation"><code>SBML.GeneProductAssociation</code></a><span class="docstring-category">Type</span></header><section><div><p>Abstract type for all kinds of gene product associations</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/SBML.jl/blob/3ee30322df7d4b5fc124b5f0499a62e04a85a7e8/src/structs.jl#L24-L26">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="SBML.Math" href="#SBML.Math"><code>SBML.Math</code></a><span class="docstring-category">Type</span></header><section><div><p>A simplified representation of MathML-specified math AST</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/SBML.jl/blob/3ee30322df7d4b5fc124b5f0499a62e04a85a7e8/src/structs.jl#L50-L52">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="SBML.MathApply" href="#SBML.MathApply"><code>SBML.MathApply</code></a><span class="docstring-category">Type</span></header><section><div><p>Function application (&quot;call by name&quot;, no tricks allowed) in mathematical expression</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/SBML.jl/blob/3ee30322df7d4b5fc124b5f0499a62e04a85a7e8/src/structs.jl#L85-L87">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="SBML.MathConst" href="#SBML.MathConst"><code>SBML.MathConst</code></a><span class="docstring-category">Type</span></header><section><div><p>A constant identified by name (usually something like <code>pi</code>, <code>e</code> or <code>true</code>) in mathematical expression</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/SBML.jl/blob/3ee30322df7d4b5fc124b5f0499a62e04a85a7e8/src/structs.jl#L69-L72">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="SBML.MathIdent" href="#SBML.MathIdent"><code>SBML.MathIdent</code></a><span class="docstring-category">Type</span></header><section><div><p>An identifier (usually a variable name) in mathematical expression</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/SBML.jl/blob/3ee30322df7d4b5fc124b5f0499a62e04a85a7e8/src/structs.jl#L62-L64">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="SBML.MathLambda" href="#SBML.MathLambda"><code>SBML.MathLambda</code></a><span class="docstring-category">Type</span></header><section><div><p>Function definition (aka &quot;lambda&quot;) in mathematical expression</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/SBML.jl/blob/3ee30322df7d4b5fc124b5f0499a62e04a85a7e8/src/structs.jl#L93-L95">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="SBML.MathTime" href="#SBML.MathTime"><code>SBML.MathTime</code></a><span class="docstring-category">Type</span></header><section><div><p>A special value representing the current time of the simulation, with a special name.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/SBML.jl/blob/3ee30322df7d4b5fc124b5f0499a62e04a85a7e8/src/structs.jl#L77-L80">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="SBML.MathVal" href="#SBML.MathVal"><code>SBML.MathVal</code></a><span class="docstring-category">Type</span></header><section><div><p>A literal value (usually a numeric constant) in mathematical expression</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/SBML.jl/blob/3ee30322df7d4b5fc124b5f0499a62e04a85a7e8/src/structs.jl#L55-L57">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="SBML.Model" href="#SBML.Model"><code>SBML.Model</code></a><span class="docstring-category">Type</span></header><section><div><p>Structure that collects the model-related data. Contains <code>parameters</code>, <code>units</code>, <code>compartments</code>, <code>species</code> and <code>reactions</code> and <code>gene_products</code>, and additional <code>notes</code> and <code>annotation</code> (also present internally in some of the data fields). The contained dictionaries are indexed by identifiers of the corresponding objects.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/SBML.jl/blob/3ee30322df7d4b5fc124b5f0499a62e04a85a7e8/src/structs.jl#L176-L182">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="SBML.Reaction" href="#SBML.Reaction"><code>SBML.Reaction</code></a><span class="docstring-category">Type</span></header><section><div><p>Reaction with stoichiometry that assigns reactants and products their relative consumption/production rates (accessible in field <code>stoichiometry</code>), lower/upper bounds (in tuples <code>lb</code> and <code>ub</code>, with unit names), and objective coefficient (<code>oc</code>). Also may contains <code>notes</code> and <code>annotation</code>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/SBML.jl/blob/3ee30322df7d4b5fc124b5f0499a62e04a85a7e8/src/structs.jl#L115-L120">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="SBML.Species" href="#SBML.Species"><code>SBML.Species</code></a><span class="docstring-category">Type</span></header><section><div><p>Species metadata – contains a human-readable <code>name</code>, a <code>compartment</code> identifier, <code>formula</code>, <code>charge</code>, and additional <code>notes</code> and <code>annotation</code>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/SBML.jl/blob/3ee30322df7d4b5fc124b5f0499a62e04a85a7e8/src/structs.jl#L135-L138">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="SBML.UnitPart" href="#SBML.UnitPart"><code>SBML.UnitPart</code></a><span class="docstring-category">Type</span></header><section><div><p>Part of a measurement unit definition that corresponds to the SBML definition of <code>Unit</code>. For example, the unit &quot;per square megahour&quot;, Mh^(-2), is written as:</p><pre><code class="nohighlight">SBML.UnitPart(&quot;second&quot;, # base SI unit, this says we are measuring time
-2, # exponent, says &quot;per square&quot;
6, # log-10 scale of the unit, says &quot;mega&quot;
1/3600) # second-to-hour multiplier</code></pre><p>Compound units (such as &quot;volt-amperes&quot; and &quot;dozens of yards per ounce&quot;) are built from multiple <code>UnitPart</code>s; see the definition of field <code>units</code> in <a href="#SBML.Model"><code>SBML.Model</code></a>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/SBML.jl/blob/9604c34aca43738d55ce50e4103c371af51239f6/src/structs.jl#L10-L22">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="SBML.SBMLVersion-Tuple{}" href="#SBML.SBMLVersion-Tuple{}"><code>SBML.SBMLVersion</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">function SBMLVersion()</code></pre><p>Get the version of the used SBML library in Julia version format.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/SBML.jl/blob/9604c34aca43738d55ce50e4103c371af51239f6/src/version.jl#L2-L6">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="SBML.extractModel-Tuple{Ptr{Nothing}}" href="#SBML.extractModel-Tuple{Ptr{Nothing}}"><code>SBML.extractModel</code></a><span class="docstring-category">Method</span></header><section><div><p>&quot; function extractModel(mdl::VPtr)::SBML.Model</p><p>Take the <code>SBMLModel_t</code> pointer and extract all information required to make a valid <a href="#SBML.Model"><code>SBML.Model</code></a> structure.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/SBML.jl/blob/9604c34aca43738d55ce50e4103c371af51239f6/src/readsbml.jl#L146-L152">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="SBML.getAssociation-Tuple{Ptr{Nothing}}" href="#SBML.getAssociation-Tuple{Ptr{Nothing}}"><code>SBML.getAssociation</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">function getAssociation(x::VPtr)::GeneProductAssociation</code></pre><p>Convert a pointer to SBML <code>FbcAssociation_t</code> to the <code>GeneProductAssociation</code> tree structure.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/SBML.jl/blob/9604c34aca43738d55ce50e4103c371af51239f6/src/readsbml.jl#L116-L121">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="SBML.get_optional_bool-Tuple{Ptr{Nothing},Any,Any}" href="#SBML.get_optional_bool-Tuple{Ptr{Nothing},Any,Any}"><code>SBML.get_optional_bool</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">get_optional_bool(x::VPtr, is_sym, get_sym)::Maybe{Bool}</code></pre><p>Helper for getting out boolean flags.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/SBML.jl/blob/9604c34aca43738d55ce50e4103c371af51239f6/src/readsbml.jl#L35-L39">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="SBML.get_optional_double-Tuple{Ptr{Nothing},Any,Any}" href="#SBML.get_optional_double-Tuple{Ptr{Nothing},Any,Any}"><code>SBML.get_optional_double</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">get_optional_double(x::VPtr, is_sym, get_sym)::Maybe{Float64}</code></pre><p>Helper for getting out C doubles aka Float64s.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/SBML.jl/blob/9604c34aca43738d55ce50e4103c371af51239f6/src/readsbml.jl#L61-L65">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="SBML.get_optional_int-Tuple{Ptr{Nothing},Any,Any}" href="#SBML.get_optional_int-Tuple{Ptr{Nothing},Any,Any}"><code>SBML.get_optional_int</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">get_optional_int(x::VPtr, is_sym, get_sym)::Maybe{UInt}</code></pre><p>Helper for getting out unsigned integers.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/SBML.jl/blob/9604c34aca43738d55ce50e4103c371af51239f6/src/readsbml.jl#L48-L52">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="SBML.get_optional_string-Tuple{Ptr{Nothing},Any}" href="#SBML.get_optional_string-Tuple{Ptr{Nothing},Any}"><code>SBML.get_optional_string</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">get_optional_string(x::VPtr, fn_sym)::Maybe{String}</code></pre><p>Like <a href="#SBML.get_string-Tuple{Ptr{Nothing},Any}"><code>get_string</code></a>, but returns <code>nothing</code> instead of throwing an exception.</p><p>This is used to get notes and annotations and several other things (see <code>get_notes</code>, <code>get_annotations</code>)</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/SBML.jl/blob/9604c34aca43738d55ce50e4103c371af51239f6/src/readsbml.jl#L17-L25">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="SBML.get_string-Tuple{Ptr{Nothing},Any}" href="#SBML.get_string-Tuple{Ptr{Nothing},Any}"><code>SBML.get_string</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">get_string(x::VPtr, fn_sym)::Maybe{String}</code></pre><p>C-call the SBML function <code>fn_sym</code> with a single parameter <code>x</code>, interpret the result as a string and return it, or throw exception in case the pointer is NULL.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/SBML.jl/blob/9604c34aca43738d55ce50e4103c371af51239f6/src/readsbml.jl#L1-L7">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="SBML.readSBML" href="#SBML.readSBML"><code>SBML.readSBML</code></a><span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia">function readSBML(fn::String, sbml_conversion = model-&gt;nothing)::SBML.Model</code></pre><p>Read the SBML from a XML file in <code>fn</code> and return the contained <code>SBML.Model</code>.</p><p>The <code>sbml_conversion</code> is a function that does an in-place modification of the single parameter, which is the C pointer to the loaded SBML document (C type <code>SBMLDocument*</code>). Several functions for doing that are prepared, including <a href="#SBML.set_level_and_version-Tuple{Any,Any}"><code>set_level_and_version</code></a>, <a href="#SBML.libsbml_convert-Tuple{AbstractArray{var&quot;#s39&quot;,1} where var&quot;#s39&quot;&lt;:(Pair{String,var&quot;#s38&quot;} where var&quot;#s38&quot;&lt;:AbstractDict{String,String})}"><code>libsbml_convert</code></a>, and <a href="#SBML.convert_simplify_math"><code>convert_simplify_math</code></a>.</p><p><strong>Example</strong></p><pre><code class="nohighlight">m = readSBML(&quot;my_model.xml&quot;, doc -&gt; begin
1/3600) # second-to-hour multiplier</code></pre><p>Compound units (such as &quot;volt-amperes&quot; and &quot;dozens of yards per ounce&quot;) are built from multiple <code>UnitPart</code>s; see the definition of field <code>units</code> in <a href="#SBML.Model"><code>SBML.Model</code></a>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/SBML.jl/blob/3ee30322df7d4b5fc124b5f0499a62e04a85a7e8/src/structs.jl#L2-L14">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="SBML.SBMLVersion-Tuple{}" href="#SBML.SBMLVersion-Tuple{}"><code>SBML.SBMLVersion</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">function SBMLVersion()</code></pre><p>Get the version of the used SBML library in Julia version format.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/SBML.jl/blob/3ee30322df7d4b5fc124b5f0499a62e04a85a7e8/src/version.jl#L2-L6">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="SBML.extractModel-Tuple{Ptr{Nothing}}" href="#SBML.extractModel-Tuple{Ptr{Nothing}}"><code>SBML.extractModel</code></a><span class="docstring-category">Method</span></header><section><div><p>&quot; function extractModel(mdl::VPtr)::SBML.Model</p><p>Take the <code>SBMLModel_t</code> pointer and extract all information required to make a valid <a href="#SBML.Model"><code>SBML.Model</code></a> structure.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/SBML.jl/blob/3ee30322df7d4b5fc124b5f0499a62e04a85a7e8/src/readsbml.jl#L145-L151">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="SBML.getAssociation-Tuple{Ptr{Nothing}}" href="#SBML.getAssociation-Tuple{Ptr{Nothing}}"><code>SBML.getAssociation</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">function getAssociation(x::VPtr)::GeneProductAssociation</code></pre><p>Convert a pointer to SBML <code>FbcAssociation_t</code> to the <code>GeneProductAssociation</code> tree structure.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/SBML.jl/blob/3ee30322df7d4b5fc124b5f0499a62e04a85a7e8/src/readsbml.jl#L115-L120">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="SBML.get_optional_bool-Tuple{Ptr{Nothing},Any,Any}" href="#SBML.get_optional_bool-Tuple{Ptr{Nothing},Any,Any}"><code>SBML.get_optional_bool</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">get_optional_bool(x::VPtr, is_sym, get_sym)::Maybe{Bool}</code></pre><p>Helper for getting out boolean flags.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/SBML.jl/blob/3ee30322df7d4b5fc124b5f0499a62e04a85a7e8/src/readsbml.jl#L35-L39">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="SBML.get_optional_double-Tuple{Ptr{Nothing},Any,Any}" href="#SBML.get_optional_double-Tuple{Ptr{Nothing},Any,Any}"><code>SBML.get_optional_double</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">get_optional_double(x::VPtr, is_sym, get_sym)::Maybe{Float64}</code></pre><p>Helper for getting out C doubles aka Float64s.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/SBML.jl/blob/3ee30322df7d4b5fc124b5f0499a62e04a85a7e8/src/readsbml.jl#L61-L65">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="SBML.get_optional_int-Tuple{Ptr{Nothing},Any,Any}" href="#SBML.get_optional_int-Tuple{Ptr{Nothing},Any,Any}"><code>SBML.get_optional_int</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">get_optional_int(x::VPtr, is_sym, get_sym)::Maybe{UInt}</code></pre><p>Helper for getting out unsigned integers.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/SBML.jl/blob/3ee30322df7d4b5fc124b5f0499a62e04a85a7e8/src/readsbml.jl#L48-L52">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="SBML.get_optional_string-Tuple{Ptr{Nothing},Any}" href="#SBML.get_optional_string-Tuple{Ptr{Nothing},Any}"><code>SBML.get_optional_string</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">get_optional_string(x::VPtr, fn_sym)::Maybe{String}</code></pre><p>Like <a href="#SBML.get_string-Tuple{Ptr{Nothing},Any}"><code>get_string</code></a>, but returns <code>nothing</code> instead of throwing an exception.</p><p>This is used to get notes and annotations and several other things (see <code>get_notes</code>, <code>get_annotations</code>)</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/SBML.jl/blob/3ee30322df7d4b5fc124b5f0499a62e04a85a7e8/src/readsbml.jl#L17-L25">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="SBML.get_string-Tuple{Ptr{Nothing},Any}" href="#SBML.get_string-Tuple{Ptr{Nothing},Any}"><code>SBML.get_string</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">get_string(x::VPtr, fn_sym)::Maybe{String}</code></pre><p>C-call the SBML function <code>fn_sym</code> with a single parameter <code>x</code>, interpret the result as a string and return it, or throw exception in case the pointer is NULL.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/SBML.jl/blob/3ee30322df7d4b5fc124b5f0499a62e04a85a7e8/src/readsbml.jl#L1-L7">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="SBML.readSBML" href="#SBML.readSBML"><code>SBML.readSBML</code></a><span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia">function readSBML(fn::String, sbml_conversion = model-&gt;nothing)::SBML.Model</code></pre><p>Read the SBML from a XML file in <code>fn</code> and return the contained <code>SBML.Model</code>.</p><p>The <code>sbml_conversion</code> is a function that does an in-place modification of the single parameter, which is the C pointer to the loaded SBML document (C type <code>SBMLDocument*</code>). Several functions for doing that are prepared, including <a href="#SBML.set_level_and_version-Tuple{Any,Any}"><code>set_level_and_version</code></a>, <a href="#SBML.libsbml_convert-Tuple{AbstractArray{var&quot;#s37&quot;,1} where var&quot;#s37&quot;&lt;:(Pair{String,var&quot;#s38&quot;} where var&quot;#s38&quot;&lt;:AbstractDict{String,String})}"><code>libsbml_convert</code></a>, and <a href="#SBML.convert_simplify_math"><code>convert_simplify_math</code></a>.</p><p><strong>Example</strong></p><pre><code class="nohighlight">m = readSBML(&quot;my_model.xml&quot;, doc -&gt; begin
set_level_and_version(3, 1)(doc)
convert_simplify_math(doc)
end)</code></pre></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/SBML.jl/blob/9604c34aca43738d55ce50e4103c371af51239f6/src/readsbml.jl#L74-L92">source</a></section></article><h2 id="libsbml-representation-converters"><a class="docs-heading-anchor" href="#libsbml-representation-converters"><code>libsbml</code> representation converters</a><a id="libsbml-representation-converters-1"></a><a class="docs-heading-anchor-permalink" href="#libsbml-representation-converters" title="Permalink"></a></h2><p>The converters are intended to be used as parameters of <a href="#SBML.readSBML"><code>readSBML</code></a>.</p><article class="docstring"><header><a class="docstring-binding" id="SBML.convert_simplify_math" href="#SBML.convert_simplify_math"><code>SBML.convert_simplify_math</code></a><span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia">convert_simplify_math</code></pre><p>Shortcut for <a href="#SBML.libsbml_convert-Tuple{AbstractArray{var&quot;#s39&quot;,1} where var&quot;#s39&quot;&lt;:(Pair{String,var&quot;#s38&quot;} where var&quot;#s38&quot;&lt;:AbstractDict{String,String})}"><code>libsbml_convert</code></a> that expands functions, local parameters, and initial assignments in the SBML document.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/SBML.jl/blob/9604c34aca43738d55ce50e4103c371af51239f6/src/converters.jl#L60-L65">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="SBML.libsbml_convert-Tuple{AbstractArray{var&quot;#s39&quot;,1} where var&quot;#s39&quot;&lt;:(Pair{String,var&quot;#s38&quot;} where var&quot;#s38&quot;&lt;:AbstractDict{String,String})}" href="#SBML.libsbml_convert-Tuple{AbstractArray{var&quot;#s39&quot;,1} where var&quot;#s39&quot;&lt;:(Pair{String,var&quot;#s38&quot;} where var&quot;#s38&quot;&lt;:AbstractDict{String,String})}"><code>SBML.libsbml_convert</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">libsbml_convert(conversion_options::Vector{Pair{String, Dict{String, String}}})</code></pre><p>A converter that runs the SBML conversion routine, with specified conversion options. The argument is a vector of pairs to allow specifying the order of conversions.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/SBML.jl/blob/9604c34aca43738d55ce50e4103c371af51239f6/src/converters.jl#L15-L21">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="SBML.libsbml_convert-Tuple{String}" href="#SBML.libsbml_convert-Tuple{String}"><code>SBML.libsbml_convert</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">libsbml_convert(converter::String; kwargs...)</code></pre><p>Quickly construct a single run of a <code>libsbml</code> converter from keyword arguments.</p><p><strong>Example</strong></p><pre><code class="nohighlight">readSBML(&quot;example.xml&quot;, libsbml_convert(&quot;stripPackage&quot;, package=&quot;layout&quot;))</code></pre></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/SBML.jl/blob/9604c34aca43738d55ce50e4103c371af51239f6/src/converters.jl#L46-L55">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="SBML.set_level_and_version-Tuple{Any,Any}" href="#SBML.set_level_and_version-Tuple{Any,Any}"><code>SBML.set_level_and_version</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">set_level_and_version(level, version)</code></pre><p>A converter to pass into <a href="#SBML.readSBML"><code>readSBML</code></a> that enforces certain SBML level and version.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/SBML.jl/blob/9604c34aca43738d55ce50e4103c371af51239f6/src/converters.jl#L2-L7">source</a></section></article><h2 id="Data-helpers"><a class="docs-heading-anchor" href="#Data-helpers">Data helpers</a><a id="Data-helpers-1"></a><a class="docs-heading-anchor-permalink" href="#Data-helpers" title="Permalink"></a></h2><article class="docstring"><header><a class="docstring-binding" id="SBML.check_errors-Tuple{Integer,Ptr{Nothing},Exception}" href="#SBML.check_errors-Tuple{Integer,Ptr{Nothing},Exception}"><code>SBML.check_errors</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">check_errors(success::Integer, doc::Ptr{Cvoid}, error::Exception)</code></pre><p>If success is a 0-valued <code>Integer</code> (a logical <code>false</code>), then call <a href="#SBML.get_error_messages-Tuple{Ptr{Nothing},Exception}"><code>get_error_messages</code></a> to show the error messages reported by SBML in the <code>doc</code> document and throw the <code>error</code> if they are more than 1. <code>success</code> is typically the value returned by an SBML C function operating on <code>doc</code> which returns a boolean flag to signal a successful operation.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/SBML.jl/blob/9604c34aca43738d55ce50e4103c371af51239f6/src/utils.jl#L155-L163">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="SBML.extensive_kinetic_math-Tuple{SBML.Model,SBML.Math}" href="#SBML.extensive_kinetic_math-Tuple{SBML.Model,SBML.Math}"><code>SBML.extensive_kinetic_math</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">extensive_kinetic_math(m::SBML.Model, formula::SBML.Math)</code></pre><p>Convert a SBML math <code>formula</code> to &quot;extensive&quot; kinetic laws, where the references to species that are marked as not having only substance units are converted from amounts to concentrations.</p><p>Handling of units in the conversion process is ignored in this version.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/SBML.jl/blob/9604c34aca43738d55ce50e4103c371af51239f6/src/utils.jl#L107-L115">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="SBML.getLBs-Tuple{SBML.Model}" href="#SBML.getLBs-Tuple{SBML.Model}"><code>SBML.getLBs</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">getLBs(m::SBML.Model)::Vector{Tuple{Float64,String}}</code></pre><p>Extract a vector of lower bounds of reaction rates from the model. All bounds are accompanied with the unit of the corresponding value (this behavior is based on SBML specification).</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/SBML.jl/blob/9604c34aca43738d55ce50e4103c371af51239f6/src/utils.jl#L29-L35">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="SBML.getOCs-Tuple{SBML.Model}" href="#SBML.getOCs-Tuple{SBML.Model}"><code>SBML.getOCs</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">getOCs(m::SBML.Model)::Vector{Float64}</code></pre><p>Extract the vector of objective coefficients of each reaction.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/SBML.jl/blob/9604c34aca43738d55ce50e4103c371af51239f6/src/utils.jl#L47-L51">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="SBML.getS-Tuple{SBML.Model}" href="#SBML.getS-Tuple{SBML.Model}"><code>SBML.getS</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">function getS(m::SBML.Model; zeros=spzeros)::Tuple{Vector{String},Vector{String},AbstractMatrix{Float64}}</code></pre><p>Extract the vector of species (aka metabolite) identifiers, vector of reaction identifiers, and the (dense) stoichiometry matrix from an existing <code>SBML.Model</code>. Returns a tuple with these values.</p><p>The matrix is sparse by default (initially constructed by <code>SparseArrays.spzeros</code>). You can fill in a custom empty matrix constructed to argument <code>zeros</code>; e.g. running with <code>zeros=zeros</code> will produce a dense matrix.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/SBML.jl/blob/9604c34aca43738d55ce50e4103c371af51239f6/src/utils.jl#L3-L13">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="SBML.getUBs-Tuple{SBML.Model}" href="#SBML.getUBs-Tuple{SBML.Model}"><code>SBML.getUBs</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">getUBs(m::SBML.Model)::Vector{Tuple{Float64,String}}</code></pre><p>Likewise to <a href="#SBML.getLBs-Tuple{SBML.Model}"><code>getLBs</code></a>, extract the upper bounds.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/SBML.jl/blob/9604c34aca43738d55ce50e4103c371af51239f6/src/utils.jl#L39-L43">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="SBML.get_error_messages-Tuple{Ptr{Nothing},Exception}" href="#SBML.get_error_messages-Tuple{Ptr{Nothing},Exception}"><code>SBML.get_error_messages</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">get_error_messages(doc::Ptr{Cvoid}, error::Exception)</code></pre><p>Show the error messages reported by SBML in the <code>doc</code> document and throw the <code>error</code> if they are more than 1.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/SBML.jl/blob/9604c34aca43738d55ce50e4103c371af51239f6/src/utils.jl#L136-L141">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="SBML.initial_amounts-Tuple{SBML.Model}" href="#SBML.initial_amounts-Tuple{SBML.Model}"><code>SBML.initial_amounts</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">initial_amounts(m::SBML.Model; convert_concentrations = false)</code></pre><p>Return initial amounts for each species as a generator of pairs <code>species_name =&gt; initial_amount</code>; the amount is set to <code>nothing</code> if not available. If <code>convert_concentrations</code> is true and there is information about initial concentration available together with compartment size, the result is computed from the species&#39; initial concentration.</p><p>In the current version, units of the measurements are completely ignored.</p><p><strong>Example</strong></p><pre><code class="nohighlight"># get the initial amounts as dictionary
end)</code></pre></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/SBML.jl/blob/3ee30322df7d4b5fc124b5f0499a62e04a85a7e8/src/readsbml.jl#L74-L92">source</a></section></article><h2 id="libsbml-representation-converters"><a class="docs-heading-anchor" href="#libsbml-representation-converters"><code>libsbml</code> representation converters</a><a id="libsbml-representation-converters-1"></a><a class="docs-heading-anchor-permalink" href="#libsbml-representation-converters" title="Permalink"></a></h2><p>The converters are intended to be used as parameters of <a href="#SBML.readSBML"><code>readSBML</code></a>.</p><article class="docstring"><header><a class="docstring-binding" id="SBML.convert_simplify_math" href="#SBML.convert_simplify_math"><code>SBML.convert_simplify_math</code></a><span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia">convert_simplify_math</code></pre><p>Shortcut for <a href="#SBML.libsbml_convert-Tuple{AbstractArray{var&quot;#s37&quot;,1} where var&quot;#s37&quot;&lt;:(Pair{String,var&quot;#s38&quot;} where var&quot;#s38&quot;&lt;:AbstractDict{String,String})}"><code>libsbml_convert</code></a> that expands functions, local parameters, and initial assignments in the SBML document.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/SBML.jl/blob/3ee30322df7d4b5fc124b5f0499a62e04a85a7e8/src/converters.jl#L70-L75">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="SBML.libsbml_convert-Tuple{AbstractArray{var&quot;#s37&quot;,1} where var&quot;#s37&quot;&lt;:(Pair{String,var&quot;#s38&quot;} where var&quot;#s38&quot;&lt;:AbstractDict{String,String})}" href="#SBML.libsbml_convert-Tuple{AbstractArray{var&quot;#s37&quot;,1} where var&quot;#s37&quot;&lt;:(Pair{String,var&quot;#s38&quot;} where var&quot;#s38&quot;&lt;:AbstractDict{String,String})}"><code>SBML.libsbml_convert</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">libsbml_convert(conversion_options::Vector{Pair{String, Dict{String, String}}})</code></pre><p>A converter that runs the SBML conversion routine, with specified conversion options. The argument is a vector of pairs to allow specifying the order of conversions.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/SBML.jl/blob/3ee30322df7d4b5fc124b5f0499a62e04a85a7e8/src/converters.jl#L22-L28">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="SBML.libsbml_convert-Tuple{String}" href="#SBML.libsbml_convert-Tuple{String}"><code>SBML.libsbml_convert</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">libsbml_convert(converter::String; kwargs...)</code></pre><p>Quickly construct a single run of a <code>libsbml</code> converter from keyword arguments.</p><p><strong>Example</strong></p><pre><code class="nohighlight">readSBML(&quot;example.xml&quot;, libsbml_convert(&quot;stripPackage&quot;, package=&quot;layout&quot;))</code></pre></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/SBML.jl/blob/3ee30322df7d4b5fc124b5f0499a62e04a85a7e8/src/converters.jl#L56-L65">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="SBML.set_level_and_version-Tuple{Any,Any}" href="#SBML.set_level_and_version-Tuple{Any,Any}"><code>SBML.set_level_and_version</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">set_level_and_version(level, version)</code></pre><p>A converter to pass into <a href="#SBML.readSBML"><code>readSBML</code></a> that enforces certain SBML level and version.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/SBML.jl/blob/3ee30322df7d4b5fc124b5f0499a62e04a85a7e8/src/converters.jl#L2-L7">source</a></section></article><h2 id="Data-helpers"><a class="docs-heading-anchor" href="#Data-helpers">Data helpers</a><a id="Data-helpers-1"></a><a class="docs-heading-anchor-permalink" href="#Data-helpers" title="Permalink"></a></h2><article class="docstring"><header><a class="docstring-binding" id="SBML.check_errors-Tuple{Integer,Ptr{Nothing},Exception}" href="#SBML.check_errors-Tuple{Integer,Ptr{Nothing},Exception}"><code>SBML.check_errors</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">check_errors(success::Integer, doc::Ptr{Cvoid}, error::Exception)</code></pre><p>If success is a 0-valued <code>Integer</code> (a logical <code>false</code>), then call <a href="#SBML.get_error_messages-Tuple{Ptr{Nothing},Exception}"><code>get_error_messages</code></a> to show the error messages reported by SBML in the <code>doc</code> document and throw the <code>error</code> if they are more than 1. <code>success</code> is typically the value returned by an SBML C function operating on <code>doc</code> which returns a boolean flag to signal a successful operation.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/SBML.jl/blob/3ee30322df7d4b5fc124b5f0499a62e04a85a7e8/src/utils.jl#L153-L161">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="SBML.extensive_kinetic_math-Tuple{SBML.Model,SBML.Math}" href="#SBML.extensive_kinetic_math-Tuple{SBML.Model,SBML.Math}"><code>SBML.extensive_kinetic_math</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">extensive_kinetic_math(m::SBML.Model, formula::SBML.Math)</code></pre><p>Convert a SBML math <code>formula</code> to &quot;extensive&quot; kinetic laws, where the references to species that are marked as not having only substance units are converted from amounts to concentrations.</p><p>Handling of units in the conversion process is ignored in this version.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/SBML.jl/blob/3ee30322df7d4b5fc124b5f0499a62e04a85a7e8/src/utils.jl#L105-L113">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="SBML.getLBs-Tuple{SBML.Model}" href="#SBML.getLBs-Tuple{SBML.Model}"><code>SBML.getLBs</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">getLBs(m::SBML.Model)::Vector{Tuple{Float64,String}}</code></pre><p>Extract a vector of lower bounds of reaction rates from the model. All bounds are accompanied with the unit of the corresponding value (this behavior is based on SBML specification).</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/SBML.jl/blob/3ee30322df7d4b5fc124b5f0499a62e04a85a7e8/src/utils.jl#L27-L33">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="SBML.getOCs-Tuple{SBML.Model}" href="#SBML.getOCs-Tuple{SBML.Model}"><code>SBML.getOCs</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">getOCs(m::SBML.Model)::Vector{Float64}</code></pre><p>Extract the vector of objective coefficients of each reaction.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/SBML.jl/blob/3ee30322df7d4b5fc124b5f0499a62e04a85a7e8/src/utils.jl#L45-L49">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="SBML.getS-Tuple{SBML.Model}" href="#SBML.getS-Tuple{SBML.Model}"><code>SBML.getS</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">function getS(m::SBML.Model; zeros=spzeros)::Tuple{Vector{String},Vector{String},AbstractMatrix{Float64}}</code></pre><p>Extract the vector of species (aka metabolite) identifiers, vector of reaction identifiers, and the (dense) stoichiometry matrix from an existing <code>SBML.Model</code>. Returns a tuple with these values.</p><p>The matrix is sparse by default (initially constructed by <code>SparseArrays.spzeros</code>). You can fill in a custom empty matrix constructed to argument <code>zeros</code>; e.g. running with <code>zeros=zeros</code> will produce a dense matrix.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/SBML.jl/blob/3ee30322df7d4b5fc124b5f0499a62e04a85a7e8/src/utils.jl#L1-L11">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="SBML.getUBs-Tuple{SBML.Model}" href="#SBML.getUBs-Tuple{SBML.Model}"><code>SBML.getUBs</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">getUBs(m::SBML.Model)::Vector{Tuple{Float64,String}}</code></pre><p>Likewise to <a href="#SBML.getLBs-Tuple{SBML.Model}"><code>getLBs</code></a>, extract the upper bounds.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/SBML.jl/blob/3ee30322df7d4b5fc124b5f0499a62e04a85a7e8/src/utils.jl#L37-L41">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="SBML.get_error_messages-Tuple{Ptr{Nothing},Exception}" href="#SBML.get_error_messages-Tuple{Ptr{Nothing},Exception}"><code>SBML.get_error_messages</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">get_error_messages(doc::Ptr{Cvoid}, error::Exception)</code></pre><p>Show the error messages reported by SBML in the <code>doc</code> document and throw the <code>error</code> if they are more than 1.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/SBML.jl/blob/3ee30322df7d4b5fc124b5f0499a62e04a85a7e8/src/utils.jl#L134-L139">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="SBML.initial_amounts-Tuple{SBML.Model}" href="#SBML.initial_amounts-Tuple{SBML.Model}"><code>SBML.initial_amounts</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">initial_amounts(m::SBML.Model; convert_concentrations = false)</code></pre><p>Return initial amounts for each species as a generator of pairs <code>species_name =&gt; initial_amount</code>; the amount is set to <code>nothing</code> if not available. If <code>convert_concentrations</code> is true and there is information about initial concentration available together with compartment size, the result is computed from the species&#39; initial concentration.</p><p>In the current version, units of the measurements are completely ignored.</p><p><strong>Example</strong></p><pre><code class="nohighlight"># get the initial amounts as dictionary
Dict(initial_amounts(model, convert_concentrations = true))
# remove the empty entries
Dict(k =&gt; v for (k,v) in initial_amounts(model) if !isnothing(v))</code></pre></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/SBML.jl/blob/9604c34aca43738d55ce50e4103c371af51239f6/src/utils.jl#L54-L73">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="SBML.initial_concentrations-Tuple{SBML.Model}" href="#SBML.initial_concentrations-Tuple{SBML.Model}"><code>SBML.initial_concentrations</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">initial_concentrations(m::SBML.Model; convert_amounts = false)</code></pre><p>Return initial concentrations of the species in the model. Refer to work-alike <a href="#SBML.initial_amounts-Tuple{SBML.Model}"><code>initial_amounts</code></a> for details.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/SBML.jl/blob/9604c34aca43738d55ce50e4103c371af51239f6/src/utils.jl#L87-L92">source</a></section></article><h2 id="Math-and-Symbolics.jl-compatibility"><a class="docs-heading-anchor" href="#Math-and-Symbolics.jl-compatibility">Math and <code>Symbolics.jl</code> compatibility</a><a id="Math-and-Symbolics.jl-compatibility-1"></a><a class="docs-heading-anchor-permalink" href="#Math-and-Symbolics.jl-compatibility" title="Permalink"></a></h2><article class="docstring"><header><a class="docstring-binding" id="SBML.default_symbolics_constants" href="#SBML.default_symbolics_constants"><code>SBML.default_symbolics_constants</code></a><span class="docstring-category">Constant</span></header><section><div><pre><code class="language-julia">const default_symbolics_constants::Dict{String, Any}</code></pre><p>A dictionary of default constants filled in place of SBML Math constants in the symbolics conversion.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/SBML.jl/blob/9604c34aca43738d55ce50e4103c371af51239f6/src/symbolics.jl#L69-L74">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="SBML.default_symbolics_mapping" href="#SBML.default_symbolics_mapping"><code>SBML.default_symbolics_mapping</code></a><span class="docstring-category">Constant</span></header><section><div><pre><code class="language-julia">default_symbolics_mapping :: Dict{String,Any}</code></pre><p>Default mapping of SBML function names to Julia functions, represented as a dictionary from Strings (SBML names) to anything <code>eval</code>uable as Julia&amp;Symbolics functions, such as symbols and expressions.</p><p>The default mapping only contains the basic SBML functions that are unambiguously represented in Julia; it is supposed to be extended by the user if more functions need to be supported.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/SBML.jl/blob/9604c34aca43738d55ce50e4103c371af51239f6/src/symbolics.jl#L2-L12">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="Base.convert-Tuple{Type{Symbolics.Num},SBML.Math}" href="#Base.convert-Tuple{Type{Symbolics.Num},SBML.Math}"><code>Base.convert</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">Base.convert(
Dict(k =&gt; v for (k,v) in initial_amounts(model) if !isnothing(v))</code></pre></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/SBML.jl/blob/3ee30322df7d4b5fc124b5f0499a62e04a85a7e8/src/utils.jl#L52-L71">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="SBML.initial_concentrations-Tuple{SBML.Model}" href="#SBML.initial_concentrations-Tuple{SBML.Model}"><code>SBML.initial_concentrations</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">initial_concentrations(m::SBML.Model; convert_amounts = false)</code></pre><p>Return initial concentrations of the species in the model. Refer to work-alike <a href="#SBML.initial_amounts-Tuple{SBML.Model}"><code>initial_amounts</code></a> for details.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/SBML.jl/blob/3ee30322df7d4b5fc124b5f0499a62e04a85a7e8/src/utils.jl#L85-L90">source</a></section></article><h2 id="Math-and-Symbolics.jl-compatibility"><a class="docs-heading-anchor" href="#Math-and-Symbolics.jl-compatibility">Math and <code>Symbolics.jl</code> compatibility</a><a id="Math-and-Symbolics.jl-compatibility-1"></a><a class="docs-heading-anchor-permalink" href="#Math-and-Symbolics.jl-compatibility" title="Permalink"></a></h2><article class="docstring"><header><a class="docstring-binding" id="SBML.default_symbolics_constants" href="#SBML.default_symbolics_constants"><code>SBML.default_symbolics_constants</code></a><span class="docstring-category">Constant</span></header><section><div><pre><code class="language-julia">const default_symbolics_constants::Dict{String, Any}</code></pre><p>A dictionary of default constants filled in place of SBML Math constants in the symbolics conversion.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/SBML.jl/blob/3ee30322df7d4b5fc124b5f0499a62e04a85a7e8/src/symbolics.jl#L69-L74">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="SBML.default_symbolics_mapping" href="#SBML.default_symbolics_mapping"><code>SBML.default_symbolics_mapping</code></a><span class="docstring-category">Constant</span></header><section><div><pre><code class="language-julia">default_symbolics_mapping :: Dict{String,Any}</code></pre><p>Default mapping of SBML function names to Julia functions, represented as a dictionary from Strings (SBML names) to anything <code>eval</code>uable as Julia&amp;Symbolics functions, such as symbols and expressions.</p><p>The default mapping only contains the basic SBML functions that are unambiguously represented in Julia; it is supposed to be extended by the user if more functions need to be supported.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/SBML.jl/blob/3ee30322df7d4b5fc124b5f0499a62e04a85a7e8/src/symbolics.jl#L2-L12">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="Base.convert-Tuple{Type{Symbolics.Num},SBML.Math}" href="#Base.convert-Tuple{Type{Symbolics.Num},SBML.Math}"><code>Base.convert</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">Base.convert(
::Type{Num},
x::SBML.Math;
mapping = default_symbolics_mapping,
convert_time = (x::SBML.MathTime) -&gt; Num(Variable(Symbol(x.id))).val,
convert_const = (x::SBML.MathConst) -&gt; Num(default_symbolics_constants[x.id]),
)</code></pre><p>Convert SBML.<a href="#SBML.Math"><code>Math</code></a> to <code>Num</code> type from Symbolics package. The conversion of functions can be customized by supplying a custom mapping; if nothing is supplied, <a href="#SBML.default_symbolics_mapping"><code>default_symbolics_mapping</code></a> that translates basic functions to their Julia equivalents is assumed.</p><p>Translation of <a href="#SBML.MathLambda"><code>MathLambda</code></a> is not supported by Symbolics.</p><p><a href="#SBML.MathTime"><code>MathTime</code></a> is handled specially, the function from the argument <code>convert_time</code> is called to possibly specify any desired behavior. By default, it just creates a variable with the same name as the time variable name stored in SBML.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/SBML.jl/blob/9604c34aca43738d55ce50e4103c371af51239f6/src/symbolics.jl#L78-L98">source</a></section></article><h3 id="Internal-math-helpers"><a class="docs-heading-anchor" href="#Internal-math-helpers">Internal math helpers</a><a id="Internal-math-helpers-1"></a><a class="docs-heading-anchor-permalink" href="#Internal-math-helpers" title="Permalink"></a></h3><article class="docstring"><header><a class="docstring-binding" id="SBML.ast_is-Tuple{Ptr{Nothing},Symbol}" href="#SBML.ast_is-Tuple{Ptr{Nothing},Symbol}"><code>SBML.ast_is</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">ast_is(ast::VPtr, what::Symbol)::Bool</code></pre><p>Helper for quickly recognizing kinds of ASTs</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/SBML.jl/blob/9604c34aca43738d55ce50e4103c371af51239f6/src/math.jl#L2-L6">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="SBML.parse_math-Tuple{Ptr{Nothing}}" href="#SBML.parse_math-Tuple{Ptr{Nothing}}"><code>SBML.parse_math</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">parse_math(ast::VPtr)::Math</code></pre><p>This attempts to parse out a decent Julia-esque (<a href="#SBML.Math"><code>Math</code></a> AST from a pointer to <code>ASTNode_t</code>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/SBML.jl/blob/9604c34aca43738d55ce50e4103c371af51239f6/src/math.jl#L19-L24">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="SBML.parse_math_children-Tuple{Ptr{Nothing}}" href="#SBML.parse_math_children-Tuple{Ptr{Nothing}}"><code>SBML.parse_math_children</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">parse_math_children(ast::VPtr)::Vector{Math}</code></pre><p>Recursively parse all children of an AST node.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/SBML.jl/blob/9604c34aca43738d55ce50e4103c371af51239f6/src/math.jl#L9-L13">source</a></section></article></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> version 0.27.3 on <span class="colophon-date" title="Saturday 3 July 2021 07:40">Saturday 3 July 2021</span>. Using Julia version 1.5.4.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
)</code></pre><p>Convert SBML.<a href="#SBML.Math"><code>Math</code></a> to <code>Num</code> type from Symbolics package. The conversion of functions can be customized by supplying a custom mapping; if nothing is supplied, <a href="#SBML.default_symbolics_mapping"><code>default_symbolics_mapping</code></a> that translates basic functions to their Julia equivalents is assumed.</p><p>Translation of <a href="#SBML.MathLambda"><code>MathLambda</code></a> is not supported by Symbolics.</p><p><a href="#SBML.MathTime"><code>MathTime</code></a> is handled specially, the function from the argument <code>convert_time</code> is called to possibly specify any desired behavior. By default, it just creates a variable with the same name as the time variable name stored in SBML.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/SBML.jl/blob/3ee30322df7d4b5fc124b5f0499a62e04a85a7e8/src/symbolics.jl#L78-L98">source</a></section></article><h3 id="Internal-math-helpers"><a class="docs-heading-anchor" href="#Internal-math-helpers">Internal math helpers</a><a id="Internal-math-helpers-1"></a><a class="docs-heading-anchor-permalink" href="#Internal-math-helpers" title="Permalink"></a></h3><article class="docstring"><header><a class="docstring-binding" id="SBML.ast_is-Tuple{Ptr{Nothing},Symbol}" href="#SBML.ast_is-Tuple{Ptr{Nothing},Symbol}"><code>SBML.ast_is</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">ast_is(ast::VPtr, what::Symbol)::Bool</code></pre><p>Helper for quickly recognizing kinds of ASTs</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/SBML.jl/blob/3ee30322df7d4b5fc124b5f0499a62e04a85a7e8/src/math.jl#L2-L6">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="SBML.parse_math-Tuple{Ptr{Nothing}}" href="#SBML.parse_math-Tuple{Ptr{Nothing}}"><code>SBML.parse_math</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">parse_math(ast::VPtr)::Math</code></pre><p>This attempts to parse out a decent Julia-esque (<a href="#SBML.Math"><code>Math</code></a> AST from a pointer to <code>ASTNode_t</code>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/SBML.jl/blob/3ee30322df7d4b5fc124b5f0499a62e04a85a7e8/src/math.jl#L19-L24">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="SBML.parse_math_children-Tuple{Ptr{Nothing}}" href="#SBML.parse_math_children-Tuple{Ptr{Nothing}}"><code>SBML.parse_math_children</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">parse_math_children(ast::VPtr)::Vector{Math}</code></pre><p>Recursively parse all children of an AST node.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/SBML.jl/blob/3ee30322df7d4b5fc124b5f0499a62e04a85a7e8/src/math.jl#L9-L13">source</a></section></article></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> version 0.27.3 on <span class="colophon-date" title="Saturday 3 July 2021 08:30">Saturday 3 July 2021</span>. Using Julia version 1.5.4.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
<!DOCTYPE html>
<html lang="en"><head><meta charset="UTF-8"/><meta name="viewport" content="width=device-width, initial-scale=1.0"/><title>Search · SBML.jl</title><script data-outdated-warner src="../assets/warner.js"></script><link rel="canonical" href="https://lcsb-biocore.github.io/DistributedData.jl/stable/search/"/><link href="https://cdnjs.cloudflare.com/ajax/libs/lato-font/3.0.0/css/lato-font.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/juliamono/0.039/juliamono-regular.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.3/css/fontawesome.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.3/css/solid.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.3/css/brands.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.13.11/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></head><body><div id="documenter"><nav class="docs-sidebar"><a class="docs-logo" href="../"><img src="../assets/logo.svg" alt="SBML.jl logo"/></a><div class="docs-package-name"><span class="docs-autofit"><a href="../">SBML.jl</a></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="../">Documentation</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> version 0.27.3 on <span class="colophon-date" title="Saturday 3 July 2021 07:40">Saturday 3 July 2021</span>. Using Julia version 1.5.4.</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 · SBML.jl</title><script data-outdated-warner src="../assets/warner.js"></script><link rel="canonical" href="https://lcsb-biocore.github.io/DistributedData.jl/stable/search/"/><link href="https://cdnjs.cloudflare.com/ajax/libs/lato-font/3.0.0/css/lato-font.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/juliamono/0.039/juliamono-regular.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.3/css/fontawesome.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.3/css/solid.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.3/css/brands.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.13.11/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></head><body><div id="documenter"><nav class="docs-sidebar"><a class="docs-logo" href="../"><img src="../assets/logo.svg" alt="SBML.jl logo"/></a><div class="docs-package-name"><span class="docs-autofit"><a href="../">SBML.jl</a></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="../">Documentation</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> version 0.27.3 on <span class="colophon-date" title="Saturday 3 July 2021 08:30">Saturday 3 July 2021</span>. Using Julia version 1.5.4.</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>
var documenterSearchIndex = {"docs":
[{"location":"#SBML.jl-—-load-systems-biology-models-from-SBML-files","page":"Documentation","title":"SBML.jl — load systems biology models from SBML files","text":"","category":"section"},{"location":"","page":"Documentation","title":"Documentation","text":"This package provides a straightforward way to load model- and simulation-relevant information from SBML files.","category":"page"},{"location":"","page":"Documentation","title":"Documentation","text":"The library provides a single function readSBML to load a SBML.Model:","category":"page"},{"location":"","page":"Documentation","title":"Documentation","text":"julia> using SBML\njulia> mdl = readSBML(\"Ec_core_flux1.xml\")\nSBML.Model(…)\n\njulia> mdl.compartments\n2-element Array{String,1}:\n \"Extra_organism\"\n \"Cytosol\"","category":"page"},{"location":"","page":"Documentation","title":"Documentation","text":"There are several functions to help you with using the data in the usual COBRA-style workflows, such as getS:","category":"page"},{"location":"","page":"Documentation","title":"Documentation","text":"julia> metabolites, reactions, S = getS(mdl)\njulia> metabolites\n77-element Array{String,1}:\n \"M_succoa_c\"\n \"M_ac_c\"\n \"M_etoh_c\"\n\n\njulia> S\n77×77 SparseArrays.SparseMatrixCSC{Float64,Int64} with 308 stored entries:\n [60, 1] = -1.0\n [68, 1] = 1.0\n [1 , 2] = 1.0\n [6 , 2] = -1.0\n\n [23, 76] = 1.0\n [56, 76] = -1.0\n [30, 77] = -1.0\n [48, 77] = 1.0\n\njulia> Matrix(S)\n77×77 Array{Float64,2}:\n 0.0 1.0 0.0 0.0 0.0 0.0 0.0 … 0.0 0.0 0.0 0.0 0.0 0.0 0.0\n 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0\n 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0\n 0.0 0.0 1.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0\n 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0\n 0.0 -1.0 0.0 0.0 0.0 0.0 0.0 … 0.0 0.0 0.0 0.0 0.0 0.0 0.0\n 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 1.0 -1.0 0.0 0.0 0.0\n 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0\n 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0\n 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 -1.0 0.0 0.0 0.0 0.0 0.0\n ⋮ ⋮ ⋱ ⋮ ⋮ ","category":"page"},{"location":"#Function-reference","page":"Documentation","title":"Function reference","text":"","category":"section"},{"location":"#Data-structures","page":"Documentation","title":"Data structures","text":"","category":"section"},{"location":"","page":"Documentation","title":"Documentation","text":"Modules = [SBML]\nPages = [\"structs.jl\"]","category":"page"},{"location":"#SBML.Maybe","page":"Documentation","title":"SBML.Maybe","text":"Maybe{X}\n\nType shortcut for \"X or nothing\" or \"nullable X\" in javaspeak. Name got inspired by our functional friends.\n\n\n\n\n\n","category":"type"},{"location":"#SBML.Compartment","page":"Documentation","title":"SBML.Compartment","text":"SBML Compartment with sizing information.\n\n\n\n\n\n","category":"type"},{"location":"#SBML.FunctionDefinition","page":"Documentation","title":"SBML.FunctionDefinition","text":"Custom function definition.\n\n\n\n\n\n","category":"type"},{"location":"#SBML.GPAAnd","page":"Documentation","title":"SBML.GPAAnd","text":"Boolean binary \"and\" in the association expression\n\n\n\n\n\n","category":"type"},{"location":"#SBML.GPAOr","page":"Documentation","title":"SBML.GPAOr","text":"Boolean binary \"or\" in the association expression\n\n\n\n\n\n","category":"type"},{"location":"#SBML.GPARef","page":"Documentation","title":"SBML.GPARef","text":"Gene product reference in the association expression\n\n\n\n\n\n","category":"type"},{"location":"#SBML.GeneProduct","page":"Documentation","title":"SBML.GeneProduct","text":"Gene product metadata.\n\n\n\n\n\n","category":"type"},{"location":"#SBML.GeneProductAssociation","page":"Documentation","title":"SBML.GeneProductAssociation","text":"Abstract type for all kinds of gene product associations\n\n\n\n\n\n","category":"type"},{"location":"#SBML.Math","page":"Documentation","title":"SBML.Math","text":"A simplified representation of MathML-specified math AST\n\n\n\n\n\n","category":"type"},{"location":"#SBML.MathApply","page":"Documentation","title":"SBML.MathApply","text":"Function application (\"call by name\", no tricks allowed) in mathematical expression\n\n\n\n\n\n","category":"type"},{"location":"#SBML.MathConst","page":"Documentation","title":"SBML.MathConst","text":"A constant identified by name (usually something like pi, e or true) in mathematical expression\n\n\n\n\n\n","category":"type"},{"location":"#SBML.MathIdent","page":"Documentation","title":"SBML.MathIdent","text":"An identifier (usually a variable name) in mathematical expression\n\n\n\n\n\n","category":"type"},{"location":"#SBML.MathLambda","page":"Documentation","title":"SBML.MathLambda","text":"Function definition (aka \"lambda\") in mathematical expression\n\n\n\n\n\n","category":"type"},{"location":"#SBML.MathTime","page":"Documentation","title":"SBML.MathTime","text":"A special value representing the current time of the simulation, with a special name.\n\n\n\n\n\n","category":"type"},{"location":"#SBML.MathVal","page":"Documentation","title":"SBML.MathVal","text":"A literal value (usually a numeric constant) in mathematical expression\n\n\n\n\n\n","category":"type"},{"location":"#SBML.Model","page":"Documentation","title":"SBML.Model","text":"Structure that collects the model-related data. Contains parameters, units, compartments, species and reactions and gene_products, and additional notes and annotation (also present internally in some of the data fields). The contained dictionaries are indexed by identifiers of the corresponding objects.\n\n\n\n\n\n","category":"type"},{"location":"#SBML.Reaction","page":"Documentation","title":"SBML.Reaction","text":"Reaction with stoichiometry that assigns reactants and products their relative consumption/production rates (accessible in field stoichiometry), lower/upper bounds (in tuples lb and ub, with unit names), and objective coefficient (oc). Also may contains notes and annotation.\n\n\n\n\n\n","category":"type"},{"location":"#SBML.Species","page":"Documentation","title":"SBML.Species","text":"Species metadata – contains a human-readable name, a compartment identifier, formula, charge, and additional notes and annotation.\n\n\n\n\n\n","category":"type"},{"location":"#SBML.UnitPart","page":"Documentation","title":"SBML.UnitPart","text":"Part of a measurement unit definition that corresponds to the SBML definition of Unit. For example, the unit \"per square megahour\", Mh^(-2), is written as:\n\nSBML.UnitPart(\"second\", # base SI unit, this says we are measuring time\n -2, # exponent, says \"per square\"\n 6, # log-10 scale of the unit, says \"mega\"\n 1/3600) # second-to-hour multiplier\n\nCompound units (such as \"volt-amperes\" and \"dozens of yards per ounce\") are built from multiple UnitParts; see the definition of field units in SBML.Model.\n\n\n\n\n\n","category":"type"},{"location":"#Base-functions","page":"Documentation","title":"Base functions","text":"","category":"section"},{"location":"","page":"Documentation","title":"Documentation","text":"Modules = [SBML]\nPages = [\"version.jl\", \"readsbml.jl\"]","category":"page"},{"location":"#SBML.SBMLVersion-Tuple{}","page":"Documentation","title":"SBML.SBMLVersion","text":"function SBMLVersion()\n\nGet the version of the used SBML library in Julia version format.\n\n\n\n\n\n","category":"method"},{"location":"#SBML.extractModel-Tuple{Ptr{Nothing}}","page":"Documentation","title":"SBML.extractModel","text":"\" function extractModel(mdl::VPtr)::SBML.Model\n\nTake the SBMLModel_t pointer and extract all information required to make a valid SBML.Model structure.\n\n\n\n\n\n","category":"method"},{"location":"#SBML.getAssociation-Tuple{Ptr{Nothing}}","page":"Documentation","title":"SBML.getAssociation","text":"function getAssociation(x::VPtr)::GeneProductAssociation\n\nConvert a pointer to SBML FbcAssociation_t to the GeneProductAssociation tree structure.\n\n\n\n\n\n","category":"method"},{"location":"#SBML.get_optional_bool-Tuple{Ptr{Nothing},Any,Any}","page":"Documentation","title":"SBML.get_optional_bool","text":"get_optional_bool(x::VPtr, is_sym, get_sym)::Maybe{Bool}\n\nHelper for getting out boolean flags.\n\n\n\n\n\n","category":"method"},{"location":"#SBML.get_optional_double-Tuple{Ptr{Nothing},Any,Any}","page":"Documentation","title":"SBML.get_optional_double","text":"get_optional_double(x::VPtr, is_sym, get_sym)::Maybe{Float64}\n\nHelper for getting out C doubles aka Float64s.\n\n\n\n\n\n","category":"method"},{"location":"#SBML.get_optional_int-Tuple{Ptr{Nothing},Any,Any}","page":"Documentation","title":"SBML.get_optional_int","text":"get_optional_int(x::VPtr, is_sym, get_sym)::Maybe{UInt}\n\nHelper for getting out unsigned integers.\n\n\n\n\n\n","category":"method"},{"location":"#SBML.get_optional_string-Tuple{Ptr{Nothing},Any}","page":"Documentation","title":"SBML.get_optional_string","text":"get_optional_string(x::VPtr, fn_sym)::Maybe{String}\n\nLike get_string, but returns nothing instead of throwing an exception.\n\nThis is used to get notes and annotations and several other things (see get_notes, get_annotations)\n\n\n\n\n\n","category":"method"},{"location":"#SBML.get_string-Tuple{Ptr{Nothing},Any}","page":"Documentation","title":"SBML.get_string","text":"get_string(x::VPtr, fn_sym)::Maybe{String}\n\nC-call the SBML function fn_sym with a single parameter x, interpret the result as a string and return it, or throw exception in case the pointer is NULL.\n\n\n\n\n\n","category":"method"},{"location":"#SBML.readSBML","page":"Documentation","title":"SBML.readSBML","text":"function readSBML(fn::String, sbml_conversion = model->nothing)::SBML.Model\n\nRead the SBML from a XML file in fn and return the contained SBML.Model.\n\nThe sbml_conversion is a function that does an in-place modification of the single parameter, which is the C pointer to the loaded SBML document (C type SBMLDocument*). Several functions for doing that are prepared, including set_level_and_version, libsbml_convert, and convert_simplify_math.\n\nExample\n\nm = readSBML(\"my_model.xml\", doc -> begin\n set_level_and_version(3, 1)(doc)\n convert_simplify_math(doc)\nend)\n\n\n\n\n\n","category":"function"},{"location":"#libsbml-representation-converters","page":"Documentation","title":"libsbml representation converters","text":"","category":"section"},{"location":"","page":"Documentation","title":"Documentation","text":"The converters are intended to be used as parameters of readSBML.","category":"page"},{"location":"","page":"Documentation","title":"Documentation","text":"Modules = [SBML]\nPages = [\"converters.jl\"]","category":"page"},{"location":"#SBML.convert_simplify_math","page":"Documentation","title":"SBML.convert_simplify_math","text":"convert_simplify_math\n\nShortcut for libsbml_convert that expands functions, local parameters, and initial assignments in the SBML document.\n\n\n\n\n\n","category":"function"},{"location":"#SBML.libsbml_convert-Tuple{AbstractArray{var\"#s39\",1} where var\"#s39\"<:(Pair{String,var\"#s38\"} where var\"#s38\"<:AbstractDict{String,String})}","page":"Documentation","title":"SBML.libsbml_convert","text":"libsbml_convert(conversion_options::Vector{Pair{String, Dict{String, String}}})\n\nA converter that runs the SBML conversion routine, with specified conversion options. The argument is a vector of pairs to allow specifying the order of conversions.\n\n\n\n\n\n","category":"method"},{"location":"#SBML.libsbml_convert-Tuple{String}","page":"Documentation","title":"SBML.libsbml_convert","text":"libsbml_convert(converter::String; kwargs...)\n\nQuickly construct a single run of a libsbml converter from keyword arguments.\n\nExample\n\nreadSBML(\"example.xml\", libsbml_convert(\"stripPackage\", package=\"layout\"))\n\n\n\n\n\n","category":"method"},{"location":"#SBML.set_level_and_version-Tuple{Any,Any}","page":"Documentation","title":"SBML.set_level_and_version","text":"set_level_and_version(level, version)\n\nA converter to pass into readSBML that enforces certain SBML level and version.\n\n\n\n\n\n","category":"method"},{"location":"#Data-helpers","page":"Documentation","title":"Data helpers","text":"","category":"section"},{"location":"","page":"Documentation","title":"Documentation","text":"Modules = [SBML]\nPages = [\"utils.jl\"]","category":"page"},{"location":"#SBML.check_errors-Tuple{Integer,Ptr{Nothing},Exception}","page":"Documentation","title":"SBML.check_errors","text":"check_errors(success::Integer, doc::Ptr{Cvoid}, error::Exception)\n\nIf success is a 0-valued Integer (a logical false), then call get_error_messages to show the error messages reported by SBML in the doc document and throw the error if they are more than 1. success is typically the value returned by an SBML C function operating on doc which returns a boolean flag to signal a successful operation.\n\n\n\n\n\n","category":"method"},{"location":"#SBML.extensive_kinetic_math-Tuple{SBML.Model,SBML.Math}","page":"Documentation","title":"SBML.extensive_kinetic_math","text":"extensive_kinetic_math(m::SBML.Model, formula::SBML.Math)\n\nConvert a SBML math formula to \"extensive\" kinetic laws, where the references to species that are marked as not having only substance units are converted from amounts to concentrations.\n\nHandling of units in the conversion process is ignored in this version.\n\n\n\n\n\n","category":"method"},{"location":"#SBML.getLBs-Tuple{SBML.Model}","page":"Documentation","title":"SBML.getLBs","text":"getLBs(m::SBML.Model)::Vector{Tuple{Float64,String}}\n\nExtract a vector of lower bounds of reaction rates from the model. All bounds are accompanied with the unit of the corresponding value (this behavior is based on SBML specification).\n\n\n\n\n\n","category":"method"},{"location":"#SBML.getOCs-Tuple{SBML.Model}","page":"Documentation","title":"SBML.getOCs","text":"getOCs(m::SBML.Model)::Vector{Float64}\n\nExtract the vector of objective coefficients of each reaction.\n\n\n\n\n\n","category":"method"},{"location":"#SBML.getS-Tuple{SBML.Model}","page":"Documentation","title":"SBML.getS","text":"function getS(m::SBML.Model; zeros=spzeros)::Tuple{Vector{String},Vector{String},AbstractMatrix{Float64}}\n\nExtract the vector of species (aka metabolite) identifiers, vector of reaction identifiers, and the (dense) stoichiometry matrix from an existing SBML.Model. Returns a tuple with these values.\n\nThe matrix is sparse by default (initially constructed by SparseArrays.spzeros). You can fill in a custom empty matrix constructed to argument zeros; e.g. running with zeros=zeros will produce a dense matrix.\n\n\n\n\n\n","category":"method"},{"location":"#SBML.getUBs-Tuple{SBML.Model}","page":"Documentation","title":"SBML.getUBs","text":"getUBs(m::SBML.Model)::Vector{Tuple{Float64,String}}\n\nLikewise to getLBs, extract the upper bounds.\n\n\n\n\n\n","category":"method"},{"location":"#SBML.get_error_messages-Tuple{Ptr{Nothing},Exception}","page":"Documentation","title":"SBML.get_error_messages","text":"get_error_messages(doc::Ptr{Cvoid}, error::Exception)\n\nShow the error messages reported by SBML in the doc document and throw the error if they are more than 1.\n\n\n\n\n\n","category":"method"},{"location":"#SBML.initial_amounts-Tuple{SBML.Model}","page":"Documentation","title":"SBML.initial_amounts","text":"initial_amounts(m::SBML.Model; convert_concentrations = false)\n\nReturn initial amounts for each species as a generator of pairs species_name => initial_amount; the amount is set to nothing if not available. If convert_concentrations is true and there is information about initial concentration available together with compartment size, the result is computed from the species' initial concentration.\n\nIn the current version, units of the measurements are completely ignored.\n\nExample\n\n# get the initial amounts as dictionary\nDict(initial_amounts(model, convert_concentrations = true))\n\n# remove the empty entries\nDict(k => v for (k,v) in initial_amounts(model) if !isnothing(v))\n\n\n\n\n\n","category":"method"},{"location":"#SBML.initial_concentrations-Tuple{SBML.Model}","page":"Documentation","title":"SBML.initial_concentrations","text":"initial_concentrations(m::SBML.Model; convert_amounts = false)\n\nReturn initial concentrations of the species in the model. Refer to work-alike initial_amounts for details.\n\n\n\n\n\n","category":"method"},{"location":"#Math-and-Symbolics.jl-compatibility","page":"Documentation","title":"Math and Symbolics.jl compatibility","text":"","category":"section"},{"location":"","page":"Documentation","title":"Documentation","text":"Modules = [SBML]\nPages = [\"symbolics.jl\"]","category":"page"},{"location":"#SBML.default_symbolics_constants","page":"Documentation","title":"SBML.default_symbolics_constants","text":"const default_symbolics_constants::Dict{String, Any}\n\nA dictionary of default constants filled in place of SBML Math constants in the symbolics conversion.\n\n\n\n\n\n","category":"constant"},{"location":"#SBML.default_symbolics_mapping","page":"Documentation","title":"SBML.default_symbolics_mapping","text":"default_symbolics_mapping :: Dict{String,Any}\n\nDefault mapping of SBML function names to Julia functions, represented as a dictionary from Strings (SBML names) to anything evaluable as Julia&Symbolics functions, such as symbols and expressions.\n\nThe default mapping only contains the basic SBML functions that are unambiguously represented in Julia; it is supposed to be extended by the user if more functions need to be supported.\n\n\n\n\n\n","category":"constant"},{"location":"#Base.convert-Tuple{Type{Symbolics.Num},SBML.Math}","page":"Documentation","title":"Base.convert","text":"Base.convert(\n ::Type{Num},\n x::SBML.Math;\n mapping = default_symbolics_mapping,\n convert_time = (x::SBML.MathTime) -> Num(Variable(Symbol(x.id))).val,\n convert_const = (x::SBML.MathConst) -> Num(default_symbolics_constants[x.id]),\n)\n\nConvert SBML.Math to Num type from Symbolics package. The conversion of functions can be customized by supplying a custom mapping; if nothing is supplied, default_symbolics_mapping that translates basic functions to their Julia equivalents is assumed.\n\nTranslation of MathLambda is not supported by Symbolics.\n\nMathTime is handled specially, the function from the argument convert_time is called to possibly specify any desired behavior. By default, it just creates a variable with the same name as the time variable name stored in SBML.\n\n\n\n\n\n","category":"method"},{"location":"#Internal-math-helpers","page":"Documentation","title":"Internal math helpers","text":"","category":"section"},{"location":"","page":"Documentation","title":"Documentation","text":"Modules = [SBML]\nPages = [\"math.jl\"]","category":"page"},{"location":"#SBML.ast_is-Tuple{Ptr{Nothing},Symbol}","page":"Documentation","title":"SBML.ast_is","text":"ast_is(ast::VPtr, what::Symbol)::Bool\n\nHelper for quickly recognizing kinds of ASTs\n\n\n\n\n\n","category":"method"},{"location":"#SBML.parse_math-Tuple{Ptr{Nothing}}","page":"Documentation","title":"SBML.parse_math","text":"parse_math(ast::VPtr)::Math\n\nThis attempts to parse out a decent Julia-esque (Math AST from a pointer to ASTNode_t.\n\n\n\n\n\n","category":"method"},{"location":"#SBML.parse_math_children-Tuple{Ptr{Nothing}}","page":"Documentation","title":"SBML.parse_math_children","text":"parse_math_children(ast::VPtr)::Vector{Math}\n\nRecursively parse all children of an AST node.\n\n\n\n\n\n","category":"method"}]
[{"location":"#SBML.jl-—-load-systems-biology-models-from-SBML-files","page":"Documentation","title":"SBML.jl — load systems biology models from SBML files","text":"","category":"section"},{"location":"","page":"Documentation","title":"Documentation","text":"This package provides a straightforward way to load model- and simulation-relevant information from SBML files.","category":"page"},{"location":"","page":"Documentation","title":"Documentation","text":"The library provides a single function readSBML to load a SBML.Model:","category":"page"},{"location":"","page":"Documentation","title":"Documentation","text":"julia> using SBML\njulia> mdl = readSBML(\"Ec_core_flux1.xml\")\nSBML.Model(…)\n\njulia> mdl.compartments\n2-element Array{String,1}:\n \"Extra_organism\"\n \"Cytosol\"","category":"page"},{"location":"","page":"Documentation","title":"Documentation","text":"There are several functions to help you with using the data in the usual COBRA-style workflows, such as getS:","category":"page"},{"location":"","page":"Documentation","title":"Documentation","text":"julia> metabolites, reactions, S = getS(mdl)\njulia> metabolites\n77-element Array{String,1}:\n \"M_succoa_c\"\n \"M_ac_c\"\n \"M_etoh_c\"\n\n\njulia> S\n77×77 SparseArrays.SparseMatrixCSC{Float64,Int64} with 308 stored entries:\n [60, 1] = -1.0\n [68, 1] = 1.0\n [1 , 2] = 1.0\n [6 , 2] = -1.0\n\n [23, 76] = 1.0\n [56, 76] = -1.0\n [30, 77] = -1.0\n [48, 77] = 1.0\n\njulia> Matrix(S)\n77×77 Array{Float64,2}:\n 0.0 1.0 0.0 0.0 0.0 0.0 0.0 … 0.0 0.0 0.0 0.0 0.0 0.0 0.0\n 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0\n 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0\n 0.0 0.0 1.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0\n 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0\n 0.0 -1.0 0.0 0.0 0.0 0.0 0.0 … 0.0 0.0 0.0 0.0 0.0 0.0 0.0\n 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 1.0 -1.0 0.0 0.0 0.0\n 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0\n 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0\n 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 -1.0 0.0 0.0 0.0 0.0 0.0\n ⋮ ⋮ ⋱ ⋮ ⋮ ","category":"page"},{"location":"#Function-reference","page":"Documentation","title":"Function reference","text":"","category":"section"},{"location":"#Helper-types","page":"Documentation","title":"Helper types","text":"","category":"section"},{"location":"","page":"Documentation","title":"Documentation","text":"Modules = [SBML]\nPages = [\"types.jl\"]","category":"page"},{"location":"#SBML.Maybe","page":"Documentation","title":"SBML.Maybe","text":"Maybe{X}\n\nType shortcut for \"X or nothing\" or \"nullable X\" in javaspeak. Name got inspired by our functional friends.\n\n\n\n\n\n","category":"type"},{"location":"#SBML.VPtr","page":"Documentation","title":"SBML.VPtr","text":"VPtr\n\nA convenience wrapper for \"any\" (C void) pointer.\n\n\n\n\n\n","category":"type"},{"location":"#Data-structures","page":"Documentation","title":"Data structures","text":"","category":"section"},{"location":"","page":"Documentation","title":"Documentation","text":"Modules = [SBML]\nPages = [\"structs.jl\"]","category":"page"},{"location":"#SBML.Compartment","page":"Documentation","title":"SBML.Compartment","text":"SBML Compartment with sizing information.\n\n\n\n\n\n","category":"type"},{"location":"#SBML.FunctionDefinition","page":"Documentation","title":"SBML.FunctionDefinition","text":"Custom function definition.\n\n\n\n\n\n","category":"type"},{"location":"#SBML.GPAAnd","page":"Documentation","title":"SBML.GPAAnd","text":"Boolean binary \"and\" in the association expression\n\n\n\n\n\n","category":"type"},{"location":"#SBML.GPAOr","page":"Documentation","title":"SBML.GPAOr","text":"Boolean binary \"or\" in the association expression\n\n\n\n\n\n","category":"type"},{"location":"#SBML.GPARef","page":"Documentation","title":"SBML.GPARef","text":"Gene product reference in the association expression\n\n\n\n\n\n","category":"type"},{"location":"#SBML.GeneProduct","page":"Documentation","title":"SBML.GeneProduct","text":"Gene product metadata.\n\n\n\n\n\n","category":"type"},{"location":"#SBML.GeneProductAssociation","page":"Documentation","title":"SBML.GeneProductAssociation","text":"Abstract type for all kinds of gene product associations\n\n\n\n\n\n","category":"type"},{"location":"#SBML.Math","page":"Documentation","title":"SBML.Math","text":"A simplified representation of MathML-specified math AST\n\n\n\n\n\n","category":"type"},{"location":"#SBML.MathApply","page":"Documentation","title":"SBML.MathApply","text":"Function application (\"call by name\", no tricks allowed) in mathematical expression\n\n\n\n\n\n","category":"type"},{"location":"#SBML.MathConst","page":"Documentation","title":"SBML.MathConst","text":"A constant identified by name (usually something like pi, e or true) in mathematical expression\n\n\n\n\n\n","category":"type"},{"location":"#SBML.MathIdent","page":"Documentation","title":"SBML.MathIdent","text":"An identifier (usually a variable name) in mathematical expression\n\n\n\n\n\n","category":"type"},{"location":"#SBML.MathLambda","page":"Documentation","title":"SBML.MathLambda","text":"Function definition (aka \"lambda\") in mathematical expression\n\n\n\n\n\n","category":"type"},{"location":"#SBML.MathTime","page":"Documentation","title":"SBML.MathTime","text":"A special value representing the current time of the simulation, with a special name.\n\n\n\n\n\n","category":"type"},{"location":"#SBML.MathVal","page":"Documentation","title":"SBML.MathVal","text":"A literal value (usually a numeric constant) in mathematical expression\n\n\n\n\n\n","category":"type"},{"location":"#SBML.Model","page":"Documentation","title":"SBML.Model","text":"Structure that collects the model-related data. Contains parameters, units, compartments, species and reactions and gene_products, and additional notes and annotation (also present internally in some of the data fields). The contained dictionaries are indexed by identifiers of the corresponding objects.\n\n\n\n\n\n","category":"type"},{"location":"#SBML.Reaction","page":"Documentation","title":"SBML.Reaction","text":"Reaction with stoichiometry that assigns reactants and products their relative consumption/production rates (accessible in field stoichiometry), lower/upper bounds (in tuples lb and ub, with unit names), and objective coefficient (oc). Also may contains notes and annotation.\n\n\n\n\n\n","category":"type"},{"location":"#SBML.Species","page":"Documentation","title":"SBML.Species","text":"Species metadata – contains a human-readable name, a compartment identifier, formula, charge, and additional notes and annotation.\n\n\n\n\n\n","category":"type"},{"location":"#SBML.UnitPart","page":"Documentation","title":"SBML.UnitPart","text":"Part of a measurement unit definition that corresponds to the SBML definition of Unit. For example, the unit \"per square megahour\", Mh^(-2), is written as:\n\nSBML.UnitPart(\"second\", # base SI unit, this says we are measuring time\n -2, # exponent, says \"per square\"\n 6, # log-10 scale of the unit, says \"mega\"\n 1/3600) # second-to-hour multiplier\n\nCompound units (such as \"volt-amperes\" and \"dozens of yards per ounce\") are built from multiple UnitParts; see the definition of field units in SBML.Model.\n\n\n\n\n\n","category":"type"},{"location":"#Base-functions","page":"Documentation","title":"Base functions","text":"","category":"section"},{"location":"","page":"Documentation","title":"Documentation","text":"Modules = [SBML]\nPages = [\"version.jl\", \"readsbml.jl\"]","category":"page"},{"location":"#SBML.SBMLVersion-Tuple{}","page":"Documentation","title":"SBML.SBMLVersion","text":"function SBMLVersion()\n\nGet the version of the used SBML library in Julia version format.\n\n\n\n\n\n","category":"method"},{"location":"#SBML.extractModel-Tuple{Ptr{Nothing}}","page":"Documentation","title":"SBML.extractModel","text":"\" function extractModel(mdl::VPtr)::SBML.Model\n\nTake the SBMLModel_t pointer and extract all information required to make a valid SBML.Model structure.\n\n\n\n\n\n","category":"method"},{"location":"#SBML.getAssociation-Tuple{Ptr{Nothing}}","page":"Documentation","title":"SBML.getAssociation","text":"function getAssociation(x::VPtr)::GeneProductAssociation\n\nConvert a pointer to SBML FbcAssociation_t to the GeneProductAssociation tree structure.\n\n\n\n\n\n","category":"method"},{"location":"#SBML.get_optional_bool-Tuple{Ptr{Nothing},Any,Any}","page":"Documentation","title":"SBML.get_optional_bool","text":"get_optional_bool(x::VPtr, is_sym, get_sym)::Maybe{Bool}\n\nHelper for getting out boolean flags.\n\n\n\n\n\n","category":"method"},{"location":"#SBML.get_optional_double-Tuple{Ptr{Nothing},Any,Any}","page":"Documentation","title":"SBML.get_optional_double","text":"get_optional_double(x::VPtr, is_sym, get_sym)::Maybe{Float64}\n\nHelper for getting out C doubles aka Float64s.\n\n\n\n\n\n","category":"method"},{"location":"#SBML.get_optional_int-Tuple{Ptr{Nothing},Any,Any}","page":"Documentation","title":"SBML.get_optional_int","text":"get_optional_int(x::VPtr, is_sym, get_sym)::Maybe{UInt}\n\nHelper for getting out unsigned integers.\n\n\n\n\n\n","category":"method"},{"location":"#SBML.get_optional_string-Tuple{Ptr{Nothing},Any}","page":"Documentation","title":"SBML.get_optional_string","text":"get_optional_string(x::VPtr, fn_sym)::Maybe{String}\n\nLike get_string, but returns nothing instead of throwing an exception.\n\nThis is used to get notes and annotations and several other things (see get_notes, get_annotations)\n\n\n\n\n\n","category":"method"},{"location":"#SBML.get_string-Tuple{Ptr{Nothing},Any}","page":"Documentation","title":"SBML.get_string","text":"get_string(x::VPtr, fn_sym)::Maybe{String}\n\nC-call the SBML function fn_sym with a single parameter x, interpret the result as a string and return it, or throw exception in case the pointer is NULL.\n\n\n\n\n\n","category":"method"},{"location":"#SBML.readSBML","page":"Documentation","title":"SBML.readSBML","text":"function readSBML(fn::String, sbml_conversion = model->nothing)::SBML.Model\n\nRead the SBML from a XML file in fn and return the contained SBML.Model.\n\nThe sbml_conversion is a function that does an in-place modification of the single parameter, which is the C pointer to the loaded SBML document (C type SBMLDocument*). Several functions for doing that are prepared, including set_level_and_version, libsbml_convert, and convert_simplify_math.\n\nExample\n\nm = readSBML(\"my_model.xml\", doc -> begin\n set_level_and_version(3, 1)(doc)\n convert_simplify_math(doc)\nend)\n\n\n\n\n\n","category":"function"},{"location":"#libsbml-representation-converters","page":"Documentation","title":"libsbml representation converters","text":"","category":"section"},{"location":"","page":"Documentation","title":"Documentation","text":"The converters are intended to be used as parameters of readSBML.","category":"page"},{"location":"","page":"Documentation","title":"Documentation","text":"Modules = [SBML]\nPages = [\"converters.jl\"]","category":"page"},{"location":"#SBML.convert_simplify_math","page":"Documentation","title":"SBML.convert_simplify_math","text":"convert_simplify_math\n\nShortcut for libsbml_convert that expands functions, local parameters, and initial assignments in the SBML document.\n\n\n\n\n\n","category":"function"},{"location":"#SBML.libsbml_convert-Tuple{AbstractArray{var\"#s37\",1} where var\"#s37\"<:(Pair{String,var\"#s38\"} where var\"#s38\"<:AbstractDict{String,String})}","page":"Documentation","title":"SBML.libsbml_convert","text":"libsbml_convert(conversion_options::Vector{Pair{String, Dict{String, String}}})\n\nA converter that runs the SBML conversion routine, with specified conversion options. The argument is a vector of pairs to allow specifying the order of conversions.\n\n\n\n\n\n","category":"method"},{"location":"#SBML.libsbml_convert-Tuple{String}","page":"Documentation","title":"SBML.libsbml_convert","text":"libsbml_convert(converter::String; kwargs...)\n\nQuickly construct a single run of a libsbml converter from keyword arguments.\n\nExample\n\nreadSBML(\"example.xml\", libsbml_convert(\"stripPackage\", package=\"layout\"))\n\n\n\n\n\n","category":"method"},{"location":"#SBML.set_level_and_version-Tuple{Any,Any}","page":"Documentation","title":"SBML.set_level_and_version","text":"set_level_and_version(level, version)\n\nA converter to pass into readSBML that enforces certain SBML level and version.\n\n\n\n\n\n","category":"method"},{"location":"#Data-helpers","page":"Documentation","title":"Data helpers","text":"","category":"section"},{"location":"","page":"Documentation","title":"Documentation","text":"Modules = [SBML]\nPages = [\"utils.jl\"]","category":"page"},{"location":"#SBML.check_errors-Tuple{Integer,Ptr{Nothing},Exception}","page":"Documentation","title":"SBML.check_errors","text":"check_errors(success::Integer, doc::Ptr{Cvoid}, error::Exception)\n\nIf success is a 0-valued Integer (a logical false), then call get_error_messages to show the error messages reported by SBML in the doc document and throw the error if they are more than 1. success is typically the value returned by an SBML C function operating on doc which returns a boolean flag to signal a successful operation.\n\n\n\n\n\n","category":"method"},{"location":"#SBML.extensive_kinetic_math-Tuple{SBML.Model,SBML.Math}","page":"Documentation","title":"SBML.extensive_kinetic_math","text":"extensive_kinetic_math(m::SBML.Model, formula::SBML.Math)\n\nConvert a SBML math formula to \"extensive\" kinetic laws, where the references to species that are marked as not having only substance units are converted from amounts to concentrations.\n\nHandling of units in the conversion process is ignored in this version.\n\n\n\n\n\n","category":"method"},{"location":"#SBML.getLBs-Tuple{SBML.Model}","page":"Documentation","title":"SBML.getLBs","text":"getLBs(m::SBML.Model)::Vector{Tuple{Float64,String}}\n\nExtract a vector of lower bounds of reaction rates from the model. All bounds are accompanied with the unit of the corresponding value (this behavior is based on SBML specification).\n\n\n\n\n\n","category":"method"},{"location":"#SBML.getOCs-Tuple{SBML.Model}","page":"Documentation","title":"SBML.getOCs","text":"getOCs(m::SBML.Model)::Vector{Float64}\n\nExtract the vector of objective coefficients of each reaction.\n\n\n\n\n\n","category":"method"},{"location":"#SBML.getS-Tuple{SBML.Model}","page":"Documentation","title":"SBML.getS","text":"function getS(m::SBML.Model; zeros=spzeros)::Tuple{Vector{String},Vector{String},AbstractMatrix{Float64}}\n\nExtract the vector of species (aka metabolite) identifiers, vector of reaction identifiers, and the (dense) stoichiometry matrix from an existing SBML.Model. Returns a tuple with these values.\n\nThe matrix is sparse by default (initially constructed by SparseArrays.spzeros). You can fill in a custom empty matrix constructed to argument zeros; e.g. running with zeros=zeros will produce a dense matrix.\n\n\n\n\n\n","category":"method"},{"location":"#SBML.getUBs-Tuple{SBML.Model}","page":"Documentation","title":"SBML.getUBs","text":"getUBs(m::SBML.Model)::Vector{Tuple{Float64,String}}\n\nLikewise to getLBs, extract the upper bounds.\n\n\n\n\n\n","category":"method"},{"location":"#SBML.get_error_messages-Tuple{Ptr{Nothing},Exception}","page":"Documentation","title":"SBML.get_error_messages","text":"get_error_messages(doc::Ptr{Cvoid}, error::Exception)\n\nShow the error messages reported by SBML in the doc document and throw the error if they are more than 1.\n\n\n\n\n\n","category":"method"},{"location":"#SBML.initial_amounts-Tuple{SBML.Model}","page":"Documentation","title":"SBML.initial_amounts","text":"initial_amounts(m::SBML.Model; convert_concentrations = false)\n\nReturn initial amounts for each species as a generator of pairs species_name => initial_amount; the amount is set to nothing if not available. If convert_concentrations is true and there is information about initial concentration available together with compartment size, the result is computed from the species' initial concentration.\n\nIn the current version, units of the measurements are completely ignored.\n\nExample\n\n# get the initial amounts as dictionary\nDict(initial_amounts(model, convert_concentrations = true))\n\n# remove the empty entries\nDict(k => v for (k,v) in initial_amounts(model) if !isnothing(v))\n\n\n\n\n\n","category":"method"},{"location":"#SBML.initial_concentrations-Tuple{SBML.Model}","page":"Documentation","title":"SBML.initial_concentrations","text":"initial_concentrations(m::SBML.Model; convert_amounts = false)\n\nReturn initial concentrations of the species in the model. Refer to work-alike initial_amounts for details.\n\n\n\n\n\n","category":"method"},{"location":"#Math-and-Symbolics.jl-compatibility","page":"Documentation","title":"Math and Symbolics.jl compatibility","text":"","category":"section"},{"location":"","page":"Documentation","title":"Documentation","text":"Modules = [SBML]\nPages = [\"symbolics.jl\"]","category":"page"},{"location":"#SBML.default_symbolics_constants","page":"Documentation","title":"SBML.default_symbolics_constants","text":"const default_symbolics_constants::Dict{String, Any}\n\nA dictionary of default constants filled in place of SBML Math constants in the symbolics conversion.\n\n\n\n\n\n","category":"constant"},{"location":"#SBML.default_symbolics_mapping","page":"Documentation","title":"SBML.default_symbolics_mapping","text":"default_symbolics_mapping :: Dict{String,Any}\n\nDefault mapping of SBML function names to Julia functions, represented as a dictionary from Strings (SBML names) to anything evaluable as Julia&Symbolics functions, such as symbols and expressions.\n\nThe default mapping only contains the basic SBML functions that are unambiguously represented in Julia; it is supposed to be extended by the user if more functions need to be supported.\n\n\n\n\n\n","category":"constant"},{"location":"#Base.convert-Tuple{Type{Symbolics.Num},SBML.Math}","page":"Documentation","title":"Base.convert","text":"Base.convert(\n ::Type{Num},\n x::SBML.Math;\n mapping = default_symbolics_mapping,\n convert_time = (x::SBML.MathTime) -> Num(Variable(Symbol(x.id))).val,\n convert_const = (x::SBML.MathConst) -> Num(default_symbolics_constants[x.id]),\n)\n\nConvert SBML.Math to Num type from Symbolics package. The conversion of functions can be customized by supplying a custom mapping; if nothing is supplied, default_symbolics_mapping that translates basic functions to their Julia equivalents is assumed.\n\nTranslation of MathLambda is not supported by Symbolics.\n\nMathTime is handled specially, the function from the argument convert_time is called to possibly specify any desired behavior. By default, it just creates a variable with the same name as the time variable name stored in SBML.\n\n\n\n\n\n","category":"method"},{"location":"#Internal-math-helpers","page":"Documentation","title":"Internal math helpers","text":"","category":"section"},{"location":"","page":"Documentation","title":"Documentation","text":"Modules = [SBML]\nPages = [\"math.jl\"]","category":"page"},{"location":"#SBML.ast_is-Tuple{Ptr{Nothing},Symbol}","page":"Documentation","title":"SBML.ast_is","text":"ast_is(ast::VPtr, what::Symbol)::Bool\n\nHelper for quickly recognizing kinds of ASTs\n\n\n\n\n\n","category":"method"},{"location":"#SBML.parse_math-Tuple{Ptr{Nothing}}","page":"Documentation","title":"SBML.parse_math","text":"parse_math(ast::VPtr)::Math\n\nThis attempts to parse out a decent Julia-esque (Math AST from a pointer to ASTNode_t.\n\n\n\n\n\n","category":"method"},{"location":"#SBML.parse_math_children-Tuple{Ptr{Nothing}}","page":"Documentation","title":"SBML.parse_math_children","text":"parse_math_children(ast::VPtr)::Vector{Math}\n\nRecursively parse all children of an AST node.\n\n\n\n\n\n","category":"method"}]
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment