Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
LCSB-BioCore
SBML.jl
Commits
647f4230
Unverified
Commit
647f4230
authored
Jun 17, 2021
by
Miroslav Kratochvil
Committed by
GitHub
Jun 17, 2021
Browse files
Merge pull request #66 from LCSB-BioCore/mk-converter-types
Sanitize `libsbml_converter` types
parents
0949dfac
4da6d4bf
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/converters.jl
View file @
647f4230
...
...
@@ -24,7 +24,7 @@ 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.
"""
libsbml_convert
(
conversion_options
::
Vector
{
Pair
{
String
,
Dict
{
String
,
String
}}})
=
libsbml_convert
(
conversion_options
::
Abstract
Vector
{
Pair
{
String
,
Dict
{
String
,
String
}}})
=
doc
->
begin
for
(
converter
,
options
)
in
conversion_options
props
=
ccall
(
sbml
(
:
ConversionProperties_create
),
VPtr
,
())
...
...
@@ -55,8 +55,9 @@ Quickly construct a single run of a `libsbml` converter from keyword arguments.
readSBML("
example
.
xml
", libsbml_convert("
stripPackage
", package="
layout
"))
```
"""
libsbml_convert
(
converter
::
String
;
kwargs
...
)
=
libsbml_convert
([
converter
=>
Dict
(
string
(
k
)
=>
string
(
v
)
for
(
k
,
v
)
in
kwargs
)])
libsbml_convert
(
converter
::
String
;
kwargs
...
)
=
libsbml_convert
([
converter
=>
Dict
{
String
,
String
}(
string
(
k
)
=>
string
(
v
)
for
(
k
,
v
)
in
kwargs
),
])
"""
convert_simplify_math
...
...
@@ -65,6 +66,5 @@ Shortcut for [`libsbml_convert`](@ref) that expands functions, local
parameters, and initial assignments in the SBML document.
"""
convert_simplify_math
=
libsbml_convert
(
[
"promoteLocalParameters"
,
"expandFunctionDefinitions"
]
.=>
Ref
(
Dict
{
String
,
String
}()),
[
"promoteLocalParameters"
,
"expandFunctionDefinitions"
,
"expandInitialAssignments"
]
.=>
Ref
(
Dict
{
String
,
String
}()),
)
test/ecoli_flux.jl
View file @
647f4230
...
...
@@ -2,7 +2,7 @@
sbmlfile
=
"Ec_core_flux1.xml"
if
!
isfile
(
sbmlfile
)
download
(
Downloads
.
download
(
"http://systemsbiology.ucsd.edu/sites/systemsbiology.ucsd.edu/files/Attachments/Images/InSilicoOrganisms/Ecoli/Ecoli_SBML/Ec_core_flux1.xml"
,
sbmlfile
,
)
...
...
cylon-x
🤖
@cylon-x
mentioned in commit
ab59e455
·
Jun 17, 2021
mentioned in commit
ab59e455
mentioned in commit ab59e45524c7299eecfd19c26c86b745821f0659
Toggle commit list
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment