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

build based on c2a182e9

parent 55944617
......@@ -38,23 +38,23 @@ julia> 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="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 hljs">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/8f87883ac56109d9e5f713b3d85a4fdc567ca2f5/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 hljs">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/8f87883ac56109d9e5f713b3d85a4fdc567ca2f5/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><pre><code class="language-julia hljs">struct Compartment</code></pre><p>SBML Compartment with sizing information.</p><p><strong>Fields</strong></p><ul><li><p><code>name::Union{Nothing, String}</code></p></li><li><p><code>constant::Union{Nothing, Bool}</code></p></li><li><p><code>spatial_dimensions::Union{Nothing, Int64}</code></p></li><li><p><code>size::Union{Nothing, Float64}</code></p></li><li><p><code>units::Union{Nothing, String}</code></p></li><li><p><code>notes::Union{Nothing, String}</code></p></li><li><p><code>annotation::Union{Nothing, String}</code></p></li></ul></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/SBML.jl/blob/8f87883ac56109d9e5f713b3d85a4fdc567ca2f5/src/structs.jl#L79">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/8f87883ac56109d9e5f713b3d85a4fdc567ca2f5/src/structs.jl#L164-L166">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/8f87883ac56109d9e5f713b3d85a4fdc567ca2f5/src/structs.jl#L14-L16">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/8f87883ac56109d9e5f713b3d85a4fdc567ca2f5/src/structs.jl#L21-L23">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/8f87883ac56109d9e5f713b3d85a4fdc567ca2f5/src/structs.jl#L7-L9">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><pre><code class="language-julia hljs">struct GeneProduct</code></pre><p>Gene product metadata.</p><p><strong>Fields</strong></p><ul><li><p><code>name::Union{Nothing, String}</code></p></li><li><p><code>label::Union{Nothing, String}</code></p></li><li><p><code>notes::Union{Nothing, String}</code></p></li><li><p><code>annotation::Union{Nothing, String}</code></p></li></ul></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/SBML.jl/blob/8f87883ac56109d9e5f713b3d85a4fdc567ca2f5/src/structs.jl#L148">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/8f87883ac56109d9e5f713b3d85a4fdc567ca2f5/src/structs.jl#L2-L4">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/8f87883ac56109d9e5f713b3d85a4fdc567ca2f5/src/structs.jl#L28-L30">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/8f87883ac56109d9e5f713b3d85a4fdc567ca2f5/src/structs.jl#L63-L65">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/8f87883ac56109d9e5f713b3d85a4fdc567ca2f5/src/structs.jl#L47-L50">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/8f87883ac56109d9e5f713b3d85a4fdc567ca2f5/src/structs.jl#L40-L42">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/8f87883ac56109d9e5f713b3d85a4fdc567ca2f5/src/structs.jl#L71-L73">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/8f87883ac56109d9e5f713b3d85a4fdc567ca2f5/src/structs.jl#L55-L58">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/8f87883ac56109d9e5f713b3d85a4fdc567ca2f5/src/structs.jl#L33-L35">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><pre><code class="language-julia hljs">struct Model</code></pre><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><p><strong>Fields</strong></p><ul><li><p><code>parameters::Dict{String,Float64}</code></p></li><li><p><code>units::Dict{String,Number}</code></p></li><li><p><code>compartments::Dict{String,SBML.Compartment}</code></p></li><li><p><code>species::Dict{String,SBML.Species}</code></p></li><li><p><code>reactions::Dict{String,SBML.Reaction}</code></p></li><li><p><code>gene_products::Dict{String,SBML.GeneProduct}</code></p></li><li><p><code>function_definitions::Dict{String,SBML.FunctionDefinition}</code></p></li><li><p><code>notes::Union{Nothing, String}</code></p></li><li><p><code>annotation::Union{Nothing, String}</code></p></li></ul></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/SBML.jl/blob/8f87883ac56109d9e5f713b3d85a4fdc567ca2f5/src/structs.jl#L175">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><pre><code class="language-julia hljs">struct Reaction</code></pre><p>Reaction with stoichiometry that assigns reactants and products their relative consumption/production rates, 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><p><strong>Fields</strong></p><ul><li><p><code>reactants::Dict{String,Float64}</code></p></li><li><p><code>products::Dict{String,Float64}</code></p></li><li><p><code>lb::Tuple{Float64,String}</code></p></li><li><p><code>ub::Tuple{Float64,String}</code></p></li><li><p><code>oc::Float64</code></p></li><li><p><code>gene_product_association::Union{Nothing, SBML.GeneProductAssociation}</code></p></li><li><p><code>kinetic_math::Union{Nothing, SBML.Math}</code></p></li><li><p><code>reversible::Bool</code></p></li><li><p><code>notes::Union{Nothing, String}</code></p></li><li><p><code>annotation::Union{Nothing, String}</code></p></li></ul></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/SBML.jl/blob/8f87883ac56109d9e5f713b3d85a4fdc567ca2f5/src/structs.jl#L98">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><pre><code class="language-julia hljs">struct Species</code></pre><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><p><strong>Fields</strong></p><ul><li><p><code>name::Union{Nothing, String}</code></p></li><li><p><code>compartment::String</code></p></li><li><p><code>boundary_condition::Union{Nothing, Bool}</code></p></li><li><p><code>formula::Union{Nothing, String}</code></p></li><li><p><code>charge::Union{Nothing, Int64}</code></p></li><li><p><code>initial_amount::Union{Nothing, Tuple{Float64,Union{Nothing, String}}}</code></p></li><li><p><code>initial_concentration::Union{Nothing, Tuple{Float64,Union{Nothing, String}}}</code></p></li><li><p><code>only_substance_units::Union{Nothing, Bool}</code></p></li><li><p><code>notes::Union{Nothing, String}</code></p></li><li><p><code>annotation::Union{Nothing, String}</code></p></li></ul></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/SBML.jl/blob/8f87883ac56109d9e5f713b3d85a4fdc567ca2f5/src/structs.jl#L124">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.Version-Tuple{}" href="#SBML.Version-Tuple{}"><code>SBML.Version</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia hljs">function SBML.Version()</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/8f87883ac56109d9e5f713b3d85a4fdc567ca2f5/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/8f87883ac56109d9e5f713b3d85a4fdc567ca2f5/src/readsbml.jl#L188-L194">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 hljs">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/8f87883ac56109d9e5f713b3d85a4fdc567ca2f5/src/readsbml.jl#L158-L163">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 hljs">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/8f87883ac56109d9e5f713b3d85a4fdc567ca2f5/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 hljs">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/8f87883ac56109d9e5f713b3d85a4fdc567ca2f5/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 hljs">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/8f87883ac56109d9e5f713b3d85a4fdc567ca2f5/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 hljs">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/8f87883ac56109d9e5f713b3d85a4fdc567ca2f5/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 hljs">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/8f87883ac56109d9e5f713b3d85a4fdc567ca2f5/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 hljs">readSBML(
⋮ ⋮ ⋱ ⋮ ⋮ </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 hljs">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/c2a182e92ed2e65ef58869b84094a7cc10a4952b/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 hljs">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/c2a182e92ed2e65ef58869b84094a7cc10a4952b/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><pre><code class="language-julia hljs">struct Compartment</code></pre><p>SBML Compartment with sizing information.</p><p><strong>Fields</strong></p><ul><li><p><code>name::Union{Nothing, String}</code></p></li><li><p><code>constant::Union{Nothing, Bool}</code></p></li><li><p><code>spatial_dimensions::Union{Nothing, Int64}</code></p></li><li><p><code>size::Union{Nothing, Float64}</code></p></li><li><p><code>units::Union{Nothing, String}</code></p></li><li><p><code>notes::Union{Nothing, String}</code></p></li><li><p><code>annotation::Union{Nothing, String}</code></p></li></ul></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/SBML.jl/blob/c2a182e92ed2e65ef58869b84094a7cc10a4952b/src/structs.jl#L79">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/c2a182e92ed2e65ef58869b84094a7cc10a4952b/src/structs.jl#L164-L166">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/c2a182e92ed2e65ef58869b84094a7cc10a4952b/src/structs.jl#L14-L16">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/c2a182e92ed2e65ef58869b84094a7cc10a4952b/src/structs.jl#L21-L23">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/c2a182e92ed2e65ef58869b84094a7cc10a4952b/src/structs.jl#L7-L9">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><pre><code class="language-julia hljs">struct GeneProduct</code></pre><p>Gene product metadata.</p><p><strong>Fields</strong></p><ul><li><p><code>name::Union{Nothing, String}</code></p></li><li><p><code>label::Union{Nothing, String}</code></p></li><li><p><code>notes::Union{Nothing, String}</code></p></li><li><p><code>annotation::Union{Nothing, String}</code></p></li></ul></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/SBML.jl/blob/c2a182e92ed2e65ef58869b84094a7cc10a4952b/src/structs.jl#L148">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/c2a182e92ed2e65ef58869b84094a7cc10a4952b/src/structs.jl#L2-L4">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/c2a182e92ed2e65ef58869b84094a7cc10a4952b/src/structs.jl#L28-L30">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/c2a182e92ed2e65ef58869b84094a7cc10a4952b/src/structs.jl#L63-L65">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/c2a182e92ed2e65ef58869b84094a7cc10a4952b/src/structs.jl#L47-L50">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/c2a182e92ed2e65ef58869b84094a7cc10a4952b/src/structs.jl#L40-L42">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/c2a182e92ed2e65ef58869b84094a7cc10a4952b/src/structs.jl#L71-L73">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/c2a182e92ed2e65ef58869b84094a7cc10a4952b/src/structs.jl#L55-L58">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/c2a182e92ed2e65ef58869b84094a7cc10a4952b/src/structs.jl#L33-L35">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><pre><code class="language-julia hljs">struct Model</code></pre><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><p><strong>Fields</strong></p><ul><li><p><code>parameters::Dict{String,Float64}</code></p></li><li><p><code>units::Dict{String,Number}</code></p></li><li><p><code>compartments::Dict{String,SBML.Compartment}</code></p></li><li><p><code>species::Dict{String,SBML.Species}</code></p></li><li><p><code>reactions::Dict{String,SBML.Reaction}</code></p></li><li><p><code>gene_products::Dict{String,SBML.GeneProduct}</code></p></li><li><p><code>function_definitions::Dict{String,SBML.FunctionDefinition}</code></p></li><li><p><code>notes::Union{Nothing, String}</code></p></li><li><p><code>annotation::Union{Nothing, String}</code></p></li></ul></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/SBML.jl/blob/c2a182e92ed2e65ef58869b84094a7cc10a4952b/src/structs.jl#L175">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><pre><code class="language-julia hljs">struct Reaction</code></pre><p>Reaction with stoichiometry that assigns reactants and products their relative consumption/production rates, 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><p><strong>Fields</strong></p><ul><li><p><code>reactants::Dict{String,Float64}</code></p></li><li><p><code>products::Dict{String,Float64}</code></p></li><li><p><code>lb::Tuple{Float64,String}</code></p></li><li><p><code>ub::Tuple{Float64,String}</code></p></li><li><p><code>oc::Float64</code></p></li><li><p><code>gene_product_association::Union{Nothing, SBML.GeneProductAssociation}</code></p></li><li><p><code>kinetic_math::Union{Nothing, SBML.Math}</code></p></li><li><p><code>reversible::Bool</code></p></li><li><p><code>notes::Union{Nothing, String}</code></p></li><li><p><code>annotation::Union{Nothing, String}</code></p></li></ul></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/SBML.jl/blob/c2a182e92ed2e65ef58869b84094a7cc10a4952b/src/structs.jl#L98">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><pre><code class="language-julia hljs">struct Species</code></pre><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><p><strong>Fields</strong></p><ul><li><p><code>name::Union{Nothing, String}</code></p></li><li><p><code>compartment::String</code></p></li><li><p><code>boundary_condition::Union{Nothing, Bool}</code></p></li><li><p><code>formula::Union{Nothing, String}</code></p></li><li><p><code>charge::Union{Nothing, Int64}</code></p></li><li><p><code>initial_amount::Union{Nothing, Tuple{Float64,Union{Nothing, String}}}</code></p></li><li><p><code>initial_concentration::Union{Nothing, Tuple{Float64,Union{Nothing, String}}}</code></p></li><li><p><code>only_substance_units::Union{Nothing, Bool}</code></p></li><li><p><code>notes::Union{Nothing, String}</code></p></li><li><p><code>annotation::Union{Nothing, String}</code></p></li></ul></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/SBML.jl/blob/c2a182e92ed2e65ef58869b84094a7cc10a4952b/src/structs.jl#L124">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.Version-Tuple{}" href="#SBML.Version-Tuple{}"><code>SBML.Version</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia hljs">function SBML.Version()</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/c2a182e92ed2e65ef58869b84094a7cc10a4952b/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/c2a182e92ed2e65ef58869b84094a7cc10a4952b/src/readsbml.jl#L188-L194">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 hljs">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/c2a182e92ed2e65ef58869b84094a7cc10a4952b/src/readsbml.jl#L158-L163">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 hljs">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/c2a182e92ed2e65ef58869b84094a7cc10a4952b/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 hljs">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/c2a182e92ed2e65ef58869b84094a7cc10a4952b/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 hljs">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/c2a182e92ed2e65ef58869b84094a7cc10a4952b/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 hljs">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/c2a182e92ed2e65ef58869b84094a7cc10a4952b/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 hljs">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/c2a182e92ed2e65ef58869b84094a7cc10a4952b/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 hljs">readSBML(
fn::String,
sbml_conversion = document -&gt; nothing;
report_severities = [&quot;Fatal&quot;, &quot;Error&quot;],
)::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"><code>set_level_and_version</code></a>, <a href="#SBML.libsbml_convert"><code>libsbml_convert</code></a>, and <a href="#SBML.convert_simplify_math"><code>convert_simplify_math</code></a>.</p><p><code>report_severities</code> switches on and off reporting of certain errors; see the documentation of <a href="#SBML.get_error_messages-Tuple{Ptr{Nothing},Exception,Any}"><code>get_error_messages</code></a> for details.</p><p>To read from a string instead of a file, use <a href="#SBML.readSBMLFromString"><code>readSBMLFromString</code></a>.</p><p><strong>Example</strong></p><pre><code class="nohighlight hljs">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/8f87883ac56109d9e5f713b3d85a4fdc567ca2f5/src/readsbml.jl#L102-L129">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="SBML.readSBMLFromString" href="#SBML.readSBMLFromString"><code>SBML.readSBMLFromString</code></a><span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia hljs">readSBML(
end)</code></pre></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/SBML.jl/blob/c2a182e92ed2e65ef58869b84094a7cc10a4952b/src/readsbml.jl#L102-L129">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="SBML.readSBMLFromString" href="#SBML.readSBMLFromString"><code>SBML.readSBMLFromString</code></a><span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia hljs">readSBML(
str::String,
sbml_conversion = document -&gt; nothing;
report_severities = [&quot;Fatal&quot;, &quot;Error&quot;],
)::SBML.Model</code></pre><p>Read the SBML from the string <code>str</code> and return the contained <code>SBML.Model</code>.</p><p>For the other arguments see the docstring of <a href="#SBML.readSBML"><code>readSBML</code></a>, which can be used to read from a file instead of a string.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/SBML.jl/blob/8f87883ac56109d9e5f713b3d85a4fdc567ca2f5/src/readsbml.jl#L136-L147">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 hljs">convert_simplify_math</code></pre><p>Shortcut for <a href="#SBML.libsbml_convert"><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/8f87883ac56109d9e5f713b3d85a4fdc567ca2f5/src/converters.jl#L81-L86">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="SBML.libsbml_convert" href="#SBML.libsbml_convert"><code>SBML.libsbml_convert</code></a><span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia hljs">libsbml_convert(conversion_options::Vector{Pair{String, Dict{String, String}}}, report_severities = [&quot;Fatal&quot;, &quot;Error&quot;])</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. <code>report_severities</code> switches on and off reporting of certain errors; see the documentation of <a href="#SBML.get_error_messages-Tuple{Ptr{Nothing},Exception,Any}"><code>get_error_messages</code></a> for details.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/SBML.jl/blob/8f87883ac56109d9e5f713b3d85a4fdc567ca2f5/src/converters.jl#L24-L31">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="SBML.libsbml_convert" href="#SBML.libsbml_convert"><code>SBML.libsbml_convert</code></a><span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia hljs">libsbml_convert(converter::String, report_severities = [&quot;Fatal&quot;, &quot;Error&quot;]; kwargs...)</code></pre><p>Quickly construct a single run of a <code>libsbml</code> converter from keyword arguments. <code>report_severities</code> switches on and off reporting of certain errors; see the documentation of <a href="#SBML.get_error_messages-Tuple{Ptr{Nothing},Exception,Any}"><code>get_error_messages</code></a> for details.</p><p><strong>Example</strong></p><pre><code class="nohighlight hljs">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/8f87883ac56109d9e5f713b3d85a4fdc567ca2f5/src/converters.jl#L63-L74">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="SBML.set_level_and_version" href="#SBML.set_level_and_version"><code>SBML.set_level_and_version</code></a><span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia hljs">set_level_and_version(level, version, report_severities = [&quot;Fatal&quot;, &quot;Error&quot;])</code></pre><p>A converter to pass into <a href="#SBML.readSBML"><code>readSBML</code></a> that enforces certain SBML level and version. <code>report_severities</code> switches on and off reporting of certain errors; see the documentation of <a href="#SBML.get_error_messages-Tuple{Ptr{Nothing},Exception,Any}"><code>get_error_messages</code></a> for details.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/SBML.jl/blob/8f87883ac56109d9e5f713b3d85a4fdc567ca2f5/src/converters.jl#L2-L8">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" href="#SBML.check_errors"><code>SBML.check_errors</code></a><span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia hljs">check_errors(
)::SBML.Model</code></pre><p>Read the SBML from the string <code>str</code> and return the contained <code>SBML.Model</code>.</p><p>For the other arguments see the docstring of <a href="#SBML.readSBML"><code>readSBML</code></a>, which can be used to read from a file instead of a string.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/SBML.jl/blob/c2a182e92ed2e65ef58869b84094a7cc10a4952b/src/readsbml.jl#L136-L147">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 hljs">convert_simplify_math</code></pre><p>Shortcut for <a href="#SBML.libsbml_convert"><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/c2a182e92ed2e65ef58869b84094a7cc10a4952b/src/converters.jl#L81-L86">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="SBML.libsbml_convert" href="#SBML.libsbml_convert"><code>SBML.libsbml_convert</code></a><span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia hljs">libsbml_convert(conversion_options::Vector{Pair{String, Dict{String, String}}}, report_severities = [&quot;Fatal&quot;, &quot;Error&quot;])</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. <code>report_severities</code> switches on and off reporting of certain errors; see the documentation of <a href="#SBML.get_error_messages-Tuple{Ptr{Nothing},Exception,Any}"><code>get_error_messages</code></a> for details.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/SBML.jl/blob/c2a182e92ed2e65ef58869b84094a7cc10a4952b/src/converters.jl#L24-L31">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="SBML.libsbml_convert" href="#SBML.libsbml_convert"><code>SBML.libsbml_convert</code></a><span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia hljs">libsbml_convert(converter::String, report_severities = [&quot;Fatal&quot;, &quot;Error&quot;]; kwargs...)</code></pre><p>Quickly construct a single run of a <code>libsbml</code> converter from keyword arguments. <code>report_severities</code> switches on and off reporting of certain errors; see the documentation of <a href="#SBML.get_error_messages-Tuple{Ptr{Nothing},Exception,Any}"><code>get_error_messages</code></a> for details.</p><p><strong>Example</strong></p><pre><code class="nohighlight hljs">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/c2a182e92ed2e65ef58869b84094a7cc10a4952b/src/converters.jl#L63-L74">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="SBML.set_level_and_version" href="#SBML.set_level_and_version"><code>SBML.set_level_and_version</code></a><span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia hljs">set_level_and_version(level, version, report_severities = [&quot;Fatal&quot;, &quot;Error&quot;])</code></pre><p>A converter to pass into <a href="#SBML.readSBML"><code>readSBML</code></a> that enforces certain SBML level and version. <code>report_severities</code> switches on and off reporting of certain errors; see the documentation of <a href="#SBML.get_error_messages-Tuple{Ptr{Nothing},Exception,Any}"><code>get_error_messages</code></a> for details.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/SBML.jl/blob/c2a182e92ed2e65ef58869b84094a7cc10a4952b/src/converters.jl#L2-L8">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" href="#SBML.check_errors"><code>SBML.check_errors</code></a><span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia hljs">check_errors(
success::Integer,
doc::VPtr,
error::Exception,
report_severities = [&quot;Fatal&quot;, &quot;Error&quot;],
)</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,Any}"><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/8f87883ac56109d9e5f713b3d85a4fdc567ca2f5/src/utils.jl#L177-L190">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 hljs">function extensive_kinetic_math(
)</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,Any}"><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/c2a182e92ed2e65ef58869b84094a7cc10a4952b/src/utils.jl#L177-L190">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 hljs">function extensive_kinetic_math(
m::SBML.Model,
formula::SBML.Math;
handle_empty_compartment_size = (id::String) -&gt; throw(
......@@ -62,14 +62,14 @@ end)</code></pre></div><a class="docs-sourcelink" target="_blank" href="https://
&quot;Non-substance-only-unit reference to species `$id&#39; in an unsized compartment `$(m.species[id].compartment)&#39;&quot;,
),
),
)</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>If the data is missing, you can supply a function that adds them. A common way to handle errors is to assume that unsized compartments have volume 1.0 (of whatever units), you can specify that behavior by supplying <code>handle_empty_compartment_size = _ -&gt; 1.0</code>.</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/8f87883ac56109d9e5f713b3d85a4fdc567ca2f5/src/utils.jl#L99-L120">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="SBML.flux_bounds-Tuple{SBML.Model}" href="#SBML.flux_bounds-Tuple{SBML.Model}"><code>SBML.flux_bounds</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia hljs">flux_bounds(m::SBML.Model)::NTuple{2, Vector{Tuple{Float64,String}}}</code></pre><p>Extract the vectors of lower and upper 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/8f87883ac56109d9e5f713b3d85a4fdc567ca2f5/src/utils.jl#L29-L35">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="SBML.flux_objective-Tuple{SBML.Model}" href="#SBML.flux_objective-Tuple{SBML.Model}"><code>SBML.flux_objective</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia hljs">flux_objective(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/8f87883ac56109d9e5f713b3d85a4fdc567ca2f5/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,Any}" href="#SBML.get_error_messages-Tuple{Ptr{Nothing},Exception,Any}"><code>SBML.get_error_messages</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia hljs">get_error_messages(doc::VPtr, error::Exception, report_severities)</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><p><code>report_severities</code> switches the reporting of certain error types defined by libsbml; you can choose from <code>[&quot;Fatal&quot;, &quot;Error&quot;, &quot;Warning&quot;, &quot;Informational&quot;]</code>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/SBML.jl/blob/8f87883ac56109d9e5f713b3d85a4fdc567ca2f5/src/utils.jl#L144-L152">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 hljs">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 hljs"># get the initial amounts as dictionary
)</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>If the data is missing, you can supply a function that adds them. A common way to handle errors is to assume that unsized compartments have volume 1.0 (of whatever units), you can specify that behavior by supplying <code>handle_empty_compartment_size = _ -&gt; 1.0</code>.</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/c2a182e92ed2e65ef58869b84094a7cc10a4952b/src/utils.jl#L99-L120">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="SBML.flux_bounds-Tuple{SBML.Model}" href="#SBML.flux_bounds-Tuple{SBML.Model}"><code>SBML.flux_bounds</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia hljs">flux_bounds(m::SBML.Model)::NTuple{2, Vector{Tuple{Float64,String}}}</code></pre><p>Extract the vectors of lower and upper 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/c2a182e92ed2e65ef58869b84094a7cc10a4952b/src/utils.jl#L29-L35">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="SBML.flux_objective-Tuple{SBML.Model}" href="#SBML.flux_objective-Tuple{SBML.Model}"><code>SBML.flux_objective</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia hljs">flux_objective(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/c2a182e92ed2e65ef58869b84094a7cc10a4952b/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,Any}" href="#SBML.get_error_messages-Tuple{Ptr{Nothing},Exception,Any}"><code>SBML.get_error_messages</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia hljs">get_error_messages(doc::VPtr, error::Exception, report_severities)</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><p><code>report_severities</code> switches the reporting of certain error types defined by libsbml; you can choose from <code>[&quot;Fatal&quot;, &quot;Error&quot;, &quot;Warning&quot;, &quot;Informational&quot;]</code>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/SBML.jl/blob/c2a182e92ed2e65ef58869b84094a7cc10a4952b/src/utils.jl#L144-L152">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 hljs">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 hljs"># 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/8f87883ac56109d9e5f713b3d85a4fdc567ca2f5/src/utils.jl#L46-L65">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 hljs">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/8f87883ac56109d9e5f713b3d85a4fdc567ca2f5/src/utils.jl#L79-L84">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="SBML.stoichiometry_matrix-Tuple{SBML.Model}" href="#SBML.stoichiometry_matrix-Tuple{SBML.Model}"><code>SBML.stoichiometry_matrix</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia hljs">function stoichiometry_matrix(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/8f87883ac56109d9e5f713b3d85a4fdc567ca2f5/src/utils.jl#L1-L11">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 hljs">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/8f87883ac56109d9e5f713b3d85a4fdc567ca2f5/src/symbolics.jl#L86-L91">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 hljs">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/8f87883ac56109d9e5f713b3d85a4fdc567ca2f5/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 hljs">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/c2a182e92ed2e65ef58869b84094a7cc10a4952b/src/utils.jl#L46-L65">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 hljs">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/c2a182e92ed2e65ef58869b84094a7cc10a4952b/src/utils.jl#L79-L84">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="SBML.stoichiometry_matrix-Tuple{SBML.Model}" href="#SBML.stoichiometry_matrix-Tuple{SBML.Model}"><code>SBML.stoichiometry_matrix</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia hljs">function stoichiometry_matrix(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/c2a182e92ed2e65ef58869b84094a7cc10a4952b/src/utils.jl#L1-L11">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 hljs">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/c2a182e92ed2e65ef58869b84094a7cc10a4952b/src/symbolics.jl#L86-L91">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 hljs">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/c2a182e92ed2e65ef58869b84094a7cc10a4952b/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 hljs">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/8f87883ac56109d9e5f713b3d85a4fdc567ca2f5/src/symbolics.jl#L95-L115">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 hljs">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/8f87883ac56109d9e5f713b3d85a4fdc567ca2f5/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 hljs">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/8f87883ac56109d9e5f713b3d85a4fdc567ca2f5/src/math.jl#L38-L43">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 hljs">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/8f87883ac56109d9e5f713b3d85a4fdc567ca2f5/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.5 on <span class="colophon-date" title="Sunday 8 August 2021 07:39">Sunday 8 August 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/c2a182e92ed2e65ef58869b84094a7cc10a4952b/src/symbolics.jl#L95-L115">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 hljs">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/c2a182e92ed2e65ef58869b84094a7cc10a4952b/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 hljs">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/c2a182e92ed2e65ef58869b84094a7cc10a4952b/src/math.jl#L38-L43">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 hljs">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/c2a182e92ed2e65ef58869b84094a7cc10a4952b/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.5 on <span class="colophon-date" title="Monday 9 August 2021 13:31">Monday 9 August 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.5 on <span class="colophon-date" title="Sunday 8 August 2021 07:39">Sunday 8 August 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.5 on <span class="colophon-date" title="Monday 9 August 2021 13:31">Monday 9 August 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>
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