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
COBREXA.jl
Commits
5bcc8994
Commit
5bcc8994
authored
Feb 11, 2021
by
Miroslav Kratochvil
Browse files
SBML loading tests
parent
fc4d38a5
Changes
4
Hide whitespace changes
Inline
Side-by-side
.gitignore
View file @
5bcc8994
.DS_Store
/Manifest.toml
docs/build
test/data/ecoli_core.xml
Project.toml
View file @
5bcc8994
...
...
@@ -16,5 +16,9 @@ Logging = "56ddb016-857b-54e1-b83d-db4d58db5568"
MAT
=
"23992714-dd62-5051-b70f-ba57cb901cac"
Pkg
=
"44cfe95a-1eb2-52ea-b672-e2afdf69b78f"
SBML
=
"e5567a89-2604-4b09-9718-f5f78e97c3bb"
SHA
=
"ea8e919c-243c-51af-8825-aaa63cd721ce"
SparseArrays
=
"2f01184e-e22b-5df5-ae63-d93ebab69eaf"
Test
=
"8dfed614-e22c-5e08-85e1-65c5234f0b40"
[compat]
julia
=
"1"
test/io/sbml.jl
0 → 100644
View file @
5bcc8994
sbmlfile
=
joinpath
(
"data"
,
"ecoli_core.xml"
)
if
!
isfile
(
sbmlfile
)
download
(
"http://systemsbiology.ucsd.edu/sites/systemsbiology.ucsd.edu/files/Attachments/Images/downloads/Ecoli_core/ecoli_core_model.xml"
,
sbmlfile
)
end
cksum
=
bytes2hex
(
sha256
(
open
(
sbmlfile
)))
if
cksum
!=
"78692f8509fb36534f4f9b6ade23b23552044f3ecd8b48d84d484636922ae907"
@warn
"The downloaded E Coli core model seems to be different from the expected one. Tests may fail."
cksum
end
@testset
"SBML import"
begin
m
=
loadSBMLModel
(
sbmlfile
)
@test
size
(
m
.
C
)
==
(
0
,
95
)
@test
size
(
m
.
S
)
==
(
92
,
95
)
@test
length
(
m
.
S
.
nzval
)
==
380
@test
length
(
m
.
b
)
==
92
@test
all
([
length
(
m
.
xl
),
length
(
m
.
xu
),
length
(
m
.
c
)]
.==
95
)
@test
m
.
mets
[
1
:
3
]
==
[
"M_succoa_c"
,
"M_ac_c"
,
"M_fru_b"
]
@test
m
.
rxns
[
1
:
3
]
==
[
"R_EX_fum_e"
,
"R_ACONTb"
,
"R_GLNS"
]
end
test/runtests.jl
View file @
5bcc8994
...
...
@@ -6,6 +6,7 @@ using GLPK
using
Clp
using
COBREXA
using
MAT
using
SHA
using
Distributed
"""
...
...
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