diff --git a/ArchiveEditor.ipynb b/ArchiveEditor.ipynb index 112f92e50..b158ae194 100644 --- a/ArchiveEditor.ipynb +++ b/ArchiveEditor.ipynb @@ -4,7 +4,7 @@ "metadata": { "colab": { "provenance": [], - "authorship_tag": "ABX9TyMQb5yMhGHHc1kwRIAH9xGP", + "authorship_tag": "ABX9TyPjK/verqoLQXZ42lnmhg2h", "include_colab_link": true }, "kernelspec": { @@ -28,27 +28,39 @@ }, { "cell_type": "code", - "execution_count": 20, + "execution_count": 3, "metadata": { "colab": { "base_uri": "https://localhost:8080/" }, "id": "jyZetQ55uWF6", - "outputId": "17c3586f-27e1-45ef-a9c6-c7082a2ef87e" + "outputId": "66882ce7-c27e-4bfc-99fd-556a4eb84cb9" }, "outputs": [ { "output_type": "stream", "name": "stdout", "text": [ - "Requirement already satisfied: biosimulators-utils[sbml] in /usr/local/lib/python3.10/dist-packages (0.1.187)\n", + "Collecting biosimulators-utils[sbml]\n", + " Downloading biosimulators_utils-0.1.187-py2.py3-none-any.whl (564 kB)\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m565.0/565.0 kB\u001b[0m \u001b[31m3.4 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[?25hCollecting process-bigraph\n", + " Downloading process-bigraph-0.0.15.tar.gz (25 kB)\n", + " Preparing metadata (setup.py) ... \u001b[?25l\u001b[?25hdone\n", "Requirement already satisfied: appdirs in /usr/local/lib/python3.10/dist-packages (from biosimulators-utils[sbml]) (1.4.4)\n", - "Requirement already satisfied: biopython in /usr/local/lib/python3.10/dist-packages (from biosimulators-utils[sbml]) (1.83)\n", - "Requirement already satisfied: cement in /usr/local/lib/python3.10/dist-packages (from biosimulators-utils[sbml]) (3.0.10)\n", - "Requirement already satisfied: evalidate>=2.0.0 in /usr/local/lib/python3.10/dist-packages (from biosimulators-utils[sbml]) (2.0.2)\n", + "Collecting biopython (from biosimulators-utils[sbml])\n", + " Downloading biopython-1.83-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.1 MB)\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m3.1/3.1 MB\u001b[0m \u001b[31m24.3 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[?25hCollecting cement (from biosimulators-utils[sbml])\n", + " Downloading cement-3.0.10-py3-none-any.whl (334 kB)\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m334.7/334.7 kB\u001b[0m \u001b[31m24.3 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[?25hCollecting evalidate>=2.0.0 (from biosimulators-utils[sbml])\n", + " Downloading evalidate-2.0.2-py3-none-any.whl (8.5 kB)\n", "Requirement already satisfied: h5py in /usr/local/lib/python3.10/dist-packages (from biosimulators-utils[sbml]) (3.9.0)\n", - "Requirement already satisfied: kisao>=2.33 in /usr/local/lib/python3.10/dist-packages (from biosimulators-utils[sbml]) (2.34)\n", - "Requirement already satisfied: lxml in /usr/local/lib/python3.10/dist-packages (from biosimulators-utils[sbml]) (4.9.4)\n", + "Collecting kisao>=2.33 (from biosimulators-utils[sbml])\n", + " Downloading kisao-2.34-py2.py3-none-any.whl (111 kB)\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m111.6/111.6 kB\u001b[0m \u001b[31m11.7 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[?25hRequirement already satisfied: lxml in /usr/local/lib/python3.10/dist-packages (from biosimulators-utils[sbml]) (4.9.4)\n", "Requirement already satisfied: matplotlib in /usr/local/lib/python3.10/dist-packages (from biosimulators-utils[sbml]) (3.7.1)\n", "Requirement already satisfied: mpmath in /usr/local/lib/python3.10/dist-packages (from biosimulators-utils[sbml]) (1.3.0)\n", "Requirement already satisfied: natsort in /usr/local/lib/python3.10/dist-packages (from biosimulators-utils[sbml]) (8.4.0)\n", @@ -56,40 +68,101 @@ "Requirement already satisfied: numpy in /usr/local/lib/python3.10/dist-packages (from biosimulators-utils[sbml]) (1.25.2)\n", "Requirement already satisfied: openpyxl in /usr/local/lib/python3.10/dist-packages (from biosimulators-utils[sbml]) (3.1.2)\n", "Requirement already satisfied: pandas in /usr/local/lib/python3.10/dist-packages (from biosimulators-utils[sbml]) (1.5.3)\n", - "Requirement already satisfied: pronto>=2.4 in /usr/local/lib/python3.10/dist-packages (from biosimulators-utils[sbml]) (2.5.6)\n", - "Requirement already satisfied: pyomexmeta>=1.2.13 in /usr/local/lib/python3.10/dist-packages (from biosimulators-utils[sbml]) (1.2.14)\n", - "Requirement already satisfied: python-dateutil in /usr/local/lib/python3.10/dist-packages (from biosimulators-utils[sbml]) (2.8.2)\n", - "Requirement already satisfied: python-libcombine>=0.2.11 in /usr/local/lib/python3.10/dist-packages (from biosimulators-utils[sbml]) (0.2.20)\n", - "Requirement already satisfied: python-libsedml>=2.0.16 in /usr/local/lib/python3.10/dist-packages (from biosimulators-utils[sbml]) (2.0.32)\n", - "Requirement already satisfied: pyyaml in /usr/local/lib/python3.10/dist-packages (from biosimulators-utils[sbml]) (6.0.1)\n", - "Requirement already satisfied: rdflib in /usr/local/lib/python3.10/dist-packages (from biosimulators-utils[sbml]) (7.0.0)\n", - "Requirement already satisfied: regex in /usr/local/lib/python3.10/dist-packages (from biosimulators-utils[sbml]) (2023.12.25)\n", + "Collecting pronto>=2.4 (from biosimulators-utils[sbml])\n", + " Downloading pronto-2.5.6-py2.py3-none-any.whl (61 kB)\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m61.7/61.7 kB\u001b[0m \u001b[31m6.5 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[?25hCollecting pyomexmeta>=1.2.13 (from biosimulators-utils[sbml])\n", + " Downloading pyomexmeta-1.2.14-cp310-cp310-manylinux2014_x86_64.whl (5.5 MB)\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m5.5/5.5 MB\u001b[0m \u001b[31m47.8 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[?25hRequirement already satisfied: python-dateutil in /usr/local/lib/python3.10/dist-packages (from biosimulators-utils[sbml]) (2.8.2)\n", + "Collecting python-libcombine>=0.2.11 (from biosimulators-utils[sbml])\n", + " Downloading python_libcombine-0.2.20-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (2.6 MB)\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m2.6/2.6 MB\u001b[0m \u001b[31m51.6 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[?25hCollecting python-libsedml>=2.0.16 (from biosimulators-utils[sbml])\n", + " Downloading python_libsedml-2.0.32-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.3 MB)\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m3.3/3.3 MB\u001b[0m \u001b[31m51.1 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[?25hRequirement already satisfied: pyyaml in /usr/local/lib/python3.10/dist-packages (from biosimulators-utils[sbml]) (6.0.1)\n", + "Collecting rdflib (from biosimulators-utils[sbml])\n", + " Downloading rdflib-7.0.0-py3-none-any.whl (531 kB)\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m531.9/531.9 kB\u001b[0m \u001b[31m44.0 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[?25hRequirement already satisfied: regex in /usr/local/lib/python3.10/dist-packages (from biosimulators-utils[sbml]) (2023.12.25)\n", "Requirement already satisfied: requests in /usr/local/lib/python3.10/dist-packages (from biosimulators-utils[sbml]) (2.31.0)\n", "Requirement already satisfied: setuptools in /usr/local/lib/python3.10/dist-packages (from biosimulators-utils[sbml]) (67.7.2)\n", - "Requirement already satisfied: simplejson in /usr/local/lib/python3.10/dist-packages (from biosimulators-utils[sbml]) (3.19.2)\n", - "Requirement already satisfied: termcolor in /usr/local/lib/python3.10/dist-packages (from biosimulators-utils[sbml]) (2.4.0)\n", - "Requirement already satisfied: uritools in /usr/local/lib/python3.10/dist-packages (from biosimulators-utils[sbml]) (4.0.2)\n", - "Requirement already satisfied: yamldown in /usr/local/lib/python3.10/dist-packages (from biosimulators-utils[sbml]) (0.1.8)\n", - "Requirement already satisfied: python-libsbml in /usr/local/lib/python3.10/dist-packages (from biosimulators-utils[sbml]) (5.20.2)\n", - "Requirement already satisfied: chardet~=5.0 in /usr/local/lib/python3.10/dist-packages (from pronto>=2.4->biosimulators-utils[sbml]) (5.2.0)\n", - "Requirement already satisfied: fastobo~=0.12.2 in /usr/local/lib/python3.10/dist-packages (from pronto>=2.4->biosimulators-utils[sbml]) (0.12.3)\n", - "Requirement already satisfied: graphviz>=0.15 in /usr/local/lib/python3.10/dist-packages (from pyomexmeta>=1.2.13->biosimulators-utils[sbml]) (0.20.1)\n", + "Collecting simplejson (from biosimulators-utils[sbml])\n", + " Downloading simplejson-3.19.2-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (137 kB)\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m137.9/137.9 kB\u001b[0m \u001b[31m17.0 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[?25hRequirement already satisfied: termcolor in /usr/local/lib/python3.10/dist-packages (from biosimulators-utils[sbml]) (2.4.0)\n", + "Collecting uritools (from biosimulators-utils[sbml])\n", + " Downloading uritools-4.0.2-py3-none-any.whl (10 kB)\n", + "Collecting yamldown (from biosimulators-utils[sbml])\n", + " Downloading yamldown-0.1.8-py3-none-any.whl (4.1 kB)\n", + "Collecting python-libsbml (from biosimulators-utils[sbml])\n", + " Downloading python_libsbml-5.20.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (8.0 MB)\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m8.0/8.0 MB\u001b[0m \u001b[31m43.4 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[?25hCollecting bigraph-schema (from process-bigraph)\n", + " Downloading bigraph-schema-0.0.30.tar.gz (36 kB)\n", + " Preparing metadata (setup.py) ... \u001b[?25l\u001b[?25hdone\n", + "Requirement already satisfied: pytest>=6.2.5 in /usr/local/lib/python3.10/dist-packages (from process-bigraph) (7.4.4)\n", + "Collecting pymongo (from process-bigraph)\n", + " Downloading pymongo-4.6.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (677 kB)\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m677.2/677.2 kB\u001b[0m \u001b[31m18.3 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[?25hCollecting orjson (from process-bigraph)\n", + " Downloading orjson-3.9.15-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (138 kB)\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m138.5/138.5 kB\u001b[0m \u001b[31m15.3 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[?25hRequirement already satisfied: chardet~=5.0 in /usr/local/lib/python3.10/dist-packages (from pronto>=2.4->biosimulators-utils[sbml]) (5.2.0)\n", + "Collecting fastobo~=0.12.2 (from pronto>=2.4->biosimulators-utils[sbml])\n", + " Downloading fastobo-0.12.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (2.0 MB)\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m2.0/2.0 MB\u001b[0m \u001b[31m77.0 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[?25hRequirement already satisfied: graphviz>=0.15 in /usr/local/lib/python3.10/dist-packages (from pyomexmeta>=1.2.13->biosimulators-utils[sbml]) (0.20.1)\n", "Requirement already satisfied: pydot>=1.4.1 in /usr/local/lib/python3.10/dist-packages (from pyomexmeta>=1.2.13->biosimulators-utils[sbml]) (1.4.2)\n", + "Requirement already satisfied: iniconfig in /usr/local/lib/python3.10/dist-packages (from pytest>=6.2.5->process-bigraph) (2.0.0)\n", + "Requirement already satisfied: packaging in /usr/local/lib/python3.10/dist-packages (from pytest>=6.2.5->process-bigraph) (24.0)\n", + "Requirement already satisfied: pluggy<2.0,>=0.12 in /usr/local/lib/python3.10/dist-packages (from pytest>=6.2.5->process-bigraph) (1.4.0)\n", + "Requirement already satisfied: exceptiongroup>=1.0.0rc8 in /usr/local/lib/python3.10/dist-packages (from pytest>=6.2.5->process-bigraph) (1.2.0)\n", + "Requirement already satisfied: tomli>=1.0.0 in /usr/local/lib/python3.10/dist-packages (from pytest>=6.2.5->process-bigraph) (2.0.1)\n", "Requirement already satisfied: six>=1.5 in /usr/local/lib/python3.10/dist-packages (from python-dateutil->biosimulators-utils[sbml]) (1.16.0)\n", - "Requirement already satisfied: contourpy>=1.0.1 in /usr/local/lib/python3.10/dist-packages (from matplotlib->biosimulators-utils[sbml]) (1.2.0)\n", + "Collecting parsimonious (from bigraph-schema->process-bigraph)\n", + " Downloading parsimonious-0.10.0-py3-none-any.whl (48 kB)\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m48.4/48.4 kB\u001b[0m \u001b[31m5.3 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[?25hCollecting fire (from bigraph-schema->process-bigraph)\n", + " Downloading fire-0.6.0.tar.gz (88 kB)\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m88.4/88.4 kB\u001b[0m \u001b[31m10.4 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[?25h Preparing metadata (setup.py) ... \u001b[?25l\u001b[?25hdone\n", + "Collecting pint (from bigraph-schema->process-bigraph)\n", + " Downloading Pint-0.23-py3-none-any.whl (305 kB)\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m305.0/305.0 kB\u001b[0m \u001b[31m27.0 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[?25hRequirement already satisfied: contourpy>=1.0.1 in /usr/local/lib/python3.10/dist-packages (from matplotlib->biosimulators-utils[sbml]) (1.2.0)\n", "Requirement already satisfied: cycler>=0.10 in /usr/local/lib/python3.10/dist-packages (from matplotlib->biosimulators-utils[sbml]) (0.12.1)\n", "Requirement already satisfied: fonttools>=4.22.0 in /usr/local/lib/python3.10/dist-packages (from matplotlib->biosimulators-utils[sbml]) (4.49.0)\n", "Requirement already satisfied: kiwisolver>=1.0.1 in /usr/local/lib/python3.10/dist-packages (from matplotlib->biosimulators-utils[sbml]) (1.4.5)\n", - "Requirement already satisfied: packaging>=20.0 in /usr/local/lib/python3.10/dist-packages (from matplotlib->biosimulators-utils[sbml]) (24.0)\n", "Requirement already satisfied: pillow>=6.2.0 in /usr/local/lib/python3.10/dist-packages (from matplotlib->biosimulators-utils[sbml]) (9.4.0)\n", "Requirement already satisfied: pyparsing>=2.3.1 in /usr/local/lib/python3.10/dist-packages (from matplotlib->biosimulators-utils[sbml]) (3.1.2)\n", "Requirement already satisfied: et-xmlfile in /usr/local/lib/python3.10/dist-packages (from openpyxl->biosimulators-utils[sbml]) (1.1.0)\n", "Requirement already satisfied: pytz>=2020.1 in /usr/local/lib/python3.10/dist-packages (from pandas->biosimulators-utils[sbml]) (2023.4)\n", - "Requirement already satisfied: isodate<0.7.0,>=0.6.0 in /usr/local/lib/python3.10/dist-packages (from rdflib->biosimulators-utils[sbml]) (0.6.1)\n", - "Requirement already satisfied: charset-normalizer<4,>=2 in /usr/local/lib/python3.10/dist-packages (from requests->biosimulators-utils[sbml]) (3.3.2)\n", + "Collecting dnspython<3.0.0,>=1.16.0 (from pymongo->process-bigraph)\n", + " Downloading dnspython-2.6.1-py3-none-any.whl (307 kB)\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m307.7/307.7 kB\u001b[0m \u001b[31m29.7 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[?25hCollecting isodate<0.7.0,>=0.6.0 (from rdflib->biosimulators-utils[sbml])\n", + " Downloading isodate-0.6.1-py2.py3-none-any.whl (41 kB)\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m41.7/41.7 kB\u001b[0m \u001b[31m5.1 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[?25hRequirement already satisfied: charset-normalizer<4,>=2 in /usr/local/lib/python3.10/dist-packages (from requests->biosimulators-utils[sbml]) (3.3.2)\n", "Requirement already satisfied: idna<4,>=2.5 in /usr/local/lib/python3.10/dist-packages (from requests->biosimulators-utils[sbml]) (3.6)\n", "Requirement already satisfied: urllib3<3,>=1.21.1 in /usr/local/lib/python3.10/dist-packages (from requests->biosimulators-utils[sbml]) (2.0.7)\n", - "Requirement already satisfied: certifi>=2017.4.17 in /usr/local/lib/python3.10/dist-packages (from requests->biosimulators-utils[sbml]) (2024.2.2)\n" + "Requirement already satisfied: certifi>=2017.4.17 in /usr/local/lib/python3.10/dist-packages (from requests->biosimulators-utils[sbml]) (2024.2.2)\n", + "Requirement already satisfied: typing-extensions in /usr/local/lib/python3.10/dist-packages (from pint->bigraph-schema->process-bigraph) (4.10.0)\n", + "Building wheels for collected packages: process-bigraph, bigraph-schema, fire\n", + " Building wheel for process-bigraph (setup.py) ... \u001b[?25l\u001b[?25hdone\n", + " Created wheel for process-bigraph: filename=process_bigraph-0.0.15-py3-none-any.whl size=26604 sha256=c9e4e7b87fd07752be8cce85938e7c7eff092c997f7110129d083774413f003c\n", + " Stored in directory: /root/.cache/pip/wheels/ee/4d/5d/18d92a8bb5484771901a0dc93d89a9029f6c6a4ba0010be079\n", + " Building wheel for bigraph-schema (setup.py) ... \u001b[?25l\u001b[?25hdone\n", + " Created wheel for bigraph-schema: filename=bigraph_schema-0.0.30-py3-none-any.whl size=37795 sha256=8679490631c6412524fb22bd9685564b827be85a94af608503b22c1d74164566\n", + " Stored in directory: /root/.cache/pip/wheels/b8/fd/63/3e228cc6e58b0fd46f2ecb1ca5bc78962cefc9a302feca8e5e\n", + " Building wheel for fire (setup.py) ... \u001b[?25l\u001b[?25hdone\n", + " Created wheel for fire: filename=fire-0.6.0-py2.py3-none-any.whl size=117029 sha256=8d44ba3c89f0d3eeca9e9e9f8abd7dd0d3dc72628838aa81ccc2c25d770647d6\n", + " Stored in directory: /root/.cache/pip/wheels/d6/6d/5d/5b73fa0f46d01a793713f8859201361e9e581ced8c75e5c6a3\n", + "Successfully built process-bigraph bigraph-schema fire\n", + "Installing collected packages: python-libsedml, python-libsbml, python-libcombine, evalidate, yamldown, uritools, simplejson, pint, parsimonious, orjson, isodate, fire, fastobo, dnspython, cement, biopython, rdflib, pyomexmeta, pymongo, pronto, bigraph-schema, process-bigraph, kisao, biosimulators-utils\n", + "Successfully installed bigraph-schema-0.0.30 biopython-1.83 biosimulators-utils-0.1.187 cement-3.0.10 dnspython-2.6.1 evalidate-2.0.2 fastobo-0.12.3 fire-0.6.0 isodate-0.6.1 kisao-2.34 orjson-3.9.15 parsimonious-0.10.0 pint-0.23 process-bigraph-0.0.15 pronto-2.5.6 pymongo-4.6.2 pyomexmeta-1.2.14 python-libcombine-0.2.20 python-libsbml-5.20.2 python-libsedml-2.0.32 rdflib-7.0.0 simplejson-3.19.2 uritools-4.0.2 yamldown-0.1.8\n" ] } ], @@ -114,7 +187,7 @@ "metadata": { "id": "YRw-DUavuZqr" }, - "execution_count": 2, + "execution_count": 5, "outputs": [] }, { @@ -264,12 +337,12 @@ " return Model(model_id, model_name, model_source, model_language, changes)\n", "\n", " @classmethod\n", - " def generate_archive_from_changed_model(\n", + " def generate_sed_doc_from_changed_model(\n", " cls,\n", " uploaded_archive: CombineArchive,\n", " extraction_dir: str,\n", " kisao_id: str = None,\n", - " **changes):\n", + " **changes) -> SedDocument:\n", " introspection = cls.introspect_archive(\n", " uploaded_archive=uploaded_archive,\n", " extraction_dir=extraction_dir,\n", @@ -295,6 +368,16 @@ " assert sim_model.changes != new_model_changes\n", " introspection['sim_model'].changes = new_model_changes\n", " pp(introspection)\n", + " # TODO: Create sed doc\n", + "\n", + " @classmethod\n", + " def add_changed_sed_to_uploaded_archive(cls, uploaded_archive: CombineArchive) -> None:\n", + " # remove previous sedml\n", + " print(len(uploaded_archive.contents))\n", + " for content in uploaded_archive.contents:\n", + " if 'sedml' in content.location:\n", + " uploaded_archive.contents.remove(content)\n", + " print(len(uploaded_archive.contents))\n", "\n", " # TODO: add this to the yaml spec\n", " @classmethod\n", @@ -302,7 +385,7 @@ " cls,\n", " uploaded_archive: CombineArchive,\n", " extraction_dir: str,\n", - " kisao_id: str = None):\n", + " kisao_id: str = None) -> Dict:\n", " for content in uploaded_archive.contents:\n", " if 'sedml' in content.location:\n", " sed_fp = content.location.replace('./', '')\n", @@ -353,438 +436,18 @@ " temp_extraction_dir = tempfile.mkdtemp()\n", " uploaded_archive: CombineArchive = cls.read_omex(omex_fp, temp_extraction_dir)\n", " serialized_editable_params = cls.introspect_archive(uploaded_archive, temp_extraction_dir, kisao_id)\n", - " pp(cls.generate_archive_from_changed_model(uploaded_archive, temp_extraction_dir, kisao_id))\n", + "\n", + " adjusted_sed: SedDocument = cls.generate_sed_doc_from_changed_model(uploaded_archive, temp_extraction_dir, kisao_id)\n", "\n", "\n", "\n", "ArchiveEditorApi.run('/content')" ], "metadata": { - "colab": { - "base_uri": "https://localhost:8080/" - }, - "id": "nhzHa4j_uj9y", - "outputId": "9ac707a6-fe11-462c-9a28-b218ee83be02" + "id": "nhzHa4j_uj9y" }, - "execution_count": 110, - "outputs": [ - { - "output_type": "stream", - "name": "stderr", - "text": [ - "/usr/local/lib/python3.10/dist-packages/biosimulators_utils/warnings.py:31: BioSimulatorsWarning: The SED document is potentially incorrect.\n", - " - This tool validates XPaths for model changes and variables against their unmodified target models. As a result, this tool does not fully validate these XPaths. These XPaths could be invalidated by changes to their target models.\n", - " - Model `Ciliberto2003_Morphogenesis` has warnings.\n", - " - The model file `BIOMD0000000297_url.xml` has warnings.\n", - " - 3 warnings of type SBO term consistency (10713). The following is the first warning at line 211, column 6:\n", - " - The value of the 'sboTerm' attribute on a 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", - " Reference: L2V4 Section 5\n", - " SBO term 'SBO:0000014' on the is not in the appropriate branch.\n", - " - 9 warnings of type SBO term consistency (10703). The following is the first warning at line 405, column 6:\n", - " - The value of the 'sboTerm' attribute on a is expected to be an SBO identifier (http://www.biomodels.net/SBO/) referring to a quantitative parameter defined in SBO (i.e., terms derived from SBO:0000002, \"quantitative systems description parameter\"). \n", - " Reference: L2V4 Sections 4.9.5 and 5\n", - " SBO term 'SBO:0000336' on the is not in the appropriate branch.\n", - " - 67 warnings of type SBML unit consistency (99505). The following is the first warning at line 440, column 6:\n", - " - 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. \n", - " The units of the expression 'kswe_prime * Swe1 + kswe_doubleprime * Swe1M + kswe_tripleprime * PSwe1' cannot be fully checked. Unit consistency reported as either no errors or further unit errors related to this object may not be accurate.\n", - " - 81 warnings of type Modeling practice (80701). The following is the first warning at line 357, column 6:\n", - " - As a principle of best modeling practice, the units of a 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.\n", - " The with the id 'kswe' does not have a 'units' attribute.\n", - " warnings.warn(termcolor.colored(message, Colors.warning.value), category)\n" - ] - }, - { - "output_type": "stream", - "name": "stdout", - "text": [ - "{ 'model_lang': 'urn:sedml:language:sbml',\n", - " 'model_source': '/tmp/tmpxmx8c28j/BIOMD0000000297_url.xml',\n", - " 'sim_model': ,\n", - " 'sim_type': ,\n", - " 'values': [ { 'id': 'Initial concentration of species '\n", - " '\"CDC28_Clb2_Sic1_Complex\"',\n", - " 'name': 'Initial concentration of species '\n", - " '\"CDC28_Clb2_Sic1_Complex\"',\n", - " 'target': \"/sbml:sbml/sbml:model/sbml:listOfSpecies/sbml:species[@id='Trim']/@initialConcentration\",\n", - " 'target_namespaces': { 'sbml': 'http://www.sbml.org/sbml/level2/version4'}},\n", - " { 'id': 'Initial concentration of species \"Clb2\"',\n", - " 'name': 'Initial concentration of species \"Clb2\"',\n", - " 'target': \"/sbml:sbml/sbml:model/sbml:listOfSpecies/sbml:species[@id='Clb']/@initialConcentration\",\n", - " 'target_namespaces': { 'sbml': 'http://www.sbml.org/sbml/level2/version4'}},\n", - " { 'id': 'Initial concentration of species \"Sic1\"',\n", - " 'name': 'Initial concentration of species \"Sic1\"',\n", - " 'target': \"/sbml:sbml/sbml:model/sbml:listOfSpecies/sbml:species[@id='Sic']/@initialConcentration\",\n", - " 'target_namespaces': { 'sbml': 'http://www.sbml.org/sbml/level2/version4'}},\n", - " { 'id': 'Initial concentration of species \"Phosphorylated '\n", - " 'Cdc28_Clb2_Sic1 Complex\"',\n", - " 'name': 'Initial concentration of species \"Phosphorylated '\n", - " 'Cdc28_Clb2_Sic1 Complex\"',\n", - " 'target': \"/sbml:sbml/sbml:model/sbml:listOfSpecies/sbml:species[@id='PTrim']/@initialConcentration\",\n", - " 'target_namespaces': { 'sbml': 'http://www.sbml.org/sbml/level2/version4'}},\n", - " { 'id': 'Initial concentration of species \"Phosphorylated Clb2\"',\n", - " 'name': 'Initial concentration of species \"Phosphorylated '\n", - " 'Clb2\"',\n", - " 'target': \"/sbml:sbml/sbml:model/sbml:listOfSpecies/sbml:species[@id='PClb']/@initialConcentration\",\n", - " 'target_namespaces': { 'sbml': 'http://www.sbml.org/sbml/level2/version4'}},\n", - " { 'id': 'Initial concentration of species \"SBF\"',\n", - " 'name': 'Initial concentration of species \"SBF\"',\n", - " 'target': \"/sbml:sbml/sbml:model/sbml:listOfSpecies/sbml:species[@id='SBF']/@initialConcentration\",\n", - " 'target_namespaces': { 'sbml': 'http://www.sbml.org/sbml/level2/version4'}},\n", - " { 'id': 'Initial concentration of species \"Intermediary Enzyme\"',\n", - " 'name': 'Initial concentration of species \"Intermediary '\n", - " 'Enzyme\"',\n", - " 'target': \"/sbml:sbml/sbml:model/sbml:listOfSpecies/sbml:species[@id='IE']/@initialConcentration\",\n", - " 'target_namespaces': { 'sbml': 'http://www.sbml.org/sbml/level2/version4'}},\n", - " { 'id': 'Initial concentration of species \"Cdc20 activated\"',\n", - " 'name': 'Initial concentration of species \"Cdc20 activated\"',\n", - " 'target': \"/sbml:sbml/sbml:model/sbml:listOfSpecies/sbml:species[@id='Cdc20a']/@initialConcentration\",\n", - " 'target_namespaces': { 'sbml': 'http://www.sbml.org/sbml/level2/version4'}},\n", - " { 'id': 'Initial concentration of species \"Cdc20\"',\n", - " 'name': 'Initial concentration of species \"Cdc20\"',\n", - " 'target': \"/sbml:sbml/sbml:model/sbml:listOfSpecies/sbml:species[@id='Cdc20']/@initialConcentration\",\n", - " 'target_namespaces': { 'sbml': 'http://www.sbml.org/sbml/level2/version4'}},\n", - " { 'id': 'Initial concentration of species \"Cdh1\"',\n", - " 'name': 'Initial concentration of species \"Cdh1\"',\n", - " 'target': \"/sbml:sbml/sbml:model/sbml:listOfSpecies/sbml:species[@id='Cdh1']/@initialConcentration\",\n", - " 'target_namespaces': { 'sbml': 'http://www.sbml.org/sbml/level2/version4'}},\n", - " { 'id': 'Initial concentration of species \"Swe1\"',\n", - " 'name': 'Initial concentration of species \"Swe1\"',\n", - " 'target': \"/sbml:sbml/sbml:model/sbml:listOfSpecies/sbml:species[@id='Swe1']/@initialConcentration\",\n", - " 'target_namespaces': { 'sbml': 'http://www.sbml.org/sbml/level2/version4'}},\n", - " { 'id': 'Initial concentration of species \"Swe1 modified\"',\n", - " 'name': 'Initial concentration of species \"Swe1 modified\"',\n", - " 'target': \"/sbml:sbml/sbml:model/sbml:listOfSpecies/sbml:species[@id='Swe1M']/@initialConcentration\",\n", - " 'target_namespaces': { 'sbml': 'http://www.sbml.org/sbml/level2/version4'}},\n", - " { 'id': 'Initial concentration of species \"Phosphorylated Swe1\"',\n", - " 'name': 'Initial concentration of species \"Phosphorylated '\n", - " 'Swe1\"',\n", - " 'target': \"/sbml:sbml/sbml:model/sbml:listOfSpecies/sbml:species[@id='PSwe1']/@initialConcentration\",\n", - " 'target_namespaces': { 'sbml': 'http://www.sbml.org/sbml/level2/version4'}},\n", - " { 'id': 'Initial concentration of species \"Phosphorylated Swe1M\"',\n", - " 'name': 'Initial concentration of species \"Phosphorylated '\n", - " 'Swe1M\"',\n", - " 'target': \"/sbml:sbml/sbml:model/sbml:listOfSpecies/sbml:species[@id='PSwe1M']/@initialConcentration\",\n", - " 'target_namespaces': { 'sbml': 'http://www.sbml.org/sbml/level2/version4'}},\n", - " { 'id': 'Initial concentration of species \"Mih1a\"',\n", - " 'name': 'Initial concentration of species \"Mih1a\"',\n", - " 'target': \"/sbml:sbml/sbml:model/sbml:listOfSpecies/sbml:species[@id='Mih1a']/@initialConcentration\",\n", - " 'target_namespaces': { 'sbml': 'http://www.sbml.org/sbml/level2/version4'}},\n", - " { 'id': 'Initial concentration of species \"Mcm\"',\n", - " 'name': 'Initial concentration of species \"Mcm\"',\n", - " 'target': \"/sbml:sbml/sbml:model/sbml:listOfSpecies/sbml:species[@id='Mcm']/@initialConcentration\",\n", - " 'target_namespaces': { 'sbml': 'http://www.sbml.org/sbml/level2/version4'}},\n", - " { 'id': 'Initial concentration of species \"BE\"',\n", - " 'name': 'Initial concentration of species \"BE\"',\n", - " 'target': \"/sbml:sbml/sbml:model/sbml:listOfSpecies/sbml:species[@id='BE']/@initialConcentration\",\n", - " 'target_namespaces': { 'sbml': 'http://www.sbml.org/sbml/level2/version4'}},\n", - " { 'id': 'Initial concentration of species \"Cln\"',\n", - " 'name': 'Initial concentration of species \"Cln\"',\n", - " 'target': \"/sbml:sbml/sbml:model/sbml:listOfSpecies/sbml:species[@id='Cln']/@initialConcentration\",\n", - " 'target_namespaces': { 'sbml': 'http://www.sbml.org/sbml/level2/version4'}},\n", - " { 'id': 'Initial concentration of species \"mass\"',\n", - " 'name': 'Initial concentration of species \"mass\"',\n", - " 'target': \"/sbml:sbml/sbml:model/sbml:listOfSpecies/sbml:species[@id='mass']/@initialConcentration\",\n", - " 'target_namespaces': { 'sbml': 'http://www.sbml.org/sbml/level2/version4'}},\n", - " { 'id': 'Initial size of compartment \"compartment\"',\n", - " 'name': 'Initial size of compartment \"compartment\"',\n", - " 'target': \"/sbml:sbml/sbml:model/sbml:listOfCompartments/sbml:compartment[@id='compartment']/@size\",\n", - " 'target_namespaces': { 'sbml': 'http://www.sbml.org/sbml/level2/version4'}},\n", - " { 'id': 'Value of parameter \"kswe_prime\"',\n", - " 'name': 'Value of parameter \"kswe_prime\"',\n", - " 'target': \"/sbml:sbml/sbml:model/sbml:listOfParameters/sbml:parameter[@id='kswe_prime']/@value\",\n", - " 'target_namespaces': { 'sbml': 'http://www.sbml.org/sbml/level2/version4'}},\n", - " { 'id': 'Value of parameter \"kswe_doubleprime\"',\n", - " 'name': 'Value of parameter \"kswe_doubleprime\"',\n", - " 'target': \"/sbml:sbml/sbml:model/sbml:listOfParameters/sbml:parameter[@id='kswe_doubleprime']/@value\",\n", - " 'target_namespaces': { 'sbml': 'http://www.sbml.org/sbml/level2/version4'}},\n", - " { 'id': 'Value of parameter \"kswe_tripleprime\"',\n", - " 'name': 'Value of parameter \"kswe_tripleprime\"',\n", - " 'target': \"/sbml:sbml/sbml:model/sbml:listOfParameters/sbml:parameter[@id='kswe_tripleprime']/@value\",\n", - " 'target_namespaces': { 'sbml': 'http://www.sbml.org/sbml/level2/version4'}},\n", - " { 'id': 'Value of parameter \"kmih_prime\"',\n", - " 'name': 'Value of parameter \"kmih_prime\"',\n", - " 'target': \"/sbml:sbml/sbml:model/sbml:listOfParameters/sbml:parameter[@id='kmih_prime']/@value\",\n", - " 'target_namespaces': { 'sbml': 'http://www.sbml.org/sbml/level2/version4'}},\n", - " { 'id': 'Value of parameter \"Mih_ast\"',\n", - " 'name': 'Value of parameter \"Mih_ast\"',\n", - " 'target': \"/sbml:sbml/sbml:model/sbml:listOfParameters/sbml:parameter[@id='Mih_ast']/@value\",\n", - " 'target_namespaces': { 'sbml': 'http://www.sbml.org/sbml/level2/version4'}},\n", - " { 'id': 'Value of parameter \"kmih_doubleprime\"',\n", - " 'name': 'Value of parameter \"kmih_doubleprime\"',\n", - " 'target': \"/sbml:sbml/sbml:model/sbml:listOfParameters/sbml:parameter[@id='kmih_doubleprime']/@value\",\n", - " 'target_namespaces': { 'sbml': 'http://www.sbml.org/sbml/level2/version4'}},\n", - " { 'id': 'Value of parameter \"Mih\"',\n", - " 'name': 'Value of parameter \"Mih\"',\n", - " 'target': \"/sbml:sbml/sbml:model/sbml:listOfParameters/sbml:parameter[@id='Mih']/@value\",\n", - " 'target_namespaces': { 'sbml': 'http://www.sbml.org/sbml/level2/version4'}},\n", - " { 'id': 'Value of parameter \"IEtot\"',\n", - " 'name': 'Value of parameter \"IEtot\"',\n", - " 'target': \"/sbml:sbml/sbml:model/sbml:listOfParameters/sbml:parameter[@id='IEtot']/@value\",\n", - " 'target_namespaces': { 'sbml': 'http://www.sbml.org/sbml/level2/version4'}},\n", - " { 'id': 'Value of parameter \"Cdh1tot\"',\n", - " 'name': 'Value of parameter \"Cdh1tot\"',\n", - " 'target': \"/sbml:sbml/sbml:model/sbml:listOfParameters/sbml:parameter[@id='Cdh1tot']/@value\",\n", - " 'target_namespaces': { 'sbml': 'http://www.sbml.org/sbml/level2/version4'}},\n", - " { 'id': 'Value of parameter \"Mih1tot\"',\n", - " 'name': 'Value of parameter \"Mih1tot\"',\n", - " 'target': \"/sbml:sbml/sbml:model/sbml:listOfParameters/sbml:parameter[@id='Mih1tot']/@value\",\n", - " 'target_namespaces': { 'sbml': 'http://www.sbml.org/sbml/level2/version4'}},\n", - " { 'id': 'Value of parameter \"Mcmtot\"',\n", - " 'name': 'Value of parameter \"Mcmtot\"',\n", - " 'target': \"/sbml:sbml/sbml:model/sbml:listOfParameters/sbml:parameter[@id='Mcmtot']/@value\",\n", - " 'target_namespaces': { 'sbml': 'http://www.sbml.org/sbml/level2/version4'}},\n", - " { 'id': 'Value of parameter \"SBFtot\"',\n", - " 'name': 'Value of parameter \"SBFtot\"',\n", - " 'target': \"/sbml:sbml/sbml:model/sbml:listOfParameters/sbml:parameter[@id='SBFtot']/@value\",\n", - " 'target_namespaces': { 'sbml': 'http://www.sbml.org/sbml/level2/version4'}},\n", - " { 'id': 'Value of parameter \"kdiss\"',\n", - " 'name': 'Value of parameter \"kdiss\"',\n", - " 'target': \"/sbml:sbml/sbml:model/sbml:listOfParameters/sbml:parameter[@id='kdiss']/@value\",\n", - " 'target_namespaces': { 'sbml': 'http://www.sbml.org/sbml/level2/version4'}},\n", - " { 'id': 'Value of parameter \"kdsic_prime\"',\n", - " 'name': 'Value of parameter \"kdsic_prime\"',\n", - " 'target': \"/sbml:sbml/sbml:model/sbml:listOfParameters/sbml:parameter[@id='kdsic_prime']/@value\",\n", - " 'target_namespaces': { 'sbml': 'http://www.sbml.org/sbml/level2/version4'}},\n", - " { 'id': 'Value of parameter \"kdsic_doubleprime\"',\n", - " 'name': 'Value of parameter \"kdsic_doubleprime\"',\n", - " 'target': \"/sbml:sbml/sbml:model/sbml:listOfParameters/sbml:parameter[@id='kdsic_doubleprime']/@value\",\n", - " 'target_namespaces': { 'sbml': 'http://www.sbml.org/sbml/level2/version4'}},\n", - " { 'id': 'Value of parameter \"kdsic\"',\n", - " 'name': 'Value of parameter \"kdsic\"',\n", - " 'target': \"/sbml:sbml/sbml:model/sbml:listOfParameters/sbml:parameter[@id='kdsic']/@value\",\n", - " 'target_namespaces': { 'sbml': 'http://www.sbml.org/sbml/level2/version4'}},\n", - " { 'id': 'Value of parameter \"kdclb_doubleprime\"',\n", - " 'name': 'Value of parameter \"kdclb_doubleprime\"',\n", - " 'target': \"/sbml:sbml/sbml:model/sbml:listOfParameters/sbml:parameter[@id='kdclb_doubleprime']/@value\",\n", - " 'target_namespaces': { 'sbml': 'http://www.sbml.org/sbml/level2/version4'}},\n", - " { 'id': 'Value of parameter \"kdclb_tripleprime\"',\n", - " 'name': 'Value of parameter \"kdclb_tripleprime\"',\n", - " 'target': \"/sbml:sbml/sbml:model/sbml:listOfParameters/sbml:parameter[@id='kdclb_tripleprime']/@value\",\n", - " 'target_namespaces': { 'sbml': 'http://www.sbml.org/sbml/level2/version4'}},\n", - " { 'id': 'Value of parameter \"kdclb_prime\"',\n", - " 'name': 'Value of parameter \"kdclb_prime\"',\n", - " 'target': \"/sbml:sbml/sbml:model/sbml:listOfParameters/sbml:parameter[@id='kdclb_prime']/@value\",\n", - " 'target_namespaces': { 'sbml': 'http://www.sbml.org/sbml/level2/version4'}},\n", - " { 'id': 'Value of parameter \"kass\"',\n", - " 'name': 'Value of parameter \"kass\"',\n", - " 'target': \"/sbml:sbml/sbml:model/sbml:listOfParameters/sbml:parameter[@id='kass']/@value\",\n", - " 'target_namespaces': { 'sbml': 'http://www.sbml.org/sbml/level2/version4'}},\n", - " { 'id': 'Value of parameter \"ksclb\"',\n", - " 'name': 'Value of parameter \"ksclb\"',\n", - " 'target': \"/sbml:sbml/sbml:model/sbml:listOfParameters/sbml:parameter[@id='ksclb']/@value\",\n", - " 'target_namespaces': { 'sbml': 'http://www.sbml.org/sbml/level2/version4'}},\n", - " { 'id': 'Value of parameter \"Jm\"',\n", - " 'name': 'Value of parameter \"Jm\"',\n", - " 'target': \"/sbml:sbml/sbml:model/sbml:listOfParameters/sbml:parameter[@id='Jm']/@value\",\n", - " 'target_namespaces': { 'sbml': 'http://www.sbml.org/sbml/level2/version4'}},\n", - " { 'id': 'Value of parameter \"eps\"',\n", - " 'name': 'Value of parameter \"eps\"',\n", - " 'target': \"/sbml:sbml/sbml:model/sbml:listOfParameters/sbml:parameter[@id='eps']/@value\",\n", - " 'target_namespaces': { 'sbml': 'http://www.sbml.org/sbml/level2/version4'}},\n", - " { 'id': 'Value of parameter \"kisbf_prime\"',\n", - " 'name': 'Value of parameter \"kisbf_prime\"',\n", - " 'target': \"/sbml:sbml/sbml:model/sbml:listOfParameters/sbml:parameter[@id='kisbf_prime']/@value\",\n", - " 'target_namespaces': { 'sbml': 'http://www.sbml.org/sbml/level2/version4'}},\n", - " { 'id': 'Value of parameter \"kisbf_doubleprime\"',\n", - " 'name': 'Value of parameter \"kisbf_doubleprime\"',\n", - " 'target': \"/sbml:sbml/sbml:model/sbml:listOfParameters/sbml:parameter[@id='kisbf_doubleprime']/@value\",\n", - " 'target_namespaces': { 'sbml': 'http://www.sbml.org/sbml/level2/version4'}},\n", - " { 'id': 'Value of parameter \"jisbf\"',\n", - " 'name': 'Value of parameter \"jisbf\"',\n", - " 'target': \"/sbml:sbml/sbml:model/sbml:listOfParameters/sbml:parameter[@id='jisbf']/@value\",\n", - " 'target_namespaces': { 'sbml': 'http://www.sbml.org/sbml/level2/version4'}},\n", - " { 'id': 'Value of parameter \"kasbf_prime\"',\n", - " 'name': 'Value of parameter \"kasbf_prime\"',\n", - " 'target': \"/sbml:sbml/sbml:model/sbml:listOfParameters/sbml:parameter[@id='kasbf_prime']/@value\",\n", - " 'target_namespaces': { 'sbml': 'http://www.sbml.org/sbml/level2/version4'}},\n", - " { 'id': 'Value of parameter \"kasbf_doubleprime\"',\n", - " 'name': 'Value of parameter \"kasbf_doubleprime\"',\n", - " 'target': \"/sbml:sbml/sbml:model/sbml:listOfParameters/sbml:parameter[@id='kasbf_doubleprime']/@value\",\n", - " 'target_namespaces': { 'sbml': 'http://www.sbml.org/sbml/level2/version4'}},\n", - " { 'id': 'Value of parameter \"jasbf\"',\n", - " 'name': 'Value of parameter \"jasbf\"',\n", - " 'target': \"/sbml:sbml/sbml:model/sbml:listOfParameters/sbml:parameter[@id='jasbf']/@value\",\n", - " 'target_namespaces': { 'sbml': 'http://www.sbml.org/sbml/level2/version4'}},\n", - " { 'id': 'Value of parameter \"kiie\"',\n", - " 'name': 'Value of parameter \"kiie\"',\n", - " 'target': \"/sbml:sbml/sbml:model/sbml:listOfParameters/sbml:parameter[@id='kiie']/@value\",\n", - " 'target_namespaces': { 'sbml': 'http://www.sbml.org/sbml/level2/version4'}},\n", - " { 'id': 'Value of parameter \"jiie\"',\n", - " 'name': 'Value of parameter \"jiie\"',\n", - " 'target': \"/sbml:sbml/sbml:model/sbml:listOfParameters/sbml:parameter[@id='jiie']/@value\",\n", - " 'target_namespaces': { 'sbml': 'http://www.sbml.org/sbml/level2/version4'}},\n", - " { 'id': 'Value of parameter \"kaie\"',\n", - " 'name': 'Value of parameter \"kaie\"',\n", - " 'target': \"/sbml:sbml/sbml:model/sbml:listOfParameters/sbml:parameter[@id='kaie']/@value\",\n", - " 'target_namespaces': { 'sbml': 'http://www.sbml.org/sbml/level2/version4'}},\n", - " { 'id': 'Value of parameter \"jaie\"',\n", - " 'name': 'Value of parameter \"jaie\"',\n", - " 'target': \"/sbml:sbml/sbml:model/sbml:listOfParameters/sbml:parameter[@id='jaie']/@value\",\n", - " 'target_namespaces': { 'sbml': 'http://www.sbml.org/sbml/level2/version4'}},\n", - " { 'id': 'Value of parameter \"kicdc20\"',\n", - " 'name': 'Value of parameter \"kicdc20\"',\n", - " 'target': \"/sbml:sbml/sbml:model/sbml:listOfParameters/sbml:parameter[@id='kicdc20']/@value\",\n", - " 'target_namespaces': { 'sbml': 'http://www.sbml.org/sbml/level2/version4'}},\n", - " { 'id': 'Value of parameter \"jicdc20\"',\n", - " 'name': 'Value of parameter \"jicdc20\"',\n", - " 'target': \"/sbml:sbml/sbml:model/sbml:listOfParameters/sbml:parameter[@id='jicdc20']/@value\",\n", - " 'target_namespaces': { 'sbml': 'http://www.sbml.org/sbml/level2/version4'}},\n", - " { 'id': 'Value of parameter \"kdcdc20\"',\n", - " 'name': 'Value of parameter \"kdcdc20\"',\n", - " 'target': \"/sbml:sbml/sbml:model/sbml:listOfParameters/sbml:parameter[@id='kdcdc20']/@value\",\n", - " 'target_namespaces': { 'sbml': 'http://www.sbml.org/sbml/level2/version4'}},\n", - " { 'id': 'Value of parameter \"kacdc20\"',\n", - " 'name': 'Value of parameter \"kacdc20\"',\n", - " 'target': \"/sbml:sbml/sbml:model/sbml:listOfParameters/sbml:parameter[@id='kacdc20']/@value\",\n", - " 'target_namespaces': { 'sbml': 'http://www.sbml.org/sbml/level2/version4'}},\n", - " { 'id': 'Value of parameter \"jacdc20\"',\n", - " 'name': 'Value of parameter \"jacdc20\"',\n", - " 'target': \"/sbml:sbml/sbml:model/sbml:listOfParameters/sbml:parameter[@id='jacdc20']/@value\",\n", - " 'target_namespaces': { 'sbml': 'http://www.sbml.org/sbml/level2/version4'}},\n", - " { 'id': 'Value of parameter \"kicdh\"',\n", - " 'name': 'Value of parameter \"kicdh\"',\n", - " 'target': \"/sbml:sbml/sbml:model/sbml:listOfParameters/sbml:parameter[@id='kicdh']/@value\",\n", - " 'target_namespaces': { 'sbml': 'http://www.sbml.org/sbml/level2/version4'}},\n", - " { 'id': 'Value of parameter \"kicdh_prime\"',\n", - " 'name': 'Value of parameter \"kicdh_prime\"',\n", - " 'target': \"/sbml:sbml/sbml:model/sbml:listOfParameters/sbml:parameter[@id='kicdh_prime']/@value\",\n", - " 'target_namespaces': { 'sbml': 'http://www.sbml.org/sbml/level2/version4'}},\n", - " { 'id': 'Value of parameter \"jicdh\"',\n", - " 'name': 'Value of parameter \"jicdh\"',\n", - " 'target': \"/sbml:sbml/sbml:model/sbml:listOfParameters/sbml:parameter[@id='jicdh']/@value\",\n", - " 'target_namespaces': { 'sbml': 'http://www.sbml.org/sbml/level2/version4'}},\n", - " { 'id': 'Value of parameter \"Kacdh_prime\"',\n", - " 'name': 'Value of parameter \"Kacdh_prime\"',\n", - " 'target': \"/sbml:sbml/sbml:model/sbml:listOfParameters/sbml:parameter[@id='Kacdh_prime']/@value\",\n", - " 'target_namespaces': { 'sbml': 'http://www.sbml.org/sbml/level2/version4'}},\n", - " { 'id': 'Value of parameter \"Kacdh_doubleprime\"',\n", - " 'name': 'Value of parameter \"Kacdh_doubleprime\"',\n", - " 'target': \"/sbml:sbml/sbml:model/sbml:listOfParameters/sbml:parameter[@id='Kacdh_doubleprime']/@value\",\n", - " 'target_namespaces': { 'sbml': 'http://www.sbml.org/sbml/level2/version4'}},\n", - " { 'id': 'Value of parameter \"jacdh\"',\n", - " 'name': 'Value of parameter \"jacdh\"',\n", - " 'target': \"/sbml:sbml/sbml:model/sbml:listOfParameters/sbml:parameter[@id='jacdh']/@value\",\n", - " 'target_namespaces': { 'sbml': 'http://www.sbml.org/sbml/level2/version4'}},\n", - " { 'id': 'Value of parameter \"khsl1\"',\n", - " 'name': 'Value of parameter \"khsl1\"',\n", - " 'target': \"/sbml:sbml/sbml:model/sbml:listOfParameters/sbml:parameter[@id='khsl1']/@value\",\n", - " 'target_namespaces': { 'sbml': 'http://www.sbml.org/sbml/level2/version4'}},\n", - " { 'id': 'Value of parameter \"BUD\"',\n", - " 'name': 'Value of parameter \"BUD\"',\n", - " 'target': \"/sbml:sbml/sbml:model/sbml:listOfParameters/sbml:parameter[@id='BUD']/@value\",\n", - " 'target_namespaces': { 'sbml': 'http://www.sbml.org/sbml/level2/version4'}},\n", - " { 'id': 'Value of parameter \"Viwee\"',\n", - " 'name': 'Value of parameter \"Viwee\"',\n", - " 'target': \"/sbml:sbml/sbml:model/sbml:listOfParameters/sbml:parameter[@id='Viwee']/@value\",\n", - " 'target_namespaces': { 'sbml': 'http://www.sbml.org/sbml/level2/version4'}},\n", - " { 'id': 'Value of parameter \"Jiwee\"',\n", - " 'name': 'Value of parameter \"Jiwee\"',\n", - " 'target': \"/sbml:sbml/sbml:model/sbml:listOfParameters/sbml:parameter[@id='Jiwee']/@value\",\n", - " 'target_namespaces': { 'sbml': 'http://www.sbml.org/sbml/level2/version4'}},\n", - " { 'id': 'Value of parameter \"kdswe_prime\"',\n", - " 'name': 'Value of parameter \"kdswe_prime\"',\n", - " 'target': \"/sbml:sbml/sbml:model/sbml:listOfParameters/sbml:parameter[@id='kdswe_prime']/@value\",\n", - " 'target_namespaces': { 'sbml': 'http://www.sbml.org/sbml/level2/version4'}},\n", - " { 'id': 'Value of parameter \"khsl1r\"',\n", - " 'name': 'Value of parameter \"khsl1r\"',\n", - " 'target': \"/sbml:sbml/sbml:model/sbml:listOfParameters/sbml:parameter[@id='khsl1r']/@value\",\n", - " 'target_namespaces': { 'sbml': 'http://www.sbml.org/sbml/level2/version4'}},\n", - " { 'id': 'Value of parameter \"Vawee\"',\n", - " 'name': 'Value of parameter \"Vawee\"',\n", - " 'target': \"/sbml:sbml/sbml:model/sbml:listOfParameters/sbml:parameter[@id='Vawee']/@value\",\n", - " 'target_namespaces': { 'sbml': 'http://www.sbml.org/sbml/level2/version4'}},\n", - " { 'id': 'Value of parameter \"Jawee\"',\n", - " 'name': 'Value of parameter \"Jawee\"',\n", - " 'target': \"/sbml:sbml/sbml:model/sbml:listOfParameters/sbml:parameter[@id='Jawee']/@value\",\n", - " 'target_namespaces': { 'sbml': 'http://www.sbml.org/sbml/level2/version4'}},\n", - " { 'id': 'Value of parameter \"ksswe\"',\n", - " 'name': 'Value of parameter \"ksswe\"',\n", - " 'target': \"/sbml:sbml/sbml:model/sbml:listOfParameters/sbml:parameter[@id='ksswe']/@value\",\n", - " 'target_namespaces': { 'sbml': 'http://www.sbml.org/sbml/level2/version4'}},\n", - " { 'id': 'Value of parameter \"kssweC\"',\n", - " 'name': 'Value of parameter \"kssweC\"',\n", - " 'target': \"/sbml:sbml/sbml:model/sbml:listOfParameters/sbml:parameter[@id='kssweC']/@value\",\n", - " 'target_namespaces': { 'sbml': 'http://www.sbml.org/sbml/level2/version4'}},\n", - " { 'id': 'Value of parameter \"Vimih\"',\n", - " 'name': 'Value of parameter \"Vimih\"',\n", - " 'target': \"/sbml:sbml/sbml:model/sbml:listOfParameters/sbml:parameter[@id='Vimih']/@value\",\n", - " 'target_namespaces': { 'sbml': 'http://www.sbml.org/sbml/level2/version4'}},\n", - " { 'id': 'Value of parameter \"jimih\"',\n", - " 'name': 'Value of parameter \"jimih\"',\n", - " 'target': \"/sbml:sbml/sbml:model/sbml:listOfParameters/sbml:parameter[@id='jimih']/@value\",\n", - " 'target_namespaces': { 'sbml': 'http://www.sbml.org/sbml/level2/version4'}},\n", - " { 'id': 'Value of parameter \"Vamih\"',\n", - " 'name': 'Value of parameter \"Vamih\"',\n", - " 'target': \"/sbml:sbml/sbml:model/sbml:listOfParameters/sbml:parameter[@id='Vamih']/@value\",\n", - " 'target_namespaces': { 'sbml': 'http://www.sbml.org/sbml/level2/version4'}},\n", - " { 'id': 'Value of parameter \"Jamih\"',\n", - " 'name': 'Value of parameter \"Jamih\"',\n", - " 'target': \"/sbml:sbml/sbml:model/sbml:listOfParameters/sbml:parameter[@id='Jamih']/@value\",\n", - " 'target_namespaces': { 'sbml': 'http://www.sbml.org/sbml/level2/version4'}},\n", - " { 'id': 'Value of parameter \"kimcm\"',\n", - " 'name': 'Value of parameter \"kimcm\"',\n", - " 'target': \"/sbml:sbml/sbml:model/sbml:listOfParameters/sbml:parameter[@id='kimcm']/@value\",\n", - " 'target_namespaces': { 'sbml': 'http://www.sbml.org/sbml/level2/version4'}},\n", - " { 'id': 'Value of parameter \"jimcm\"',\n", - " 'name': 'Value of parameter \"jimcm\"',\n", - " 'target': \"/sbml:sbml/sbml:model/sbml:listOfParameters/sbml:parameter[@id='jimcm']/@value\",\n", - " 'target_namespaces': { 'sbml': 'http://www.sbml.org/sbml/level2/version4'}},\n", - " { 'id': 'Value of parameter \"kamcm\"',\n", - " 'name': 'Value of parameter \"kamcm\"',\n", - " 'target': \"/sbml:sbml/sbml:model/sbml:listOfParameters/sbml:parameter[@id='kamcm']/@value\",\n", - " 'target_namespaces': { 'sbml': 'http://www.sbml.org/sbml/level2/version4'}},\n", - " { 'id': 'Value of parameter \"jamcm\"',\n", - " 'name': 'Value of parameter \"jamcm\"',\n", - " 'target': \"/sbml:sbml/sbml:model/sbml:listOfParameters/sbml:parameter[@id='jamcm']/@value\",\n", - " 'target_namespaces': { 'sbml': 'http://www.sbml.org/sbml/level2/version4'}},\n", - " { 'id': 'Value of parameter \"kdbud\"',\n", - " 'name': 'Value of parameter \"kdbud\"',\n", - " 'target': \"/sbml:sbml/sbml:model/sbml:listOfParameters/sbml:parameter[@id='kdbud']/@value\",\n", - " 'target_namespaces': { 'sbml': 'http://www.sbml.org/sbml/level2/version4'}},\n", - " { 'id': 'Value of parameter \"ksbud\"',\n", - " 'name': 'Value of parameter \"ksbud\"',\n", - " 'target': \"/sbml:sbml/sbml:model/sbml:listOfParameters/sbml:parameter[@id='ksbud']/@value\",\n", - " 'target_namespaces': { 'sbml': 'http://www.sbml.org/sbml/level2/version4'}},\n", - " { 'id': 'Value of parameter \"kssic\"',\n", - " 'name': 'Value of parameter \"kssic\"',\n", - " 'target': \"/sbml:sbml/sbml:model/sbml:listOfParameters/sbml:parameter[@id='kssic']/@value\",\n", - " 'target_namespaces': { 'sbml': 'http://www.sbml.org/sbml/level2/version4'}},\n", - " { 'id': 'Value of parameter \"kdcln\"',\n", - " 'name': 'Value of parameter \"kdcln\"',\n", - " 'target': \"/sbml:sbml/sbml:model/sbml:listOfParameters/sbml:parameter[@id='kdcln']/@value\",\n", - " 'target_namespaces': { 'sbml': 'http://www.sbml.org/sbml/level2/version4'}},\n", - " { 'id': 'Value of parameter \"kscln\"',\n", - " 'name': 'Value of parameter \"kscln\"',\n", - " 'target': \"/sbml:sbml/sbml:model/sbml:listOfParameters/sbml:parameter[@id='kscln']/@value\",\n", - " 'target_namespaces': { 'sbml': 'http://www.sbml.org/sbml/level2/version4'}},\n", - " { 'id': 'Value of parameter \"kscdc20_prime\"',\n", - " 'name': 'Value of parameter \"kscdc20_prime\"',\n", - " 'target': \"/sbml:sbml/sbml:model/sbml:listOfParameters/sbml:parameter[@id='kscdc20_prime']/@value\",\n", - " 'target_namespaces': { 'sbml': 'http://www.sbml.org/sbml/level2/version4'}},\n", - " { 'id': 'Value of parameter \"kscdc20_doubleprime\"',\n", - " 'name': 'Value of parameter \"kscdc20_doubleprime\"',\n", - " 'target': \"/sbml:sbml/sbml:model/sbml:listOfParameters/sbml:parameter[@id='kscdc20_doubleprime']/@value\",\n", - " 'target_namespaces': { 'sbml': 'http://www.sbml.org/sbml/level2/version4'}},\n", - " { 'id': 'Value of parameter \"jscdc20\"',\n", - " 'name': 'Value of parameter \"jscdc20\"',\n", - " 'target': \"/sbml:sbml/sbml:model/sbml:listOfParameters/sbml:parameter[@id='jscdc20']/@value\",\n", - " 'target_namespaces': { 'sbml': 'http://www.sbml.org/sbml/level2/version4'}},\n", - " { 'id': 'Value of parameter \"kdswe_doubleprime\"',\n", - " 'name': 'Value of parameter \"kdswe_doubleprime\"',\n", - " 'target': \"/sbml:sbml/sbml:model/sbml:listOfParameters/sbml:parameter[@id='kdswe_doubleprime']/@value\",\n", - " 'target_namespaces': { 'sbml': 'http://www.sbml.org/sbml/level2/version4'}},\n", - " { 'id': 'Value of parameter \"mu\"',\n", - " 'name': 'Value of parameter \"mu\"',\n", - " 'target': \"/sbml:sbml/sbml:model/sbml:listOfParameters/sbml:parameter[@id='mu']/@value\",\n", - " 'target_namespaces': { 'sbml': 'http://www.sbml.org/sbml/level2/version4'}},\n", - " { 'id': 'Value of parameter \"flag\"',\n", - " 'name': 'Value of parameter \"flag\"',\n", - " 'target': \"/sbml:sbml/sbml:model/sbml:listOfParameters/sbml:parameter[@id='flag']/@value\",\n", - " 'target_namespaces': { 'sbml': 'http://www.sbml.org/sbml/level2/version4'}}]}\n", - "None\n" - ] - } - ] + "execution_count": null, + "outputs": [] }, { "cell_type": "markdown", @@ -811,25 +474,59 @@ }, { "cell_type": "code", - "source": [], + "source": [ + "import tkinter as tk\n", + "from tkinter import simpledialog\n", + "\n", + "# Assume this is your SED-ML document represented as a dictionary\n", + "sedml_document = {\n", + " 'model': 'my_model.xml',\n", + " 'simulation': 'stochastic',\n", + " 'steps': 1000,\n", + " 'algorithm': 'KISAO:0000032'\n", + "}\n", + "\n", + "def update_steps():\n", + " new_steps = simpledialog.askinteger(\"Update Steps\", \"Enter new number of steps:\",\n", + " parent=root)\n", + " if new_steps is not None:\n", + " sedml_document['steps'] = new_steps\n", + " steps_var.set(f\"Steps: {sedml_document['steps']}\")\n", + "\n", + "# Set up the Tkinter root window\n", + "root = tk.Tk()\n", + "root.title(\"SED-ML Editor\")\n", + "\n", + "# Display the current number of steps\n", + "steps_var = tk.StringVar(value=f\"Steps: {sedml_document['steps']}\")\n", + "tk.Label(root, textvariable=steps_var).pack()\n", + "\n", + "# Button to change the number of steps\n", + "tk.Button(root, text=\"Change Steps\", command=update_steps).pack()\n", + "\n", + "root.mainloop()\n" + ], "metadata": { "colab": { - "base_uri": "https://localhost:8080/" + "base_uri": "https://localhost:8080/", + "height": 332 }, "id": "lHP47jfF-RpL", - "outputId": "7feee280-7faa-4d57-efa6-1cb3ef37702c" + "outputId": "d6013e56-191e-4fa5-b2c9-428fe979f965" }, - "execution_count": 59, + "execution_count": 2, "outputs": [ { - "output_type": "execute_result", - "data": { - "text/plain": [ - "3" - ] - }, - "metadata": {}, - "execution_count": 59 + "output_type": "error", + "ename": "TclError", + "evalue": "no display name and no $DISPLAY environment variable", + "traceback": [ + "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", + "\u001b[0;31mTclError\u001b[0m Traceback (most recent call last)", + "\u001b[0;32m\u001b[0m in \u001b[0;36m\u001b[0;34m()\u001b[0m\n\u001b[1;32m 18\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 19\u001b[0m \u001b[0;31m# Set up the Tkinter root window\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m---> 20\u001b[0;31m \u001b[0mroot\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mtk\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mTk\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 21\u001b[0m \u001b[0mroot\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mtitle\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m\"SED-ML Editor\"\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 22\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n", + "\u001b[0;32m/usr/lib/python3.10/tkinter/__init__.py\u001b[0m in \u001b[0;36m__init__\u001b[0;34m(self, screenName, baseName, className, useTk, sync, use)\u001b[0m\n\u001b[1;32m 2297\u001b[0m \u001b[0mbaseName\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mbaseName\u001b[0m \u001b[0;34m+\u001b[0m \u001b[0mext\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 2298\u001b[0m \u001b[0minteractive\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;32mFalse\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m-> 2299\u001b[0;31m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mtk\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0m_tkinter\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mcreate\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mscreenName\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mbaseName\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mclassName\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0minteractive\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mwantobjects\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0museTk\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0msync\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0muse\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 2300\u001b[0m \u001b[0;32mif\u001b[0m \u001b[0museTk\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 2301\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_loadtk\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", + "\u001b[0;31mTclError\u001b[0m: no display name and no $DISPLAY environment variable" + ] } ] },