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 compartment | \n type | \n unit | \n initial_concentration | \n initial_particle_number | \n initial_expression | \n expression | \n concentration | \n particle_number | \n rate | \n particle_number_rate | \n key | \n sbml_id | \n
\n \n name | \n | \n | \n | \n | \n | \n | \n | \n | \n | \n | \n | \n | \n | \n
\n \n \n \n EpoRJAK2 | \n cyt | \n reactions | \n nmol/l | \n 3.976220e+00 | \n 9.578143e+14 | \n | \n | \n 3.976220e+00 | \n 9.578143e+14 | \n -0.314737 | \n -7.581552e+13 | \n Metabolite_50 | \n EpoRJAK2 | \n
\n \n EpoRpJAK2 | \n cyt | \n reactions | \n nmol/l | \n 0.000000e+00 | \n 0.000000e+00 | \n | \n | \n 0.000000e+00 | \n 0.000000e+00 | \n 0.314737 | \n 7.581552e+13 | \n Metabolite_51 | \n EpoRpJAK2 | \n
\n \n p1EpoRpJAK2 | \n cyt | \n reactions | \n nmol/l | \n 0.000000e+00 | \n 0.000000e+00 | \n | \n | \n 0.000000e+00 | \n 0.000000e+00 | \n 0.000000 | \n 0.000000e+00 | \n Metabolite_52 | \n p1EpoRpJAK2 | \n
\n \n p2EpoRpJAK2 | \n cyt | \n reactions | \n nmol/l | \n 0.000000e+00 | \n 0.000000e+00 | \n | \n | \n 0.000000e+00 | \n 0.000000e+00 | \n 0.000000 | \n 0.000000e+00 | \n Metabolite_53 | \n p2EpoRpJAK2 | \n
\n \n p12EpoRpJAK2 | \n cyt | \n reactions | \n nmol/l | \n 0.000000e+00 | \n 0.000000e+00 | \n | \n | \n 0.000000e+00 | \n 0.000000e+00 | \n 0.000000 | \n 0.000000e+00 | \n Metabolite_54 | \n p12EpoRpJAK2 | \n
\n \n EpoRJAK2_CIS | \n cyt | \n reactions | \n nmol/l | \n 0.000000e+00 | \n 0.000000e+00 | \n | \n | \n 0.000000e+00 | \n 0.000000e+00 | \n 0.000000 | \n 0.000000e+00 | \n Metabolite_55 | \n EpoRJAK2_CIS | \n
\n \n SHP1 | \n cyt | \n reactions | \n nmol/l | \n 2.672510e+01 | \n 6.437693e+15 | \n | \n | \n 2.672510e+01 | \n 6.437693e+15 | \n 0.000000 | \n 0.000000e+00 | \n Metabolite_56 | \n SHP1 | \n
\n \n SHP1Act | \n cyt | \n reactions | \n nmol/l | \n 0.000000e+00 | \n 0.000000e+00 | \n | \n | \n 0.000000e+00 | \n 0.000000e+00 | \n 0.000000 | \n 0.000000e+00 | \n Metabolite_57 | \n SHP1Act | \n
\n \n STAT5 | \n cyt | \n reactions | \n nmol/l | \n 7.975350e+01 | \n 1.921147e+16 | \n | \n | \n 7.975350e+01 | \n 1.921147e+16 | \n 0.000000 | \n 0.000000e+00 | \n Metabolite_58 | \n STAT5 | \n
\n \n pSTAT5 | \n cyt | \n reactions | \n nmol/l | \n 0.000000e+00 | \n 0.000000e+00 | \n | \n | \n 0.000000e+00 | \n 0.000000e+00 | \n 0.000000 | \n 0.000000e+00 | \n Metabolite_59 | \n pSTAT5 | \n
\n \n npSTAT5 | \n nuc | \n reactions | \n nmol/l | \n 0.000000e+00 | \n 0.000000e+00 | \n | \n | \n 0.000000e+00 | \n 0.000000e+00 | \n 0.000000 | \n 0.000000e+00 | \n Metabolite_60 | \n npSTAT5 | \n
\n \n CISnRNA1 | \n nuc | \n reactions | \n nmol/l | \n 0.000000e+00 | \n 0.000000e+00 | \n | \n | \n 0.000000e+00 | \n 0.000000e+00 | \n 0.000000 | \n 0.000000e+00 | \n Metabolite_61 | \n CISnRNA1 | \n
\n \n CISnRNA2 | \n nuc | \n reactions | \n nmol/l | \n 0.000000e+00 | \n 0.000000e+00 | \n | \n | \n 0.000000e+00 | \n 0.000000e+00 | \n 0.000000 | \n 0.000000e+00 | \n Metabolite_62 | \n CISnRNA2 | \n
\n \n CISnRNA3 | \n nuc | \n reactions | \n nmol/l | \n 0.000000e+00 | \n 0.000000e+00 | \n | \n | \n 0.000000e+00 | \n 0.000000e+00 | \n 0.000000 | \n 0.000000e+00 | \n Metabolite_63 | \n CISnRNA3 | \n
\n \n CISnRNA4 | \n nuc | \n reactions | \n nmol/l | \n 0.000000e+00 | \n 0.000000e+00 | \n | \n | \n 0.000000e+00 | \n 0.000000e+00 | \n 0.000000 | \n 0.000000e+00 | \n Metabolite_64 | \n CISnRNA4 | \n
\n \n CISnRNA5 | \n nuc | \n reactions | \n nmol/l | \n 0.000000e+00 | \n 0.000000e+00 | \n | \n | \n 0.000000e+00 | \n 0.000000e+00 | \n 0.000000 | \n 0.000000e+00 | \n Metabolite_65 | \n CISnRNA5 | \n
\n \n CISRNA | \n cyt | \n reactions | \n nmol/l | \n 0.000000e+00 | \n 0.000000e+00 | \n | \n | \n 0.000000e+00 | \n 0.000000e+00 | \n 0.000000 | \n 0.000000e+00 | \n Metabolite_66 | \n CISRNA | \n
\n \n CIS | \n cyt | \n reactions | \n nmol/l | \n 0.000000e+00 | \n 0.000000e+00 | \n | \n | \n 0.000000e+00 | \n 0.000000e+00 | \n 0.000000 | \n 0.000000e+00 | \n Metabolite_67 | \n CIS | \n
\n \n SOCS3nRNA1 | \n nuc | \n reactions | \n nmol/l | \n 0.000000e+00 | \n 0.000000e+00 | \n | \n | \n 0.000000e+00 | \n 0.000000e+00 | \n 0.000000 | \n 0.000000e+00 | \n Metabolite_68 | \n SOCS3nRNA1 | \n
\n \n SOCS3nRNA2 | \n nuc | \n reactions | \n nmol/l | \n 0.000000e+00 | \n 0.000000e+00 | \n | \n | \n 0.000000e+00 | \n 0.000000e+00 | \n 0.000000 | \n 0.000000e+00 | \n Metabolite_69 | \n SOCS3nRNA2 | \n
\n \n SOCS3nRNA3 | \n nuc | \n reactions | \n nmol/l | \n 0.000000e+00 | \n 0.000000e+00 | \n | \n | \n 0.000000e+00 | \n 0.000000e+00 | \n 0.000000 | \n 0.000000e+00 | \n Metabolite_70 | \n SOCS3nRNA3 | \n
\n \n SOCS3nRNA4 | \n nuc | \n reactions | \n nmol/l | \n 0.000000e+00 | \n 0.000000e+00 | \n | \n | \n 0.000000e+00 | \n 0.000000e+00 | \n 0.000000 | \n 0.000000e+00 | \n Metabolite_71 | \n SOCS3nRNA4 | \n
\n \n SOCS3nRNA5 | \n nuc | \n reactions | \n nmol/l | \n 0.000000e+00 | \n 0.000000e+00 | \n | \n | \n 0.000000e+00 | \n 0.000000e+00 | \n 0.000000 | \n 0.000000e+00 | \n Metabolite_72 | \n SOCS3nRNA5 | \n
\n \n SOCS3RNA | \n cyt | \n reactions | \n nmol/l | \n 0.000000e+00 | \n 0.000000e+00 | \n | \n | \n 0.000000e+00 | \n 0.000000e+00 | \n 0.000000 | \n 0.000000e+00 | \n Metabolite_73 | \n SOCS3RNA | \n
\n \n SOCS3 | \n cyt | \n reactions | \n nmol/l | \n 0.000000e+00 | \n 0.000000e+00 | \n | \n | \n 0.000000e+00 | \n 0.000000e+00 | \n 0.000000 | \n 0.000000e+00 | \n Metabolite_74 | \n SOCS3 | \n
\n \n Epo | \n cyt | \n reactions | \n nmol/l | \n 1.249970e-07 | \n 3.010998e+07 | \n | \n | \n 1.249970e-07 | \n 3.010998e+07 | \n 0.000000 | \n 0.000000e+00 | \n Metabolite_75 | \n Epo | \n
\n \n
\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 scheme | \n flux | \n particle_flux | \n function | \n key | \n sbml_id | \n mapping | \n
\n \n name | \n | \n | \n | \n | \n | \n | \n | \n
\n \n \n \n reaction_1 | \n EpoRJAK2 -> EpoRpJAK2; Epo SOCS3 | \n 0.125895 | \n 7.581552e+13 | \n Function for reaction_1 | \n Reaction_48 | \n reaction_1 | \n {'Epo': 'Epo', 'EpoRJAK2': 'EpoRJAK2', 'JAK2Ac... | \n
\n \n reaction_2 | \n EpoRpJAK2 -> EpoRJAK2; SHP1Act | \n 0.000000 | \n 0.000000e+00 | \n Function for reaction_2 | \n Reaction_49 | \n reaction_2 | \n {'EpoRpJAK2': 'EpoRpJAK2', 'JAK2EpoRDeaSHP1': ... | \n
\n \n reaction_3 | \n EpoRpJAK2 -> p1EpoRpJAK2; SOCS3 | \n 0.000000 | \n 0.000000e+00 | \n Function for reaction_3 | \n Reaction_50 | \n reaction_3 | \n {'EpoRActJAK2': 'EpoRActJAK2', 'EpoRpJAK2': 'E... | \n
\n \n reaction_4 | \n EpoRpJAK2 -> p2EpoRpJAK2; EpoRJAK2_CIS SOCS3 | \n 0.000000 | \n 0.000000e+00 | \n Function for reaction_4 | \n Reaction_51 | \n reaction_4 | \n {'EpoRActJAK2': 'EpoRActJAK2', 'EpoRCISInh': '... | \n
\n \n reaction_5 | \n p1EpoRpJAK2 -> p12EpoRpJAK2; EpoRJAK2_CIS SOCS3 | \n 0.000000 | \n 0.000000e+00 | \n Function for reaction_5 | \n Reaction_52 | \n reaction_5 | \n {'EpoRActJAK2': 'EpoRActJAK2', 'EpoRCISInh': '... | \n
\n \n reaction_6 | \n p2EpoRpJAK2 -> p12EpoRpJAK2; SOCS3 | \n 0.000000 | \n 0.000000e+00 | \n Function for reaction_6 | \n Reaction_53 | \n reaction_6 | \n {'EpoRActJAK2': 'EpoRActJAK2', 'SOCS3': 'SOCS3... | \n
\n \n reaction_7 | \n p1EpoRpJAK2 -> EpoRJAK2; SHP1Act | \n 0.000000 | \n 0.000000e+00 | \n Function for reaction_7 | \n Reaction_54 | \n reaction_7 | \n {'JAK2EpoRDeaSHP1': 'JAK2EpoRDeaSHP1', 'SHP1Ac... | \n
\n \n reaction_8 | \n p2EpoRpJAK2 -> EpoRJAK2; SHP1Act | \n 0.000000 | \n 0.000000e+00 | \n Function for reaction_8 | \n Reaction_55 | \n reaction_8 | \n {'JAK2EpoRDeaSHP1': 'JAK2EpoRDeaSHP1', 'SHP1Ac... | \n
\n \n reaction_9 | \n p12EpoRpJAK2 -> EpoRJAK2; SHP1Act | \n 0.000000 | \n 0.000000e+00 | \n Function for reaction_9 | \n Reaction_56 | \n reaction_9 | \n {'JAK2EpoRDeaSHP1': 'JAK2EpoRDeaSHP1', 'SHP1Ac... | \n
\n \n reaction_10 | \n EpoRJAK2_CIS -> ; p12EpoRpJAK2 p1EpoRpJAK2 | \n 0.000000 | \n 0.000000e+00 | \n Function for reaction_10 | \n Reaction_57 | \n reaction_10 | \n {'EpoRCISRemove': 'EpoRCISRemove', 'EpoRJAK2_C... | \n
\n \n reaction_11 | \n SHP1 -> SHP1Act; EpoRpJAK2 p12EpoRpJAK2 p1Epo... | \n 0.000000 | \n 0.000000e+00 | \n Function for reaction_11 | \n Reaction_58 | \n reaction_11 | \n {'EpoRpJAK2': 'EpoRpJAK2', 'SHP1': 'SHP1', 'SH... | \n
\n \n reaction_12 | \n SHP1Act -> SHP1 | \n 0.000000 | \n 0.000000e+00 | \n Mass action (irreversible) | \n Reaction_59 | \n reaction_12 | \n {'k1': 'SHP1Dea', 'substrate': 'SHP1Act'} | \n
\n \n reaction_13 | \n STAT5 -> pSTAT5; EpoRpJAK2 SOCS3 p12EpoRpJAK2... | \n 0.000000 | \n 0.000000e+00 | \n Function for reaction_13 | \n Reaction_60 | \n reaction_13 | \n {'EpoRpJAK2': 'EpoRpJAK2', 'SOCS3': 'SOCS3', '... | \n
\n \n reaction_14 | \n STAT5 -> pSTAT5; CIS SOCS3 p12EpoRpJAK2 p1Epo... | \n 0.000000 | \n 0.000000e+00 | \n Function for reaction_14 | \n Reaction_61 | \n reaction_14 | \n {'CIS': 'CIS', 'CISEqc': 'CISEqc', 'CISInh': '... | \n
\n \n reaction_15 | \n pSTAT5 -> npSTAT5 | \n 0.000000 | \n 0.000000e+00 | \n Function for reaction_15 | \n Reaction_62 | \n reaction_15 | \n {'STAT5Imp': 'STAT5Imp', 'cyt': 'cyt', 'pSTAT5... | \n
\n \n reaction_16 | \n npSTAT5 -> STAT5 | \n 0.000000 | \n 0.000000e+00 | \n Function for reaction_16 | \n Reaction_63 | \n reaction_16 | \n {'STAT5Exp': 'STAT5Exp', 'npSTAT5': 'npSTAT5',... | \n
\n \n reaction_17 | \n = CISnRNA1; npSTAT5 | \n 0.000000 | \n 0.000000e+00 | \n Function for reaction_17 | \n Reaction_64 | \n reaction_17 | \n {'ActD': 'ActD', 'CISRNAEqc': 'CISRNAEqc', 'CI... | \n
\n \n reaction_18 | \n CISnRNA1 -> CISnRNA2 | \n 0.000000 | \n 0.000000e+00 | \n Mass action (irreversible) | \n Reaction_65 | \n reaction_18 | \n {'k1': 'CISRNADelay', 'substrate': 'CISnRNA1'} | \n
\n \n reaction_19 | \n CISnRNA2 -> CISnRNA3 | \n 0.000000 | \n 0.000000e+00 | \n Mass action (irreversible) | \n Reaction_66 | \n reaction_19 | \n {'k1': 'CISRNADelay', 'substrate': 'CISnRNA2'} | \n
\n \n reaction_20 | \n CISnRNA3 -> CISnRNA4 | \n 0.000000 | \n 0.000000e+00 | \n Mass action (irreversible) | \n Reaction_67 | \n reaction_20 | \n {'k1': 'CISRNADelay', 'substrate': 'CISnRNA3'} | \n
\n \n reaction_21 | \n CISnRNA4 -> CISnRNA5 | \n 0.000000 | \n 0.000000e+00 | \n Mass action (irreversible) | \n Reaction_68 | \n reaction_21 | \n {'k1': 'CISRNADelay', 'substrate': 'CISnRNA4'} | \n
\n \n reaction_22 | \n CISnRNA5 -> CISRNA | \n 0.000000 | \n 0.000000e+00 | \n Function for reaction_22 | \n Reaction_69 | \n reaction_22 | \n {'CISRNADelay': 'CISRNADelay', 'CISnRNA5': 'CI... | \n
\n \n reaction_23 | \n CISRNA -> | \n 0.000000 | \n 0.000000e+00 | \n Mass action (irreversible) | \n Reaction_70 | \n reaction_23 | \n {'k1': 'CISRNATurn', 'substrate': 'CISRNA'} | \n
\n \n reaction_24 | \n -> CIS; CISRNA | \n 0.000000 | \n 0.000000e+00 | \n Function for reaction_24 | \n Reaction_71 | \n reaction_24 | \n {'CISEqc': 'CISEqc', 'CISRNA': 'CISRNA', 'CISR... | \n
\n \n reaction_25 | \n CIS -> | \n 0.000000 | \n 0.000000e+00 | \n Mass action (irreversible) | \n Reaction_72 | \n reaction_25 | \n {'k1': 'CISTurn', 'substrate': 'CIS'} | \n
\n \n reaction_26 | \n -> CIS | \n 0.000000 | \n 0.000000e+00 | \n Function for reaction_26 | \n Reaction_73 | \n reaction_26 | \n {'CISEqc': 'CISEqc', 'CISEqcOE': 'CISEqcOE', '... | \n
\n \n reaction_27 | \n = SOCS3nRNA1; npSTAT5 | \n 0.000000 | \n 0.000000e+00 | \n Function for reaction_27 | \n Reaction_74 | \n reaction_27 | \n {'ActD': 'ActD', 'SOCS3RNAEqc': 'SOCS3RNAEqc',... | \n
\n \n reaction_28 | \n SOCS3nRNA1 -> SOCS3nRNA2 | \n 0.000000 | \n 0.000000e+00 | \n Mass action (irreversible) | \n Reaction_75 | \n reaction_28 | \n {'k1': 'SOCS3RNADelay', 'substrate': 'SOCS3nRN... | \n
\n \n reaction_29 | \n SOCS3nRNA2 -> SOCS3nRNA3 | \n 0.000000 | \n 0.000000e+00 | \n Mass action (irreversible) | \n Reaction_76 | \n reaction_29 | \n {'k1': 'SOCS3RNADelay', 'substrate': 'SOCS3nRN... | \n
\n \n reaction_30 | \n SOCS3nRNA3 -> SOCS3nRNA4 | \n 0.000000 | \n 0.000000e+00 | \n Mass action (irreversible) | \n Reaction_77 | \n reaction_30 | \n {'k1': 'SOCS3RNADelay', 'substrate': 'SOCS3nRN... | \n
\n \n reaction_31 | \n SOCS3nRNA4 -> SOCS3nRNA5 | \n 0.000000 | \n 0.000000e+00 | \n Mass action (irreversible) | \n Reaction_78 | \n reaction_31 | \n {'k1': 'SOCS3RNADelay', 'substrate': 'SOCS3nRN... | \n
\n \n reaction_32 | \n SOCS3nRNA5 -> SOCS3RNA | \n 0.000000 | \n 0.000000e+00 | \n Function for reaction_32 | \n Reaction_79 | \n reaction_32 | \n {'SOCS3RNADelay': 'SOCS3RNADelay', 'SOCS3nRNA5... | \n
\n \n reaction_33 | \n SOCS3RNA -> | \n 0.000000 | \n 0.000000e+00 | \n Mass action (irreversible) | \n Reaction_80 | \n reaction_33 | \n {'k1': 'SOCS3RNATurn', 'substrate': 'SOCS3RNA'} | \n
\n \n reaction_34 | \n -> SOCS3; SOCS3RNA | \n 0.000000 | \n 0.000000e+00 | \n Function for reaction_34 | \n Reaction_81 | \n reaction_34 | \n {'SOCS3Eqc': 'SOCS3Eqc', 'SOCS3RNA': 'SOCS3RNA... | \n
\n \n reaction_35 | \n SOCS3 -> | \n 0.000000 | \n 0.000000e+00 | \n Mass action (irreversible) | \n Reaction_82 | \n reaction_35 | \n {'k1': 'SOCS3Turn', 'substrate': 'SOCS3'} | \n
\n \n reaction_36 | \n -> SOCS3 | \n 0.000000 | \n 0.000000e+00 | \n Function for reaction_36 | \n Reaction_83 | \n reaction_36 | \n {'SOCS3Eqc': 'SOCS3Eqc', 'SOCS3EqcOE': 'SOCS3E... | \n
\n \n
\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
},