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
00b48fb4
Unverified
Commit
00b48fb4
authored
Jul 10, 2021
by
Miroslav Kratochvil
🚴
Committed by
GitHub
Jul 10, 2021
Browse files
Merge pull request #110 from giordano/mg/deanon
Turn some anonymous functions into proper named functions
parents
47d95132
977cafad
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/readsbml.jl
View file @
00b48fb4
...
...
@@ -298,8 +298,8 @@ function extractModel(mdl::VPtr)::SBML.Model
for j = 1:ccall(sbml(:KineticLaw_getNumParameters), Cuint, (VPtr,), kl)
p = ccall(sbml(:KineticLaw_getParameter), VPtr, (VPtr, Cuint), kl, j - 1)
id = get_string(p, :Parameter_getId)
pval
=
()
->
ccall(sbml(:Parameter_getValue), Cdouble, (VPtr,), p)
punit
=
()
->
get_string(p, :Parameter_getUnits)
pval()
=
ccall(sbml(:Parameter_getValue), Cdouble, (VPtr,), p)
punit()
=
get_string(p, :Parameter_getUnits)
if id == "
LOWER_BOUND
"
lb = (pval(), punit())
elseif id == "
UPPER_BOUND
"
...
...
test/ecoli_flux.jl
View file @
00b48fb4
...
...
@@ -51,10 +51,10 @@ end
@test
length
(
getLBs
(
mdl
))
==
length
(
rxns
)
@test
length
(
getUBs
(
mdl
))
==
length
(
rxns
)
getunit
=
(
val
,
unit
)
::
Tuple
->
unit
getunit
(
(
val
,
unit
)
)
=
unit
@test
all
([
broadcast
(
getunit
,
lbs
)
broadcast
(
getunit
,
ubs
)]
.==
"mmol_per_gDW_per_hr"
)
getval
=
(
val
,
unit
)
::
Tuple
->
val
getval
(
(
val
,
unit
)
)
=
val
lvals
=
broadcast
(
getval
,
lbs
)
uvals
=
broadcast
(
getval
,
ubs
)
@test
isapprox
(
lvals
[
27
],
uvals
[
27
])
...
...
cylon-x
🤖
@cylon-x
mentioned in commit
e484ad0a
·
Jul 10, 2021
mentioned in commit
e484ad0a
mentioned in commit e484ad0a7c7b092c67384605876e608ef7bc70d8
Toggle commit list
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