index.html 13.7 KB
Newer Older
Documenter.jl's avatar
Documenter.jl committed
1
<!DOCTYPE html>
Documenter.jl's avatar
Documenter.jl committed
2
<html lang="en"><head><meta charset="UTF-8"/><meta name="viewport" content="width=device-width, initial-scale=1.0"/><title>Documentation · SBML.jl</title><link rel="canonical" href="https://lcsb-biocore.github.io/DistributedData.jl/stable/"/><link href="https://fonts.googleapis.com/css?family=Lato|Roboto+Mono" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.0/css/fontawesome.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.0/css/solid.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.0/css/brands.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.11.1/katex.min.css" rel="stylesheet" type="text/css"/><script>documenterBaseURL="."</script><script src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.6/require.min.js" data-main="assets/documenter.js"></script><script src="siteinfo.js"></script><script src="../versions.js"></script><link class="docs-theme-link" rel="stylesheet" type="text/css" href="assets/themes/documenter-dark.css" data-theme-name="documenter-dark" data-theme-primary-dark/><link class="docs-theme-link" rel="stylesheet" type="text/css" href="assets/themes/documenter-light.css" data-theme-name="documenter-light" data-theme-primary/><script src="assets/themeswap.js"></script></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">SBML.jl</span></div><form class="docs-search" action="search/"><input class="docs-search-query" id="documenter-search-query" name="q" type="text" placeholder="Search docs"/></form><ul class="docs-menu"><li class="is-active"><a class="tocitem" href>Documentation</a><ul class="internal"><li><a class="tocitem" href="#Functions"><span>Functions</span></a></li><li><a class="tocitem" href="#Data-helpers"><span>Data helpers</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-Tuple{String}"><code>readSBML</code></a> to load a <a href="#SBML.Model"><code>Model</code></a>:</p><pre><code class="language-julia">julia&gt; using SBML
Documenter.jl's avatar
Documenter.jl committed
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
julia&gt; mdl = readSBML(&quot;Ec_core_flux1.xml&quot;)
Model(…)

julia&gt; mdl.compartments
2-element Array{String,1}:
 &quot;Extra_organism&quot;
 &quot;Cytosol&quot;</code></pre><p>There are several functions to help you with using the data in the usual COBRA-style workflows, such as <a href="#SBML.getS-Tuple{Model}"><code>getS</code></a>:</p><pre><code class="language-julia">julia&gt; metabolites, reactions, S = getS(mdl)
julia&gt; metabolites
77-element Array{String,1}:
 &quot;M_succoa_c&quot;
 &quot;M_ac_c&quot;
 &quot;M_etoh_c&quot;


julia&gt; S
77×77 Array{Float64,2}:
 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
 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   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  …  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  -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  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
Documenter.jl's avatar
Documenter.jl committed
29
 ⋮                         ⋮         ⋱  ⋮                          ⋮    </code></pre><h2 id="Functions"><a class="docs-heading-anchor" href="#Functions">Functions</a><a id="Functions-1"></a><a class="docs-heading-anchor-permalink" href="#Functions" title="Permalink"></a></h2><h3 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></h3><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>units</code>, <code>compartments</code>, <code>species</code> and <code>reactions</code>. 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/2c517b3b5f4fa09aed0cd73f74de076af48585ce/src/structs.jl#L47-L51">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>).</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/SBML.jl/blob/2c517b3b5f4fa09aed0cd73f74de076af48585ce/src/structs.jl#L23-L28">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>, and a <code>compartment</code> identifier</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/SBML.jl/blob/2c517b3b5f4fa09aed0cd73f74de076af48585ce/src/structs.jl#L37-L40">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="language-none">UnitPart(&quot;second&quot;,  # base SI unit, this says we are measuring time
Documenter.jl's avatar
Documenter.jl committed
30
31
         -2,        # exponent, says &quot;per square&quot;
         6,         # log-10 scale of the unit, says &quot;mega&quot;
Documenter.jl's avatar
Documenter.jl committed
32
         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>Model</code></a>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/SBML.jl/blob/2c517b3b5f4fa09aed0cd73f74de076af48585ce/src/structs.jl#L2-L14">source</a></section></article><h3 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></h3><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/2c517b3b5f4fa09aed0cd73f74de076af48585ce/src/version.jl#L2-L6">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="SBML.readSBML-Tuple{String}" href="#SBML.readSBML-Tuple{String}"><code>SBML.readSBML</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">function readSBML(fn::String)::Model</code></pre><p>Read the SBML from a XML file in <code>fn</code> and return the contained <code>Model</code>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/SBML.jl/blob/2c517b3b5f4fa09aed0cd73f74de076af48585ce/src/readsbml.jl#L4-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.getLBs-Tuple{Model}" href="#SBML.getLBs-Tuple{Model}"><code>SBML.getLBs</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">function getLBs(m::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/2c517b3b5f4fa09aed0cd73f74de076af48585ce/src/utils.jl#L20-L26">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="SBML.getOCs-Tuple{Model}" href="#SBML.getOCs-Tuple{Model}"><code>SBML.getOCs</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">function getOCs(m::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/2c517b3b5f4fa09aed0cd73f74de076af48585ce/src/utils.jl#L40-L44">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="SBML.getS-Tuple{Model}" href="#SBML.getS-Tuple{Model}"><code>SBML.getS</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">function getS(m::Model)::Tuple{Vector{String},Vector{String},Matrix{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>Model</code>. Returns a tuple with these values.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/SBML.jl/blob/2c517b3b5f4fa09aed0cd73f74de076af48585ce/src/utils.jl#L1-L7">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="SBML.getUBs-Tuple{Model}" href="#SBML.getUBs-Tuple{Model}"><code>SBML.getUBs</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia">function getUBs(m::Model)::Vector{Tuple{Float64,String}}</code></pre><p>Likewise to <code>getLBs</code>, extract the upper bounds.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/LCSB-BioCore/SBML.jl/blob/2c517b3b5f4fa09aed0cd73f74de076af48585ce/src/utils.jl#L31-L35">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> on <span class="colophon-date" title="Tuesday 9 February 2021 10:36">Tuesday 9 February 2021</span>. Using Julia version 1.5.3.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>