robertvi / SBMLShowcase

OSB showcase of interactions between SBML and NeuroML
http://www.opensourcebrain.org/projects/sbmlshowcase
0 stars 1 forks source link

set entry format dynamically in create_omex function #3

Closed stellaprins closed 2 months ago

stellaprins commented 4 months ago

create_omex function has some hardcoded bits that cause issues for running in biosimulator.

robertvi commented 4 months ago

create_omex needs to use libsbml to get the sbml version from the sbml file and then set the appropriate version in the omex manifest entry, something like:


reader = SBMLReader()
doc = reader.readSBML("my_model.sbml")
ver = doc.getVersion()```
stellaprins commented 4 months ago

I've added a get_entry_format function so that entry format can be set dynamically in create_omex function. See commit here.

To double check whether the created omex file was valid I ran it on https://biosimulators.org.

Simulation Run Details Name: test_minimal_omex_new_tellurium Id: #664462d607f7ec6378913b6f Simulator: tellurium 2.2.8 CPU cores: 1 RAM: 8 GB Max time: 20 m Submitted: 2024-05-15 08:23:03 AM Updated: 2024-05-15 08:23:24 AM Status: Succeeded

stellaprins commented 4 months ago

I still get this error when I am creating the minimal omex file. The error was there too before I changed anything.

The COMBINE/OMEX did not execute successfully: The SED document did not execute successfully: [Errno 17] File exists: '/root/out/LEMS_NML2_Ex9_FN.sedml'

robertvi commented 3 months ago

It seems that biosimulators wants to create a new directory called /root/out/LEMS_NML2_Ex9_FN.sedml in the container filesystem, which will map straight on top of the input sedml file if you try to use the same folder as the input and output directories for the docker call. In this new output folder it will put various output files. Therefore this is solved in my new branch which separates the input and output folders (https://github.com/robertvi/SBMLShowcase/tree/separate_input_output_dirs)

robertvi commented 3 months ago

@stellaprins should we close this issue now?