SBMLModel.jl 773 Bytes
Newer Older
1
2

@testset "Conversion from and to SBML model" begin
3
    sbmlm = load_sbml_model(model_paths["ecoli_core_model.xml"])
4
5
    sm = convert(StandardModel, sbmlm)
    sbmlm2 = convert(SBMLModel, sm)
6

7
8
9
10
    @test Set(reactions(sbmlm)) == Set(reactions(sbmlm2))
    @test Set(reactions(sbmlm)) == Set(reactions(sm))
    @test Set(metabolites(sbmlm)) == Set(metabolites(sbmlm2))
    @test all([
11
12
        sbmlm.sbml.reactions[i].reactants == sbmlm2.sbml.reactions[i].reactants &&
        sbmlm.sbml.reactions[i].products == sbmlm2.sbml.reactions[i].products for
13
        i in reactions(sbmlm2)
14
    ])
15
end
St. Elmo's avatar
St. Elmo committed
16
17
18
19

@testset "SBMLModel generic interface" begin
    model = load_model(model_paths["e_coli_core.xml"])

St. Elmo's avatar
St. Elmo committed
20
    @test reaction_stoichiometry(model, "R_EX_ac_e") == Dict("M_ac_e" => -1)
St. Elmo's avatar
St. Elmo committed
21
end