Skip to content

Commit d038700

Browse files
committed
feat: added tuttorial for executing individual simulations
1 parent cb9c2b9 commit d038700

7 files changed

+10048
-38
lines changed

Dockerfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,4 +29,6 @@ RUN chown -R ${NB_UID} ${HOME}
2929
USER ${NB_USER}
3030
WORKDIR ${HOME}
3131

32+
ENV PYTHONWARNINGS="ignore::biosimulators_utils.warnings.BioSimulatorsWarning"
33+
3234
CMD /bin/bash /xvfb-startup.sh

requirements.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ jupyterhub
44
jupyterlab
55

66
# requirements for notebooks
7+
biosimulators-copasi
8+
biosimulators-cobrapy
9+
biosimulators-tellurium
10+
biosimulators-utils
711
kisao
812
matplotlib
913
pyyaml

tutorials/Programmatically executing individual simulations.ipynb

Lines changed: 2068 additions & 0 deletions
Large diffs are not rendered by default.

tutorials/Programmatically executing simulation projects.ipynb

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,17 @@
55
"id": "4d20a3c2",
66
"metadata": {},
77
"source": [
8-
"# Programmatically executing COMBINE/OMEX archives"
8+
"# Programmatically executing simulation projects (COMBINE/OMEX archives)"
99
]
1010
},
1111
{
1212
"cell_type": "markdown",
1313
"id": "0601616d",
1414
"metadata": {},
1515
"source": [
16-
"This tutorial illustrates how to use Python APIs for simulation tools to execute COMBINE/OMEX archives and plot their results."
16+
"This tutorial illustrates how to use Python APIs for simulation tools to execute [COMBINE/OMEX archives](https://combinearchive.org/) that contain simulation experiments described with the [Simulation Experiment Description Markup Language (SED-ML)](http://sed-ml.org/) and plot their results.\n",
17+
"\n",
18+
"Information about the capabilities (supported model formats, modeling frameworks, simulation types, simulation algorithms, observables) of each simulation tool is available from [BioSimulators](https://biosimulators.org). These capabilties are described using several ontologies. Please see the [Programmatically getting information about simulation tools from BioSimulators tutorial](Programmatically%20getting%20information%20about%20simulation%20tools%20from%20BioSimulators.ipynb) for more information about how to use this information to identify and use appropriate simulation tools."
1719
]
1820
},
1921
{
@@ -1157,7 +1159,7 @@
11571159
"/usr/local/lib/python3.9/site-packages/biosimulators_utils/warnings.py:31: StandardOutputNotLoggedWarning: \u001b[33mStandard output and error could not be logged because capturer is not installed. To install capturer, install BioSimulators utils with the `logging` option (`pip install biosimulators-utils[logging]`).\u001b[0m\n",
11581160
" warnings.warn(termcolor.colored(message, Colors.warning.value), category)\n",
11591161
"/usr/local/lib/python3.9/site-packages/biosimulators_utils/warnings.py:31: BioSimulatorsWarning: \u001b[33mModel `Ciliberto2003_Morphogenesis` may be invalid.\n",
1160-
" - The model file `/tmp/tmplxry5gfe.xml` may be invalid.\n",
1162+
" - The model file `/tmp/tmpmcxer10_.xml` may be invalid.\n",
11611163
" - The value of the 'sboTerm' attribute on a <species> is expected to be an SBO identifier (http://www.biomodels.net/SBO/). In SBML Level 2 prior to Version 4 it is expected to refer to a participant physical type (i.e., terms derived from SBO:0000236, \"participant physical type\"); in Versions 4 and above it is expected to refer to a material entity (i.e., terms derived from SBO:0000240, \"material entity\").\n",
11621164
" Reference: L2V4 Section 5\n",
11631165
" SBO term 'SBO:0000014' on the <species> is not in the appropriate branch.\n",
@@ -1659,7 +1661,11 @@
16591661
"text": [
16601662
" \u001b[34msucceeded\u001b[0m\n",
16611663
" Generating 5 outputs ...\n",
1662-
" Generating output 1: `report` ..."
1664+
" Generating output 1: `report` ... \u001b[34msucceeded\u001b[0m\n",
1665+
" Generating output 2: `Figure_3a` ... \u001b[34msucceeded\u001b[0m\n",
1666+
" Generating output 3: `Figure_3b` ... \u001b[34msucceeded\u001b[0m\n",
1667+
" Generating output 4: `Figure_3c` ... \u001b[34msucceeded\u001b[0m\n",
1668+
" Generating output 5: `Figure_3d` ..."
16631669
]
16641670
},
16651671
{
@@ -1675,10 +1681,6 @@
16751681
"output_type": "stream",
16761682
"text": [
16771683
" \u001b[34msucceeded\u001b[0m\n",
1678-
" Generating output 2: `Figure_3a` ... \u001b[34msucceeded\u001b[0m\n",
1679-
" Generating output 3: `Figure_3b` ... \u001b[34msucceeded\u001b[0m\n",
1680-
" Generating output 4: `Figure_3c` ... \u001b[34msucceeded\u001b[0m\n",
1681-
" Generating output 5: `Figure_3d` ... \u001b[34msucceeded\u001b[0m\n",
16821684
"\n",
16831685
"Bundling outputs ...\n",
16841686
"Cleaning up ...\n"
@@ -1746,7 +1748,7 @@
17461748
{
17471749
"data": {
17481750
"text/plain": [
1749-
"[<matplotlib.lines.Line2D at 0x7fa6a5a104c0>]"
1751+
"[<matplotlib.lines.Line2D at 0x7f39cfd98250>]"
17501752
]
17511753
},
17521754
"execution_count": 7,

tutorials/Programmatically getting information about simulation tools from BioSimulators.ipynb

Lines changed: 30 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,14 @@
2020
"These schemas utilize several ontologies:\n",
2121
"* Funding agencies: [FunderRegistry](https://www.crossref.org/services/funder-registry/)\n",
2222
"* Modeling frameworks: [Systems Biology Ontology (SBO)](https://wwwdev.ebi.ac.uk/sbo/)\n",
23-
"* Modeling formats: [EDAM](https://edamontology.org/page)\n",
23+
"* Modeling formats: [EDAM](https://edamontology.org/page) and [SED-ML model language URNs](https://sed-ml.org/urns.html)\n",
2424
"* Output dimensions: [Semanticscience Integrated Ontology (SIO)](https://semanticscience.org/)\n",
25+
"* Outputs of implicit simulation variables: [SED-ML symbol URNs](https://sed-ml.org/urns.html)\n",
2526
"* Programming languages: [Linguist](https://github.com/github/linguist)\n",
2627
"* Simulation algorithms, their parameters, and their outputs: [Kinetic Simulation Algorithm Ontology (KiSAO)](https://github.com/SED-ML/KiSAO)\n",
2728
"* Software licenses: [Software Package Data Exchange (SPDX)](https://spdx.org/licenses)\n",
2829
"\n",
29-
"This tutorial illustrates how to programmatically retrieve information about simulation tools for BioSimulators' REST API."
30+
"This tutorial illustrates how to programmatically retrieve information about simulation tools for BioSimulators' REST API. Please see the other tools for more information about using simulation tools to execute individual simulations and entire simulation projects."
3031
]
3132
},
3233
{
@@ -101,7 +102,7 @@
101102
},
102103
{
103104
"cell_type": "code",
104-
"execution_count": 11,
105+
"execution_count": 4,
105106
"id": "c837064c-29c1-417b-bb6f-6f9b87aca572",
106107
"metadata": {},
107108
"outputs": [],
@@ -119,7 +120,7 @@
119120
},
120121
{
121122
"cell_type": "code",
122-
"execution_count": 14,
123+
"execution_count": 5,
123124
"id": "7f256fda-2a95-4ae4-b5aa-a7aebce5a18e",
124125
"metadata": {},
125126
"outputs": [],
@@ -137,7 +138,7 @@
137138
},
138139
{
139140
"cell_type": "code",
140-
"execution_count": 68,
141+
"execution_count": 6,
141142
"id": "23fb133a-0753-43c5-9169-b2591c7528a6",
142143
"metadata": {},
143144
"outputs": [
@@ -150,21 +151,21 @@
150151
" - id: format_3686\n",
151152
" namespace: EDAM\n",
152153
" supportedFeatures: []\n",
153-
" version: '1'\n",
154+
" version: null\n",
154155
" availableSoftwareInterfaceTypes:\n",
155156
" - library\n",
156157
" - command-line application\n",
157158
" - BioSimulators Docker image\n",
158159
" citations:\n",
159-
" - authors: Scott D. Cohen, Alan C. Hindmarsh & Paul F. Dubois\n",
160+
" - authors: \"Jeffrey D. Orth, Ines Thiele & Bernhard \\xD8. Palsson\"\n",
160161
" identifiers:\n",
161-
" - id: 10.1063/1.4822377\n",
162+
" - id: 10.1038/nbt.1614\n",
162163
" namespace: doi\n",
163-
" url: https://doi.org/10.1063/1.4822377\n",
164-
" issue: '2'\n",
165-
" journal: Computers in Physics\n",
166-
" pages: 138-143\n",
167-
" title: CVODE, a stif\n",
164+
" url: https://doi.org/10.1038/nbt.1614\n",
165+
" issue: '3'\n",
166+
" journal: Nature Biotechnology\n",
167+
" pages: 245-248\n",
168+
" title: What is f\n",
168169
"...\n"
169170
]
170171
}
@@ -184,7 +185,7 @@
184185
},
185186
{
186187
"cell_type": "code",
187-
"execution_count": 23,
188+
"execution_count": 7,
188189
"id": "11e35773-c8bb-4e37-a5bf-8cd699e75c1a",
189190
"metadata": {},
190191
"outputs": [
@@ -217,7 +218,7 @@
217218
},
218219
{
219220
"cell_type": "code",
220-
"execution_count": 25,
221+
"execution_count": 8,
221222
"id": "7036eb5e-7e00-4e16-81fb-f4e97744f438",
222223
"metadata": {},
223224
"outputs": [
@@ -250,7 +251,7 @@
250251
},
251252
{
252253
"cell_type": "code",
253-
"execution_count": 30,
254+
"execution_count": 9,
254255
"id": "2fa6c0eb-8696-4767-82ed-e7536a738e9c",
255256
"metadata": {},
256257
"outputs": [
@@ -285,7 +286,7 @@
285286
},
286287
{
287288
"cell_type": "code",
288-
"execution_count": 33,
289+
"execution_count": 10,
289290
"id": "5f4cc31e-460a-4cf5-8dc3-f4c2238820da",
290291
"metadata": {},
291292
"outputs": [
@@ -317,7 +318,7 @@
317318
},
318319
{
319320
"cell_type": "code",
320-
"execution_count": 48,
321+
"execution_count": 11,
321322
"id": "4ba94ba6-dcb4-4f3b-9b9a-8ee843d40b5f",
322323
"metadata": {},
323324
"outputs": [
@@ -349,7 +350,7 @@
349350
},
350351
{
351352
"cell_type": "code",
352-
"execution_count": 49,
353+
"execution_count": 12,
353354
"id": "f7573df1-5741-421c-a85d-ebd889e9d9c1",
354355
"metadata": {},
355356
"outputs": [],
@@ -367,7 +368,7 @@
367368
},
368369
{
369370
"cell_type": "code",
370-
"execution_count": 51,
371+
"execution_count": 13,
371372
"id": "83014718-c6ef-4990-83fe-ac86f16d7b31",
372373
"metadata": {},
373374
"outputs": [
@@ -397,7 +398,7 @@
397398
},
398399
{
399400
"cell_type": "code",
400-
"execution_count": 52,
401+
"execution_count": 14,
401402
"id": "f3bbcecc-c848-474d-a0df-d04a42ac88d5",
402403
"metadata": {},
403404
"outputs": [],
@@ -415,7 +416,7 @@
415416
},
416417
{
417418
"cell_type": "code",
418-
"execution_count": 54,
419+
"execution_count": 15,
419420
"id": "1d202a71-bdc0-4ed3-9a43-3f549ca8793c",
420421
"metadata": {},
421422
"outputs": [
@@ -444,7 +445,7 @@
444445
},
445446
{
446447
"cell_type": "code",
447-
"execution_count": 62,
448+
"execution_count": 16,
448449
"id": "0dd27b12-ccee-45de-8d25-f226bd0d93f4",
449450
"metadata": {},
450451
"outputs": [
@@ -497,7 +498,7 @@
497498
},
498499
{
499500
"cell_type": "code",
500-
"execution_count": 64,
501+
"execution_count": 17,
501502
"id": "ac21ff08-55ad-4d89-82a7-05ad257bc1cb",
502503
"metadata": {},
503504
"outputs": [
@@ -553,7 +554,7 @@
553554
},
554555
{
555556
"cell_type": "code",
556-
"execution_count": 69,
557+
"execution_count": 18,
557558
"id": "7945a2ac-90d7-4a9a-b9d6-d3f7daa859ed",
558559
"metadata": {},
559560
"outputs": [
@@ -612,7 +613,7 @@
612613
},
613614
{
614615
"cell_type": "code",
615-
"execution_count": 76,
616+
"execution_count": 19,
616617
"id": "5ea13527-243f-4a39-be3d-5922bf160df9",
617618
"metadata": {},
618619
"outputs": [
@@ -641,7 +642,7 @@
641642
},
642643
{
643644
"cell_type": "code",
644-
"execution_count": 75,
645+
"execution_count": 20,
645646
"id": "6fbd039f-13b1-4788-b683-c4b7344ab1c1",
646647
"metadata": {},
647648
"outputs": [
@@ -681,7 +682,7 @@
681682
},
682683
{
683684
"cell_type": "code",
684-
"execution_count": 70,
685+
"execution_count": 21,
685686
"id": "4f155bbc-ede1-442a-85de-0d8a0b0fc56a",
686687
"metadata": {},
687688
"outputs": [],
@@ -702,7 +703,7 @@
702703
},
703704
{
704705
"cell_type": "code",
705-
"execution_count": 71,
706+
"execution_count": 22,
706707
"id": "29c37a09-e629-468e-abcf-9efa5f3971ef",
707708
"metadata": {},
708709
"outputs": [

0 commit comments

Comments
 (0)