From 94c3cc89315d2209113bfd57c513fd32f8406486 Mon Sep 17 00:00:00 2001 From: paulflang Date: Wed, 5 Jun 2024 13:35:45 +0200 Subject: [PATCH 1/5] link citation in readme --- README.md | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 62a6f28..4d1f83a 100644 --- a/README.md +++ b/README.md @@ -55,10 +55,20 @@ odesys = readSBML("my_model.xml", ODESystemImporter()) The package is released under the [MIT license](https://github.com/SciML/SBMLToolkit.jl/blob/main/LICENSE). -## Development team +## Questions and comments -This package was developed by [Paul F. Lang](https://www.linkedin.com/in/paul-lang-7b54a81a3/) at the University of Oxford, UK and [Anand Jain](https://github.com/anandijain) at the University of Chicago, USA. +Please use GitHub issues and the #sciml-sysbio channel in the [Julia Slack workspace](https://julialang.org/slack/) with any questions or comments. -## Questions and comments +# Citation + +If you use SBMLToolkit.jl in your research, please cite [this paper](https://www.degruyter.com/document/doi/10.1515/jib-2024-0003/html): -Please use GitHub issues, the #sciml-sysbio channel in the [Julia Slack workspace](https://julialang.org/slack/) or email [Paul F. Lang](mailto:plang@biosim.ai) with any questions or comments. +``` +@article{lang_sbmltoolkitjl_2024, + title = {{SBMLToolkit}.jl: a {Julia} package for importing {SBML} into the {SciML} ecosystem}, + doi = {10.1515/jib-2024-0003}, + journal = {Journal of Integrative Bioinformatics}, + author = {Lang, Paul F. and Jain, Anand and Rackauckas, Christopher}, + year = {2024}, +} +``` From bb5c07844c615ca1edce441eac7a304ebaf2fff2 Mon Sep 17 00:00:00 2001 From: paulflang Date: Wed, 26 Jun 2024 14:36:13 +0200 Subject: [PATCH 2/5] update istree to iscall --- src/reactions.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/reactions.jl b/src/reactions.jl index 86e3409..1bed3cb 100644 --- a/src/reactions.jl +++ b/src/reactions.jl @@ -163,7 +163,7 @@ Get rate constant of mass action kineticLaws function get_massaction(kl::Num, reactants::Union{Vector{Num}, Nothing}, stoich::Union{Vector{<:Real}, Nothing}) function check_args(x::SymbolicUtils.BasicSymbolic{Real}) - check_args(Val(SymbolicUtils.istree(x)), x) + check_args(Val(SymbolicUtils.iscall(x)), x) end function check_args(::Val{true}, x::SymbolicUtils.BasicSymbolic{Real}) From 7a269ef5085b4a0c1ff90b38fa42a92fdd2e275a Mon Sep 17 00:00:00 2001 From: paulflang Date: Wed, 26 Jun 2024 15:00:17 +0200 Subject: [PATCH 3/5] update SymbolicUtils --- Project.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Project.toml b/Project.toml index fc203b1..d66893f 100644 --- a/Project.toml +++ b/Project.toml @@ -13,6 +13,7 @@ Aqua = "0.8" CSV = "0.10.5" Catalyst = "13" DataFrames = "1" +Downloads = "1" ModelingToolkit = "8.51" OrdinaryDiffEq = "6.42" Plots = "1.11" @@ -20,8 +21,7 @@ SBML = "1.4.4" SBMLToolkitTestSuite = "0.0.3" SafeTestsets = "0.1" Sundials = "4.14" -SymbolicUtils = "1" -Downloads = "1" +SymbolicUtils = "2" Test = "1" julia = "1.10" From 2d0c1f807b10f47a3728b520d1e111bbc0e92d24 Mon Sep 17 00:00:00 2001 From: paulflang Date: Wed, 26 Jun 2024 15:57:57 +0200 Subject: [PATCH 4/5] fix istree deprecation warning --- Project.toml | 2 +- src/reactions.jl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Project.toml b/Project.toml index d66893f..d298d37 100644 --- a/Project.toml +++ b/Project.toml @@ -21,7 +21,7 @@ SBML = "1.4.4" SBMLToolkitTestSuite = "0.0.3" SafeTestsets = "0.1" Sundials = "4.14" -SymbolicUtils = "2" +SymbolicUtils = "1, 2" Test = "1" julia = "1.10" diff --git a/src/reactions.jl b/src/reactions.jl index 1bed3cb..8380479 100644 --- a/src/reactions.jl +++ b/src/reactions.jl @@ -163,7 +163,7 @@ Get rate constant of mass action kineticLaws function get_massaction(kl::Num, reactants::Union{Vector{Num}, Nothing}, stoich::Union{Vector{<:Real}, Nothing}) function check_args(x::SymbolicUtils.BasicSymbolic{Real}) - check_args(Val(SymbolicUtils.iscall(x)), x) + check_args(Val(SymbolicUtils.TermInterface.iscall(x)), x) end function check_args(::Val{true}, x::SymbolicUtils.BasicSymbolic{Real}) From df0b5f622f006cc351826a2ba18e85a254660c66 Mon Sep 17 00:00:00 2001 From: paulflang Date: Wed, 26 Jun 2024 21:13:09 +0200 Subject: [PATCH 5/5] pass tests despite warnings --- src/reactions.jl | 2 +- test/systems.jl | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/reactions.jl b/src/reactions.jl index 8380479..86e3409 100644 --- a/src/reactions.jl +++ b/src/reactions.jl @@ -163,7 +163,7 @@ Get rate constant of mass action kineticLaws function get_massaction(kl::Num, reactants::Union{Vector{Num}, Nothing}, stoich::Union{Vector{<:Real}, Nothing}) function check_args(x::SymbolicUtils.BasicSymbolic{Real}) - check_args(Val(SymbolicUtils.TermInterface.iscall(x)), x) + check_args(Val(SymbolicUtils.istree(x)), x) end function check_args(::Val{true}, x::SymbolicUtils.BasicSymbolic{Real}) diff --git a/test/systems.jl b/test/systems.jl index 75f09ec..2fe458d 100644 --- a/test/systems.jl +++ b/test/systems.jl @@ -74,8 +74,8 @@ rs = ReactionSystem(MODEL2) # Contains reversible reaction @test isequal(Catalyst.get_states(rs), [s1]) @test isequal(Catalyst.get_ps(rs), [k1, c1]) -@test_nowarn convert(ModelingToolkit.ODESystem, rs) -@test_nowarn structural_simplify(convert(ModelingToolkit.ODESystem, rs)) +@test convert(ModelingToolkit.ODESystem, rs) isa ODESystem +@test structural_simplify(convert(ModelingToolkit.ODESystem, rs)) isa ODESystem # Test ODESystem constructor odesys = ODESystem(MODEL1) @@ -89,7 +89,7 @@ par = [k1 => 1.0, c1 => 2.0] @test isequal(ModelingToolkit.defaults(odesys), ModelingToolkit._merge(u0, par)) # PL: @Anand: for some reason this does not work with `Catalyst.get_default()` @named odesys = ODESystem(MODEL1) isequal(nameof(odesys), :odesys) -@test_nowarn structural_simplify(odesys) +@test structural_simplify(odesys) isa ODESystem odesys = ODESystem(readSBML(sbmlfile)) m = readSBML(sbmlfile) @@ -106,7 +106,7 @@ par = [k1 => 1.0, c1 => 2.0] @named odesys = ODESystem(MODEL1) isequal(nameof(odesys), :odesys) -@test_nowarn ODEProblem(odesys, [], [0.0, 1.0], []) +@test ODEProblem(odesys, [], [0.0, 1.0], []) isa ODEProblem # # Test ODEProblem # oprob = ODEProblem(ODESystem(MODEL1), [], [0.0, 1.0], [])