Commit 5bcc8994 authored by Miroslav Kratochvil's avatar Miroslav Kratochvil
Browse files

SBML loading tests

parent fc4d38a5
.DS_Store
/Manifest.toml
docs/build
test/data/ecoli_core.xml
......@@ -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"
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
......@@ -6,6 +6,7 @@ using GLPK
using Clp
using COBREXA
using MAT
using SHA
using Distributed
"""
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment