Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
LCSB-BioCore
SBML.jl
Commits
f6b416c8
Commit
f6b416c8
authored
Jul 13, 2021
by
Miroslav Kratochvil
🚴
Browse files
quickfix: do not load invalid information for species with double stoichiometry
parent
70778a8c
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/readsbml.jl
View file @
f6b416c8
...
...
@@ -335,10 +335,12 @@ function extractModel(mdl::VPtr)::SBML.Model
# extract stoichiometry
stoi = Dict{String,Float64}()
add_stoi =
(sr, factor) ->
stoi[get_string(sr, :SpeciesReference_getSpecies)] =
ccall(sbml(:SpeciesReference_getStoichiometry), Cdouble, (VPtr,), sr) *
factor
(sr, factor) -> begin
s = get_string(sr, :SpeciesReference_getSpecies)
stoi[s] =
get(stoi, s, 0) +
ccall(sbml(:SpeciesReference_getStoichiometry), Cdouble, (VPtr,), sr) * factor
end
# reactants and products
for j = 1:ccall(sbml(:Reaction_getNumReactants), Cuint, (VPtr,), re)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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