From 14d32a1e7fc34246f91bfe6a500d55f39ad0fcb0 Mon Sep 17 00:00:00 2001 From: Eran Date: Thu, 9 Nov 2023 09:25:42 -0500 Subject: [PATCH] update process bigraphs notebook --- notebooks/process-bigraphs.ipynb | 139 ++++++++++++++++--------------- 1 file changed, 74 insertions(+), 65 deletions(-) diff --git a/notebooks/process-bigraphs.ipynb b/notebooks/process-bigraphs.ipynb index 2c9ba35..ffcb2c5 100644 --- a/notebooks/process-bigraphs.ipynb +++ b/notebooks/process-bigraphs.ipynb @@ -11,7 +11,7 @@ }, { "cell_type": "code", - "execution_count": 14, + "execution_count": 4, "id": "db2ec175-a886-41e7-9ba2-a43c235892f4", "metadata": {}, "outputs": [ @@ -19,8 +19,8 @@ "name": "stdout", "output_type": "stream", "text": [ - "bigraph-schema==0.0.8\n", - "bigraph-viz==0.0.29\n" + "bigraph-schema==0.0.19\n", + "bigraph-viz==0.0.30\n" ] } ], @@ -33,15 +33,13 @@ }, { "cell_type": "code", - "execution_count": 53, + "execution_count": 5, "id": "d0aa6af4-0231-4ec0-b3b4-bafd93110392", "metadata": {}, "outputs": [], "source": [ "#some imports and set up\n", "from bigraph_viz import plot_bigraph, pf\n", - "from bigraph_schema import fill\n", - "from bigraph_schema.schema import apply\n", "from bigraph_viz.dict_utils import replace_regex_recursive\n", "\n", "plot_settings = {'remove_process_place_edges': True}\n", @@ -68,7 +66,7 @@ }, { "cell_type": "code", - "execution_count": 55, + "execution_count": 6, "id": "e32e354f-e340-4350-8dcc-2296bf142aac", "metadata": {}, "outputs": [], @@ -117,7 +115,7 @@ }, { "cell_type": "code", - "execution_count": 56, + "execution_count": 7, "id": "3e6a4893-a81d-4cfb-b4ac-b07113a2c4d8", "metadata": {}, "outputs": [ @@ -130,7 +128,7 @@ " \n", "\n", - "\n", "\n", "\n", "('v0',)\n", "\n", - "v0\n", + "v0\n", "\n", "\n", "\n", "('v0', 'v1')\n", "\n", - "v1\n", + "v1\n", "\n", "\n", "\n", @@ -159,7 +157,7 @@ "\n", "('v0', 'v2')\n", "\n", - "v2\n", + "v2\n", "\n", "\n", "\n", @@ -170,7 +168,7 @@ "\n", "('v0', 'v2', 'v3')\n", "\n", - "v3\n", + "v3\n", "\n", "\n", "\n", @@ -181,13 +179,13 @@ "\n", "('v4',)\n", "\n", - "v4\n", + "v4\n", "\n", "\n", "\n", "('v4', 'v5')\n", "\n", - "v5\n", + "v5\n", "\n", "\n", "\n", @@ -200,7 +198,7 @@ " \n", "\n", - "\n", "\n", "\n", "('v0',)\n", "\n", - "v0\n", + "v0\n", "\n", "\n", "\n", "('e0',)\n", - "\n", - "e0\n", + "\n", + "e0\n", "\n", "\n", "\n", @@ -229,19 +227,19 @@ "\n", "('v1',)\n", "\n", - "v1\n", + "v1\n", "\n", "\n", "\n", "('v1',)->('e0',)\n", - "\n", + "\n", "\n", "\n", "\n", "\n", "('e1',)\n", - "\n", - "e1\n", + "\n", + "e1\n", "\n", "\n", "\n", @@ -252,13 +250,13 @@ "\n", "('v2',)\n", "\n", - "v2\n", + "v2\n", "\n", "\n", "\n", "('v3',)\n", "\n", - "v3\n", + "v3\n", "\n", "\n", "\n", @@ -268,36 +266,36 @@ "\n", "\n", "('e2',)\n", - "\n", - "e2\n", + "\n", + "e2\n", "\n", "\n", "\n", "('v3',)->('e2',)\n", - "\n", + "\n", "\n", "\n", "\n", "\n", "('v4',)\n", "\n", - "v4\n", + "v4\n", "\n", "\n", "\n", "('v4',)->('e0',)\n", - "\n", + "\n", "\n", "\n", "\n", "('v4',)->('e2',)\n", - "\n", + "\n", "\n", "\n", "\n", "('v5',)\n", "\n", - "v5\n", + "v5\n", "\n", "\n", "\n", @@ -349,7 +347,7 @@ }, { "cell_type": "code", - "execution_count": 57, + "execution_count": 8, "id": "8c6ba21e-3fac-4105-8a79-7bcdff08bafa", "metadata": {}, "outputs": [ @@ -359,7 +357,7 @@ "\n", "\n", - "\n", "\n", "\n", "('v0',)\n", "\n", - "v0\n", + "v0\n", "\n", "\n", "\n", "('v0', 'v1')\n", "\n", - "v1\n", + "v1\n", "\n", "\n", "\n", @@ -388,7 +386,7 @@ "\n", "('v0', 'v2')\n", "\n", - "v2\n", + "v2\n", "\n", "\n", "\n", @@ -398,8 +396,8 @@ "\n", "\n", "('e0',)\n", - "\n", - "e0\n", + "\n", + "e0\n", "\n", "\n", "\n", @@ -409,14 +407,14 @@ "\n", "\n", "('v0', 'v1')->('e0',)\n", - "\n", + "\n", "\n", "\n", "\n", "\n", "('e1',)\n", - "\n", - "e1\n", + "\n", + "e1\n", "\n", "\n", "\n", @@ -427,7 +425,7 @@ "\n", "('v0', 'v2', 'v3')\n", "\n", - "v3\n", + "v3\n", "\n", "\n", "\n", @@ -437,14 +435,14 @@ "\n", "\n", "('e2',)\n", - "\n", - "e2\n", + "\n", + "e2\n", "\n", "\n", "\n", "\n", "('v0', 'v2', 'v3')->('e1',)\n", - "\n", + "\n", "\n", "\n", "\n", @@ -455,13 +453,13 @@ "\n", "('v4',)\n", "\n", - "v4\n", + "v4\n", "\n", "\n", "\n", "('v4', 'v5')\n", "\n", - "v5\n", + "v5\n", "\n", "\n", "\n", @@ -481,7 +479,7 @@ "\n", "\n", "('v4', 'v5')->('e2',)\n", - "\n", + "\n", "\n", "\n", "\n", @@ -490,10 +488,10 @@ "\n" ], "text/plain": [ - "" + "" ] }, - "execution_count": 57, + "execution_count": 8, "metadata": {}, "output_type": "execute_result" } @@ -541,7 +539,7 @@ }, { "cell_type": "code", - "execution_count": 40, + "execution_count": 9, "id": "9ab263dc-a73d-4f68-920c-6b0e90c12b54", "metadata": {}, "outputs": [ @@ -551,7 +549,7 @@ "\n", "\n", - "\n", "\n", "\n", "('v0',)\n", "\n", - "v0\n", + "v0\n", "\n", "\n", "\n", "('v0', 'v1')\n", "\n", - "v1\n", + "v1\n", "\n", "\n", "\n", @@ -580,7 +578,7 @@ "\n", "('v0', 'v2')\n", "\n", - "v2\n", + "v2\n", "\n", "\n", "\n", @@ -591,7 +589,7 @@ "\n", "('e0',)\n", "\n", - "e0\n", + "e0\n", "\n", "\n", "\n", @@ -609,7 +607,7 @@ "\n", "('e1',)\n", "\n", - "e1\n", + "e1\n", "\n", "\n", "\n", @@ -621,7 +619,7 @@ "\n", "('v0', 'v2', 'v3')\n", "\n", - "v3\n", + "v3\n", "\n", "\n", "\n", @@ -638,7 +636,7 @@ "\n", "('e2',)\n", "\n", - "e2\n", + "e2\n", "\n", "\n", "\n", @@ -650,13 +648,13 @@ "\n", "('v4',)\n", "\n", - "v4\n", + "v4\n", "\n", "\n", "\n", "('v4', 'v5')\n", "\n", - "v5\n", + "v5\n", "\n", "\n", "\n", @@ -685,10 +683,10 @@ "\n" ], "text/plain": [ - "" + "" ] }, - "execution_count": 40, + "execution_count": 9, "metadata": {}, "output_type": "execute_result" } @@ -697,10 +695,21 @@ "plot_bigraph(bigraph, **plot_settings, port_labels=False, filename='process_bigraph')" ] }, + { + "cell_type": "markdown", + "id": "bb74d7a5-9dc3-4853-be6c-afbf71f15963", + "metadata": {}, + "source": [ + "See more examples of process bigraphs:\n", + " - [Process Bigraph Basics](https://vivarium-collective.github.io/bigraph-viz/notebooks/basics.html)\n", + " - [E. coli Whole Cell Model Wiring Diagram](https://github.com/vivarium-collective/bigraph-viz/blob/main/doc/_static/ecoli.png?raw=true)\n", + " - [Tumor/T cell multiscale simulation](https://nbviewer.org/github/vivarium-collective/tumor-tcell/blob/master/jupyter_notebooks/diagrams.ipynb)" + ] + }, { "cell_type": "code", "execution_count": null, - "id": "88213ee8-2546-4a35-b74f-6f771b4b8100", + "id": "4dcb8c1a-dee6-493b-acc2-2b0d0f147fc9", "metadata": {}, "outputs": [], "source": []