Skip to content

use SBML converter that retains initialAssignment #107

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jan 31, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "SBMLToolkit"
uuid = "86080e66-c8ac-44c2-a1a0-9adaadfe4a4e"
authors = ["paulflang", "anandijain"]
version = "0.1.19"
version = "0.1.20"

[deps]
Catalyst = "479239e8-5488-4da2-87a7-35f2df7eef83"
Expand All @@ -12,7 +12,7 @@ SymbolicUtils = "d1185830-fcd6-423d-90d6-eec64667417b"
[compat]
Catalyst = "12"
MathML = "0.1"
SBML = "1.3"
SBML = "1.4"
SymbolicUtils = "0.17, 0.18, 0.19"
julia = "1.6"

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ SBML models can be simulated with the following steps (note that `sol` is in abs
SBMLToolkit.checksupport_file("my_model.xml")
mdl = readSBML("my_model.xml", doc -> begin
set_level_and_version(3, 2)(doc)
convert_simplify_math(doc)
convert_promotelocals_expandfuns(doc)
end)

rs = ReactionSystem(mdl) # If you want to create a reaction system
Expand Down
2 changes: 1 addition & 1 deletion docs/src/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ using SBMLToolkit, ModelingToolkit, OrdinaryDiffEq
SBMLToolkit.checksupport_file("my_model.xml")
mdl = readSBML("my_model.xml", doc -> begin
set_level_and_version(3, 2)(doc)
convert_simplify_math(doc)
convert_promotelocals_expandfuns(doc)
end)
rs = ReactionSystem(mdl) # If you want to create a reaction system
odesys = convert(ODESystem, rs) # Alternatively: ODESystem(mdl)
Expand Down
5 changes: 4 additions & 1 deletion src/SBMLToolkit.jl
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,10 @@ include("rules.jl")
include("events.jl")
include("utils.jl")

@deprecate convert_simplify_math convert_promotelocals_expandfuns

export ReactionSystem, ODESystem
export readSBML, readSBMLFromString, set_level_and_version, convert_simplify_math
export readSBML, readSBMLFromString, set_level_and_version, convert_simplify_math,
convert_promotelocals_expandfuns

end
2 changes: 1 addition & 1 deletion test/events.jl
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const IV = Catalyst.DEFAULT_IV
function readmodel(sbml)
SBMLToolkit.readSBMLFromString(sbml, doc -> begin
set_level_and_version(3, 2)(doc)
convert_simplify_math(doc)
convert_promotelocals_expandfuns(doc)
end)
end

Expand Down
2 changes: 1 addition & 1 deletion test/rules.jl
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const IV = Catalyst.DEFAULT_IV
function readmodel(sbml)
SBMLToolkit.readSBMLFromString(sbml, doc -> begin
set_level_and_version(3, 2)(doc)
convert_simplify_math(doc)
convert_promotelocals_expandfuns(doc)
end)
end

Expand Down
2 changes: 1 addition & 1 deletion test/utils.jl
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ using Test
function readmodel(sbml)
SBMLToolkit.readSBMLFromString(sbml, doc -> begin
set_level_and_version(3, 2)(doc)
convert_simplify_math(doc)
convert_promotelocals_expandfuns(doc)
end)
end

Expand Down
2 changes: 1 addition & 1 deletion test/wuschel.jl
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ sbml_url = "https://www.ebi.ac.uk/biomodels/model/download/MODEL1112100000.2?fil
sbml = String(take!(Downloads.download(sbml_url, IOBuffer())))
m = readSBMLFromString(sbml, doc -> begin
# set_level_and_version(3, 2)(doc) # fails on wuschel
convert_simplify_math(doc) end)
convert_promotelocals_expandfuns(doc) end)
sys = ODESystem(m)
@test length(equations(sys)) == 1012
@test length(states(sys)) == 1012
Expand Down