From adf88be6d82cdd1221bf6665a6af9b3142be4291 Mon Sep 17 00:00:00 2001
From: Stella <30465823+stellaprins@users.noreply.github.com>
Date: Tue, 21 Jan 2025 15:59:04 +0000
Subject: [PATCH 1/3] add egg info to gitignore
---
.gitignore | 1 +
1 file changed, 1 insertion(+)
diff --git a/.gitignore b/.gitignore
index 0b8437e..f51cc53 100644
--- a/.gitignore
+++ b/.gitignore
@@ -46,3 +46,4 @@ venv
/SBML/.DS_Store
/SBML/LEMS_NML2_Ex9_FN_missing_xmlns.omex
/SBML/output
+*.egg-info
From 7ba1950d529cff93c8d9b16c5aff627b1e0cca16 Mon Sep 17 00:00:00 2001
From: Stella <30465823+stellaprins@users.noreply.github.com>
Date: Tue, 21 Jan 2025 16:02:22 +0000
Subject: [PATCH 2/3] update readmes
---
README.md | 123 ++++++++++++++++++++++++++++++++++++++++++-
test_suite/README.md | 50 ++++++++----------
2 files changed, 144 insertions(+), 29 deletions(-)
diff --git a/README.md b/README.md
index 03f6ab1..17360b4 100644
--- a/README.md
+++ b/README.md
@@ -1,7 +1,126 @@
-# Converting NeuroML2/LEMS to & from SBML
-
+# SBML Showcase
[](https://github.com/OpenSourceBrain/SBMLShowcase/actions/workflows/omv-ci.yml) [](https://github.com/OpenSourceBrain/SBMLShowcase/actions/workflows/non-omv.yml)
+This repository contains files and instructions for testing validity of Systems Biology Markup Language (SBML) and Simulation Experiment Description Markup Language (SED-ML) files, and their compatibility with different simulations engines.
+
+## Results tables
+
+### SBML
+- [LEMS_NML2_Ex9_FN](SBML\tests\results_compatibility_biosimulators.md)
+
+### BioModels
+- [BioModels overview table](BioModels\README.md)
+- [BIOMD0000000001](BioModels\BIOMD0000000001\tests\results_BIOMD0000000001_url.md)
+- [BIOMD0000000138](BioModels/BIOMD0000000138/tests/results_BIOMD0000000138_url.md)
+- [BIOMD0000000724](BioModels\BIOMD0000000724\tests\results_Theinmozhi_2018.md)
+- [BIOMD0000001077](BioModels\BIOMD0000001077\tests\results_Adlung2021_model_jakstat_pa.md)
+
+### Test Suite
+- [Test Suite overview table](test_suite\results.md)
+- [00001](test_suite\test_00001\tests\results_compatibility_biosimulators.md)
+- [01186](test_suite\test_01186\tests\results_compatibility_biosimulators.md)
+
+## Clone the Repository
+To clone this repository to your local machine using the following command:
+
+```sh
+git clone https://github.com/OpenSourceBrain/SBMLShowcase.git
+cd SBMLShowcase
+```
+
+## Conda environment
+To set up a conda environment for the code in the SBML, BioModels, and test_suite folders.
+```
+conda create -n sbmlshowcase -c conda-forge python=3.10
+conda activate sbmlshowcase
+pip install -e .
+conda activate sbmlshowcase
+```
+### for for developers
+```
+conda create -n sbmlshowcase-dev -c conda-forge python=3.10
+conda activate sbmlshowcase-dev
+pip install -e .[dev]
+conda activate sbmlshowcase-dev
+```
+To install the pre-commit hooks
+```
+pre-commit install
+```
+## Main Folders
+
+The repository is organized into several folders each serving a specific purpose. Some of the key folders are:
+
+- [**SBML**](SBML) Contains scripts and files related to a few simple SBML models and testing their compatibility with different BioSimulator engines.
+- [**BioModels**](BioModels) Includes scripts for parsing and testing the compatibility of [BioModels](https://www.ebi.ac.uk/biomodels/) with various BioSimulator engines.
+- [**test_suite**](test_suite) Holds test cases and scripts for validating the functionality of the repository's tools and models.
+- [**utils**](utils) containing general functions.
+
+## SBML
+[**SBML**](SBML) contains a simple SBML model [`LEMS_NML2_Ex9_FN.sbml`](SBML\LEMS_NML2_Ex9_FN.sbml) and it's simulation file [`LEMS_NML2_Ex9_FN_missing_xmlns.
+sedml`](SBML\LEMS_NML2_Ex9_FN_missing_xmlns.sedml).
+
+[test_compatibility_biosimulators](SBML/tests/test_compatibility_biosimulators.py) adds any missing XML or FBC namespaces to the SED-ML file, wraps up the SBML and SED-ML files into an Open Modeling EXchange format (OMEX) file, submits the OMEX file to different BioSimulator engines either locally via docker (indicated with an `L` for local in the results table), or remotely through the BioSimulators API (indicated with an `R`). The results table created by this script can be found in [here](SBML\tests\results_compatibility_biosimulators.md).
+
+To run the script, change your directory to the SBML folder and run:
+
+```
+python test_compatibility_biosimulators.py
+```
+
+The following scripts test specific components the process described above and are mainly run as workflows in GitHub Actions.
+- [test_biosimulators_api](SBML/tests/test_biosimulators_api.py)
+- [test_biosimulators_docker](SBML/tests/test_biosimulators_docker.py)
+- [test_biosimulators_local](SBML/tests/test_biosimulators_local.py)
+- [test_biosimulators_remote](SBML/tests/test_biosimulators_remote.py)
+- [test_compatibility_biosimulators](SBML/tests/test_compatibility_biosimulators.py)
+- [test_tellurium](SBML/tests/test_tellurium.py)
+
+## BioModels
+### Overview with all curated BioModels
+
+[parse_biomodels](BioModels\parse_biomodels.py) creates an overview table in [`BioModels/README.md`](BioModels\README.md), testing curated [BioModels](https://www.ebi.ac.uk/biomodels/).
+
+To run the script, change your directory to the BioModels folder and run:
+
+```
+python parse_biomodels.py
+```
+### Test specific BioModels
+[test_biomodels_compatibility_biosimulators](BioModels\test_biomodels_compatibility_biosimulators.py)
+tests engine compatibility of BioModels listed in `biomodel_id_list` ([BIOMD0000000001](https://www.ebi.ac.uk/biomodels/BIOMD0000000001), [BIOMD0000000138](https://www.ebi.ac.uk/biomodels/BIOMD0000000138), [BIOMD0000000724](https://www.ebi.ac.uk/biomodels/BIOMD0000000724), [BIOMD0000001077](https://www.ebi.ac.uk/biomodels/BIOMD0000001077)) and creates subfolders containing the results. Results can be found in `BioModels/BIOMOD_id/tests/results_BioModel_name.md`.
+
+For example for BioModel [BIOMD0000000001](https://www.ebi.ac.uk/biomodels/BIOMD0000000001), results can be found [here](BioModels\BIOMD0000000001\tests\results_BIOMD0000000001_url.md).
+
+## test_suite
+### Overview with semantic test suite cases
+Processes the [semantic](https://github.com/sbmlteam/sbml-test-suite/tree/release/cases/semantic) [SBML Test Suite](https://github.com/sbmlteam/sbml-test-suite?tab=readme-ov-file) test cases which should all be valid SBML models with deterministic simulation results.
+
+[process_test_suite](test_suite\process_test_suite.py) creates an overview table summarising whether the SBML files, SBML units, and SED-ML files are valid. In addition to that it shows whether the XML SBML namespaces (`xmlns-sbml`) are missing, and whether the models can be run (`pass` / `FAIL`) in tellurium natively, or remotely through the BioSimulators API. The table can be found [here](test_suite\results.md).
+
+To run the script, change your directory to the test_suite folder and run:
+
+```
+python process_test_suite.py
+```
+
+There are several command line options for testing a limited amount of cases or specific test suite cases, see the [test_suite README](test_suite\README.md) for more information.
+
+
+### Testing specific test suite cases
+[test_test_suite_compatibility_biosimulators](test_suite\test_test_suite_compatibility_biosimulators.py) tests engine compatibility of specific semantic test suite cases (00001, 01186) Results can be found in `test_suite/test_case_id/tests/results_compatibility_biosimulators.md`.
+
+For example for for semantic test case [00001](https://www.ebi.ac.uk/biomodels/BIOMD0000000001), results can be found [here](test_suite\test_00001\tests\results_compatibility_biosimulators.md).
+
+To run the script, change your directory to the test_suite folder and run:
+
+```
+python test_test_suite_compatibility_biosimulators.py
+```
+There are several command line options in the [test_suite README](test_suite\README.md).
+
+# Converting NeuroML2/LEMS to & from SBML
+
Most of the interactions between [SBML](https://sbml.org) and LEMS/NeuroML showcased here are enabled by:
- The SBML to LEMS import function in: [org.neuroml.importer](https://github.com/NeuroML/org.neuroml.import/blob/master/src/main/java/org/neuroml/importer/sbml/SBMLImporter.java)
diff --git a/test_suite/README.md b/test_suite/README.md
index 6526fd7..b799dba 100644
--- a/test_suite/README.md
+++ b/test_suite/README.md
@@ -9,57 +9,49 @@ It currently runs three validation tests:
The output is a markdown file containing a simple table of the results obtained on each file, where each test result is recorded as either a `pass` or `FAIL`.
-## Getting Started
+## Run the Validation Script
-### Step 1: Download the Test Suite
-Download the [zipfile](https://github.com/sbmlteam/sbml-test-suite/releases/download/3.4.0/semantic_tests_with_sedml_and_graphs.v3.4.0.zip) (or the latest equivalent) of the [SBML test suite](https://github.com/sbmlteam/sbml-test-suite) that includes [SEDML](https://github.com/SED-ML/sed-ml) files.
+Navigate to the test_suite directory and run for example
-### Step 2: Extract the Files
-Extract the downloaded ZIP file to a desired location, for example using the `unzip` command:
-
-```bash
-unzip semantic_tests_with_sedml_and_graphs.v3.4.0.zip -d /path_to_extraction_folder
```
+ python process_test_suite.py --cases 00001 00002 00011 --sbml-level_version l1v2 --output-file results_00001_00002_00011.md
+```
+or to run all test cases using the highest SBML versions available navigate to the test_suite directory and run (overwrites `results.md`)
-### Step 3: Set up the right environment
```
-pip install matplotlib
-pip install pyneuroml
-pip install pyneuroml[combine]
-pip install pyneuroml[tellurium]
-pip install pymetadata
-pip install docker
+ python process_test_suite.py
```
+## Test specific cases
+Navigate to the test_suite directory and run for example
-### Step 3: Run the Validation Script
-Navigate to the directory containing the `process_test_suite.py` script and execute it, specifying the path to the extracted test files. For example if the extraction folder is `C:\Users\Username\Documents\compbiolibs\SBML_test_suite\semantic` and the `process_test_suite.py` script is in the current directory.
+```
+test_test_suite_compatibility_biosimulators.py --cases 00006 01280 --sbml-level_version highest
+```
+or to run test cases 00001 and 01186 (tested in this repository) using the highest SBML versions available navigate to the test_suite directory and run
```
- python process_test_suite.py --suite-path C:\Users\Username\Documents\compbiolibs\SBML_test_suite\semantic --sbml-level_version 'sbml-l3v2' --output-file ./results_test.md --limit 5
+test_test_suite_compatibility_biosimulators.py
```
## Command Line Options
-The `process_test_suite.py` script provides various command-line options to customize the execution of the tests. Below are the available options.
-
- `--limit`
**Description:** Limits the number of test cases processed.
**Usage:** `--limit The model is according to the paper Simple Model of Spiking Neurons
- In this paper, a simple spiking model is presented that is as biologically plausible as the Hodgkin-Huxley model, yet as computationally efficient as the integrate-and-fire model. Known types of neurons correspond to different values of the parameters a,b,c,d in the model. Figure2RS,IB,CH,FS,LTS have been simulated by MathSBML. RS: a=0.02, b=0.2, c=-65, d=8. IB: a=0.02,b=0.2,c=-55,d=4 CH: a=0.02,b=0.2,c=-50,d=2 FS:a=0.1b=0.2c=-65,d=2 LTS:a=0.02,b=0.25,c=-65,d=2`
**Default:** `[]` (no limit)
-
- `--suite-path`
**Description:** Specifies the path to the directory containing the test suite files.
**Usage:** `--suite-path
`
+ **Default:** `[]` (no skip)
+
- `--output-file`
**Description:** Specifies the path to the output file where the results will be written.
**Usage:** `--output-file
To the extent possible under law, all copyright and related or neighbouring rights to this encoded model have been dedicated to the public domain worldwide. Please refer to CC0 Public Domain Dedication - for more information.
-In summary, you are entitled to use this encoded model in absolutely any manner you deem suitable, verbatim, or with modification, alone or embedded it in a larger context, redistribute it, commercially or not, in a restricted way or not.
-To cite BioModels Database, please use Le Novère N., Bornstein B., Broicher A., Courtot M., Donizelli M., Dharuri H., Li L., Sauro H., Schilstra M., Shapiro B., Snoep J.L., Hucka M. (2006) BioModels Database: A Free, Centralized Database of Curated, Published, Quantitative Kinetic Models of Biochemical and Cellular Systems Nucleic Acids Res., 34: D689-D691. -
- - - -The model reproduces the time profile of cytoplasmic Calcium as depicted in Fig 3 of the paper. Model successfully reproduced using Jarnac and MathSBML
-This model originates from BioModels Database: A Database of Annotated Published Models. It is copyright (c) 2005-2011 The BioModels.net Team.
For more information see the terms of use.
To cite BioModels Database, please use: Li C, Donizelli M, Rodriguez N, Dharuri H, Endler L, Chelliah V, Li L, He E, Henry A, Stefan MI, Snoep JL, Hucka M, Le Novère N, Laibe C (2010) BioModels Database: An enhanced, curated and annotated resource for published quantitative kinetic models. BMC Syst Biol., 4:92.
-