diff --git a/.github/workflows/non-omv.yml b/.github/workflows/non-omv.yml index f821bd9b..6c69b90e 100644 --- a/.github/workflows/non-omv.yml +++ b/.github/workflows/non-omv.yml @@ -55,6 +55,12 @@ jobs: cd SBML ./test_biosimulators_docker.py + - name: test biosimulators compatibility table creation + run: | + cd SBML + sudo rm -rf output + python ./test_compatibility_biosimulators.py --output-dir=tmp_plots + - name: Test test_suite output regeneration run: | diff --git a/.gitignore b/.gitignore index 5fa12e25..af268f95 100644 --- a/.gitignore +++ b/.gitignore @@ -41,4 +41,5 @@ arm64 /BioModels/cache /BioModels/tmplocalfiles __pycache__ -venv \ No newline at end of file +venv +/SBML/.DS_Store diff --git a/Brian/BIOMD0000000184_LEMS_brian.py b/Brian/BIOMD0000000184_LEMS_brian.py index f633ef1f..a8d6e557 100644 --- a/Brian/BIOMD0000000184_LEMS_brian.py +++ b/Brian/BIOMD0000000184_LEMS_brian.py @@ -8,9 +8,9 @@ ''' ''' This Brian file has been generated by org.neuroml.export (see https://github.com/NeuroML/org.neuroml.export) - org.neuroml.export v1.10.0 - org.neuroml.model v1.10.0 - jLEMS v0.11.0 + org.neuroml.export v1.10.1 + org.neuroml.model v1.10.1 + jLEMS v0.11.1 ''' from brian import * diff --git a/Brian/BIOMD0000000184_LEMS_brian2.py b/Brian/BIOMD0000000184_LEMS_brian2.py index 6cbbbc78..6f9e3f71 100644 --- a/Brian/BIOMD0000000184_LEMS_brian2.py +++ b/Brian/BIOMD0000000184_LEMS_brian2.py @@ -8,9 +8,9 @@ ''' ''' This Brian file has been generated by org.neuroml.export (see https://github.com/NeuroML/org.neuroml.export) - org.neuroml.export v1.10.0 - org.neuroml.model v1.10.0 - jLEMS v0.11.0 + org.neuroml.export v1.10.1 + org.neuroml.model v1.10.1 + jLEMS v0.11.1 ''' from brian2 import * diff --git a/NEURON/BIOMD0000000184_LEMS_nrn.py b/NEURON/BIOMD0000000184_LEMS_nrn.py index 5b01f436..138198ab 100644 --- a/NEURON/BIOMD0000000184_LEMS_nrn.py +++ b/NEURON/BIOMD0000000184_LEMS_nrn.py @@ -7,9 +7,9 @@ This NEURON file has been generated by org.neuroml.export (see https://github.com/NeuroML/org.neuroml.export) - org.neuroml.export v1.10.0 - org.neuroml.model v1.10.0 - jLEMS v0.11.0 + org.neuroml.export v1.10.1 + org.neuroml.model v1.10.1 + jLEMS v0.11.1 ''' diff --git a/NEURON/Lavrentovich2008_Ca_Oscillations_0.mod b/NEURON/Lavrentovich2008_Ca_Oscillations_0.mod index 22b21d73..3917c05c 100644 --- a/NEURON/Lavrentovich2008_Ca_Oscillations_0.mod +++ b/NEURON/Lavrentovich2008_Ca_Oscillations_0.mod @@ -3,9 +3,9 @@ TITLE Mod file for component: Component(id=Lavrentovich2008_Ca_Oscillations_0 ty COMMENT This NEURON file has been generated by org.neuroml.export (see https://github.com/NeuroML/org.neuroml.export) - org.neuroml.export v1.10.0 - org.neuroml.model v1.10.0 - jLEMS v0.11.0 + org.neuroml.export v1.10.1 + org.neuroml.model v1.10.1 + jLEMS v0.11.1 ENDCOMMENT diff --git a/SBML/LEMS_NML2_Ex9_FN.sbml b/SBML/LEMS_NML2_Ex9_FN.sbml index 80eb43a6..8cdd1edd 100644 --- a/SBML/LEMS_NML2_Ex9_FN.sbml +++ b/SBML/LEMS_NML2_Ex9_FN.sbml @@ -4,9 +4,9 @@

This SBML file has been generated by org.neuroml.export (see https://github.com/NeuroML/org.neuroml.export) - org.neuroml.export v1.10.0 - org.neuroml.model v1.10.0 - jLEMS v0.11.0 + org.neuroml.export v1.10.1 + org.neuroml.model v1.10.1 + jLEMS v0.11.1 Export of model: Components: diff --git a/SBML/LEMS_NML2_Ex9_FN.sedml b/SBML/LEMS_NML2_Ex9_FN.sedml index 95ac2849..b90dace8 100644 --- a/SBML/LEMS_NML2_Ex9_FN.sedml +++ b/SBML/LEMS_NML2_Ex9_FN.sedml @@ -1,5 +1,5 @@ - +

diff --git a/SBML/LEMS_Regular_HindmarshRose.sbml b/SBML/LEMS_Regular_HindmarshRose.sbml index fe5c78da..fd204651 100644 --- a/SBML/LEMS_Regular_HindmarshRose.sbml +++ b/SBML/LEMS_Regular_HindmarshRose.sbml @@ -4,9 +4,9 @@

This SBML file has been generated by org.neuroml.export (see https://github.com/NeuroML/org.neuroml.export) - org.neuroml.export v1.10.0 - org.neuroml.model v1.10.0 - jLEMS v0.11.0 + org.neuroml.export v1.10.1 + org.neuroml.model v1.10.1 + jLEMS v0.11.1 Export of model: Components: diff --git a/SBML/LEMS_Regular_HindmarshRose.sedml b/SBML/LEMS_Regular_HindmarshRose.sedml index 98b5c8a2..b2810437 100644 --- a/SBML/LEMS_Regular_HindmarshRose.sedml +++ b/SBML/LEMS_Regular_HindmarshRose.sedml @@ -1,5 +1,5 @@ - +

diff --git a/SBML/d1_plots/amici_d1.pdf b/SBML/d1_plots/amici_d1.pdf new file mode 100644 index 00000000..72b7c733 Binary files /dev/null and b/SBML/d1_plots/amici_d1.pdf differ diff --git a/SBML/d1_plots/bionetgen_d1.pdf b/SBML/d1_plots/bionetgen_d1.pdf new file mode 100644 index 00000000..57481d34 Binary files /dev/null and b/SBML/d1_plots/bionetgen_d1.pdf differ diff --git a/SBML/d1_plots/boolnet_d1.pdf b/SBML/d1_plots/boolnet_d1.pdf new file mode 100644 index 00000000..0c673117 Binary files /dev/null and b/SBML/d1_plots/boolnet_d1.pdf differ diff --git a/SBML/d1_plots/cbmpy_d1.pdf b/SBML/d1_plots/cbmpy_d1.pdf new file mode 100644 index 00000000..bcfb118c Binary files /dev/null and b/SBML/d1_plots/cbmpy_d1.pdf differ diff --git a/SBML/d1_plots/cobrapy_d1.pdf b/SBML/d1_plots/cobrapy_d1.pdf new file mode 100644 index 00000000..e9588c7c Binary files /dev/null and b/SBML/d1_plots/cobrapy_d1.pdf differ diff --git a/SBML/d1_plots/copasi_d1.pdf b/SBML/d1_plots/copasi_d1.pdf new file mode 100644 index 00000000..88ca6799 Binary files /dev/null and b/SBML/d1_plots/copasi_d1.pdf differ diff --git a/SBML/d1_plots/gillespy2_d1.pdf b/SBML/d1_plots/gillespy2_d1.pdf new file mode 100644 index 00000000..1e32fd0f Binary files /dev/null and b/SBML/d1_plots/gillespy2_d1.pdf differ diff --git a/SBML/d1_plots/ginsim_d1.pdf b/SBML/d1_plots/ginsim_d1.pdf new file mode 100644 index 00000000..4262ce16 Binary files /dev/null and b/SBML/d1_plots/ginsim_d1.pdf differ diff --git a/SBML/d1_plots/libsbmlsim_d1.pdf b/SBML/d1_plots/libsbmlsim_d1.pdf new file mode 100644 index 00000000..307a3f11 Binary files /dev/null and b/SBML/d1_plots/libsbmlsim_d1.pdf differ diff --git a/SBML/d1_plots/masspy_d1.pdf b/SBML/d1_plots/masspy_d1.pdf new file mode 100644 index 00000000..96d03f9b Binary files /dev/null and b/SBML/d1_plots/masspy_d1.pdf differ diff --git a/SBML/d1_plots/pysces_d1.pdf b/SBML/d1_plots/pysces_d1.pdf new file mode 100644 index 00000000..eea56d0b Binary files /dev/null and b/SBML/d1_plots/pysces_d1.pdf differ diff --git a/SBML/d1_plots/rbapy_d1.pdf b/SBML/d1_plots/rbapy_d1.pdf new file mode 100644 index 00000000..c85a7915 Binary files /dev/null and b/SBML/d1_plots/rbapy_d1.pdf differ diff --git a/SBML/d1_plots/tellurium_d1.pdf b/SBML/d1_plots/tellurium_d1.pdf new file mode 100644 index 00000000..b63dd5df Binary files /dev/null and b/SBML/d1_plots/tellurium_d1.pdf differ diff --git a/SBML/results_compatibility_biosimulators.md b/SBML/results_compatibility_biosimulators.md new file mode 100644 index 00000000..c5cfc5bf --- /dev/null +++ b/SBML/results_compatibility_biosimulators.md @@ -0,0 +1,23 @@ +| Engine | pass/FAIL | Error | Compatibility | d1 | +|:-----------|:-----------------------------------------|:--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:-----------------------------------------------------------| +| amici | pass | |

passThe file extensions suggest the input file types are '['SBML', 'SED-ML']'. These are compatible with amici
| amici_d1.pdf | +| brian2 | FAIL |
DetailsNo module named 'libsbml'
|
passThe file extensions suggest the input file types are '['SBML', 'SED-ML']'. These are compatible with brian2
| | +| bionetgen | FAIL |
Details/usr/local/lib/python3.9/site-packages/biosimulators_utils/warnings.py:31:

BioSimulatorsWarning:

The SED document is potentially incorrect.
  • Model `net1` has warnings.
    - The model file `LEMS_NML2_Ex9_FN.sbml` has warnings.
    - 2 warnings of type SBML unit consistency (99505). The following is the first warning at line 40, column 12:
    - In situations where a mathematical expression contains literal numbers or parameters whose units have not been declared, it is not possible to verify accurately the consistency of the units in the expression.
    The units of the rateRule math expression '(V - pow(V, 3) / 3 - W + I) / SEC' cannot be fully checked. Unit consistency reported as either no errors or further unit errors related to this object may not be accurate.
    - 4 warnings of type Modeling practice (80701). The following is the first warning at line 32, column 12:
    - As a principle of best modeling practice, the units of a parameter should be declared rather than be left undefined. Doing so improves the ability of software to check the consistency of units and helps make it easier to detect potential errors in models.
    The parameter with the id 'I' does not have a 'units' attribute.


    /usr/local/lib/python3.9/site-packages/biosimulators_utils/warnings.py:31:

    BioSimulatorsWarning:

    The COMBINE/OMEX archive has warnings.
  • OMEX manifests should not contain content entries for themselves.
  • The SED-ML file at location `./tmp179064` has warnings.
    - Model `net1` has warnings.
    - The model file `LEMS_NML2_Ex9_FN.sbml` has warnings.
    - 2 warnings of type SBML unit consistency (99505). The following is the first warning at line 40, column 12:
    - In situations where a mathematical expression contains literal numbers or parameters whose units have not been declared, it is not possible to verify accurately the consistency of the units in the expression.
    The units of the rateRule math expression '(V - pow(V, 3) / 3 - W + I) / SEC' cannot be fully checked. Unit consistency reported as either no errors or further unit errors related to this object may not be accurate.
    - 4 warnings of type Modeling practice (80701). The following is the first warning at line 32, column 12:
    - As a principle of best modeling practice, the units of a parameter should be declared rather than be left undefined. Doing so improves the ability of software to check the consistency of units and helps make it easier to detect potential errors in models.
    The parameter with the id 'I' does not have a 'units' attribute.


    The COMBINE/OMEX did not execute successfully:

    The SED document did not execute successfully:

    Language for model `net1` is not supported.
    - Model language `urn:sedml:language:sbml` is not supported. Models must be in BNGL format (e.g., `sed:model/@language` must match `^urn:sedml:language:bngl(\.$)` such as `urn:sedml:language:bngl`).
  • |
    FAILThe file extensions suggest the input file types are '['SBML', 'SED-ML']'. Tese are not compatible with bionetgen. The following file types will be compatible ['BNGL', 'SED-ML']
    | bionetgen_d1.pdf | +| boolnet | FAIL |
    Details/usr/local/lib/python3.9/site-packages/biosimulators_utils/warnings.py:31:

    BioSimulatorsWarning:

    The SED document is potentially incorrect.
  • Model `net1` may be invalid.
    - The model file `LEMS_NML2_Ex9_FN.sbml` may be invalid.
    - In situations where a mathematical expression contains literal numbers or parameters whose units have not been declared, it is not possible to verify accurately the consistency of the units in the expression.
    The units of the rateRule math expression '(V - pow(V, 3) / 3 - W + I) / SEC' cannot be fully checked. Unit consistency reported as either no errors or further unit errors related to this object may not be accurate.

    - In situations where a mathematical expression contains literal numbers or parameters whose units have not been declared, it is not possible to verify accurately the consistency of the units in the expression.
    The units of the rateRule math expression '0.08 * (V + (0.7 - 0.8 * W)) / SEC' cannot be fully checked. Unit consistency reported as either no errors or further unit errors related to this object may not be accurate.

    - As a principle of best modeling practice, the units of a parameter should be declared rather than be left undefined. Doing so improves the ability of software to check the consistency of units and helps make it easier to detect potential errors in models.
    The parameter with the id 'I' does not have a 'units' attribute.

    - As a principle of best modeling practice, the units of a parameter should be declared rather than be left undefined. Doing so improves the ability of software to check the consistency of units and helps make it easier to detect potential errors in models.
    The parameter with the id 'SEC' does not have a 'units' attribute.

    - As a principle of best modeling practice, the units of a parameter should be declared rather than be left undefined. Doing so improves the ability of software to check the consistency of units and helps make it easier to detect potential errors in models.
    The parameter with the id 'V' does not have a 'units' attribute.

    - As a principle of best modeling practice, the units of a parameter should be declared rather than be left undefined. Doing so improves the ability of software to check the consistency of units and helps make it easier to detect potential errors in models.
    The parameter with the id 'W' does not have a 'units' attribute.



    /usr/local/lib/python3.9/site-packages/biosimulators_utils/warnings.py:31:

    BioSimulatorsWarning:

    The COMBINE/OMEX archive may be invalid.
  • OMEX manifests should not contain content entries for themselves.
  • The SED-ML file at location `./tmp515819` may be invalid.
    - Model `net1` may be invalid.
    - The model file `LEMS_NML2_Ex9_FN.sbml` may be invalid.
    - In situations where a mathematical expression contains literal numbers or parameters whose units have not been declared, it is not possible to verify accurately the consistency of the units in the expression.
    The units of the rateRule math expression '(V - pow(V, 3) / 3 - W + I) / SEC' cannot be fully checked. Unit consistency reported as either no errors or further unit errors related to this object may not be accurate.

    - In situations where a mathematical expression contains literal numbers or parameters whose units have not been declared, it is not possible to verify accurately the consistency of the units in the expression.
    The units of the rateRule math expression '0.08 * (V + (0.7 - 0.8 * W)) / SEC' cannot be fully checked. Unit consistency reported as either no errors or further unit errors related to this object may not be accurate.

    - As a principle of best modeling practice, the units of a parameter should be declared rather than be left undefined. Doing so improves the ability of software to check the consistency of units and helps make it easier to detect potential errors in models.
    The parameter with the id 'I' does not have a 'units' attribute.

    - As a principle of best modeling practice, the units of a parameter should be declared rather than be left undefined. Doing so improves the ability of software to check the consistency of units and helps make it easier to detect potential errors in models.
    The parameter with the id 'SEC' does not have a 'units' attribute.

    - As a principle of best modeling practice, the units of a parameter should be declared rather than be left undefined. Doing so improves the ability of software to check the consistency of units and helps make it easier to detect potential errors in models.
    The parameter with the id 'V' does not have a 'units' attribute.

    - As a principle of best modeling practice, the units of a parameter should be declared rather than be left undefined. Doing so improves the ability of software to check the consistency of units and helps make it easier to detect potential errors in models.
    The parameter with the id 'W' does not have a 'units' attribute.



    The COMBINE/OMEX did not execute successfully:

    The SED document did not execute successfully:

    Simulation `sim1` is invalid.
    - Number of points (20000) must be equal to the difference between the output end (200.0) and start times (0.0).
    R[write to console]: Warning message:

    R[write to console]: In (function (package, help, pos = 2, lib.loc = NULL, character.only = FALSE, :
    R[write to console]:

    R[write to console]: library ‘/usr/lib/R/site-library’ contains no packages

  • |
    FAILThe file extensions suggest the input file types are '['SBML', 'SED-ML']'. Tese are not compatible with boolnet. The following file types will be compatible ['SBML-qual', 'SED-ML']
    | boolnet_d1.pdf | +| cbmpy | FAIL |
    Details
    INFO: No xlwt module available, Excel spreadsheet creation disabled



    No module named 'cplex'



    CPLEX not available

    *****
    Using GLPK
    *****


    INFO: No xlrd module available, Excel spreadsheet reading disabled

    CBMPy environment
    ******************
    Revision: r689


    ***********************************************************************
    * Welcome to CBMPy (0.7.25) - PySCeS Constraint Based Modelling *
    * http://cbmpy.sourceforge.net *
    * Copyright(C) Brett G. Olivier 2014 - 2019 *
    * Dept. of Systems Bioinformatics *
    * Vrije Universiteit Amsterdam, Amsterdam, The Netherlands *
    * CBMPy is developed as part of the BeBasic MetaToolKit Project *
    * Distributed under the GNU GPL v 3.0 licence, see *
    * LICENCE (supplied with this release) for details *
    ***********************************************************************

    /usr/local/lib/python3.9/site-packages/biosimulators_utils/warnings.py:31:

    BioSimulatorsWarning:

    The SED document is potentially incorrect.
  • Model `net1` has warnings.
    - The model file `LEMS_NML2_Ex9_FN.sbml` has warnings.
    - 2 warnings of type SBML unit consistency (99505). The following is the first warning at line 40, column 12:
    - In situations where a mathematical expression contains literal numbers or parameters whose units have not been declared, it is not possible to verify accurately the consistency of the units in the expression.
    The units of the rateRule math expression '(V - pow(V, 3) / 3 - W + I) / SEC' cannot be fully checked. Unit consistency reported as either no errors or further unit errors related to this object may not be accurate.
    - 4 warnings of type Modeling practice (80701). The following is the first warning at line 32, column 12:
    - As a principle of best modeling practice, the units of a parameter should be declared rather than be left undefined. Doing so improves the ability of software to check the consistency of units and helps make it easier to detect potential errors in models.
    The parameter with the id 'I' does not have a 'units' attribute.


    /usr/local/lib/python3.9/site-packages/biosimulators_utils/warnings.py:31:

    BioSimulatorsWarning:

    The COMBINE/OMEX archive has warnings.
  • OMEX manifests should not contain content entries for themselves.
  • The SED-ML file at location `./tmp133820` has warnings.
    - Model `net1` has warnings.
    - The model file `LEMS_NML2_Ex9_FN.sbml` has warnings.
    - 2 warnings of type SBML unit consistency (99505). The following is the first warning at line 40, column 12:
    - In situations where a mathematical expression contains literal numbers or parameters whose units have not been declared, it is not possible to verify accurately the consistency of the units in the expression.
    The units of the rateRule math expression '(V - pow(V, 3) / 3 - W + I) / SEC' cannot be fully checked. Unit consistency reported as either no errors or further unit errors related to this object may not be accurate.
    - 4 warnings of type Modeling practice (80701). The following is the first warning at line 32, column 12:
    - As a principle of best modeling practice, the units of a parameter should be declared rather than be left undefined. Doing so improves the ability of software to check the consistency of units and helps make it easier to detect potential errors in models.
    The parameter with the id 'I' does not have a 'units' attribute.


    The COMBINE/OMEX did not execute successfully:

    The SED document did not execute successfully:

    UniformTimeCourseSimulation `sim1` is not supported.
    - Simulation sim1 of type `UniformTimeCourseSimulation` is not supported. Simulation must be an instance of one of the following:
    - SteadyStateSimulation
  • |
    passThe file extensions suggest the input file types are '['SBML', 'SED-ML']'. These are compatible with cbmpy
    | cbmpy_d1.pdf | +| cobrapy | FAIL |
    Details/usr/local/lib/python3.9/site-packages/biosimulators_utils/warnings.py:31:

    BioSimulatorsWarning:

    The SED document is potentially incorrect.
  • Model `net1` has warnings.
    - The model file `LEMS_NML2_Ex9_FN.sbml` has warnings.
    - 2 warnings of type SBML unit consistency (99505). The following is the first warning at line 40, column 12:
    - In situations where a mathematical expression contains literal numbers or parameters whose units have not been declared, it is not possible to verify accurately the consistency of the units in the expression.
    The units of the rateRule math expression '(V - pow(V, 3) / 3 - W + I) / SEC' cannot be fully checked. Unit consistency reported as either no errors or further unit errors related to this object may not be accurate.
    - 4 warnings of type Modeling practice (80701). The following is the first warning at line 32, column 12:
    - As a principle of best modeling practice, the units of a parameter should be declared rather than be left undefined. Doing so improves the ability of software to check the consistency of units and helps make it easier to detect potential errors in models.
    The parameter with the id 'I' does not have a 'units' attribute.


    /usr/local/lib/python3.9/site-packages/biosimulators_utils/warnings.py:31:

    BioSimulatorsWarning:

    The COMBINE/OMEX archive has warnings.
  • OMEX manifests should not contain content entries for themselves.
  • The SED-ML file at location `./tmp818452` has warnings.
    - Model `net1` has warnings.
    - The model file `LEMS_NML2_Ex9_FN.sbml` has warnings.
    - 2 warnings of type SBML unit consistency (99505). The following is the first warning at line 40, column 12:
    - In situations where a mathematical expression contains literal numbers or parameters whose units have not been declared, it is not possible to verify accurately the consistency of the units in the expression.
    The units of the rateRule math expression '(V - pow(V, 3) / 3 - W + I) / SEC' cannot be fully checked. Unit consistency reported as either no errors or further unit errors related to this object may not be accurate.
    - 4 warnings of type Modeling practice (80701). The following is the first warning at line 32, column 12:
    - As a principle of best modeling practice, the units of a parameter should be declared rather than be left undefined. Doing so improves the ability of software to check the consistency of units and helps make it easier to detect potential errors in models.
    The parameter with the id 'I' does not have a 'units' attribute.


    The COMBINE/OMEX did not execute successfully:

    The SED document did not execute successfully:

    UniformTimeCourseSimulation `sim1` is not supported.
    - Simulation sim1 of type `UniformTimeCourseSimulation` is not supported. Simulation must be an instance of one of the following:
    - SteadyStateSimulation
  • |
    passThe file extensions suggest the input file types are '['SBML', 'SED-ML']'. These are compatible with cobrapy
    | cobrapy_d1.pdf | +| copasi | FAIL |
    Details/usr/local/lib/python3.9/site-packages/biosimulators_utils/warnings.py:31:

    BioSimulatorsWarning:

    The SED document is potentially incorrect.
  • Model `net1` has warnings.
    - The model file `LEMS_NML2_Ex9_FN.sbml` has warnings.
    - 2 warnings of type SBML unit consistency (99505). The following is the first warning at line 40, column 12:
    - In situations where a mathematical expression contains literal numbers or parameters whose units have not been declared, it is not possible to verify accurately the consistency of the units in the expression.
    The units of the rateRule math expression '(V - pow(V, 3) / 3 - W + I) / SEC' cannot be fully checked. Unit consistency reported as either no errors or further unit errors related to this object may not be accurate.
    - 4 warnings of type Modeling practice (80701). The following is the first warning at line 32, column 12:
    - As a principle of best modeling practice, the units of a parameter should be declared rather than be left undefined. Doing so improves the ability of software to check the consistency of units and helps make it easier to detect potential errors in models.
    The parameter with the id 'I' does not have a 'units' attribute.


    /usr/local/lib/python3.9/site-packages/biosimulators_utils/warnings.py:31:

    BioSimulatorsWarning:

    The COMBINE/OMEX archive has warnings.
  • OMEX manifests should not contain content entries for themselves.
  • The SED-ML file at location `./tmp443395` has warnings.
    - Model `net1` has warnings.
    - The model file `LEMS_NML2_Ex9_FN.sbml` has warnings.
    - 2 warnings of type SBML unit consistency (99505). The following is the first warning at line 40, column 12:
    - In situations where a mathematical expression contains literal numbers or parameters whose units have not been declared, it is not possible to verify accurately the consistency of the units in the expression.
    The units of the rateRule math expression '(V - pow(V, 3) / 3 - W + I) / SEC' cannot be fully checked. Unit consistency reported as either no errors or further unit errors related to this object may not be accurate.
    - 4 warnings of type Modeling practice (80701). The following is the first warning at line 32, column 12:
    - As a principle of best modeling practice, the units of a parameter should be declared rather than be left undefined. Doing so improves the ability of software to check the consistency of units and helps make it easier to detect potential errors in models.
    The parameter with the id 'I' does not have a 'units' attribute.


    The COMBINE/OMEX did not execute successfully:

    The SED document did not execute successfully:

    could not convert string to float: 'Values[W]'
  • |
    passThe file extensions suggest the input file types are '['SBML', 'SED-ML']'. These are compatible with copasi
    | copasi_d1.pdf | +| gillespy2 | pass | |
    passThe file extensions suggest the input file types are '['SBML', 'SED-ML']'. These are compatible with gillespy2
    | gillespy2_d1.pdf | +| ginsim | FAIL |
    Details/usr/local/lib/python3.9/site-packages/biosimulators_utils/warnings.py:31:

    BioSimulatorsWarning:

    The SED document is potentially incorrect.
  • Model `net1` may be invalid.
    - The model file `LEMS_NML2_Ex9_FN.sbml` may be invalid.
    - In situations where a mathematical expression contains literal numbers or parameters whose units have not been declared, it is not possible to verify accurately the consistency of the units in the expression.
    The units of the rateRule math expression '(V - pow(V, 3) / 3 - W + I) / SEC' cannot be fully checked. Unit consistency reported as either no errors or further unit errors related to this object may not be accurate.

    - In situations where a mathematical expression contains literal numbers or parameters whose units have not been declared, it is not possible to verify accurately the consistency of the units in the expression.
    The units of the rateRule math expression '0.08 * (V + (0.7 - 0.8 * W)) / SEC' cannot be fully checked. Unit consistency reported as either no errors or further unit errors related to this object may not be accurate.

    - As a principle of best modeling practice, the units of a parameter should be declared rather than be left undefined. Doing so improves the ability of software to check the consistency of units and helps make it easier to detect potential errors in models.
    The parameter with the id 'I' does not have a 'units' attribute.

    - As a principle of best modeling practice, the units of a parameter should be declared rather than be left undefined. Doing so improves the ability of software to check the consistency of units and helps make it easier to detect potential errors in models.
    The parameter with the id 'SEC' does not have a 'units' attribute.

    - As a principle of best modeling practice, the units of a parameter should be declared rather than be left undefined. Doing so improves the ability of software to check the consistency of units and helps make it easier to detect potential errors in models.
    The parameter with the id 'V' does not have a 'units' attribute.

    - As a principle of best modeling practice, the units of a parameter should be declared rather than be left undefined. Doing so improves the ability of software to check the consistency of units and helps make it easier to detect potential errors in models.
    The parameter with the id 'W' does not have a 'units' attribute.



    /usr/local/lib/python3.9/site-packages/biosimulators_utils/warnings.py:31:

    BioSimulatorsWarning:

    The COMBINE/OMEX archive may be invalid.
  • OMEX manifests should not contain content entries for themselves.
  • The SED-ML file at location `./tmp737874` may be invalid.
    - Model `net1` may be invalid.
    - The model file `LEMS_NML2_Ex9_FN.sbml` may be invalid.
    - In situations where a mathematical expression contains literal numbers or parameters whose units have not been declared, it is not possible to verify accurately the consistency of the units in the expression.
    The units of the rateRule math expression '(V - pow(V, 3) / 3 - W + I) / SEC' cannot be fully checked. Unit consistency reported as either no errors or further unit errors related to this object may not be accurate.

    - In situations where a mathematical expression contains literal numbers or parameters whose units have not been declared, it is not possible to verify accurately the consistency of the units in the expression.
    The units of the rateRule math expression '0.08 * (V + (0.7 - 0.8 * W)) / SEC' cannot be fully checked. Unit consistency reported as either no errors or further unit errors related to this object may not be accurate.

    - As a principle of best modeling practice, the units of a parameter should be declared rather than be left undefined. Doing so improves the ability of software to check the consistency of units and helps make it easier to detect potential errors in models.
    The parameter with the id 'I' does not have a 'units' attribute.

    - As a principle of best modeling practice, the units of a parameter should be declared rather than be left undefined. Doing so improves the ability of software to check the consistency of units and helps make it easier to detect potential errors in models.
    The parameter with the id 'SEC' does not have a 'units' attribute.

    - As a principle of best modeling practice, the units of a parameter should be declared rather than be left undefined. Doing so improves the ability of software to check the consistency of units and helps make it easier to detect potential errors in models.
    The parameter with the id 'V' does not have a 'units' attribute.

    - As a principle of best modeling practice, the units of a parameter should be declared rather than be left undefined. Doing so improves the ability of software to check the consistency of units and helps make it easier to detect potential errors in models.
    The parameter with the id 'W' does not have a 'units' attribute.



    The COMBINE/OMEX did not execute successfully:

    The SED document did not execute successfully:

    Simulation `sim1` is invalid.
    - The interval between the output start and time time must be an integer multiple of the number of steps, not `0.01`:
    Output start time: 0.0
    Output end time: 200.0
    Number of steps: 20000
  • |
    FAILThe file extensions suggest the input file types are '['SBML', 'SED-ML']'. Tese are not compatible with ginsim. The following file types will be compatible ['SBML-qual', 'SED-ML']
    | ginsim_d1.pdf | +| libsbmlsim | pass | |
    passThe file extensions suggest the input file types are '['SBML', 'SED-ML']'. These are compatible with libsbmlsim
    | libsbmlsim_d1.pdf | +| masspy | FAIL |
    Details/usr/local/lib/python3.9/site-packages/biosimulators_utils/warnings.py:31 

    BioSimulatorsWarning:

    The SED document is potentially incorrect.
  • Model `net1` has warnings.
    - The model file `LEMS_NML2_Ex9_FN.sbml` has warnings.
    - 2 warnings of type SBML unit consistency (99505). The following is the first warning at line 40, column 12:
    - In situations where a mathematical expression contains literal numbers or parameters whose units have not been declared, it is not possible to verify accurately the consistency of the units in the expression.
    The units of the rateRule math expression '(V - pow(V, 3) / 3 - W + I) / SEC' cannot be fully checked. Unit consistency reported as either no errors or further unit errors related to this object may not be accurate.
    - 4 warnings of type Modeling practice (80701). The following is the first warning at line 32, column 12:
    - As a principle of best modeling practice, the units of a parameter should be declared rather than be left undefined. Doing so improves the ability of software to check the consistency of units and helps make it easier to detect potential errors in models.
    The parameter with the id 'I' does not have a 'units' attribute.
    /usr/local/lib/python3.9/site-packages/biosimulators_utils/warnings.py:31 

    BioSimulatorsWarning:

    The COMBINE/OMEX archive has warnings.
  • OMEX manifests should not contain content entries for themselves.
  • The SED-ML file at location `./tmp539402` has warnings.
    - Model `net1` has warnings.
    - The model file `LEMS_NML2_Ex9_FN.sbml` has warnings.
    - 2 warnings of type SBML unit consistency (99505). The following is the first warning at line 40, column 12:
    - In situations where a mathematical expression contains literal numbers or parameters whose units have not been declared, it is not possible to verify accurately the consistency of the units in the expression.
    The units of the rateRule math expression '(V - pow(V, 3) / 3 - W + I) / SEC' cannot be fully checked. Unit consistency reported as either no errors or further unit errors related to this object may not be accurate.
    - 4 warnings of type Modeling practice (80701). The following is the first warning at line 32, column 12:
    - As a principle of best modeling practice, the units of a parameter should be declared rather than be left undefined. Doing so improves the ability of software to check the consistency of units and helps make it easier to detect potential errors in models.
    The parameter with the id 'I' does not have a 'units' attribute.
    The COMBINE/OMEX did not execute successfully:

    The SED document did not execute successfully:

    Something went wrong reading the SBML model. Most likely the SBML model is not valid. Please check that your model is valid using the `mass.io.sbml.validate_sbml_model` function or via the online validator at http://sbml.org/validator .
    `(model, errors) = validate_sbml_model(filename)`
    If the model is valid and cannot be read please open an issue at https://github.com/SBRG/masspy/issues .
  • |
    passThe file extensions suggest the input file types are '['SBML', 'SED-ML']'. These are compatible with masspy
    | masspy_d1.pdf | +| netpyne | FAIL |
    DetailsNo module named 'libsbml'
    |
    passThe file extensions suggest the input file types are '['SBML', 'SED-ML']'. These are compatible with netpyne
    | | +| neuron | FAIL |
    DetailsNo module named 'libsbml'
    |
    FAILThe file extensions suggest the input file types are '['SBML', 'SED-ML']'. Tese are not compatible with neuron. The following file types will be compatible ['LEMS', 'NeuroML', 'SED-ML']
    | | +| opencor | FAIL |
    DetailsNo module named 'libsbml'
    |
    passThe file extensions suggest the input file types are '['SBML', 'SED-ML']'. These are compatible with opencor
    | | +| pyneuroml | FAIL |
    DetailsNo module named 'libsbml'
    |
    FAILThe file extensions suggest the input file types are '['SBML', 'SED-ML']'. Tese are not compatible with pyneuroml. The following file types will be compatible ['LEMS', 'NeuroML', 'SED-ML']
    | | +| pysces | FAIL |
    DetailsCould not find GLIMDA.
    /usr/local/lib/python3.10/site-packages/biosimulators_utils/warnings.py:31:

    BioSimulatorsWarning:

    The SED document is potentially incorrect.
  • Model `net1` has warnings.
    - The model file `LEMS_NML2_Ex9_FN.sbml` has warnings.
    - 2 warnings of type SBML unit consistency (99505). The following is the first warning at line 40, column 12:
    - In situations where a mathematical expression contains literal numbers or parameters whose units have not been declared, it is not possible to verify accurately the consistency of the units in the expression.
    The units of the rateRule math expression '(V - pow(V, 3) / 3 - W + I) / SEC' cannot be fully checked. Unit consistency reported as either no errors or further unit errors related to this object may not be accurate.
    - 4 warnings of type Modeling practice (80701). The following is the first warning at line 32, column 12:
    - As a principle of best modeling practice, the units of a parameter should be declared rather than be left undefined. Doing so improves the ability of software to check the consistency of units and helps make it easier to detect potential errors in models.
    The parameter with the id 'I' does not have a 'units' attribute.


    /usr/local/lib/python3.10/site-packages/biosimulators_utils/warnings.py:31:

    BioSimulatorsWarning:

    The COMBINE/OMEX archive has warnings.
  • OMEX manifests should not contain content entries for themselves.
  • The SED-ML file at location `./tmp82785` has warnings.
    - Model `net1` has warnings.
    - The model file `LEMS_NML2_Ex9_FN.sbml` has warnings.
    - 2 warnings of type SBML unit consistency (99505). The following is the first warning at line 40, column 12:
    - In situations where a mathematical expression contains literal numbers or parameters whose units have not been declared, it is not possible to verify accurately the consistency of the units in the expression.
    The units of the rateRule math expression '(V - pow(V, 3) / 3 - W + I) / SEC' cannot be fully checked. Unit consistency reported as either no errors or further unit errors related to this object may not be accurate.
    - 4 warnings of type Modeling practice (80701). The following is the first warning at line 32, column 12:
    - As a principle of best modeling practice, the units of a parameter should be declared rather than be left undefined. Doing so improves the ability of software to check the consistency of units and helps make it easier to detect potential errors in models.
    The parameter with the id 'I' does not have a 'units' attribute.


    The COMBINE/OMEX did not execute successfully:

    The SED document did not execute successfully:

    Model at /tmp/tmpd0feybh_/./LEMS_NML2_Ex9_FN.sbml could not be imported:

    File /tmp/tmpd0feybh_/./LEMS_NML2_Ex9_FN.sbml.xml does not exist
  • |
    passThe file extensions suggest the input file types are '['SBML', 'SED-ML']'. These are compatible with pysces
    | pysces_d1.pdf | +| rbapy | FAIL |
    Details/usr/local/lib/python3.9/site-packages/biosimulators_utils/warnings.py:31:

    BioSimulatorsWarning:

    The SED document is potentially incorrect.
  • Model `net1` may be invalid.
    - The model file `LEMS_NML2_Ex9_FN.sbml` may be invalid.
    - In situations where a mathematical expression contains literal numbers or parameters whose units have not been declared, it is not possible to verify accurately the consistency of the units in the expression.
    The units of the rateRule math expression '(V - pow(V, 3) / 3 - W + I) / SEC' cannot be fully checked. Unit consistency reported as either no errors or further unit errors related to this object may not be accurate.

    - In situations where a mathematical expression contains literal numbers or parameters whose units have not been declared, it is not possible to verify accurately the consistency of the units in the expression.
    The units of the rateRule math expression '0.08 * (V + (0.7 - 0.8 * W)) / SEC' cannot be fully checked. Unit consistency reported as either no errors or further unit errors related to this object may not be accurate.

    - As a principle of best modeling practice, the units of a parameter should be declared rather than be left undefined. Doing so improves the ability of software to check the consistency of units and helps make it easier to detect potential errors in models.
    The parameter with the id 'I' does not have a 'units' attribute.

    - As a principle of best modeling practice, the units of a parameter should be declared rather than be left undefined. Doing so improves the ability of software to check the consistency of units and helps make it easier to detect potential errors in models.
    The parameter with the id 'SEC' does not have a 'units' attribute.

    - As a principle of best modeling practice, the units of a parameter should be declared rather than be left undefined. Doing so improves the ability of software to check the consistency of units and helps make it easier to detect potential errors in models.
    The parameter with the id 'V' does not have a 'units' attribute.

    - As a principle of best modeling practice, the units of a parameter should be declared rather than be left undefined. Doing so improves the ability of software to check the consistency of units and helps make it easier to detect potential errors in models.
    The parameter with the id 'W' does not have a 'units' attribute.



    /usr/local/lib/python3.9/site-packages/biosimulators_utils/warnings.py:31:

    BioSimulatorsWarning:

    The COMBINE/OMEX archive may be invalid.
  • OMEX manifests should not contain content entries for themselves.
  • The SED-ML file at location `./tmp129913` may be invalid.
    - Model `net1` may be invalid.
    - The model file `LEMS_NML2_Ex9_FN.sbml` may be invalid.
    - In situations where a mathematical expression contains literal numbers or parameters whose units have not been declared, it is not possible to verify accurately the consistency of the units in the expression.
    The units of the rateRule math expression '(V - pow(V, 3) / 3 - W + I) / SEC' cannot be fully checked. Unit consistency reported as either no errors or further unit errors related to this object may not be accurate.

    - In situations where a mathematical expression contains literal numbers or parameters whose units have not been declared, it is not possible to verify accurately the consistency of the units in the expression.
    The units of the rateRule math expression '0.08 * (V + (0.7 - 0.8 * W)) / SEC' cannot be fully checked. Unit consistency reported as either no errors or further unit errors related to this object may not be accurate.

    - As a principle of best modeling practice, the units of a parameter should be declared rather than be left undefined. Doing so improves the ability of software to check the consistency of units and helps make it easier to detect potential errors in models.
    The parameter with the id 'I' does not have a 'units' attribute.

    - As a principle of best modeling practice, the units of a parameter should be declared rather than be left undefined. Doing so improves the ability of software to check the consistency of units and helps make it easier to detect potential errors in models.
    The parameter with the id 'SEC' does not have a 'units' attribute.

    - As a principle of best modeling practice, the units of a parameter should be declared rather than be left undefined. Doing so improves the ability of software to check the consistency of units and helps make it easier to detect potential errors in models.
    The parameter with the id 'V' does not have a 'units' attribute.

    - As a principle of best modeling practice, the units of a parameter should be declared rather than be left undefined. Doing so improves the ability of software to check the consistency of units and helps make it easier to detect potential errors in models.
    The parameter with the id 'W' does not have a 'units' attribute.



    The COMBINE/OMEX did not execute successfully:

    The SED document did not execute successfully:

    Language for model `net1` is not supported.
    - Model language `urn:sedml:language:sbml` is not supported. Models must be in RBA format (e.g., `sed:model/@language` must match `^urn:sedml:language:rba(\.$)` such as `urn:sedml:language:rba`).
  • |
    FAILThe file extensions suggest the input file types are '['SBML', 'SED-ML']'. Tese are not compatible with rbapy. The following file types will be compatible ['RBApy', 'SED-ML']
    | rbapy_d1.pdf | +| smoldyn | FAIL |
    Details[Errno 2] No such file or directory: '/tmp/tmpss9737_4/model.txt'
    |
    FAILsmoldyn compatible file types unknown.
    | | +| tellurium | pass | |
    passThe file extensions suggest the input file types are '['SBML', 'SED-ML']'. These are compatible with tellurium
    | tellurium_d1.pdf | +| vcell | FAIL |
    Details```Command '-i /root/in/LEMS_NML2_Ex9_FN_missing_xmlns.omex -o /root/out' in image 'ghcr.io/biosimulators/vcell' returned non-zero exit status 1: b' Root(root) OMEX_EXECUTE(LEMS_NML2_Ex9_FN_missing_xmlns.omex) PROCESSING_SEDML(preProcessDoc) **** Error: SED-ML processing for /tmp/vcell_temp_365be07b-5fd9-47bf-9fe9-8a37eb03827f17379398015478899102/tmp584011 failed with error: \n Root(root) OMEX_EXECUTE(LEMS_NML2_Ex9_FN_missing_xmlns.omex) SIMULATIONS_RUN(runSimulations) **** Error: \n Root(root) OMEX_EXECUTE(LEMS_NML2_Ex9_FN_missing_xmlns.omex) PROCESSING_SIMULATION_OUTPUTS(processOutputs) **** Error: Error processing outputs\n'```
    |
    FAILvcell compatible file types unknown.
    | | +| xpp | FAIL |
    DetailsNo module named 'libsbml'
    |
    FAILThe file extensions suggest the input file types are '['SBML', 'SED-ML']'. Tese are not compatible with xpp. The following file types will be compatible ['XPP', 'SED-ML']
    | | \ No newline at end of file diff --git a/SBML/test_compatibility_biosimulators.ipynb b/SBML/test_compatibility_biosimulators.ipynb new file mode 100644 index 00000000..11be933e --- /dev/null +++ b/SBML/test_compatibility_biosimulators.ipynb @@ -0,0 +1,217 @@ +{ + "cells": [ + { + "cell_type": "code", + "execution_count": 1, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "c:\\Users\\prins\\GitHub\\SBMLShowcase\\SBML\n" + ] + } + ], + "source": [ + "#!/usr/bin/env python\n", + "\n", + "'''\n", + "use pymetadata module to create a minimal valid combine archive\n", + "using LEMS_NML2_Ex9_FN.sbml and LEMS_NML2_Ex9_FN.sedml\n", + "'''\n", + "\n", + "import sys\n", + "sys.path.append(\"..\")\n", + "import utils\n", + "import os\n", + "import pandas as pd\n", + "from IPython.display import display_markdown\n", + "import shutil\n", + "\n", + "sbml_filepath = 'LEMS_NML2_Ex9_FN.sbml'\n", + "sedml_filepath = 'LEMS_NML2_Ex9_FN_missing_xmlns.sedml' #xmlns:sbml missing\n", + "\n", + "cwd = os.getcwd()\n", + "print(cwd)" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": {}, + "outputs": [], + "source": [ + "engines = utils.engines\n", + "types_dict = utils.types_dict" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Running amici\n", + "Running brian2\n", + "Running bionetgen\n", + "Running boolnet\n", + "Running cbmpy\n", + "Running cobrapy\n", + "Running copasi\n", + "Running gillespy2\n", + "Running ginsim\n", + "Running libsbmlsim\n", + "Running masspy\n", + "Running netpyne\n", + "Running neuron\n", + "Running opencor\n", + "Running pyneuroml\n", + "Running pysces\n", + "Running rbapy\n", + "Running smoldyn\n", + "Running tellurium\n", + "Running vcell\n", + "Running xpp\n", + "d1_plots\\amici_d1.pdf\n", + "d1_plots\\bionetgen_d1.pdf\n", + "d1_plots\\boolnet_d1.pdf\n", + "d1_plots\\cbmpy_d1.pdf\n", + "d1_plots\\cobrapy_d1.pdf\n", + "d1_plots\\copasi_d1.pdf\n", + "d1_plots\\gillespy2_d1.pdf\n", + "d1_plots\\ginsim_d1.pdf\n", + "d1_plots\\libsbmlsim_d1.pdf\n", + "d1_plots\\masspy_d1.pdf\n", + "d1_plots\\pysces_d1.pdf\n", + "d1_plots\\rbapy_d1.pdf\n", + "d1_plots\\tellurium_d1.pdf\n" + ] + } + ], + "source": [ + "engine_dict = {}\n", + "\n", + "output_folder = 'output'\n", + "\n", + "for e in engines.keys():\n", + " print('Running ' + e)\n", + " output_dir = os.path.abspath(os.path.join(output_folder, e))\n", + " try:\n", + " record = utils.run_biosimulators_docker(e, sedml_filepath, sbml_filepath, output_dir=output_dir)\n", + " engine_dict[e] = record\n", + " except Exception as error:\n", + " error_message = str(error)\n", + " print(f\"Error occurred while running {e}\")\n", + " engine_dict[e] = error_message\n", + " continue\n", + "\n", + "file_paths = utils.find_files(output_folder, '.pdf')\n", + "utils.move_d1_files(file_paths, 'd1_plots')\n", + "shutil.rmtree(output_folder)" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": {}, + "outputs": [ + { + "data": { + "text/markdown": [ + "| Engine | pass/FAIL | Error | Compatibility | d1 |\n", + "|:-----------|:-----------------------------------------|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:-----------------------------------------------------------|\n", + "| amici | pass | |
    passThe file extensions suggest the input file types are '['SBML', 'SED-ML']'. These are compatible with amici
    | amici_d1.pdf |\n", + "| brian2 | FAIL |
    DetailsNo module named 'libsbml'
    |
    passThe file extensions suggest the input file types are '['SBML', 'SED-ML']'. These are compatible with brian2
    | |\n", + "| bionetgen | FAIL |
    Details/usr/local/lib/python3.9/site-packages/biosimulators_utils/warnings.py:31:

    BioSimulatorsWarning:

    The SED document is potentially incorrect.
  • Model `net1` has warnings.
    - The model file `LEMS_NML2_Ex9_FN.sbml` has warnings.
    - 2 warnings of type SBML unit consistency (99505). The following is the first warning at line 40, column 12:
    - In situations where a mathematical expression contains literal numbers or parameters whose units have not been declared, it is not possible to verify accurately the consistency of the units in the expression.
    The units of the rateRule math expression '(V - pow(V, 3) / 3 - W + I) / SEC' cannot be fully checked. Unit consistency reported as either no errors or further unit errors related to this object may not be accurate.
    - 4 warnings of type Modeling practice (80701). The following is the first warning at line 32, column 12:
    - As a principle of best modeling practice, the units of a parameter should be declared rather than be left undefined. Doing so improves the ability of software to check the consistency of units and helps make it easier to detect potential errors in models.
    The parameter with the id 'I' does not have a 'units' attribute.


    /usr/local/lib/python3.9/site-packages/biosimulators_utils/warnings.py:31:

    BioSimulatorsWarning:

    The COMBINE/OMEX archive has warnings.
  • OMEX manifests should not contain content entries for themselves.
  • The SED-ML file at location `./tmp492978` has warnings.
    - Model `net1` has warnings.
    - The model file `LEMS_NML2_Ex9_FN.sbml` has warnings.
    - 2 warnings of type SBML unit consistency (99505). The following is the first warning at line 40, column 12:
    - In situations where a mathematical expression contains literal numbers or parameters whose units have not been declared, it is not possible to verify accurately the consistency of the units in the expression.
    The units of the rateRule math expression '(V - pow(V, 3) / 3 - W + I) / SEC' cannot be fully checked. Unit consistency reported as either no errors or further unit errors related to this object may not be accurate.
    - 4 warnings of type Modeling practice (80701). The following is the first warning at line 32, column 12:
    - As a principle of best modeling practice, the units of a parameter should be declared rather than be left undefined. Doing so improves the ability of software to check the consistency of units and helps make it easier to detect potential errors in models.
    The parameter with the id 'I' does not have a 'units' attribute.


    The COMBINE/OMEX did not execute successfully:

    The SED document did not execute successfully:

    Language for model `net1` is not supported.
    - Model language `urn:sedml:language:sbml` is not supported. Models must be in BNGL format (e.g., `sed:model/@language` must match `^urn:sedml:language:bngl(\\.$)` such as `urn:sedml:language:bngl`).
  • |
    FAILThe file extensions suggest the input file types are '['SBML', 'SED-ML']'. Tese are not compatible with bionetgen. The following file types will be compatible ['BNGL', 'SED-ML']
    | bionetgen_d1.pdf |\n", + "| boolnet | FAIL |
    Details/usr/local/lib/python3.9/site-packages/biosimulators_utils/warnings.py:31:

    BioSimulatorsWarning:

    The SED document is potentially incorrect.
  • Model `net1` may be invalid.
    - The model file `LEMS_NML2_Ex9_FN.sbml` may be invalid.
    - In situations where a mathematical expression contains literal numbers or parameters whose units have not been declared, it is not possible to verify accurately the consistency of the units in the expression.
    The units of the rateRule math expression '(V - pow(V, 3) / 3 - W + I) / SEC' cannot be fully checked. Unit consistency reported as either no errors or further unit errors related to this object may not be accurate.

    - In situations where a mathematical expression contains literal numbers or parameters whose units have not been declared, it is not possible to verify accurately the consistency of the units in the expression.
    The units of the rateRule math expression '0.08 * (V + (0.7 - 0.8 * W)) / SEC' cannot be fully checked. Unit consistency reported as either no errors or further unit errors related to this object may not be accurate.

    - As a principle of best modeling practice, the units of a parameter should be declared rather than be left undefined. Doing so improves the ability of software to check the consistency of units and helps make it easier to detect potential errors in models.
    The parameter with the id 'I' does not have a 'units' attribute.

    - As a principle of best modeling practice, the units of a parameter should be declared rather than be left undefined. Doing so improves the ability of software to check the consistency of units and helps make it easier to detect potential errors in models.
    The parameter with the id 'SEC' does not have a 'units' attribute.

    - As a principle of best modeling practice, the units of a parameter should be declared rather than be left undefined. Doing so improves the ability of software to check the consistency of units and helps make it easier to detect potential errors in models.
    The parameter with the id 'V' does not have a 'units' attribute.

    - As a principle of best modeling practice, the units of a parameter should be declared rather than be left undefined. Doing so improves the ability of software to check the consistency of units and helps make it easier to detect potential errors in models.
    The parameter with the id 'W' does not have a 'units' attribute.



    /usr/local/lib/python3.9/site-packages/biosimulators_utils/warnings.py:31:

    BioSimulatorsWarning:

    The COMBINE/OMEX archive may be invalid.
  • OMEX manifests should not contain content entries for themselves.
  • The SED-ML file at location `./tmp49383` may be invalid.
    - Model `net1` may be invalid.
    - The model file `LEMS_NML2_Ex9_FN.sbml` may be invalid.
    - In situations where a mathematical expression contains literal numbers or parameters whose units have not been declared, it is not possible to verify accurately the consistency of the units in the expression.
    The units of the rateRule math expression '(V - pow(V, 3) / 3 - W + I) / SEC' cannot be fully checked. Unit consistency reported as either no errors or further unit errors related to this object may not be accurate.

    - In situations where a mathematical expression contains literal numbers or parameters whose units have not been declared, it is not possible to verify accurately the consistency of the units in the expression.
    The units of the rateRule math expression '0.08 * (V + (0.7 - 0.8 * W)) / SEC' cannot be fully checked. Unit consistency reported as either no errors or further unit errors related to this object may not be accurate.

    - As a principle of best modeling practice, the units of a parameter should be declared rather than be left undefined. Doing so improves the ability of software to check the consistency of units and helps make it easier to detect potential errors in models.
    The parameter with the id 'I' does not have a 'units' attribute.

    - As a principle of best modeling practice, the units of a parameter should be declared rather than be left undefined. Doing so improves the ability of software to check the consistency of units and helps make it easier to detect potential errors in models.
    The parameter with the id 'SEC' does not have a 'units' attribute.

    - As a principle of best modeling practice, the units of a parameter should be declared rather than be left undefined. Doing so improves the ability of software to check the consistency of units and helps make it easier to detect potential errors in models.
    The parameter with the id 'V' does not have a 'units' attribute.

    - As a principle of best modeling practice, the units of a parameter should be declared rather than be left undefined. Doing so improves the ability of software to check the consistency of units and helps make it easier to detect potential errors in models.
    The parameter with the id 'W' does not have a 'units' attribute.



    The COMBINE/OMEX did not execute successfully:

    The SED document did not execute successfully:

    Simulation `sim1` is invalid.
    - Number of points (20000) must be equal to the difference between the output end (200.0) and start times (0.0).
    R[write to console]: Warning message:

    R[write to console]: In (function (package, help, pos = 2, lib.loc = NULL, character.only = FALSE, :
    R[write to console]:

    R[write to console]: library ‘/usr/lib/R/site-library’ contains no packages

  • |
    FAILThe file extensions suggest the input file types are '['SBML', 'SED-ML']'. Tese are not compatible with boolnet. The following file types will be compatible ['SBML-qual', 'SED-ML']
    | boolnet_d1.pdf |\n", + "| cbmpy | FAIL |
    Details
    INFO: No xlwt module available, Excel spreadsheet creation disabled



    No module named 'cplex'



    CPLEX not available

    *****
    Using GLPK
    *****


    INFO: No xlrd module available, Excel spreadsheet reading disabled

    CBMPy environment
    ******************
    Revision: r689


    ***********************************************************************
    * Welcome to CBMPy (0.7.25) - PySCeS Constraint Based Modelling *
    * http://cbmpy.sourceforge.net *
    * Copyright(C) Brett G. Olivier 2014 - 2019 *
    * Dept. of Systems Bioinformatics *
    * Vrije Universiteit Amsterdam, Amsterdam, The Netherlands *
    * CBMPy is developed as part of the BeBasic MetaToolKit Project *
    * Distributed under the GNU GPL v 3.0 licence, see *
    * LICENCE (supplied with this release) for details *
    ***********************************************************************

    /usr/local/lib/python3.9/site-packages/biosimulators_utils/warnings.py:31:

    BioSimulatorsWarning:

    The SED document is potentially incorrect.
  • Model `net1` has warnings.
    - The model file `LEMS_NML2_Ex9_FN.sbml` has warnings.
    - 2 warnings of type SBML unit consistency (99505). The following is the first warning at line 40, column 12:
    - In situations where a mathematical expression contains literal numbers or parameters whose units have not been declared, it is not possible to verify accurately the consistency of the units in the expression.
    The units of the rateRule math expression '(V - pow(V, 3) / 3 - W + I) / SEC' cannot be fully checked. Unit consistency reported as either no errors or further unit errors related to this object may not be accurate.
    - 4 warnings of type Modeling practice (80701). The following is the first warning at line 32, column 12:
    - As a principle of best modeling practice, the units of a parameter should be declared rather than be left undefined. Doing so improves the ability of software to check the consistency of units and helps make it easier to detect potential errors in models.
    The parameter with the id 'I' does not have a 'units' attribute.


    /usr/local/lib/python3.9/site-packages/biosimulators_utils/warnings.py:31:

    BioSimulatorsWarning:

    The COMBINE/OMEX archive has warnings.
  • OMEX manifests should not contain content entries for themselves.
  • The SED-ML file at location `./tmp882022` has warnings.
    - Model `net1` has warnings.
    - The model file `LEMS_NML2_Ex9_FN.sbml` has warnings.
    - 2 warnings of type SBML unit consistency (99505). The following is the first warning at line 40, column 12:
    - In situations where a mathematical expression contains literal numbers or parameters whose units have not been declared, it is not possible to verify accurately the consistency of the units in the expression.
    The units of the rateRule math expression '(V - pow(V, 3) / 3 - W + I) / SEC' cannot be fully checked. Unit consistency reported as either no errors or further unit errors related to this object may not be accurate.
    - 4 warnings of type Modeling practice (80701). The following is the first warning at line 32, column 12:
    - As a principle of best modeling practice, the units of a parameter should be declared rather than be left undefined. Doing so improves the ability of software to check the consistency of units and helps make it easier to detect potential errors in models.
    The parameter with the id 'I' does not have a 'units' attribute.


    The COMBINE/OMEX did not execute successfully:

    The SED document did not execute successfully:

    UniformTimeCourseSimulation `sim1` is not supported.
    - Simulation sim1 of type `UniformTimeCourseSimulation` is not supported. Simulation must be an instance of one of the following:
    - SteadyStateSimulation
  • |
    passThe file extensions suggest the input file types are '['SBML', 'SED-ML']'. These are compatible with cbmpy
    | cbmpy_d1.pdf |\n", + "| cobrapy | FAIL |
    Details/usr/local/lib/python3.9/site-packages/biosimulators_utils/warnings.py:31:

    BioSimulatorsWarning:

    The SED document is potentially incorrect.
  • Model `net1` has warnings.
    - The model file `LEMS_NML2_Ex9_FN.sbml` has warnings.
    - 2 warnings of type SBML unit consistency (99505). The following is the first warning at line 40, column 12:
    - In situations where a mathematical expression contains literal numbers or parameters whose units have not been declared, it is not possible to verify accurately the consistency of the units in the expression.
    The units of the rateRule math expression '(V - pow(V, 3) / 3 - W + I) / SEC' cannot be fully checked. Unit consistency reported as either no errors or further unit errors related to this object may not be accurate.
    - 4 warnings of type Modeling practice (80701). The following is the first warning at line 32, column 12:
    - As a principle of best modeling practice, the units of a parameter should be declared rather than be left undefined. Doing so improves the ability of software to check the consistency of units and helps make it easier to detect potential errors in models.
    The parameter with the id 'I' does not have a 'units' attribute.


    /usr/local/lib/python3.9/site-packages/biosimulators_utils/warnings.py:31:

    BioSimulatorsWarning:

    The COMBINE/OMEX archive has warnings.
  • OMEX manifests should not contain content entries for themselves.
  • The SED-ML file at location `./tmp968636` has warnings.
    - Model `net1` has warnings.
    - The model file `LEMS_NML2_Ex9_FN.sbml` has warnings.
    - 2 warnings of type SBML unit consistency (99505). The following is the first warning at line 40, column 12:
    - In situations where a mathematical expression contains literal numbers or parameters whose units have not been declared, it is not possible to verify accurately the consistency of the units in the expression.
    The units of the rateRule math expression '(V - pow(V, 3) / 3 - W + I) / SEC' cannot be fully checked. Unit consistency reported as either no errors or further unit errors related to this object may not be accurate.
    - 4 warnings of type Modeling practice (80701). The following is the first warning at line 32, column 12:
    - As a principle of best modeling practice, the units of a parameter should be declared rather than be left undefined. Doing so improves the ability of software to check the consistency of units and helps make it easier to detect potential errors in models.
    The parameter with the id 'I' does not have a 'units' attribute.


    The COMBINE/OMEX did not execute successfully:

    The SED document did not execute successfully:

    UniformTimeCourseSimulation `sim1` is not supported.
    - Simulation sim1 of type `UniformTimeCourseSimulation` is not supported. Simulation must be an instance of one of the following:
    - SteadyStateSimulation
  • |
    passThe file extensions suggest the input file types are '['SBML', 'SED-ML']'. These are compatible with cobrapy
    | cobrapy_d1.pdf |\n", + "| copasi | FAIL |
    Details/usr/local/lib/python3.9/site-packages/biosimulators_utils/warnings.py:31:

    BioSimulatorsWarning:

    The SED document is potentially incorrect.
  • Model `net1` has warnings.
    - The model file `LEMS_NML2_Ex9_FN.sbml` has warnings.
    - 2 warnings of type SBML unit consistency (99505). The following is the first warning at line 40, column 12:
    - In situations where a mathematical expression contains literal numbers or parameters whose units have not been declared, it is not possible to verify accurately the consistency of the units in the expression.
    The units of the rateRule math expression '(V - pow(V, 3) / 3 - W + I) / SEC' cannot be fully checked. Unit consistency reported as either no errors or further unit errors related to this object may not be accurate.
    - 4 warnings of type Modeling practice (80701). The following is the first warning at line 32, column 12:
    - As a principle of best modeling practice, the units of a parameter should be declared rather than be left undefined. Doing so improves the ability of software to check the consistency of units and helps make it easier to detect potential errors in models.
    The parameter with the id 'I' does not have a 'units' attribute.


    /usr/local/lib/python3.9/site-packages/biosimulators_utils/warnings.py:31:

    BioSimulatorsWarning:

    The COMBINE/OMEX archive has warnings.
  • OMEX manifests should not contain content entries for themselves.
  • The SED-ML file at location `./tmp380316` has warnings.
    - Model `net1` has warnings.
    - The model file `LEMS_NML2_Ex9_FN.sbml` has warnings.
    - 2 warnings of type SBML unit consistency (99505). The following is the first warning at line 40, column 12:
    - In situations where a mathematical expression contains literal numbers or parameters whose units have not been declared, it is not possible to verify accurately the consistency of the units in the expression.
    The units of the rateRule math expression '(V - pow(V, 3) / 3 - W + I) / SEC' cannot be fully checked. Unit consistency reported as either no errors or further unit errors related to this object may not be accurate.
    - 4 warnings of type Modeling practice (80701). The following is the first warning at line 32, column 12:
    - As a principle of best modeling practice, the units of a parameter should be declared rather than be left undefined. Doing so improves the ability of software to check the consistency of units and helps make it easier to detect potential errors in models.
    The parameter with the id 'I' does not have a 'units' attribute.


    The COMBINE/OMEX did not execute successfully:

    The SED document did not execute successfully:

    could not convert string to float: 'Values[V]'
  • |
    passThe file extensions suggest the input file types are '['SBML', 'SED-ML']'. These are compatible with copasi
    | copasi_d1.pdf |\n", + "| gillespy2 | pass | |
    passThe file extensions suggest the input file types are '['SBML', 'SED-ML']'. These are compatible with gillespy2
    | gillespy2_d1.pdf |\n", + "| ginsim | FAIL |
    Details/usr/local/lib/python3.9/site-packages/biosimulators_utils/warnings.py:31:

    BioSimulatorsWarning:

    The SED document is potentially incorrect.
  • Model `net1` may be invalid.
    - The model file `LEMS_NML2_Ex9_FN.sbml` may be invalid.
    - In situations where a mathematical expression contains literal numbers or parameters whose units have not been declared, it is not possible to verify accurately the consistency of the units in the expression.
    The units of the rateRule math expression '(V - pow(V, 3) / 3 - W + I) / SEC' cannot be fully checked. Unit consistency reported as either no errors or further unit errors related to this object may not be accurate.

    - In situations where a mathematical expression contains literal numbers or parameters whose units have not been declared, it is not possible to verify accurately the consistency of the units in the expression.
    The units of the rateRule math expression '0.08 * (V + (0.7 - 0.8 * W)) / SEC' cannot be fully checked. Unit consistency reported as either no errors or further unit errors related to this object may not be accurate.

    - As a principle of best modeling practice, the units of a parameter should be declared rather than be left undefined. Doing so improves the ability of software to check the consistency of units and helps make it easier to detect potential errors in models.
    The parameter with the id 'I' does not have a 'units' attribute.

    - As a principle of best modeling practice, the units of a parameter should be declared rather than be left undefined. Doing so improves the ability of software to check the consistency of units and helps make it easier to detect potential errors in models.
    The parameter with the id 'SEC' does not have a 'units' attribute.

    - As a principle of best modeling practice, the units of a parameter should be declared rather than be left undefined. Doing so improves the ability of software to check the consistency of units and helps make it easier to detect potential errors in models.
    The parameter with the id 'V' does not have a 'units' attribute.

    - As a principle of best modeling practice, the units of a parameter should be declared rather than be left undefined. Doing so improves the ability of software to check the consistency of units and helps make it easier to detect potential errors in models.
    The parameter with the id 'W' does not have a 'units' attribute.



    /usr/local/lib/python3.9/site-packages/biosimulators_utils/warnings.py:31:

    BioSimulatorsWarning:

    The COMBINE/OMEX archive may be invalid.
  • OMEX manifests should not contain content entries for themselves.
  • The SED-ML file at location `./tmp48023` may be invalid.
    - Model `net1` may be invalid.
    - The model file `LEMS_NML2_Ex9_FN.sbml` may be invalid.
    - In situations where a mathematical expression contains literal numbers or parameters whose units have not been declared, it is not possible to verify accurately the consistency of the units in the expression.
    The units of the rateRule math expression '(V - pow(V, 3) / 3 - W + I) / SEC' cannot be fully checked. Unit consistency reported as either no errors or further unit errors related to this object may not be accurate.

    - In situations where a mathematical expression contains literal numbers or parameters whose units have not been declared, it is not possible to verify accurately the consistency of the units in the expression.
    The units of the rateRule math expression '0.08 * (V + (0.7 - 0.8 * W)) / SEC' cannot be fully checked. Unit consistency reported as either no errors or further unit errors related to this object may not be accurate.

    - As a principle of best modeling practice, the units of a parameter should be declared rather than be left undefined. Doing so improves the ability of software to check the consistency of units and helps make it easier to detect potential errors in models.
    The parameter with the id 'I' does not have a 'units' attribute.

    - As a principle of best modeling practice, the units of a parameter should be declared rather than be left undefined. Doing so improves the ability of software to check the consistency of units and helps make it easier to detect potential errors in models.
    The parameter with the id 'SEC' does not have a 'units' attribute.

    - As a principle of best modeling practice, the units of a parameter should be declared rather than be left undefined. Doing so improves the ability of software to check the consistency of units and helps make it easier to detect potential errors in models.
    The parameter with the id 'V' does not have a 'units' attribute.

    - As a principle of best modeling practice, the units of a parameter should be declared rather than be left undefined. Doing so improves the ability of software to check the consistency of units and helps make it easier to detect potential errors in models.
    The parameter with the id 'W' does not have a 'units' attribute.



    The COMBINE/OMEX did not execute successfully:

    The SED document did not execute successfully:

    Simulation `sim1` is invalid.
    - The interval between the output start and time time must be an integer multiple of the number of steps, not `0.01`:
    Output start time: 0.0
    Output end time: 200.0
    Number of steps: 20000
  • |
    FAILThe file extensions suggest the input file types are '['SBML', 'SED-ML']'. Tese are not compatible with ginsim. The following file types will be compatible ['SBML-qual', 'SED-ML']
    | ginsim_d1.pdf |\n", + "| libsbmlsim | pass | |
    passThe file extensions suggest the input file types are '['SBML', 'SED-ML']'. These are compatible with libsbmlsim
    | libsbmlsim_d1.pdf |\n", + "| masspy | FAIL |
    Details/usr/local/lib/python3.9/site-packages/biosimulators_utils/warnings.py:31 \u001b[1;31m

    BioSimulatorsWarning:

    The SED document is potentially incorrect.
  • Model `net1` has warnings.
    - The model file `LEMS_NML2_Ex9_FN.sbml` has warnings.
    - 2 warnings of type SBML unit consistency (99505). The following is the first warning at line 40, column 12:
    - In situations where a mathematical expression contains literal numbers or parameters whose units have not been declared, it is not possible to verify accurately the consistency of the units in the expression.
    The units of the rateRule math expression '(V - pow(V, 3) / 3 - W + I) / SEC' cannot be fully checked. Unit consistency reported as either no errors or further unit errors related to this object may not be accurate.
    - 4 warnings of type Modeling practice (80701). The following is the first warning at line 32, column 12:
    - As a principle of best modeling practice, the units of a parameter should be declared rather than be left undefined. Doing so improves the ability of software to check the consistency of units and helps make it easier to detect potential errors in models.
    The parameter with the id 'I' does not have a 'units' attribute.
    /usr/local/lib/python3.9/site-packages/biosimulators_utils/warnings.py:31 \u001b[1;31m

    BioSimulatorsWarning:

    The COMBINE/OMEX archive has warnings.
  • OMEX manifests should not contain content entries for themselves.
  • The SED-ML file at location `./tmp784349` has warnings.
    - Model `net1` has warnings.
    - The model file `LEMS_NML2_Ex9_FN.sbml` has warnings.
    - 2 warnings of type SBML unit consistency (99505). The following is the first warning at line 40, column 12:
    - In situations where a mathematical expression contains literal numbers or parameters whose units have not been declared, it is not possible to verify accurately the consistency of the units in the expression.
    The units of the rateRule math expression '(V - pow(V, 3) / 3 - W + I) / SEC' cannot be fully checked. Unit consistency reported as either no errors or further unit errors related to this object may not be accurate.
    - 4 warnings of type Modeling practice (80701). The following is the first warning at line 32, column 12:
    - As a principle of best modeling practice, the units of a parameter should be declared rather than be left undefined. Doing so improves the ability of software to check the consistency of units and helps make it easier to detect potential errors in models.
    The parameter with the id 'I' does not have a 'units' attribute.
    The COMBINE/OMEX did not execute successfully:

    The SED document did not execute successfully:

    Something went wrong reading the SBML model. Most likely the SBML model is not valid. Please check that your model is valid using the `mass.io.sbml.validate_sbml_model` function or via the online validator at http://sbml.org/validator .
    \t`(model, errors) = validate_sbml_model(filename)`
    If the model is valid and cannot be read please open an issue at https://github.com/SBRG/masspy/issues .
  • |
    passThe file extensions suggest the input file types are '['SBML', 'SED-ML']'. These are compatible with masspy
    | masspy_d1.pdf |\n", + "| netpyne | FAIL |
    DetailsNo module named 'libsbml'
    |
    passThe file extensions suggest the input file types are '['SBML', 'SED-ML']'. These are compatible with netpyne
    | |\n", + "| neuron | FAIL |
    DetailsNo module named 'libsbml'
    |
    FAILThe file extensions suggest the input file types are '['SBML', 'SED-ML']'. Tese are not compatible with neuron. The following file types will be compatible ['LEMS', 'SED-ML', 'NeuroML']
    | |\n", + "| opencor | FAIL |
    DetailsNo module named 'libsbml'
    |
    passThe file extensions suggest the input file types are '['SBML', 'SED-ML']'. These are compatible with opencor
    | |\n", + "| pyneuroml | FAIL |
    DetailsNo module named 'libsbml'
    |
    FAILThe file extensions suggest the input file types are '['SBML', 'SED-ML']'. Tese are not compatible with pyneuroml. The following file types will be compatible ['LEMS', 'SED-ML', 'NeuroML']
    | |\n", + "| pysces | FAIL |
    DetailsCould not find GLIMDA.
    /usr/local/lib/python3.10/site-packages/biosimulators_utils/warnings.py:31:

    BioSimulatorsWarning:

    The SED document is potentially incorrect.
  • Model `net1` has warnings.
    - The model file `LEMS_NML2_Ex9_FN.sbml` has warnings.
    - 2 warnings of type SBML unit consistency (99505). The following is the first warning at line 40, column 12:
    - In situations where a mathematical expression contains literal numbers or parameters whose units have not been declared, it is not possible to verify accurately the consistency of the units in the expression.
    The units of the rateRule math expression '(V - pow(V, 3) / 3 - W + I) / SEC' cannot be fully checked. Unit consistency reported as either no errors or further unit errors related to this object may not be accurate.
    - 4 warnings of type Modeling practice (80701). The following is the first warning at line 32, column 12:
    - As a principle of best modeling practice, the units of a parameter should be declared rather than be left undefined. Doing so improves the ability of software to check the consistency of units and helps make it easier to detect potential errors in models.
    The parameter with the id 'I' does not have a 'units' attribute.


    /usr/local/lib/python3.10/site-packages/biosimulators_utils/warnings.py:31:

    BioSimulatorsWarning:

    The COMBINE/OMEX archive has warnings.
  • OMEX manifests should not contain content entries for themselves.
  • The SED-ML file at location `./tmp655477` has warnings.
    - Model `net1` has warnings.
    - The model file `LEMS_NML2_Ex9_FN.sbml` has warnings.
    - 2 warnings of type SBML unit consistency (99505). The following is the first warning at line 40, column 12:
    - In situations where a mathematical expression contains literal numbers or parameters whose units have not been declared, it is not possible to verify accurately the consistency of the units in the expression.
    The units of the rateRule math expression '(V - pow(V, 3) / 3 - W + I) / SEC' cannot be fully checked. Unit consistency reported as either no errors or further unit errors related to this object may not be accurate.
    - 4 warnings of type Modeling practice (80701). The following is the first warning at line 32, column 12:
    - As a principle of best modeling practice, the units of a parameter should be declared rather than be left undefined. Doing so improves the ability of software to check the consistency of units and helps make it easier to detect potential errors in models.
    The parameter with the id 'I' does not have a 'units' attribute.


    The COMBINE/OMEX did not execute successfully:

    The SED document did not execute successfully:

    Model at /tmp/tmpthlujip5/./LEMS_NML2_Ex9_FN.sbml could not be imported:

    File /tmp/tmpthlujip5/./LEMS_NML2_Ex9_FN.sbml.xml does not exist
  • |
    passThe file extensions suggest the input file types are '['SBML', 'SED-ML']'. These are compatible with pysces
    | pysces_d1.pdf |\n", + "| rbapy | FAIL |
    Details/usr/local/lib/python3.9/site-packages/biosimulators_utils/warnings.py:31:

    BioSimulatorsWarning:

    The SED document is potentially incorrect.
  • Model `net1` may be invalid.
    - The model file `LEMS_NML2_Ex9_FN.sbml` may be invalid.
    - In situations where a mathematical expression contains literal numbers or parameters whose units have not been declared, it is not possible to verify accurately the consistency of the units in the expression.
    The units of the rateRule math expression '(V - pow(V, 3) / 3 - W + I) / SEC' cannot be fully checked. Unit consistency reported as either no errors or further unit errors related to this object may not be accurate.

    - In situations where a mathematical expression contains literal numbers or parameters whose units have not been declared, it is not possible to verify accurately the consistency of the units in the expression.
    The units of the rateRule math expression '0.08 * (V + (0.7 - 0.8 * W)) / SEC' cannot be fully checked. Unit consistency reported as either no errors or further unit errors related to this object may not be accurate.

    - As a principle of best modeling practice, the units of a parameter should be declared rather than be left undefined. Doing so improves the ability of software to check the consistency of units and helps make it easier to detect potential errors in models.
    The parameter with the id 'I' does not have a 'units' attribute.

    - As a principle of best modeling practice, the units of a parameter should be declared rather than be left undefined. Doing so improves the ability of software to check the consistency of units and helps make it easier to detect potential errors in models.
    The parameter with the id 'SEC' does not have a 'units' attribute.

    - As a principle of best modeling practice, the units of a parameter should be declared rather than be left undefined. Doing so improves the ability of software to check the consistency of units and helps make it easier to detect potential errors in models.
    The parameter with the id 'V' does not have a 'units' attribute.

    - As a principle of best modeling practice, the units of a parameter should be declared rather than be left undefined. Doing so improves the ability of software to check the consistency of units and helps make it easier to detect potential errors in models.
    The parameter with the id 'W' does not have a 'units' attribute.



    /usr/local/lib/python3.9/site-packages/biosimulators_utils/warnings.py:31:

    BioSimulatorsWarning:

    The COMBINE/OMEX archive may be invalid.
  • OMEX manifests should not contain content entries for themselves.
  • The SED-ML file at location `./tmp250073` may be invalid.
    - Model `net1` may be invalid.
    - The model file `LEMS_NML2_Ex9_FN.sbml` may be invalid.
    - In situations where a mathematical expression contains literal numbers or parameters whose units have not been declared, it is not possible to verify accurately the consistency of the units in the expression.
    The units of the rateRule math expression '(V - pow(V, 3) / 3 - W + I) / SEC' cannot be fully checked. Unit consistency reported as either no errors or further unit errors related to this object may not be accurate.

    - In situations where a mathematical expression contains literal numbers or parameters whose units have not been declared, it is not possible to verify accurately the consistency of the units in the expression.
    The units of the rateRule math expression '0.08 * (V + (0.7 - 0.8 * W)) / SEC' cannot be fully checked. Unit consistency reported as either no errors or further unit errors related to this object may not be accurate.

    - As a principle of best modeling practice, the units of a parameter should be declared rather than be left undefined. Doing so improves the ability of software to check the consistency of units and helps make it easier to detect potential errors in models.
    The parameter with the id 'I' does not have a 'units' attribute.

    - As a principle of best modeling practice, the units of a parameter should be declared rather than be left undefined. Doing so improves the ability of software to check the consistency of units and helps make it easier to detect potential errors in models.
    The parameter with the id 'SEC' does not have a 'units' attribute.

    - As a principle of best modeling practice, the units of a parameter should be declared rather than be left undefined. Doing so improves the ability of software to check the consistency of units and helps make it easier to detect potential errors in models.
    The parameter with the id 'V' does not have a 'units' attribute.

    - As a principle of best modeling practice, the units of a parameter should be declared rather than be left undefined. Doing so improves the ability of software to check the consistency of units and helps make it easier to detect potential errors in models.
    The parameter with the id 'W' does not have a 'units' attribute.



    The COMBINE/OMEX did not execute successfully:

    The SED document did not execute successfully:

    Language for model `net1` is not supported.
    - Model language `urn:sedml:language:sbml` is not supported. Models must be in RBA format (e.g., `sed:model/@language` must match `^urn:sedml:language:rba(\\.$)` such as `urn:sedml:language:rba`).
  • |
    FAILThe file extensions suggest the input file types are '['SBML', 'SED-ML']'. Tese are not compatible with rbapy. The following file types will be compatible ['RBApy', 'SED-ML']
    | rbapy_d1.pdf |\n", + "| smoldyn | FAIL |
    Details[Errno 2] No such file or directory: '/tmp/tmpfn2dvdje/model.txt'
    |
    FAILsmoldyn compatible file types unknown.
    | |\n", + "| tellurium | pass | |
    passThe file extensions suggest the input file types are '['SBML', 'SED-ML']'. These are compatible with tellurium
    | tellurium_d1.pdf |\n", + "| vcell | FAIL |
    Details```Command '-i /root/in/LEMS_NML2_Ex9_FN_missing_xmlns.omex -o /root/out' in image 'ghcr.io/biosimulators/vcell' returned non-zero exit status 1: b' Root(root) OMEX_EXECUTE(LEMS_NML2_Ex9_FN_missing_xmlns.omex) PROCESSING_SEDML(preProcessDoc) **** Error: SED-ML processing for /tmp/vcell_temp_9e9c4770-45b0-4abf-aa17-49ffcf03bff52259667327810196674/tmp910870 failed with error: \\n Root(root) OMEX_EXECUTE(LEMS_NML2_Ex9_FN_missing_xmlns.omex) SIMULATIONS_RUN(runSimulations) **** Error: \\n Root(root) OMEX_EXECUTE(LEMS_NML2_Ex9_FN_missing_xmlns.omex) PROCESSING_SIMULATION_OUTPUTS(processOutputs) **** Error: Error processing outputs\\n'```
    |
    FAILvcell compatible file types unknown.
    | |\n", + "| xpp | FAIL |
    DetailsNo module named 'libsbml'
    |
    FAILThe file extensions suggest the input file types are '['SBML', 'SED-ML']'. Tese are not compatible with xpp. The following file types will be compatible ['XPP', 'SED-ML']
    | |" + ] + }, + "metadata": {}, + "output_type": "display_data" + } + ], + "source": [ + "# Create a table of the results\n", + "results_table = pd.DataFrame.from_dict(engine_dict).T\n", + "results_table.columns = ['pass/FAIL', 'Error']\n", + "results_table.index.name = 'Engine'\n", + "results_table.reset_index(inplace=True)\n", + "\n", + "results_table['Error'] = results_table.apply(lambda x: None if x['pass/FAIL'] == x['Error'] else x['Error'], axis=1)\n", + "results_table['pass/FAIL'] = results_table['pass/FAIL'].replace('other', 'FAIL')\n", + "# # results_table['pass/FAIL'] = results_table['pass/FAIL'].apply(lambda x: x if x == 'FAIL' else x)\n", + "\n", + "# for non empty cells in error col print error message\n", + "\n", + "results_table['Error'] = results_table['Error'].apply(lambda x: utils.parse_error_message(x))\n", + "results_table['Error'] = results_table['Error'].apply(lambda x: utils.collapsible_content(x))\n", + "\n", + "# compatibility_message\n", + "results_table['Compatibility'] = results_table['Engine'].apply(lambda x: utils.check_file_compatibility_test(x, types_dict, sbml_filepath, sedml_filepath))\n", + "results_table['Compatibility'] = results_table['Compatibility'].apply(lambda x: utils.collapsible_content(x[1], title=x[0]))\n", + "results_table['pass/FAIL'] = results_table['pass/FAIL'].apply(lambda x: f'{x}' if x == 'FAIL' else x)\n", + "results_table['Compatibility'] = results_table['Compatibility'].apply(lambda x: f'{x}' if 'FAIL' in x else x)\n", + "\n", + "# d1 plot clickable link\n", + "results_table['d1'] = results_table['Engine'].apply(lambda x: utils.d1_plots_dict(engines, 'd1_plots').get(x, None))\n", + "results_table['d1'] = results_table['d1'].apply(lambda x: utils.create_hyperlink(x))\n", + "\n", + "results_md_table = results_table.to_markdown(index=False)\n", + "display_markdown(results_md_table, raw=True)\n" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": {}, + "outputs": [], + "source": [ + "# save results_md_table\n", + "with open('results_compatibility_biosimulators.md', 'w', encoding='utf-8') as f:\n", + " f.write(results_md_table)" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "venv", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.11.9" + } + }, + "nbformat": 4, + "nbformat_minor": 2 +} diff --git a/SBML/test_compatibility_biosimulators.py b/SBML/test_compatibility_biosimulators.py new file mode 100644 index 00000000..ebaaa52d --- /dev/null +++ b/SBML/test_compatibility_biosimulators.py @@ -0,0 +1,63 @@ +''' +This script tests the compatibility of different biosimulation engines with a given SBML and SED-ML file. +It runs each engine and records the result (pass/fail) and any error messages encountered during the simulation. +The results are then displayed in a table and saved to a markdown file. +''' + +import sys +sys.path.append("..") +import utils +import os +import pandas as pd +import shutil +import argparse + +parser = argparse.ArgumentParser(description='Test compatibility of different biosimulation engines') +parser.add_argument('--output-dir',action='store',default='d1_plots',help='Where to move the output pdf plots to') +args = parser.parse_args() + +sbml_filepath = 'LEMS_NML2_Ex9_FN.sbml' +sedml_filepath = 'LEMS_NML2_Ex9_FN_missing_xmlns.sedml' #xmlns:sbml missing (original file) + +engines = utils.engines +types_dict = utils.types_dict + +engine_dict = {} + +output_folder = 'output' #initial temporary output folder + +for e in engines.keys(): + print('Running ' + e) + output_dir = os.path.abspath(os.path.join(output_folder, e)) + engine_dict[e] = utils.run_biosimulators_docker(e, sedml_filepath, sbml_filepath, output_dir=output_dir) + utils.move_d1_files(utils.find_files(output_dir, '.pdf'), e, args.output_dir) + +shutil.rmtree(output_folder) + +# TODO: move part that creates table to utils +# Create a table of the results +results_table = pd.DataFrame.from_dict(engine_dict).T +results_table.columns = ['pass/FAIL', 'Error'] +results_table.index.name = 'Engine' +results_table.reset_index(inplace=True) + +results_table['Error'] = results_table.apply(lambda x: None if x['pass/FAIL'] == x['Error'] else x['Error'], axis=1) +results_table['pass/FAIL'] = results_table['pass/FAIL'].replace('other', 'FAIL') + +results_table['Error'] = results_table['Error'].apply(lambda x: utils.parse_error_message(x)) +results_table['Error'] = results_table['Error'].apply(lambda x: utils.collapsible_content(x)) + +results_table['Compatibility'] = results_table['Engine'].apply(lambda x: utils.check_file_compatibility_test(x, types_dict, sbml_filepath, sedml_filepath)) +results_table['Compatibility'] = results_table['Compatibility'].apply(lambda x: utils.collapsible_content(x[1], title=x[0])) +results_table['pass/FAIL'] = results_table['pass/FAIL'].apply(lambda x: f'{x}' if x == 'FAIL' else x) +results_table['Compatibility'] = results_table['Compatibility'].apply(lambda x: f'{x}' if 'FAIL' in x else x) + +# d1 plot clickable link +results_table['d1'] = results_table['Engine'].apply(lambda x: utils.d1_plots_dict(engines, args.output_dir).get(x, None)) +results_table['d1'] = results_table['d1'].apply(lambda x: utils.create_hyperlink(x)) + +results_table = results_table.to_markdown(index=False) + +# save results_md_table +with open('results_compatibility_biosimulators.md', 'w', encoding='utf-8') as f: + f.write(results_table) diff --git a/utils/__init__.py b/utils/__init__.py index 43837f8a..5aafa540 100644 --- a/utils/__init__.py +++ b/utils/__init__.py @@ -17,6 +17,45 @@ import libsbml import libsedml import tempfile +import glob + +# +engines = { + 'amici': ('sbml', 'sedml'),\ + 'brian2': [('nml', 'sedml'),('lems', 'sedml'),('sbml', 'sedml')],\ + 'bionetgen': ('bngl', 'sedml'),\ + 'boolnet': ('sbmlqual', 'sedml'),\ + 'cbmpy': ('sbml', 'sedml'),\ + 'cobrapy': ('sbml', 'sedml'),\ + 'copasi': ('sbml', 'sedml'),\ + 'gillespy2': ('sbml', 'sedml'),\ + 'ginsim': ('sbmlqual', 'sedml'),\ + 'libsbmlsim': ('sbml', 'sedml'),\ + 'masspy': ('sbml', 'sedml'),\ + 'netpyne': ('sbml', 'sedml'),\ + 'neuron': [('nml', 'sedml'),('lems', 'sedml')],\ + 'opencor': ('cellml', 'sedml'),\ + 'pyneuroml': [('nml', 'sedml'),('lems', 'sedml')],\ + 'pysces': ('sbml', 'sedml'),\ + 'rbapy': ('rbapy', 'sedml'),\ + 'smoldyn':None ,\ + 'tellurium': ('sbml', 'sedml'),\ + 'vcell': None,\ + 'xpp': ('xpp', 'sedml') + } + +types_dict = { + 'sbml':'SBML',\ + 'sedml':'SED-ML',\ + 'nml':'NeuroML',\ + 'lems':'LEMS',\ + 'sbmlqual':'SBML-qual',\ + 'bngl':'BNGL',\ + 'rbapy':'RBApy',\ + 'xpp':'XPP',\ + 'smoldyn':'Smoldyn',\ + 'cellml':'CellML'\ + } #define error categories for detailed error counting per engine # (currently only tellurium) @@ -197,7 +236,143 @@ def read_log_yml(log_filepath): ym = yaml.safe_load(f) return ym['exception']['message'] -def run_biosimulators_docker(engine,sedml_filepath,sbml_filepath,output_dir=None,error_categories=error_categories): +def find_files(directory, extension): + files = glob.glob(f"{directory}/**/*{extension}", recursive=True) + return files + +def move_d1_files(file_paths, engine, plot_dir='d1_plots'): + for fpath in file_paths: + new_file_path = os.path.join(plot_dir, f'{engine}_{os.path.basename(fpath)}') + if not os.path.exists(plot_dir): os.makedirs(plot_dir, exist_ok=True) + if os.path.exists(new_file_path): os.remove(new_file_path) + print(f'Moving {fpath} to {new_file_path}') + shutil.move(fpath, new_file_path) + +# write definition to create d1 plots dict +def d1_plots_dict(engines=engines, d1_plots_path='d1_plots'): + """ + Create a dictionary with engine names as keys and d1 plot paths as values. + """ + d1_plots = find_files(d1_plots_path, '.pdf') + d1_plots_dict = {e: d1_plot for e in engines.keys() for d1_plot in d1_plots if e in d1_plot} + return d1_plots_dict + + +def create_hyperlink(file_path): + """ + Create a hyperlink to a file or folder. If the path is None, return None. + Title is the basename of the path. + """ + if file_path: + title = os.path.basename(file_path) + return f'{title}' + else: + return None + + +def parse_error_message(text): + if text != None: + text_message = re.findall(r'"([^"]*)"', text) + if len(text_message) > 0: + text = text_message + else: + text = text.replace('|', '') + return text + text = bytes(text[0], "utf-8").decode("unicode_escape") + text = text.replace('|', '') + + # # for any text with "<*>" remove "<" as well as ">" but leave wildcard text * + text = re.sub(r'<([^>]*)>', r'\1', text) + + # replace color codes with html color codes + text = text.replace("\x1b[33m",'') + text = text.replace("\x1b[31m",'') + + # # remove .\x1b[0m + text = text.replace("\x1b[0m", "") + + # find first "." or ":" after ""after it + pattern = r'([^.:]*)([.:])' + replacement = r'\1\2' + text = re.sub(pattern, replacement, text, count=1) + + # bullet points and new lines + text = text.replace('\r\n - ', '
  • ') + text = text.replace('\r\n', '
    ') + text = text.replace('\n', '
    ') + + # BioSimulatorsWarning: two
    tags after + text = text.replace('BioSimulatorsWarning:', '

    BioSimulatorsWarning:

    ') + text = text.replace('warnings.warn(termcolor.colored(message, Colors.warning.value), category)', '
    ') + + # if text includes The COMBINE/OMEX did not execute successfully: make everyhting from that point red + text = text.replace('The COMBINE/OMEX did not execute successfully:', 'The COMBINE/OMEX did not execute successfully:') + return text + +def display_error_message(error_message): + if error_message != None: + display_markdown(f'{error_message}', raw=True) + return error_message + +def check_file_compatibility_test(engine, types_dict, model_filepath, experiment_filepath): + ''' + Check if the file extensions suggest the file types are compatible with the engine + ''' + input_filetypes = set(get_filetypes(model_filepath, experiment_filepath)) + input_file_types_text = [types_dict[i] for i in input_filetypes] + + + engine_filetypes = engines[engine] + if engine_filetypes is not None: + # Flatten the list if the engine_filetypes is a list of tuples + if all(isinstance(i, tuple) for i in engine_filetypes): + engine_filetypes = {item for sublist in engine_filetypes for item in sublist} + engine_file_types_text = [types_dict[i] for i in engine_filetypes if i in types_dict] + if input_filetypes.issubset(engine_filetypes): + return 'pass', (f"The file extensions suggest the input file types are '{input_file_types_text}'. These are compatible with {engine}") + else: + return 'FAIL', (f"The file extensions suggest the input file types are '{input_file_types_text}'. Tese are not compatible with {engine}. The following file types will be compatible {engine_file_types_text}") + else: + return 'FAIL', (f"{engine} compatible file types unknown.") + + +def collapsible_content(content, title='Details'): + """ + Create a collapsible content section in markdown format + + Input: content, title + """ + if content: + return f'
    {title}{content}
    ' + else: + return None + +def get_filetypes(model_filepath, simulation_filepath): + """ + Get the filetypes of the model and simulation files + + Input: model_filepath, simulation_filepath + Output: tuple of filetypes + """ + if model_filepath.endswith(".sbml") and simulation_filepath.endswith(".sedml"): + filetypes = ('sbml', 'sedml') + else: + filetypes = "other" + return filetypes + +def delete_output_folder(output_dir): + ''' + # Delete the output folder and its contents + ''' + for file_name in os.listdir(output_dir): + file_path = os.path.join(output_dir, file_name) + if os.path.isfile(file_path): + os.remove(file_path) + elif os.path.isdir(file_path): + shutil.rmtree(file_path) + + +def run_biosimulators_docker(engine,sedml_filepath,sbml_filepath,output_dir=None,error_categories=error_categories,chown_outputs=True): ''' put the sedml and sbml file into an omex archive run it locally using a biosimulators docker @@ -206,19 +381,28 @@ def run_biosimulators_docker(engine,sedml_filepath,sbml_filepath,output_dir=None #put the sedml and sbml into a combine archive omex_filepath = create_omex(sedml_filepath,sbml_filepath) + error_str = None try: biosimulators_core(engine,omex_filepath,output_dir=output_dir) - return "pass" #no errors except Exception as e: #capture the error as a string which won't break markdown tables - error_str = safe_md_string(e) + # error_str = safe_md_string(e) + error_str = str(e) - #try to load the cleaner error message from the log.yml file - log_str = read_log_yml(os.path.join(os.path.dirname(omex_filepath),"log.yml")) + #ensure outputs are owned by the user + if 'getuid' in dir(os) and chown_outputs: + uid = os.getuid() + gid = os.getgid() + os.system(f'sudo chown -R {uid}:{gid} {output_dir}') - if log_str: - error_str = safe_md_string(log_str) + if not error_str: return "pass" + + # #try to load the cleaner error message from the log.yml file + # log_str = read_log_yml(os.path.join(os.path.dirname(omex_filepath),"log.yml")) + + # if log_str: + # error_str = safe_md_string(log_str) #categorise the error string if engine in error_categories: @@ -235,6 +419,9 @@ def biosimulators_core(engine,omex_filepath,output_dir=None): assumes local docker is setup engine can be any string that matches a biosimulators docker "URI": ghcr.io/biosimulators/{engine} + + omex_filepath: the OMEX file to run + output_dir: folder to write the simulation outputs to ''' #directory containing omex file needs mapping into the container as the input folders @@ -246,13 +433,15 @@ def biosimulators_core(engine,omex_filepath,output_dir=None): #to avoid the "file already exists" type error if not output_dir: output_dir = os.path.join(omex_dir,'output') - os.makedirs(output_dir,exist_ok=True) + + os.makedirs(output_dir,exist_ok=True) mount_out = docker.types.Mount("/root/out",output_dir,type="bind") client = docker.from_env() client.containers.run(f"ghcr.io/biosimulators/{engine}", mounts=[mount_in,mount_out], - command=f"-i /root/in/{omex_file} -o /root/out") + command=f"-i /root/in/{omex_file} -o /root/out", + auto_remove=True) def test_engine(engine,filename,error_categories=error_categories): '''