finsberg / gotranx

Next generation ODE translator
https://finsberg.github.io/gotranx
MIT License
8 stars 1 forks source link

SBML to MATLAB? #149

Open hsauro opened 1 month ago

hsauro commented 1 month ago

Do you have any plans to convert SBML to MATLAB? I’d love to be able to run a python script that could do that.

finsberg commented 1 month ago

Hi @hsauro, thanks for your request. I don't have any plan to do it right now, but this is definitely something we would like to support in the future. What needs to happen is

  1. Implement an adapter for SBML via MyoKit. If you take a look at these lines: https://github.com/finsberg/gotranx/blob/main/src/gotranx/myokit.py#L292-L321 you see how I do the conversion to and from CellML. Similarly we can do this for any format that is supported through MyoKit, e.g SBML. This is a rather simple task and PRs are welcomed.
  2. We need to implement a code generator for Matlab. This is more work but definitely something we want to do.
hsauro commented 1 month ago

Thanks for getting back. If you do pursue this project I would use the python bindings to libsbml and use that in myokit. There is also another python package called simpleSBML which I wrote that sits on libsbml that is easier to use. If you're thinking of doing this project let me know as we can advise you on libsbml if need be, as well as doing some testing for you. There are a lot of SBML users so I think you'd get usage out of your tool.