index.md 2.48 KB
Newer Older
Miroslav Kratochvil's avatar
Miroslav Kratochvil committed
1
2
3
4
5
6
7

# SBML.jl — load systems biology models from SBML files

This package provides a straightforward way to load model- and
simulation-relevant information from SBML files.

The library provides a single function [`readSBML`](@ref) to load a
anand jain's avatar
anand jain committed
8
[`SBML.Model`](@ref):
Miroslav Kratochvil's avatar
Miroslav Kratochvil committed
9
10
11
12

```julia
julia> using SBML
julia> mdl = readSBML("Ec_core_flux1.xml")
anand jain's avatar
anand jain committed
13
SBML.Model()
Miroslav Kratochvil's avatar
Miroslav Kratochvil committed
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33

julia> mdl.compartments
2-element Array{String,1}:
 "Extra_organism"
 "Cytosol"
```

There are several functions to help you with using the data in the usual
COBRA-style workflows, such as [`getS`](@ref):

```julia
julia> metabolites, reactions, S = getS(mdl)
julia> metabolites
77-element Array{String,1}:
 "M_succoa_c"
 "M_ac_c"
 "M_etoh_c"
  

julia> S
Miroslav Kratochvil's avatar
Miroslav Kratochvil committed
34
35
36
37
38
39
40
41
42
43
44
45
77×77 SparseArrays.SparseMatrixCSC{Float64,Int64} with 308 stored entries:
  [60,  1]  =  -1.0
  [68,  1]  =  1.0
  [1 ,  2]  =  1.0
  [6 ,  2]  =  -1.0
  
  [23, 76]  =  1.0
  [56, 76]  =  -1.0
  [30, 77]  =  -1.0
  [48, 77]  =  1.0

julia> Matrix(S)
Miroslav Kratochvil's avatar
Miroslav Kratochvil committed
46
47
48
49
50
51
52
53
54
55
56
57
58
59
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
                                                                   
```

60
# Function reference
Miroslav Kratochvil's avatar
Miroslav Kratochvil committed
61

62
63
64
65
66
67
68
## Helper types

```@autodocs
Modules = [SBML]
Pages = ["types.jl"]
```

69
## Data structures
Miroslav Kratochvil's avatar
Miroslav Kratochvil committed
70
71
72
73
74
75

```@autodocs
Modules = [SBML]
Pages = ["structs.jl"]
```

76
## Base functions
Miroslav Kratochvil's avatar
Miroslav Kratochvil committed
77
78
79
80
81
82

```@autodocs
Modules = [SBML]
Pages = ["version.jl", "readsbml.jl"]
```

83
84
85
86
87
88
89
90
91
## `libsbml` representation converters

The converters are intended to be used as parameters of [`readSBML`](@ref).

```@autodocs
Modules = [SBML]
Pages = ["converters.jl"]
```

Miroslav Kratochvil's avatar
Miroslav Kratochvil committed
92
93
94
95
96
97
## Data helpers

```@autodocs
Modules = [SBML]
Pages = ["utils.jl"]
```
98

99
100
101
102
103
104
105
106
## Math and `Symbolics.jl` compatibility

```@autodocs
Modules = [SBML]
Pages = ["symbolics.jl"]
```

### Internal math helpers
107
108
109
110
111

```@autodocs
Modules = [SBML]
Pages = ["math.jl"]
```