diff --git a/notebooks/copasi_process_composer.ipynb b/notebooks/copasi_process_composer.ipynb index 5b0763b25..f6724febd 100644 --- a/notebooks/copasi_process_composer.ipynb +++ b/notebooks/copasi_process_composer.ipynb @@ -22,8 +22,8 @@ "metadata": { "collapsed": false, "ExecuteTime": { - "end_time": "2024-03-04T16:36:20.943311Z", - "start_time": "2024-03-04T16:36:20.937615Z" + "end_time": "2024-03-04T16:42:08.935312Z", + "start_time": "2024-03-04T16:42:08.931881Z" } }, "id": "b43cd4493a594e60" @@ -53,8 +53,8 @@ "metadata": { "collapsed": false, "ExecuteTime": { - "end_time": "2024-03-04T16:36:22.632529Z", - "start_time": "2024-03-04T16:36:21.102685Z" + "end_time": "2024-03-04T16:42:10.809815Z", + "start_time": "2024-03-04T16:42:09.047667Z" } }, "id": "65385e04f4f5dd1a" @@ -79,8 +79,8 @@ "metadata": { "collapsed": false, "ExecuteTime": { - "end_time": "2024-03-04T16:36:22.633232Z", - "start_time": "2024-03-04T16:36:22.631252Z" + "end_time": "2024-03-04T16:42:10.810196Z", + "start_time": "2024-03-04T16:42:10.808054Z" } }, "id": "cc709690e20090cf" @@ -91,7 +91,7 @@ "outputs": [ { "data": { - "text/plain": "['CobraProcess',\n 'TelluriumProcess',\n 'CopasiProcess',\n 'ram-emitter',\n 'SmoldynProcess',\n 'console-emitter']" + "text/plain": "['CobraProcess',\n 'CopasiProcess',\n 'console-emitter',\n 'SmoldynProcess',\n 'TelluriumProcess',\n 'ram-emitter']" }, "execution_count": 4, "metadata": {}, @@ -106,8 +106,8 @@ "metadata": { "collapsed": false, "ExecuteTime": { - "end_time": "2024-03-04T16:36:22.637077Z", - "start_time": "2024-03-04T16:36:22.634683Z" + "end_time": "2024-03-04T16:42:10.813366Z", + "start_time": "2024-03-04T16:42:10.811517Z" } }, "id": "41034be54d9cf16" @@ -130,8 +130,8 @@ "metadata": { "collapsed": false, "ExecuteTime": { - "end_time": "2024-03-04T16:36:23.744581Z", - "start_time": "2024-03-04T16:36:23.741537Z" + "end_time": "2024-03-04T16:42:10.828221Z", + "start_time": "2024-03-04T16:42:10.813820Z" } }, "id": "f1e5eedb251a22c3" @@ -179,8 +179,8 @@ "metadata": { "collapsed": false, "ExecuteTime": { - "end_time": "2024-03-04T16:36:24.589871Z", - "start_time": "2024-03-04T16:36:24.585837Z" + "end_time": "2024-03-04T16:42:12.560995Z", + "start_time": "2024-03-04T16:42:12.555910Z" } }, "id": "edf123175ec3408c", @@ -206,8 +206,8 @@ "metadata": { "collapsed": false, "ExecuteTime": { - "end_time": "2024-03-04T16:36:25.770840Z", - "start_time": "2024-03-04T16:36:25.706021Z" + "end_time": "2024-03-04T16:42:13.555997Z", + "start_time": "2024-03-04T16:42:13.490510Z" } }, "id": "40ab6f70ac3f4996", @@ -244,8 +244,8 @@ "metadata": { "collapsed": false, "ExecuteTime": { - "end_time": "2024-03-04T16:36:26.438108Z", - "start_time": "2024-03-04T16:36:26.432170Z" + "end_time": "2024-03-04T16:42:14.251034Z", + "start_time": "2024-03-04T16:42:14.219527Z" } }, "id": "d02a547b85138f96" @@ -290,8 +290,8 @@ "metadata": { "collapsed": false, "ExecuteTime": { - "end_time": "2024-03-04T16:36:27.149616Z", - "start_time": "2024-03-04T16:36:27.137212Z" + "end_time": "2024-03-04T16:42:14.814108Z", + "start_time": "2024-03-04T16:42:14.810827Z" } }, "id": "1b6c269646357d7d" @@ -318,7 +318,7 @@ " 'model_name': 'Simple Composite Process from File',\n", " 'model_source': { 'value': '../biosimulator_processes/model_files/BIOMD0000000061_url.xml'},\n", " 'model_units': None},\n", - " 'process_name': 'simple_copasi'}\n" + " 'process_name': 'simple_copasi_from_file'}\n" ] } ], @@ -327,7 +327,7 @@ "process_config_from_file = CopasiProcessConfigSchema(\n", " method='stochastic',\n", " model=process_model_from_file,\n", - " process_name='simple_copasi'\n", + " process_name='simple_copasi_from_file'\n", ")\n", "\n", "\n", @@ -336,8 +336,8 @@ "metadata": { "collapsed": false, "ExecuteTime": { - "end_time": "2024-03-04T16:36:27.762814Z", - "start_time": "2024-03-04T16:36:27.760168Z" + "end_time": "2024-03-04T16:42:15.337152Z", + "start_time": "2024-03-04T16:42:15.334361Z" } }, "id": "5d434956e65b1a42" @@ -361,8 +361,8 @@ "metadata": { "collapsed": false, "ExecuteTime": { - "end_time": "2024-03-04T16:36:28.458757Z", - "start_time": "2024-03-04T16:36:28.455080Z" + "end_time": "2024-03-04T16:42:16.043432Z", + "start_time": "2024-03-04T16:42:16.040674Z" } }, "id": "de88e95d8f616779" @@ -370,27 +370,7 @@ { "cell_type": "code", "execution_count": 11, - "outputs": [ - { - "ename": "AttributeError", - "evalue": "'NoneType' object has no attribute 'index'", - "output_type": "error", - "traceback": [ - "\u001B[0;31m---------------------------------------------------------------------------\u001B[0m", - "\u001B[0;31mAttributeError\u001B[0m Traceback (most recent call last)", - "Cell \u001B[0;32mIn[11], line 4\u001B[0m\n\u001B[1;32m 1\u001B[0m \u001B[38;5;66;03m# 4. Add the process instance by the name of 'simple_copasi' to the builder\u001B[39;00m\n\u001B[0;32m----> 4\u001B[0m \u001B[43mb\u001B[49m\u001B[43m[\u001B[49m\u001B[43mprocess_config_from_file\u001B[49m\u001B[38;5;241;43m.\u001B[39;49m\u001B[43mprocess_name\u001B[49m\u001B[43m]\u001B[49m\u001B[38;5;241;43m.\u001B[39;49m\u001B[43madd_process\u001B[49m\u001B[43m(\u001B[49m\n\u001B[1;32m 5\u001B[0m \u001B[43m \u001B[49m\u001B[43mname\u001B[49m\u001B[38;5;241;43m=\u001B[39;49m\u001B[38;5;124;43m'\u001B[39;49m\u001B[38;5;124;43mCopasiProcess\u001B[39;49m\u001B[38;5;124;43m'\u001B[39;49m\u001B[43m,\u001B[49m\n\u001B[1;32m 6\u001B[0m \u001B[43m \u001B[49m\u001B[43mmodel\u001B[49m\u001B[38;5;241;43m=\u001B[39;49m\u001B[43mprocess_config_from_file\u001B[49m\u001B[38;5;241;43m.\u001B[39;49m\u001B[43mmodel\u001B[49m\u001B[43m,\u001B[49m\n\u001B[1;32m 7\u001B[0m \u001B[43m \u001B[49m\u001B[43mmethod\u001B[49m\u001B[38;5;241;43m=\u001B[39;49m\u001B[43mprocess_config_from_file\u001B[49m\u001B[38;5;241;43m.\u001B[39;49m\u001B[43mmethod\u001B[49m\n\u001B[1;32m 8\u001B[0m \u001B[43m)\u001B[49m\n", - "File \u001B[0;32m~/Library/Caches/pypoetry/virtualenvs/biosimulator-processes-KVuYbFzt-py3.10/lib/python3.10/site-packages/builder/builder_api.py:148\u001B[0m, in \u001B[0;36mBuilderNode.add_process\u001B[0;34m(self, name, config, inputs, outputs, **kwargs)\u001B[0m\n\u001B[1;32m 139\u001B[0m state \u001B[38;5;241m=\u001B[39m {\n\u001B[1;32m 140\u001B[0m \u001B[38;5;124m'\u001B[39m\u001B[38;5;124m_type\u001B[39m\u001B[38;5;124m'\u001B[39m: edge_type,\n\u001B[1;32m 141\u001B[0m \u001B[38;5;124m'\u001B[39m\u001B[38;5;124maddress\u001B[39m\u001B[38;5;124m'\u001B[39m: \u001B[38;5;124mf\u001B[39m\u001B[38;5;124m'\u001B[39m\u001B[38;5;124mlocal:\u001B[39m\u001B[38;5;132;01m{\u001B[39;00mname\u001B[38;5;132;01m}\u001B[39;00m\u001B[38;5;124m'\u001B[39m, \u001B[38;5;66;03m# TODO -- only support local right now?\u001B[39;00m\n\u001B[0;32m (...)\u001B[0m\n\u001B[1;32m 144\u001B[0m \u001B[38;5;124m'\u001B[39m\u001B[38;5;124moutputs\u001B[39m\u001B[38;5;124m'\u001B[39m: {} \u001B[38;5;28;01mif\u001B[39;00m outputs \u001B[38;5;129;01mis\u001B[39;00m \u001B[38;5;28;01mNone\u001B[39;00m \u001B[38;5;28;01melse\u001B[39;00m outputs,\n\u001B[1;32m 145\u001B[0m }\n\u001B[1;32m 147\u001B[0m set_path(tree\u001B[38;5;241m=\u001B[39m\u001B[38;5;28mself\u001B[39m\u001B[38;5;241m.\u001B[39mbuilder\u001B[38;5;241m.\u001B[39mtree, path\u001B[38;5;241m=\u001B[39m\u001B[38;5;28mself\u001B[39m\u001B[38;5;241m.\u001B[39mpath, value\u001B[38;5;241m=\u001B[39mstate)\n\u001B[0;32m--> 148\u001B[0m \u001B[38;5;28;43mself\u001B[39;49m\u001B[38;5;241;43m.\u001B[39;49m\u001B[43mbuilder\u001B[49m\u001B[38;5;241;43m.\u001B[39;49m\u001B[43mcomplete\u001B[49m\u001B[43m(\u001B[49m\u001B[43m)\u001B[49m\n", - "File \u001B[0;32m~/Library/Caches/pypoetry/virtualenvs/biosimulator-processes-KVuYbFzt-py3.10/lib/python3.10/site-packages/builder/builder_api.py:233\u001B[0m, in \u001B[0;36mBuilder.complete\u001B[0;34m(self)\u001B[0m\n\u001B[1;32m 232\u001B[0m \u001B[38;5;28;01mdef\u001B[39;00m \u001B[38;5;21mcomplete\u001B[39m(\u001B[38;5;28mself\u001B[39m):\n\u001B[0;32m--> 233\u001B[0m \u001B[38;5;28mself\u001B[39m\u001B[38;5;241m.\u001B[39mschema, \u001B[38;5;28mself\u001B[39m\u001B[38;5;241m.\u001B[39mtree \u001B[38;5;241m=\u001B[39m \u001B[38;5;28;43mself\u001B[39;49m\u001B[38;5;241;43m.\u001B[39;49m\u001B[43mcore\u001B[49m\u001B[38;5;241;43m.\u001B[39;49m\u001B[43mcomplete\u001B[49m\u001B[43m(\u001B[49m\u001B[38;5;28;43mself\u001B[39;49m\u001B[38;5;241;43m.\u001B[39;49m\u001B[43mschema\u001B[49m\u001B[43m,\u001B[49m\u001B[43m \u001B[49m\u001B[38;5;28;43mself\u001B[39;49m\u001B[38;5;241;43m.\u001B[39;49m\u001B[43mtree\u001B[49m\u001B[43m)\u001B[49m\n", - "File \u001B[0;32m~/Library/Caches/pypoetry/virtualenvs/biosimulator-processes-KVuYbFzt-py3.10/lib/python3.10/site-packages/bigraph_schema/type_system.py:1334\u001B[0m, in \u001B[0;36mTypeSystem.complete\u001B[0;34m(self, initial_schema, initial_state)\u001B[0m\n\u001B[1;32m 1328\u001B[0m state \u001B[38;5;241m=\u001B[39m \u001B[38;5;28mself\u001B[39m\u001B[38;5;241m.\u001B[39mhydrate(\n\u001B[1;32m 1329\u001B[0m full_schema,\n\u001B[1;32m 1330\u001B[0m initial_state)\n\u001B[1;32m 1332\u001B[0m \u001B[38;5;66;03m# fill in the parts of the composition schema\u001B[39;00m\n\u001B[1;32m 1333\u001B[0m \u001B[38;5;66;03m# determined by the state\u001B[39;00m\n\u001B[0;32m-> 1334\u001B[0m schema, state \u001B[38;5;241m=\u001B[39m \u001B[38;5;28;43mself\u001B[39;49m\u001B[38;5;241;43m.\u001B[39;49m\u001B[43minfer_schema\u001B[49m\u001B[43m(\u001B[49m\n\u001B[1;32m 1335\u001B[0m \u001B[43m \u001B[49m\u001B[43mfull_schema\u001B[49m\u001B[43m,\u001B[49m\n\u001B[1;32m 1336\u001B[0m \u001B[43m \u001B[49m\u001B[43mstate\u001B[49m\u001B[43m)\u001B[49m\n\u001B[1;32m 1338\u001B[0m final_state \u001B[38;5;241m=\u001B[39m \u001B[38;5;28mself\u001B[39m\u001B[38;5;241m.\u001B[39mfill(schema, state)\n\u001B[1;32m 1340\u001B[0m \u001B[38;5;66;03m# TODO: add flag to types.access(copy=True)\u001B[39;00m\n", - "File \u001B[0;32m~/Library/Caches/pypoetry/virtualenvs/biosimulator-processes-KVuYbFzt-py3.10/lib/python3.10/site-packages/process_bigraph/composite.py:270\u001B[0m, in \u001B[0;36mProcessTypes.infer_schema\u001B[0;34m(self, schema, state, top_state, path)\u001B[0m\n\u001B[1;32m 267\u001B[0m inner_path \u001B[38;5;241m=\u001B[39m path \u001B[38;5;241m+\u001B[39m (key,)\n\u001B[1;32m 268\u001B[0m \u001B[38;5;28;01mif\u001B[39;00m get_path(schema, inner_path) \u001B[38;5;129;01mis\u001B[39;00m \u001B[38;5;28;01mNone\u001B[39;00m \u001B[38;5;129;01mor\u001B[39;00m get_path(state, inner_path) \u001B[38;5;129;01mis\u001B[39;00m \u001B[38;5;28;01mNone\u001B[39;00m \u001B[38;5;129;01mor\u001B[39;00m (\n\u001B[1;32m 269\u001B[0m \u001B[38;5;28misinstance\u001B[39m(value, \u001B[38;5;28mdict\u001B[39m) \u001B[38;5;129;01mand\u001B[39;00m \u001B[38;5;124m'\u001B[39m\u001B[38;5;124m_type\u001B[39m\u001B[38;5;124m'\u001B[39m \u001B[38;5;129;01min\u001B[39;00m value):\n\u001B[0;32m--> 270\u001B[0m schema, top_state \u001B[38;5;241m=\u001B[39m \u001B[38;5;28;43mself\u001B[39;49m\u001B[38;5;241;43m.\u001B[39;49m\u001B[43minfer_schema\u001B[49m\u001B[43m(\u001B[49m\n\u001B[1;32m 271\u001B[0m \u001B[43m \u001B[49m\u001B[43mschema\u001B[49m\u001B[43m,\u001B[49m\n\u001B[1;32m 272\u001B[0m \u001B[43m \u001B[49m\u001B[43mvalue\u001B[49m\u001B[43m,\u001B[49m\n\u001B[1;32m 273\u001B[0m \u001B[43m \u001B[49m\u001B[43mtop_state\u001B[49m\u001B[38;5;241;43m=\u001B[39;49m\u001B[43mtop_state\u001B[49m\u001B[43m,\u001B[49m\n\u001B[1;32m 274\u001B[0m \u001B[43m \u001B[49m\u001B[43mpath\u001B[49m\u001B[38;5;241;43m=\u001B[39;49m\u001B[43minner_path\u001B[49m\u001B[43m)\u001B[49m\n\u001B[1;32m 276\u001B[0m \u001B[38;5;28;01melif\u001B[39;00m \u001B[38;5;28misinstance\u001B[39m(state, \u001B[38;5;28mstr\u001B[39m):\n\u001B[1;32m 277\u001B[0m \u001B[38;5;28;01mpass\u001B[39;00m\n", - "File \u001B[0;32m~/Library/Caches/pypoetry/virtualenvs/biosimulator-processes-KVuYbFzt-py3.10/lib/python3.10/site-packages/process_bigraph/composite.py:222\u001B[0m, in \u001B[0;36mProcessTypes.infer_schema\u001B[0;34m(self, schema, state, top_state, path)\u001B[0m\n\u001B[1;32m 219\u001B[0m state_type \u001B[38;5;241m=\u001B[39m state[\u001B[38;5;124m'\u001B[39m\u001B[38;5;124m_type\u001B[39m\u001B[38;5;124m'\u001B[39m]\n\u001B[1;32m 220\u001B[0m state_schema \u001B[38;5;241m=\u001B[39m \u001B[38;5;28mself\u001B[39m\u001B[38;5;241m.\u001B[39maccess(state_type)\n\u001B[0;32m--> 222\u001B[0m hydrated_state \u001B[38;5;241m=\u001B[39m \u001B[38;5;28;43mself\u001B[39;49m\u001B[38;5;241;43m.\u001B[39;49m\u001B[43mdeserialize\u001B[49m\u001B[43m(\u001B[49m\u001B[43mstate_schema\u001B[49m\u001B[43m,\u001B[49m\u001B[43m \u001B[49m\u001B[43mstate\u001B[49m\u001B[43m)\u001B[49m\n\u001B[1;32m 223\u001B[0m top_state \u001B[38;5;241m=\u001B[39m set_path(\n\u001B[1;32m 224\u001B[0m top_state,\n\u001B[1;32m 225\u001B[0m path,\n\u001B[1;32m 226\u001B[0m hydrated_state)\n\u001B[1;32m 228\u001B[0m schema \u001B[38;5;241m=\u001B[39m set_path(\n\u001B[1;32m 229\u001B[0m schema,\n\u001B[1;32m 230\u001B[0m path,\n\u001B[1;32m 231\u001B[0m {\u001B[38;5;124m'\u001B[39m\u001B[38;5;124m_type\u001B[39m\u001B[38;5;124m'\u001B[39m: state_type})\n", - "File \u001B[0;32m~/Library/Caches/pypoetry/virtualenvs/biosimulator-processes-KVuYbFzt-py3.10/lib/python3.10/site-packages/bigraph_schema/type_system.py:675\u001B[0m, in \u001B[0;36mTypeSystem.deserialize\u001B[0;34m(self, schema, encoded)\u001B[0m\n\u001B[1;32m 672\u001B[0m \u001B[38;5;28;01mif\u001B[39;00m encoded \u001B[38;5;129;01mis\u001B[39;00m \u001B[38;5;28;01mNone\u001B[39;00m:\n\u001B[1;32m 673\u001B[0m encoded \u001B[38;5;241m=\u001B[39m \u001B[38;5;28mself\u001B[39m\u001B[38;5;241m.\u001B[39mdefault(schema)\n\u001B[0;32m--> 675\u001B[0m \u001B[38;5;28;01mreturn\u001B[39;00m \u001B[43mdeserialize_function\u001B[49m\u001B[43m(\u001B[49m\n\u001B[1;32m 676\u001B[0m \u001B[43m \u001B[49m\u001B[43mfound\u001B[49m\u001B[43m,\u001B[49m\n\u001B[1;32m 677\u001B[0m \u001B[43m \u001B[49m\u001B[43mencoded\u001B[49m\u001B[43m,\u001B[49m\n\u001B[1;32m 678\u001B[0m \u001B[43m \u001B[49m\u001B[38;5;28;43mself\u001B[39;49m\u001B[43m)\u001B[49m\n\u001B[1;32m 680\u001B[0m \u001B[38;5;28;01melif\u001B[39;00m \u001B[38;5;28misinstance\u001B[39m(encoded, \u001B[38;5;28mdict\u001B[39m):\n\u001B[1;32m 681\u001B[0m result \u001B[38;5;241m=\u001B[39m {}\n", - "File \u001B[0;32m~/Library/Caches/pypoetry/virtualenvs/biosimulator-processes-KVuYbFzt-py3.10/lib/python3.10/site-packages/process_bigraph/composite.py:95\u001B[0m, in \u001B[0;36mdeserialize_process\u001B[0;34m(schema, encoded, core)\u001B[0m\n\u001B[1;32m 90\u001B[0m interval \u001B[38;5;241m=\u001B[39m core\u001B[38;5;241m.\u001B[39mdeserialize(\n\u001B[1;32m 91\u001B[0m \u001B[38;5;124m'\u001B[39m\u001B[38;5;124minterval\u001B[39m\u001B[38;5;124m'\u001B[39m,\n\u001B[1;32m 92\u001B[0m encoded\u001B[38;5;241m.\u001B[39mget(\u001B[38;5;124m'\u001B[39m\u001B[38;5;124minterval\u001B[39m\u001B[38;5;124m'\u001B[39m))\n\u001B[1;32m 94\u001B[0m \u001B[38;5;28;01mif\u001B[39;00m \u001B[38;5;129;01mnot\u001B[39;00m \u001B[38;5;124m'\u001B[39m\u001B[38;5;124minstance\u001B[39m\u001B[38;5;124m'\u001B[39m \u001B[38;5;129;01min\u001B[39;00m deserialized:\n\u001B[0;32m---> 95\u001B[0m process \u001B[38;5;241m=\u001B[39m \u001B[43minstantiate\u001B[49m\u001B[43m(\u001B[49m\u001B[43mconfig\u001B[49m\u001B[43m,\u001B[49m\u001B[43m \u001B[49m\u001B[43mcore\u001B[49m\u001B[38;5;241;43m=\u001B[39;49m\u001B[43mcore\u001B[49m\u001B[43m)\u001B[49m\n\u001B[1;32m 96\u001B[0m deserialized[\u001B[38;5;124m'\u001B[39m\u001B[38;5;124minstance\u001B[39m\u001B[38;5;124m'\u001B[39m] \u001B[38;5;241m=\u001B[39m process\n\u001B[1;32m 98\u001B[0m deserialized[\u001B[38;5;124m'\u001B[39m\u001B[38;5;124mconfig\u001B[39m\u001B[38;5;124m'\u001B[39m] \u001B[38;5;241m=\u001B[39m config\n", - "File \u001B[0;32m~/Desktop/uchc_work/biosimulator-processes/notebooks/../biosimulator_processes/processes/copasi_process.py:153\u001B[0m, in \u001B[0;36mCopasiProcess.__init__\u001B[0;34m(self, config, core)\u001B[0m\n\u001B[1;32m 150\u001B[0m \u001B[38;5;28mself\u001B[39m\u001B[38;5;241m.\u001B[39mfloating_species_initial \u001B[38;5;241m=\u001B[39m get_species(model\u001B[38;5;241m=\u001B[39m\u001B[38;5;28mself\u001B[39m\u001B[38;5;241m.\u001B[39mcopasi_model_object)[\u001B[38;5;124m'\u001B[39m\u001B[38;5;124mconcentration\u001B[39m\u001B[38;5;124m'\u001B[39m]\u001B[38;5;241m.\u001B[39mtolist()\n\u001B[1;32m 152\u001B[0m \u001B[38;5;66;03m# ----GLOBAL PARAMS: set global parameter changes\u001B[39;00m\n\u001B[0;32m--> 153\u001B[0m existing_global_parameters \u001B[38;5;241m=\u001B[39m \u001B[43mget_parameters\u001B[49m\u001B[43m(\u001B[49m\u001B[43mmodel\u001B[49m\u001B[38;5;241;43m=\u001B[39;49m\u001B[38;5;28;43mself\u001B[39;49m\u001B[38;5;241;43m.\u001B[39;49m\u001B[43mcopasi_model_object\u001B[49m\u001B[43m)\u001B[49m\u001B[38;5;241;43m.\u001B[39;49m\u001B[43mindex\u001B[49m\n\u001B[1;32m 154\u001B[0m global_parameter_changes \u001B[38;5;241m=\u001B[39m \u001B[38;5;28mself\u001B[39m\u001B[38;5;241m.\u001B[39mmodel_changes\u001B[38;5;241m.\u001B[39mget(\u001B[38;5;124m'\u001B[39m\u001B[38;5;124mglobal_parameter_changes\u001B[39m\u001B[38;5;124m'\u001B[39m, [])\n\u001B[1;32m 155\u001B[0m \u001B[38;5;28;01mif\u001B[39;00m global_parameter_changes:\n", - "\u001B[0;31mAttributeError\u001B[0m: 'NoneType' object has no attribute 'index'" - ] - } - ], + "outputs": [], "source": [ "# 4. Add the process instance by the name of 'simple_copasi' to the builder\n", "\n", @@ -404,8 +384,8 @@ "metadata": { "collapsed": false, "ExecuteTime": { - "end_time": "2024-03-04T16:36:29.508189Z", - "start_time": "2024-03-04T16:36:28.982186Z" + "end_time": "2024-03-04T16:42:16.698339Z", + "start_time": "2024-03-04T16:42:16.522040Z" } }, "id": "52d81ea2ea688d47" @@ -422,8 +402,18 @@ }, { "cell_type": "code", - "execution_count": null, - "outputs": [], + "execution_count": 12, + "outputs": [ + { + "data": { + "text/plain": " compartment type unit initial_concentration \\\nname \nEpoRJAK2 cyt reactions nmol/l 3.976220e+00 \nEpoRpJAK2 cyt reactions nmol/l 0.000000e+00 \np1EpoRpJAK2 cyt reactions nmol/l 0.000000e+00 \np2EpoRpJAK2 cyt reactions nmol/l 0.000000e+00 \np12EpoRpJAK2 cyt reactions nmol/l 0.000000e+00 \nEpoRJAK2_CIS cyt reactions nmol/l 0.000000e+00 \nSHP1 cyt reactions nmol/l 2.672510e+01 \nSHP1Act cyt reactions nmol/l 0.000000e+00 \nSTAT5 cyt reactions nmol/l 7.975350e+01 \npSTAT5 cyt reactions nmol/l 0.000000e+00 \nnpSTAT5 nuc reactions nmol/l 0.000000e+00 \nCISnRNA1 nuc reactions nmol/l 0.000000e+00 \nCISnRNA2 nuc reactions nmol/l 0.000000e+00 \nCISnRNA3 nuc reactions nmol/l 0.000000e+00 \nCISnRNA4 nuc reactions nmol/l 0.000000e+00 \nCISnRNA5 nuc reactions nmol/l 0.000000e+00 \nCISRNA cyt reactions nmol/l 0.000000e+00 \nCIS cyt reactions nmol/l 0.000000e+00 \nSOCS3nRNA1 nuc reactions nmol/l 0.000000e+00 \nSOCS3nRNA2 nuc reactions nmol/l 0.000000e+00 \nSOCS3nRNA3 nuc reactions nmol/l 0.000000e+00 \nSOCS3nRNA4 nuc reactions nmol/l 0.000000e+00 \nSOCS3nRNA5 nuc reactions nmol/l 0.000000e+00 \nSOCS3RNA cyt reactions nmol/l 0.000000e+00 \nSOCS3 cyt reactions nmol/l 0.000000e+00 \nEpo cyt reactions nmol/l 1.249970e-07 \n\n initial_particle_number initial_expression expression \\\nname \nEpoRJAK2 9.578143e+14 \nEpoRpJAK2 0.000000e+00 \np1EpoRpJAK2 0.000000e+00 \np2EpoRpJAK2 0.000000e+00 \np12EpoRpJAK2 0.000000e+00 \nEpoRJAK2_CIS 0.000000e+00 \nSHP1 6.437693e+15 \nSHP1Act 0.000000e+00 \nSTAT5 1.921147e+16 \npSTAT5 0.000000e+00 \nnpSTAT5 0.000000e+00 \nCISnRNA1 0.000000e+00 \nCISnRNA2 0.000000e+00 \nCISnRNA3 0.000000e+00 \nCISnRNA4 0.000000e+00 \nCISnRNA5 0.000000e+00 \nCISRNA 0.000000e+00 \nCIS 0.000000e+00 \nSOCS3nRNA1 0.000000e+00 \nSOCS3nRNA2 0.000000e+00 \nSOCS3nRNA3 0.000000e+00 \nSOCS3nRNA4 0.000000e+00 \nSOCS3nRNA5 0.000000e+00 \nSOCS3RNA 0.000000e+00 \nSOCS3 0.000000e+00 \nEpo 3.010998e+07 \n\n concentration particle_number rate particle_number_rate \\\nname \nEpoRJAK2 3.976220e+00 9.578143e+14 -0.314737 -7.581552e+13 \nEpoRpJAK2 0.000000e+00 0.000000e+00 0.314737 7.581552e+13 \np1EpoRpJAK2 0.000000e+00 0.000000e+00 0.000000 0.000000e+00 \np2EpoRpJAK2 0.000000e+00 0.000000e+00 0.000000 0.000000e+00 \np12EpoRpJAK2 0.000000e+00 0.000000e+00 0.000000 0.000000e+00 \nEpoRJAK2_CIS 0.000000e+00 0.000000e+00 0.000000 0.000000e+00 \nSHP1 2.672510e+01 6.437693e+15 0.000000 0.000000e+00 \nSHP1Act 0.000000e+00 0.000000e+00 0.000000 0.000000e+00 \nSTAT5 7.975350e+01 1.921147e+16 0.000000 0.000000e+00 \npSTAT5 0.000000e+00 0.000000e+00 0.000000 0.000000e+00 \nnpSTAT5 0.000000e+00 0.000000e+00 0.000000 0.000000e+00 \nCISnRNA1 0.000000e+00 0.000000e+00 0.000000 0.000000e+00 \nCISnRNA2 0.000000e+00 0.000000e+00 0.000000 0.000000e+00 \nCISnRNA3 0.000000e+00 0.000000e+00 0.000000 0.000000e+00 \nCISnRNA4 0.000000e+00 0.000000e+00 0.000000 0.000000e+00 \nCISnRNA5 0.000000e+00 0.000000e+00 0.000000 0.000000e+00 \nCISRNA 0.000000e+00 0.000000e+00 0.000000 0.000000e+00 \nCIS 0.000000e+00 0.000000e+00 0.000000 0.000000e+00 \nSOCS3nRNA1 0.000000e+00 0.000000e+00 0.000000 0.000000e+00 \nSOCS3nRNA2 0.000000e+00 0.000000e+00 0.000000 0.000000e+00 \nSOCS3nRNA3 0.000000e+00 0.000000e+00 0.000000 0.000000e+00 \nSOCS3nRNA4 0.000000e+00 0.000000e+00 0.000000 0.000000e+00 \nSOCS3nRNA5 0.000000e+00 0.000000e+00 0.000000 0.000000e+00 \nSOCS3RNA 0.000000e+00 0.000000e+00 0.000000 0.000000e+00 \nSOCS3 0.000000e+00 0.000000e+00 0.000000 0.000000e+00 \nEpo 1.249970e-07 3.010998e+07 0.000000 0.000000e+00 \n\n key sbml_id \nname \nEpoRJAK2 Metabolite_50 EpoRJAK2 \nEpoRpJAK2 Metabolite_51 EpoRpJAK2 \np1EpoRpJAK2 Metabolite_52 p1EpoRpJAK2 \np2EpoRpJAK2 Metabolite_53 p2EpoRpJAK2 \np12EpoRpJAK2 Metabolite_54 p12EpoRpJAK2 \nEpoRJAK2_CIS Metabolite_55 EpoRJAK2_CIS \nSHP1 Metabolite_56 SHP1 \nSHP1Act Metabolite_57 SHP1Act \nSTAT5 Metabolite_58 STAT5 \npSTAT5 Metabolite_59 pSTAT5 \nnpSTAT5 Metabolite_60 npSTAT5 \nCISnRNA1 Metabolite_61 CISnRNA1 \nCISnRNA2 Metabolite_62 CISnRNA2 \nCISnRNA3 Metabolite_63 CISnRNA3 \nCISnRNA4 Metabolite_64 CISnRNA4 \nCISnRNA5 Metabolite_65 CISnRNA5 \nCISRNA Metabolite_66 CISRNA \nCIS Metabolite_67 CIS \nSOCS3nRNA1 Metabolite_68 SOCS3nRNA1 \nSOCS3nRNA2 Metabolite_69 SOCS3nRNA2 \nSOCS3nRNA3 Metabolite_70 SOCS3nRNA3 \nSOCS3nRNA4 Metabolite_71 SOCS3nRNA4 \nSOCS3nRNA5 Metabolite_72 SOCS3nRNA5 \nSOCS3RNA Metabolite_73 SOCS3RNA \nSOCS3 Metabolite_74 SOCS3 \nEpo Metabolite_75 Epo ", + "text/html": "
\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
compartmenttypeunitinitial_concentrationinitial_particle_numberinitial_expressionexpressionconcentrationparticle_numberrateparticle_number_ratekeysbml_id
name
EpoRJAK2cytreactionsnmol/l3.976220e+009.578143e+143.976220e+009.578143e+14-0.314737-7.581552e+13Metabolite_50EpoRJAK2
EpoRpJAK2cytreactionsnmol/l0.000000e+000.000000e+000.000000e+000.000000e+000.3147377.581552e+13Metabolite_51EpoRpJAK2
p1EpoRpJAK2cytreactionsnmol/l0.000000e+000.000000e+000.000000e+000.000000e+000.0000000.000000e+00Metabolite_52p1EpoRpJAK2
p2EpoRpJAK2cytreactionsnmol/l0.000000e+000.000000e+000.000000e+000.000000e+000.0000000.000000e+00Metabolite_53p2EpoRpJAK2
p12EpoRpJAK2cytreactionsnmol/l0.000000e+000.000000e+000.000000e+000.000000e+000.0000000.000000e+00Metabolite_54p12EpoRpJAK2
EpoRJAK2_CIScytreactionsnmol/l0.000000e+000.000000e+000.000000e+000.000000e+000.0000000.000000e+00Metabolite_55EpoRJAK2_CIS
SHP1cytreactionsnmol/l2.672510e+016.437693e+152.672510e+016.437693e+150.0000000.000000e+00Metabolite_56SHP1
SHP1Actcytreactionsnmol/l0.000000e+000.000000e+000.000000e+000.000000e+000.0000000.000000e+00Metabolite_57SHP1Act
STAT5cytreactionsnmol/l7.975350e+011.921147e+167.975350e+011.921147e+160.0000000.000000e+00Metabolite_58STAT5
pSTAT5cytreactionsnmol/l0.000000e+000.000000e+000.000000e+000.000000e+000.0000000.000000e+00Metabolite_59pSTAT5
npSTAT5nucreactionsnmol/l0.000000e+000.000000e+000.000000e+000.000000e+000.0000000.000000e+00Metabolite_60npSTAT5
CISnRNA1nucreactionsnmol/l0.000000e+000.000000e+000.000000e+000.000000e+000.0000000.000000e+00Metabolite_61CISnRNA1
CISnRNA2nucreactionsnmol/l0.000000e+000.000000e+000.000000e+000.000000e+000.0000000.000000e+00Metabolite_62CISnRNA2
CISnRNA3nucreactionsnmol/l0.000000e+000.000000e+000.000000e+000.000000e+000.0000000.000000e+00Metabolite_63CISnRNA3
CISnRNA4nucreactionsnmol/l0.000000e+000.000000e+000.000000e+000.000000e+000.0000000.000000e+00Metabolite_64CISnRNA4
CISnRNA5nucreactionsnmol/l0.000000e+000.000000e+000.000000e+000.000000e+000.0000000.000000e+00Metabolite_65CISnRNA5
CISRNAcytreactionsnmol/l0.000000e+000.000000e+000.000000e+000.000000e+000.0000000.000000e+00Metabolite_66CISRNA
CIScytreactionsnmol/l0.000000e+000.000000e+000.000000e+000.000000e+000.0000000.000000e+00Metabolite_67CIS
SOCS3nRNA1nucreactionsnmol/l0.000000e+000.000000e+000.000000e+000.000000e+000.0000000.000000e+00Metabolite_68SOCS3nRNA1
SOCS3nRNA2nucreactionsnmol/l0.000000e+000.000000e+000.000000e+000.000000e+000.0000000.000000e+00Metabolite_69SOCS3nRNA2
SOCS3nRNA3nucreactionsnmol/l0.000000e+000.000000e+000.000000e+000.000000e+000.0000000.000000e+00Metabolite_70SOCS3nRNA3
SOCS3nRNA4nucreactionsnmol/l0.000000e+000.000000e+000.000000e+000.000000e+000.0000000.000000e+00Metabolite_71SOCS3nRNA4
SOCS3nRNA5nucreactionsnmol/l0.000000e+000.000000e+000.000000e+000.000000e+000.0000000.000000e+00Metabolite_72SOCS3nRNA5
SOCS3RNAcytreactionsnmol/l0.000000e+000.000000e+000.000000e+000.000000e+000.0000000.000000e+00Metabolite_73SOCS3RNA
SOCS3cytreactionsnmol/l0.000000e+000.000000e+000.000000e+000.000000e+000.0000000.000000e+00Metabolite_74SOCS3
Epocytreactionsnmol/l1.249970e-073.010998e+071.249970e-073.010998e+070.0000000.000000e+00Metabolite_75Epo
\n
" + }, + "execution_count": 12, + "metadata": {}, + "output_type": "execute_result" + } + ], "source": [ "from basico import *\n", "from basico import biomodels\n", @@ -434,27 +424,45 @@ "get_species(model=biomodel)" ], "metadata": { - "collapsed": false + "collapsed": false, + "ExecuteTime": { + "end_time": "2024-03-04T16:42:28.725829Z", + "start_time": "2024-03-04T16:42:26.443059Z" + } }, "id": "f499f96a817d9faf" }, { "cell_type": "code", - "outputs": [], + "outputs": [ + { + "data": { + "text/plain": " scheme flux \\\nname \nreaction_1 EpoRJAK2 -> EpoRpJAK2; Epo SOCS3 0.125895 \nreaction_2 EpoRpJAK2 -> EpoRJAK2; SHP1Act 0.000000 \nreaction_3 EpoRpJAK2 -> p1EpoRpJAK2; SOCS3 0.000000 \nreaction_4 EpoRpJAK2 -> p2EpoRpJAK2; EpoRJAK2_CIS SOCS3 0.000000 \nreaction_5 p1EpoRpJAK2 -> p12EpoRpJAK2; EpoRJAK2_CIS SOCS3 0.000000 \nreaction_6 p2EpoRpJAK2 -> p12EpoRpJAK2; SOCS3 0.000000 \nreaction_7 p1EpoRpJAK2 -> EpoRJAK2; SHP1Act 0.000000 \nreaction_8 p2EpoRpJAK2 -> EpoRJAK2; SHP1Act 0.000000 \nreaction_9 p12EpoRpJAK2 -> EpoRJAK2; SHP1Act 0.000000 \nreaction_10 EpoRJAK2_CIS -> ; p12EpoRpJAK2 p1EpoRpJAK2 0.000000 \nreaction_11 SHP1 -> SHP1Act; EpoRpJAK2 p12EpoRpJAK2 p1Epo... 0.000000 \nreaction_12 SHP1Act -> SHP1 0.000000 \nreaction_13 STAT5 -> pSTAT5; EpoRpJAK2 SOCS3 p12EpoRpJAK2... 0.000000 \nreaction_14 STAT5 -> pSTAT5; CIS SOCS3 p12EpoRpJAK2 p1Epo... 0.000000 \nreaction_15 pSTAT5 -> npSTAT5 0.000000 \nreaction_16 npSTAT5 -> STAT5 0.000000 \nreaction_17 = CISnRNA1; npSTAT5 0.000000 \nreaction_18 CISnRNA1 -> CISnRNA2 0.000000 \nreaction_19 CISnRNA2 -> CISnRNA3 0.000000 \nreaction_20 CISnRNA3 -> CISnRNA4 0.000000 \nreaction_21 CISnRNA4 -> CISnRNA5 0.000000 \nreaction_22 CISnRNA5 -> CISRNA 0.000000 \nreaction_23 CISRNA -> 0.000000 \nreaction_24 -> CIS; CISRNA 0.000000 \nreaction_25 CIS -> 0.000000 \nreaction_26 -> CIS 0.000000 \nreaction_27 = SOCS3nRNA1; npSTAT5 0.000000 \nreaction_28 SOCS3nRNA1 -> SOCS3nRNA2 0.000000 \nreaction_29 SOCS3nRNA2 -> SOCS3nRNA3 0.000000 \nreaction_30 SOCS3nRNA3 -> SOCS3nRNA4 0.000000 \nreaction_31 SOCS3nRNA4 -> SOCS3nRNA5 0.000000 \nreaction_32 SOCS3nRNA5 -> SOCS3RNA 0.000000 \nreaction_33 SOCS3RNA -> 0.000000 \nreaction_34 -> SOCS3; SOCS3RNA 0.000000 \nreaction_35 SOCS3 -> 0.000000 \nreaction_36 -> SOCS3 0.000000 \n\n particle_flux function key \\\nname \nreaction_1 7.581552e+13 Function for reaction_1 Reaction_48 \nreaction_2 0.000000e+00 Function for reaction_2 Reaction_49 \nreaction_3 0.000000e+00 Function for reaction_3 Reaction_50 \nreaction_4 0.000000e+00 Function for reaction_4 Reaction_51 \nreaction_5 0.000000e+00 Function for reaction_5 Reaction_52 \nreaction_6 0.000000e+00 Function for reaction_6 Reaction_53 \nreaction_7 0.000000e+00 Function for reaction_7 Reaction_54 \nreaction_8 0.000000e+00 Function for reaction_8 Reaction_55 \nreaction_9 0.000000e+00 Function for reaction_9 Reaction_56 \nreaction_10 0.000000e+00 Function for reaction_10 Reaction_57 \nreaction_11 0.000000e+00 Function for reaction_11 Reaction_58 \nreaction_12 0.000000e+00 Mass action (irreversible) Reaction_59 \nreaction_13 0.000000e+00 Function for reaction_13 Reaction_60 \nreaction_14 0.000000e+00 Function for reaction_14 Reaction_61 \nreaction_15 0.000000e+00 Function for reaction_15 Reaction_62 \nreaction_16 0.000000e+00 Function for reaction_16 Reaction_63 \nreaction_17 0.000000e+00 Function for reaction_17 Reaction_64 \nreaction_18 0.000000e+00 Mass action (irreversible) Reaction_65 \nreaction_19 0.000000e+00 Mass action (irreversible) Reaction_66 \nreaction_20 0.000000e+00 Mass action (irreversible) Reaction_67 \nreaction_21 0.000000e+00 Mass action (irreversible) Reaction_68 \nreaction_22 0.000000e+00 Function for reaction_22 Reaction_69 \nreaction_23 0.000000e+00 Mass action (irreversible) Reaction_70 \nreaction_24 0.000000e+00 Function for reaction_24 Reaction_71 \nreaction_25 0.000000e+00 Mass action (irreversible) Reaction_72 \nreaction_26 0.000000e+00 Function for reaction_26 Reaction_73 \nreaction_27 0.000000e+00 Function for reaction_27 Reaction_74 \nreaction_28 0.000000e+00 Mass action (irreversible) Reaction_75 \nreaction_29 0.000000e+00 Mass action (irreversible) Reaction_76 \nreaction_30 0.000000e+00 Mass action (irreversible) Reaction_77 \nreaction_31 0.000000e+00 Mass action (irreversible) Reaction_78 \nreaction_32 0.000000e+00 Function for reaction_32 Reaction_79 \nreaction_33 0.000000e+00 Mass action (irreversible) Reaction_80 \nreaction_34 0.000000e+00 Function for reaction_34 Reaction_81 \nreaction_35 0.000000e+00 Mass action (irreversible) Reaction_82 \nreaction_36 0.000000e+00 Function for reaction_36 Reaction_83 \n\n sbml_id mapping \nname \nreaction_1 reaction_1 {'Epo': 'Epo', 'EpoRJAK2': 'EpoRJAK2', 'JAK2Ac... \nreaction_2 reaction_2 {'EpoRpJAK2': 'EpoRpJAK2', 'JAK2EpoRDeaSHP1': ... \nreaction_3 reaction_3 {'EpoRActJAK2': 'EpoRActJAK2', 'EpoRpJAK2': 'E... \nreaction_4 reaction_4 {'EpoRActJAK2': 'EpoRActJAK2', 'EpoRCISInh': '... \nreaction_5 reaction_5 {'EpoRActJAK2': 'EpoRActJAK2', 'EpoRCISInh': '... \nreaction_6 reaction_6 {'EpoRActJAK2': 'EpoRActJAK2', 'SOCS3': 'SOCS3... \nreaction_7 reaction_7 {'JAK2EpoRDeaSHP1': 'JAK2EpoRDeaSHP1', 'SHP1Ac... \nreaction_8 reaction_8 {'JAK2EpoRDeaSHP1': 'JAK2EpoRDeaSHP1', 'SHP1Ac... \nreaction_9 reaction_9 {'JAK2EpoRDeaSHP1': 'JAK2EpoRDeaSHP1', 'SHP1Ac... \nreaction_10 reaction_10 {'EpoRCISRemove': 'EpoRCISRemove', 'EpoRJAK2_C... \nreaction_11 reaction_11 {'EpoRpJAK2': 'EpoRpJAK2', 'SHP1': 'SHP1', 'SH... \nreaction_12 reaction_12 {'k1': 'SHP1Dea', 'substrate': 'SHP1Act'} \nreaction_13 reaction_13 {'EpoRpJAK2': 'EpoRpJAK2', 'SOCS3': 'SOCS3', '... \nreaction_14 reaction_14 {'CIS': 'CIS', 'CISEqc': 'CISEqc', 'CISInh': '... \nreaction_15 reaction_15 {'STAT5Imp': 'STAT5Imp', 'cyt': 'cyt', 'pSTAT5... \nreaction_16 reaction_16 {'STAT5Exp': 'STAT5Exp', 'npSTAT5': 'npSTAT5',... \nreaction_17 reaction_17 {'ActD': 'ActD', 'CISRNAEqc': 'CISRNAEqc', 'CI... \nreaction_18 reaction_18 {'k1': 'CISRNADelay', 'substrate': 'CISnRNA1'} \nreaction_19 reaction_19 {'k1': 'CISRNADelay', 'substrate': 'CISnRNA2'} \nreaction_20 reaction_20 {'k1': 'CISRNADelay', 'substrate': 'CISnRNA3'} \nreaction_21 reaction_21 {'k1': 'CISRNADelay', 'substrate': 'CISnRNA4'} \nreaction_22 reaction_22 {'CISRNADelay': 'CISRNADelay', 'CISnRNA5': 'CI... \nreaction_23 reaction_23 {'k1': 'CISRNATurn', 'substrate': 'CISRNA'} \nreaction_24 reaction_24 {'CISEqc': 'CISEqc', 'CISRNA': 'CISRNA', 'CISR... \nreaction_25 reaction_25 {'k1': 'CISTurn', 'substrate': 'CIS'} \nreaction_26 reaction_26 {'CISEqc': 'CISEqc', 'CISEqcOE': 'CISEqcOE', '... \nreaction_27 reaction_27 {'ActD': 'ActD', 'SOCS3RNAEqc': 'SOCS3RNAEqc',... \nreaction_28 reaction_28 {'k1': 'SOCS3RNADelay', 'substrate': 'SOCS3nRN... \nreaction_29 reaction_29 {'k1': 'SOCS3RNADelay', 'substrate': 'SOCS3nRN... \nreaction_30 reaction_30 {'k1': 'SOCS3RNADelay', 'substrate': 'SOCS3nRN... \nreaction_31 reaction_31 {'k1': 'SOCS3RNADelay', 'substrate': 'SOCS3nRN... \nreaction_32 reaction_32 {'SOCS3RNADelay': 'SOCS3RNADelay', 'SOCS3nRNA5... \nreaction_33 reaction_33 {'k1': 'SOCS3RNATurn', 'substrate': 'SOCS3RNA'} \nreaction_34 reaction_34 {'SOCS3Eqc': 'SOCS3Eqc', 'SOCS3RNA': 'SOCS3RNA... \nreaction_35 reaction_35 {'k1': 'SOCS3Turn', 'substrate': 'SOCS3'} \nreaction_36 reaction_36 {'SOCS3Eqc': 'SOCS3Eqc', 'SOCS3EqcOE': 'SOCS3E... ", + "text/html": "
\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
schemefluxparticle_fluxfunctionkeysbml_idmapping
name
reaction_1EpoRJAK2 -> EpoRpJAK2; Epo SOCS30.1258957.581552e+13Function for reaction_1Reaction_48reaction_1{'Epo': 'Epo', 'EpoRJAK2': 'EpoRJAK2', 'JAK2Ac...
reaction_2EpoRpJAK2 -> EpoRJAK2; SHP1Act0.0000000.000000e+00Function for reaction_2Reaction_49reaction_2{'EpoRpJAK2': 'EpoRpJAK2', 'JAK2EpoRDeaSHP1': ...
reaction_3EpoRpJAK2 -> p1EpoRpJAK2; SOCS30.0000000.000000e+00Function for reaction_3Reaction_50reaction_3{'EpoRActJAK2': 'EpoRActJAK2', 'EpoRpJAK2': 'E...
reaction_4EpoRpJAK2 -> p2EpoRpJAK2; EpoRJAK2_CIS SOCS30.0000000.000000e+00Function for reaction_4Reaction_51reaction_4{'EpoRActJAK2': 'EpoRActJAK2', 'EpoRCISInh': '...
reaction_5p1EpoRpJAK2 -> p12EpoRpJAK2; EpoRJAK2_CIS SOCS30.0000000.000000e+00Function for reaction_5Reaction_52reaction_5{'EpoRActJAK2': 'EpoRActJAK2', 'EpoRCISInh': '...
reaction_6p2EpoRpJAK2 -> p12EpoRpJAK2; SOCS30.0000000.000000e+00Function for reaction_6Reaction_53reaction_6{'EpoRActJAK2': 'EpoRActJAK2', 'SOCS3': 'SOCS3...
reaction_7p1EpoRpJAK2 -> EpoRJAK2; SHP1Act0.0000000.000000e+00Function for reaction_7Reaction_54reaction_7{'JAK2EpoRDeaSHP1': 'JAK2EpoRDeaSHP1', 'SHP1Ac...
reaction_8p2EpoRpJAK2 -> EpoRJAK2; SHP1Act0.0000000.000000e+00Function for reaction_8Reaction_55reaction_8{'JAK2EpoRDeaSHP1': 'JAK2EpoRDeaSHP1', 'SHP1Ac...
reaction_9p12EpoRpJAK2 -> EpoRJAK2; SHP1Act0.0000000.000000e+00Function for reaction_9Reaction_56reaction_9{'JAK2EpoRDeaSHP1': 'JAK2EpoRDeaSHP1', 'SHP1Ac...
reaction_10EpoRJAK2_CIS -> ; p12EpoRpJAK2 p1EpoRpJAK20.0000000.000000e+00Function for reaction_10Reaction_57reaction_10{'EpoRCISRemove': 'EpoRCISRemove', 'EpoRJAK2_C...
reaction_11SHP1 -> SHP1Act; EpoRpJAK2 p12EpoRpJAK2 p1Epo...0.0000000.000000e+00Function for reaction_11Reaction_58reaction_11{'EpoRpJAK2': 'EpoRpJAK2', 'SHP1': 'SHP1', 'SH...
reaction_12SHP1Act -> SHP10.0000000.000000e+00Mass action (irreversible)Reaction_59reaction_12{'k1': 'SHP1Dea', 'substrate': 'SHP1Act'}
reaction_13STAT5 -> pSTAT5; EpoRpJAK2 SOCS3 p12EpoRpJAK2...0.0000000.000000e+00Function for reaction_13Reaction_60reaction_13{'EpoRpJAK2': 'EpoRpJAK2', 'SOCS3': 'SOCS3', '...
reaction_14STAT5 -> pSTAT5; CIS SOCS3 p12EpoRpJAK2 p1Epo...0.0000000.000000e+00Function for reaction_14Reaction_61reaction_14{'CIS': 'CIS', 'CISEqc': 'CISEqc', 'CISInh': '...
reaction_15pSTAT5 -> npSTAT50.0000000.000000e+00Function for reaction_15Reaction_62reaction_15{'STAT5Imp': 'STAT5Imp', 'cyt': 'cyt', 'pSTAT5...
reaction_16npSTAT5 -> STAT50.0000000.000000e+00Function for reaction_16Reaction_63reaction_16{'STAT5Exp': 'STAT5Exp', 'npSTAT5': 'npSTAT5',...
reaction_17= CISnRNA1; npSTAT50.0000000.000000e+00Function for reaction_17Reaction_64reaction_17{'ActD': 'ActD', 'CISRNAEqc': 'CISRNAEqc', 'CI...
reaction_18CISnRNA1 -> CISnRNA20.0000000.000000e+00Mass action (irreversible)Reaction_65reaction_18{'k1': 'CISRNADelay', 'substrate': 'CISnRNA1'}
reaction_19CISnRNA2 -> CISnRNA30.0000000.000000e+00Mass action (irreversible)Reaction_66reaction_19{'k1': 'CISRNADelay', 'substrate': 'CISnRNA2'}
reaction_20CISnRNA3 -> CISnRNA40.0000000.000000e+00Mass action (irreversible)Reaction_67reaction_20{'k1': 'CISRNADelay', 'substrate': 'CISnRNA3'}
reaction_21CISnRNA4 -> CISnRNA50.0000000.000000e+00Mass action (irreversible)Reaction_68reaction_21{'k1': 'CISRNADelay', 'substrate': 'CISnRNA4'}
reaction_22CISnRNA5 -> CISRNA0.0000000.000000e+00Function for reaction_22Reaction_69reaction_22{'CISRNADelay': 'CISRNADelay', 'CISnRNA5': 'CI...
reaction_23CISRNA ->0.0000000.000000e+00Mass action (irreversible)Reaction_70reaction_23{'k1': 'CISRNATurn', 'substrate': 'CISRNA'}
reaction_24-> CIS; CISRNA0.0000000.000000e+00Function for reaction_24Reaction_71reaction_24{'CISEqc': 'CISEqc', 'CISRNA': 'CISRNA', 'CISR...
reaction_25CIS ->0.0000000.000000e+00Mass action (irreversible)Reaction_72reaction_25{'k1': 'CISTurn', 'substrate': 'CIS'}
reaction_26-> CIS0.0000000.000000e+00Function for reaction_26Reaction_73reaction_26{'CISEqc': 'CISEqc', 'CISEqcOE': 'CISEqcOE', '...
reaction_27= SOCS3nRNA1; npSTAT50.0000000.000000e+00Function for reaction_27Reaction_74reaction_27{'ActD': 'ActD', 'SOCS3RNAEqc': 'SOCS3RNAEqc',...
reaction_28SOCS3nRNA1 -> SOCS3nRNA20.0000000.000000e+00Mass action (irreversible)Reaction_75reaction_28{'k1': 'SOCS3RNADelay', 'substrate': 'SOCS3nRN...
reaction_29SOCS3nRNA2 -> SOCS3nRNA30.0000000.000000e+00Mass action (irreversible)Reaction_76reaction_29{'k1': 'SOCS3RNADelay', 'substrate': 'SOCS3nRN...
reaction_30SOCS3nRNA3 -> SOCS3nRNA40.0000000.000000e+00Mass action (irreversible)Reaction_77reaction_30{'k1': 'SOCS3RNADelay', 'substrate': 'SOCS3nRN...
reaction_31SOCS3nRNA4 -> SOCS3nRNA50.0000000.000000e+00Mass action (irreversible)Reaction_78reaction_31{'k1': 'SOCS3RNADelay', 'substrate': 'SOCS3nRN...
reaction_32SOCS3nRNA5 -> SOCS3RNA0.0000000.000000e+00Function for reaction_32Reaction_79reaction_32{'SOCS3RNADelay': 'SOCS3RNADelay', 'SOCS3nRNA5...
reaction_33SOCS3RNA ->0.0000000.000000e+00Mass action (irreversible)Reaction_80reaction_33{'k1': 'SOCS3RNATurn', 'substrate': 'SOCS3RNA'}
reaction_34-> SOCS3; SOCS3RNA0.0000000.000000e+00Function for reaction_34Reaction_81reaction_34{'SOCS3Eqc': 'SOCS3Eqc', 'SOCS3RNA': 'SOCS3RNA...
reaction_35SOCS3 ->0.0000000.000000e+00Mass action (irreversible)Reaction_82reaction_35{'k1': 'SOCS3Turn', 'substrate': 'SOCS3'}
reaction_36-> SOCS30.0000000.000000e+00Function for reaction_36Reaction_83reaction_36{'SOCS3Eqc': 'SOCS3Eqc', 'SOCS3EqcOE': 'SOCS3E...
\n
" + }, + "execution_count": 13, + "metadata": {}, + "output_type": "execute_result" + } + ], "source": [ "reaction_names = get_reactions(model=biomodel)\n", "\n", "reaction_names" ], "metadata": { - "collapsed": false + "collapsed": false, + "ExecuteTime": { + "end_time": "2024-03-04T16:42:28.737875Z", + "start_time": "2024-03-04T16:42:28.733747Z" + } }, "id": "c24594c6e8229e20", - "execution_count": null + "execution_count": 13 }, { "cell_type": "code", - "execution_count": null, + "execution_count": 14, "outputs": [], "source": [ "rparam = ReactionParameter(\n", @@ -478,7 +486,11 @@ ")" ], "metadata": { - "collapsed": false + "collapsed": false, + "ExecuteTime": { + "end_time": "2024-03-04T16:42:28.738709Z", + "start_time": "2024-03-04T16:42:28.736620Z" + } }, "id": "454db50d61220bc5" }, @@ -491,46 +503,167 @@ ")" ], "metadata": { - "collapsed": false + "collapsed": false, + "ExecuteTime": { + "end_time": "2024-03-04T16:42:28.742401Z", + "start_time": "2024-03-04T16:42:28.739543Z" + } }, "id": "bd6781fe4a749c29", - "execution_count": null + "execution_count": 15 }, { "cell_type": "code", - "outputs": [], + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{ 'global_parameter_changes': [],\n", + " 'reaction_changes': [ { 'parameter_changes': [ { 'parameter_name': 'EpoRpRJAK2',\n", + " 'value': 21312.2},\n", + " { 'parameter_name': 'EpoRJAK2',\n", + " 'value': 21312.2}],\n", + " 'reaction_name': 'reaction_1',\n", + " 'reaction_scheme': None},\n", + " { 'parameter_changes': [],\n", + " 'reaction_name': 'reaction_11',\n", + " 'reaction_scheme': 'A + B -> C'}],\n", + " 'species_changes': []}\n" + ] + } + ], "source": [ "pp(biomodel_process_changes.model_dump())" ], "metadata": { - "collapsed": false + "collapsed": false, + "ExecuteTime": { + "end_time": "2024-03-04T16:42:32.179350Z", + "start_time": "2024-03-04T16:42:32.175949Z" + } }, "id": "e414174a2d6d331b", - "execution_count": null + "execution_count": 16 }, { "cell_type": "code", - "outputs": [], + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{ 'model_changes': { 'global_parameter_changes': [],\n", + " 'reaction_changes': [ { 'parameter_changes': [ { 'parameter_name': 'EpoRpRJAK2',\n", + " 'value': 21312.2},\n", + " { 'parameter_name': 'EpoRJAK2',\n", + " 'value': 21312.2}],\n", + " 'reaction_name': 'reaction_1',\n", + " 'reaction_scheme': None},\n", + " { 'parameter_changes': [],\n", + " 'reaction_name': 'reaction_11',\n", + " 'reaction_scheme': 'A + B -> C'}],\n", + " 'species_changes': []},\n", + " 'model_id': 'BIOMD0000000861',\n", + " 'model_language': 'sbml',\n", + " 'model_name': 'composite_from_biomodel',\n", + " 'model_source': {'value': 'BIOMD0000000861'},\n", + " 'model_units': None}\n" + ] + } + ], "source": [ - "biomodel_process = Model(\n", + "biomodel_process_model = Model(\n", " model_id=biomodel_id,\n", " model_source=biomodel_id,\n", " model_name='composite_from_biomodel',\n", " model_changes=biomodel_process_changes\n", ")\n", "\n", - "pp(biomodel_process.model_dump())" + "pp(biomodel_process_model.model_dump())" ], "metadata": { - "collapsed": false + "collapsed": false, + "ExecuteTime": { + "end_time": "2024-03-04T16:42:32.876207Z", + "start_time": "2024-03-04T16:42:32.872898Z" + } }, "id": "9de88bc52fb9a164", - "execution_count": null + "execution_count": 17 + }, + { + "cell_type": "code", + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{ 'method': 'directMethod',\n", + " 'model': { 'model_changes': { 'global_parameter_changes': [],\n", + " 'reaction_changes': [ { 'parameter_changes': [ { 'parameter_name': 'EpoRpRJAK2',\n", + " 'value': 21312.2},\n", + " { 'parameter_name': 'EpoRJAK2',\n", + " 'value': 21312.2}],\n", + " 'reaction_name': 'reaction_1',\n", + " 'reaction_scheme': None},\n", + " { 'parameter_changes': [],\n", + " 'reaction_name': 'reaction_11',\n", + " 'reaction_scheme': 'A '\n", + " '+ '\n", + " 'B '\n", + " '-> '\n", + " 'C'}],\n", + " 'species_changes': []},\n", + " 'model_id': 'BIOMD0000000861',\n", + " 'model_language': 'sbml',\n", + " 'model_name': 'composite_from_biomodel',\n", + " 'model_source': {'value': 'BIOMD0000000861'},\n", + " 'model_units': None},\n", + " 'process_name': 'copasi_process_from_biomodel'}\n" + ] + } + ], + "source": [ + "biomodel_process_config = CopasiProcessConfigSchema(\n", + " process_name='copasi_process_from_biomodel',\n", + " method='directMethod',\n", + " model=biomodel_process_model\n", + ")\n", + "\n", + "\n", + "pp(biomodel_process_config.model_dump())" + ], + "metadata": { + "collapsed": false, + "ExecuteTime": { + "end_time": "2024-03-04T16:43:56.030421Z", + "start_time": "2024-03-04T16:43:56.025326Z" + } + }, + "id": "25ba11c1e1e75f94", + "execution_count": 18 + }, + { + "cell_type": "markdown", + "source": [ + "Add the biomodel config to the bigraph" + ], + "metadata": { + "collapsed": false + }, + "id": "535828632bf115d" }, { "cell_type": "code", "outputs": [], - "source": [], + "source": [ + "b[biomodel_process_config.process_name].add_process(\n", + " name='CopasiProcess',\n", + " model=process_config_from_file.model,\n", + " method=process_config_from_file.method\n", + ")" + ], "metadata": { "collapsed": false },