-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
105 additions
and
85 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,100 +1,33 @@ | ||
# SBML Heta Cases | ||
|
||
The package is designed to test different aspects of Heta formats on [SBML Test Suite](https://github.com/sbmlteam/sbml-test-suite). | ||
The repository is designed to test different aspects of Heta formats on [SBML Test Suite](https://github.com/sbmlteam/sbml-test-suite). | ||
|
||
[![Heta project](https://img.shields.io/badge/%CD%B1-Heta_project-blue)](https://hetalang.github.io/) | ||
[![Copy visualization](https://github.com/insysbio/sbml-heta-cases/workflows/Copy%20visualization/badge.svg)](https://insysbio.github.io/sbml-heta-cases/) | ||
[![Build and simulate](https://github.com/insysbio/sbml-heta-cases/actions/workflows/convert-to-heta.yml/badge.svg)](https://github.com/insysbio/sbml-heta-cases/actions/workflows/convert-to-heta.yml) | ||
[![Autotest](https://github.com/insysbio/sbml-heta-cases/actions/workflows/convert-to-heta.yml/badge.svg)](https://insysbio.github.io/sbml-heta-cases/) | ||
[![GitHub issues](https://img.shields.io/github/issues/insysbio/sbml-heta-cases.svg)](https://GitHub.com/insysbio/sbml-heta-cases/issues/) | ||
[![GitHub license](https://img.shields.io/github/license/insysbio/sbml-heta-cases.svg)](https://github.com/insysbio/sbml-heta-cases/blob/master/LICENSE) | ||
|
||
## Summary | ||
|
||
1. Conversion of cases into Heta code and JSON format | ||
2. Load models in SBML format and make simulations in | ||
The GitHub Actions are utilized for the automatic testing. | ||
|
||
## File content | ||
|
||
- [SBML Test Suite](https://github.com/sbmlteam/sbml-test-suite) cases in `cases_path = "./cases/semantic"`. The original Matlab models were converted to Julia with Heta compiler. Julia code for each model is stored in `./cases/semantic/<case_num>/julia`, while models' settings and tags are stored in `cases_db = "./cases.json"`. | ||
- API (documented in the *Usage* section) to upload `cases_db`, run simulations, save results to `output_path = "./cases/output"` and update status in `results_db = "./results.json"`. A simulation can end with one of the three status: `success` indicates the output file has passed [tolerance test](https://github.com/sbmlteam/sbml-test-suite/blob/master/cases/semantic/README.md#tolerances-and-errors-for-timecourse-tests), `failure` signifies that tolerance test for a given simulation was not passed and `error` stands for any error during the simulation (error message is printed to the `message` field in `results_db`). | ||
|
||
## Usage | ||
|
||
SBML Heta Cases exports the following functions: | ||
|
||
``` | ||
upload_cases(;db_path::AbstractString=cases_db) | ||
1. Download SBML Test Suite v3.4.0 semantic cases from https://github.com/sbmlteam/sbml-test-suite. | ||
|
||
Upload cases from `cases_db`. | ||
``` | ||
2. Convert files of format SBML L2V5 and L3V2 (if presented) from semantic test suite to Heta format. | ||
|
||
``` | ||
add_cases(; | ||
cases_path::AbstractString=cases_path, | ||
cases_db::AbstractString=cases_db | ||
) | ||
3. Store the converted models and `summary.json` in the the `result` branch. | ||
|
||
Add new cases from `cases_path` to `cases_db`. | ||
``` | ||
4. The statistics of the conversion and result visualization can be seen in the https://insysbio.github.io/sbml-heta-cases/ | ||
|
||
``` | ||
update_results( | ||
case::AbstractString, | ||
cases_dict::AbstractDict=upload_cases(db_path=results_db); | ||
cases_path::AbstractString=cases_path, | ||
cases_db::AbstractString=cases_db, | ||
results_db::AbstractString=results_db, | ||
backend::DataType=default_backend, | ||
kwargs... | ||
) | ||
Reads `results_db` to `cases_dict`, accesses the `case`, | ||
solves it with the chosen `backend` solver and writes result to `results_db`. | ||
``` | ||
|
||
``` | ||
update_results( | ||
cases_vec::Vector{String}, | ||
cases_dict::AbstractDict=upload_cases(db_path=results_db); | ||
cases_path::AbstractString=cases_path, | ||
cases_db::AbstractString=cases_db, | ||
results_db::AbstractString=results_db, | ||
backend::DataType=default_backend, | ||
kwargs... | ||
) | ||
Reads `results_db` to `cases_dict`, accesses the selected cases from `cases_vec`, | ||
solves it with the chosen `backend` solver and writes results to `results_db`. | ||
``` | ||
|
||
``` | ||
update_results( | ||
cases_range::UnitRange, | ||
cases_dict::AbstractDict=upload_cases(db_path=results_db); | ||
cases_path::AbstractString=cases_path, | ||
cases_db::AbstractString=cases_db, | ||
results_db::AbstractString=results_db, | ||
backend::DataType=default_backend, | ||
kwargs... | ||
) | ||
## File content | ||
|
||
Reads `results_db` to `cases_dict`, accesses the selected cases from `cases_range`, | ||
solves it with the chosen `backend` solver and writes results to `results_db`. | ||
``` | ||
- `.github/workflows` - GitHub Actions files. | ||
- `bash` - bash scripts for the conversion. | ||
- `result` (temporal) - the folder with the converted models and `summary.json`. | ||
- `static` - the folder with the static files for the GitHub Pages. | ||
- `README.md` - the current file. | ||
|
||
``` | ||
update_results( | ||
cases_dict::AbstractDict=upload_cases(db_path=results_db); | ||
include_test_tags::Vector{String}=String[], | ||
include_component_tags::Vector{String}=String[], | ||
exclude_test_tags::Vector{String}=String[], | ||
exclude_component_tags::Vector{String}=String[], | ||
cases_path::AbstractString=cases_path, | ||
cases_db::AbstractString=cases_db, | ||
results_db::AbstractString=results_db, | ||
backend::DataType=default_backend, | ||
kwargs... | ||
) | ||
## Authors | ||
|
||
Reads `results_db` to `cases_dict`, filters the cases according to `include` and `exclude` tags, | ||
solves it with the chosen `backend` solver and writes results to `results_db`. | ||
``` | ||
- Evgeny Metelkin | ||
- Ivan Borisov |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,87 @@ | ||
## File content | ||
|
||
- [SBML Test Suite](https://github.com/sbmlteam/sbml-test-suite) cases in `cases_path = "./cases/semantic"`. The original Matlab models were converted to Julia with Heta compiler. Julia code for each model is stored in `./cases/semantic/<case_num>/julia`, while models' settings and tags are stored in `cases_db = "./cases.json"`. | ||
- API (documented in the *Usage* section) to upload `cases_db`, run simulations, save results to `output_path = "./cases/output"` and update status in `results_db = "./results.json"`. A simulation can end with one of the three status: `success` indicates the output file has passed [tolerance test](https://github.com/sbmlteam/sbml-test-suite/blob/master/cases/semantic/README.md#tolerances-and-errors-for-timecourse-tests), `failure` signifies that tolerance test for a given simulation was not passed and `error` stands for any error during the simulation (error message is printed to the `message` field in `results_db`). | ||
|
||
|
||
## Usage | ||
|
||
SBML Heta Cases exports the following functions: | ||
|
||
``` | ||
upload_cases(;db_path::AbstractString=cases_db) | ||
Upload cases from `cases_db`. | ||
``` | ||
|
||
``` | ||
add_cases(; | ||
cases_path::AbstractString=cases_path, | ||
cases_db::AbstractString=cases_db | ||
) | ||
Add new cases from `cases_path` to `cases_db`. | ||
``` | ||
|
||
``` | ||
update_results( | ||
case::AbstractString, | ||
cases_dict::AbstractDict=upload_cases(db_path=results_db); | ||
cases_path::AbstractString=cases_path, | ||
cases_db::AbstractString=cases_db, | ||
results_db::AbstractString=results_db, | ||
backend::DataType=default_backend, | ||
kwargs... | ||
) | ||
Reads `results_db` to `cases_dict`, accesses the `case`, | ||
solves it with the chosen `backend` solver and writes result to `results_db`. | ||
``` | ||
|
||
``` | ||
update_results( | ||
cases_vec::Vector{String}, | ||
cases_dict::AbstractDict=upload_cases(db_path=results_db); | ||
cases_path::AbstractString=cases_path, | ||
cases_db::AbstractString=cases_db, | ||
results_db::AbstractString=results_db, | ||
backend::DataType=default_backend, | ||
kwargs... | ||
) | ||
Reads `results_db` to `cases_dict`, accesses the selected cases from `cases_vec`, | ||
solves it with the chosen `backend` solver and writes results to `results_db`. | ||
``` | ||
|
||
``` | ||
update_results( | ||
cases_range::UnitRange, | ||
cases_dict::AbstractDict=upload_cases(db_path=results_db); | ||
cases_path::AbstractString=cases_path, | ||
cases_db::AbstractString=cases_db, | ||
results_db::AbstractString=results_db, | ||
backend::DataType=default_backend, | ||
kwargs... | ||
) | ||
Reads `results_db` to `cases_dict`, accesses the selected cases from `cases_range`, | ||
solves it with the chosen `backend` solver and writes results to `results_db`. | ||
``` | ||
|
||
``` | ||
update_results( | ||
cases_dict::AbstractDict=upload_cases(db_path=results_db); | ||
include_test_tags::Vector{String}=String[], | ||
include_component_tags::Vector{String}=String[], | ||
exclude_test_tags::Vector{String}=String[], | ||
exclude_component_tags::Vector{String}=String[], | ||
cases_path::AbstractString=cases_path, | ||
cases_db::AbstractString=cases_db, | ||
results_db::AbstractString=results_db, | ||
backend::DataType=default_backend, | ||
kwargs... | ||
) | ||
Reads `results_db` to `cases_dict`, filters the cases according to `include` and `exclude` tags, | ||
solves it with the chosen `backend` solver and writes results to `results_db`. | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -139,5 +139,5 @@ pre { | |
background-color: yellow; | ||
} | ||
.retCode_9 { | ||
background-color: gray; | ||
background-color: lightgray; | ||
} |