Unverified Commit d8e40b32 authored by Miroslav Kratochvil's avatar Miroslav Kratochvil Committed by GitHub
Browse files

Merge pull request #60 from LCSB-BioCore/mk-doc-converters

document the converter usage
parents 63902370 2e61dc8c
...@@ -57,25 +57,41 @@ julia> Matrix(S) ...@@ -57,25 +57,41 @@ julia> Matrix(S)
``` ```
## Functions # Function reference
### Data structures ## Data structures
```@autodocs ```@autodocs
Modules = [SBML] Modules = [SBML]
Pages = ["structs.jl"] Pages = ["structs.jl"]
``` ```
### Base functions ## Base functions
```@autodocs ```@autodocs
Modules = [SBML] Modules = [SBML]
Pages = ["version.jl", "readsbml.jl"] Pages = ["version.jl", "readsbml.jl"]
``` ```
## `libsbml` representation converters
The converters are intended to be used as parameters of [`readSBML`](@ref).
```@autodocs
Modules = [SBML]
Pages = ["converters.jl"]
```
## Data helpers ## Data helpers
```@autodocs ```@autodocs
Modules = [SBML] Modules = [SBML]
Pages = ["utils.jl"] Pages = ["utils.jl"]
``` ```
## Internal math manipulation
```@autodocs
Modules = [SBML]
Pages = ["math.jl"]
```
...@@ -78,6 +78,20 @@ end ...@@ -78,6 +78,20 @@ end
function readSBML(fn::String, sbml_conversion = model->nothing)::SBML.Model function readSBML(fn::String, sbml_conversion = model->nothing)::SBML.Model
Read the SBML from a XML file in `fn` and return the contained `SBML.Model`. Read the SBML from a XML file in `fn` and return the contained `SBML.Model`.
The `sbml_conversion` is a function that does an in-place modification of the
single parameter, which is the C pointer to the loaded SBML document (C type
`SBMLDocument*`). Several functions for doing that are prepared, including
[`convert_level_and_version`](@ref), [`libsbml_convert`](@ref), and
[`convert_simplify_math`](@ref).
# Example
```
m = readSBML("my_model.xml", doc -> begin
convert_level_and_version(3, 1)(doc)
convert_simplify_math(doc)
end)
```
""" """
function readSBML(fn::String, sbml_conversion = document -> nothing)::SBML.Model function readSBML(fn::String, sbml_conversion = document -> nothing)::SBML.Model
doc = ccall(sbml(:readSBML), VPtr, (Cstring,), fn) doc = ccall(sbml(:readSBML), VPtr, (Cstring,), fn)
......
Supports Markdown
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