Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
LCSB-BioCore
SBML.jl
Commits
d1fbeaf6
Commit
d1fbeaf6
authored
Mar 15, 2021
by
Miroslav Kratochvil
Browse files
cleaning: distinguish between missing and empty formula
parent
da50e144
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/readsbml.jl
View file @
d1fbeaf6
...
@@ -111,7 +111,7 @@ function extractModel(mdl::VPtr)::Model
...
@@ -111,7 +111,7 @@ function extractModel(mdl::VPtr)::Model
for
i
=
1
:
ccall
(
sbml
(
:
Model_getNumSpecies
),
Cuint
,
(
VPtr
,),
mdl
)
for
i
=
1
:
ccall
(
sbml
(
:
Model_getNumSpecies
),
Cuint
,
(
VPtr
,),
mdl
)
sp
=
ccall
(
sbml
(
:
Model_getSpecies
),
VPtr
,
(
VPtr
,
Cuint
),
mdl
,
i
-
1
)
sp
=
ccall
(
sbml
(
:
Model_getSpecies
),
VPtr
,
(
VPtr
,
Cuint
),
mdl
,
i
-
1
)
sp_fbc
=
ccall
(
sbml
(
:
SBase_getPlugin
),
VPtr
,
(
VPtr
,
Cstring
),
sp
,
"fbc"
)
# FbcSpeciesPlugin_t
sp_fbc
=
ccall
(
sbml
(
:
SBase_getPlugin
),
VPtr
,
(
VPtr
,
Cstring
),
sp
,
"fbc"
)
# FbcSpeciesPlugin_t
formula
=
""
formula
=
nothing
charge
=
nothing
charge
=
nothing
if
sp_fbc
!=
C_NULL
if
sp_fbc
!=
C_NULL
# if the FBC plugin is present, try to get the chemical formula and charge
# if the FBC plugin is present, try to get the chemical formula and charge
...
...
src/structs.jl
View file @
d1fbeaf6
...
@@ -51,7 +51,7 @@ identifier
...
@@ -51,7 +51,7 @@ identifier
struct
Species
struct
Species
name
::
String
name
::
String
compartment
::
String
compartment
::
String
formula
::
String
formula
::
Maybe
{
String
}
charge
::
Maybe
{
Int
}
charge
::
Maybe
{
Int
}
notes
::
Maybe
{
String
}
notes
::
Maybe
{
String
}
annotation
::
Maybe
{
String
}
annotation
::
Maybe
{
String
}
...
...
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