diff --git a/bigraph_viz/__init__.py b/bigraph_viz/__init__.py index 6acf92f..9798bf2 100644 --- a/bigraph_viz/__init__.py +++ b/bigraph_viz/__init__.py @@ -1,5 +1,5 @@ import pprint -from bigraph_viz.diagram import plot_bigraph +from bigraph_viz.diagram import plot_bigraph, generate_types from bigraph_viz.dict_utils import replace_regex_recursive from bigraph_schema import TypeSystem diff --git a/bigraph_viz/diagram.py b/bigraph_viz/diagram.py index 17ba5ae..4d54272 100644 --- a/bigraph_viz/diagram.py +++ b/bigraph_viz/diagram.py @@ -41,6 +41,15 @@ '_inherit': 'step', 'interval': 'float'} + +def generate_types(): + core = TypeSystem() + core.register('path', updated_path_type) + core.register('step', step_type) + core.register('process', process_type) + return core + + def plot_edges(graph, edge, port_labels, port_label_size, state_node_spec): process_path = edge['edge_path'] process_name = str(process_path) @@ -119,14 +128,12 @@ def get_graph_dict( core, graph_dict=None, path=None, - top_state=None, retain_type_keys=False, retain_process_keys=False, remove_nodes=None, show_process_schema_keys=None, ): path = path or () - top_state = top_state or state remove_nodes = remove_nodes or [] show_process_schema_keys = show_process_schema_keys or [] removed_process_keys = list(set(PROCESS_SCHEMA_KEYS) - set(show_process_schema_keys)) @@ -144,7 +151,7 @@ def get_graph_dict( } for key, value in state.items(): - subschema = schema.get(key, schema) + subschema = schema.get(key, {}) if key.startswith('_') and not retain_type_keys: continue @@ -193,6 +200,7 @@ def get_graph_dict( if isinstance(value, dict): # get subgraph if is_edge: + # remove process schema keys removed_process_schema_keys = [subpath + (schema_key,) for schema_key in removed_process_keys] remove_nodes.extend(removed_process_schema_keys) @@ -202,7 +210,6 @@ def get_graph_dict( core=core, graph_dict=graph_dict, path=subpath, - top_state=top_state, remove_nodes=remove_nodes ) @@ -405,7 +412,7 @@ def plot_bigraph( invisible_edges=False, # mark_top=False, remove_process_place_edges=False, - show_process_schema_keys=['interval'], + show_process_schema_keys=[], # ['interval'] ): # get kwargs dict and remove plotting-specific kwargs kwargs = locals() @@ -421,15 +428,8 @@ def plot_bigraph( remaining_kwargs = dict(kwargs) # set defaults if none provided - core = core or TypeSystem() + core = core or generate_types() schema = schema or {} - - core.register('path', updated_path_type) - if not core.exists('step'): - core.register('step', step_type) - if not core.exists('process'): - core.register('process', process_type) - schema, state = core.complete(schema, state) # parse out the network @@ -496,13 +496,18 @@ def test_diagram_plot(): ) def test_bio_schema(): + core = generate_types() b = { 'environment': { 'cells': { 'cell1': { + 'cytoplasm': {}, 'nucleus': { + 'chromosome': {}, 'transcription': { '_type': 'process', + '_inputs': {'DNA': 'any'}, + '_outputs': {'RNA': 'any'}, 'inputs': { 'DNA': ['chromosome'] }, @@ -518,9 +523,8 @@ def test_bio_schema(): 'barriers': {}, 'diffusion': { '_type': 'process', - # '_inputs': { - # 'fields': 'array' - # }, + '_inputs': {'fields': 'any'}, + '_outputs': {'fields': 'any'}, 'inputs': { 'fields': ['fields',] }, @@ -530,7 +534,7 @@ def test_bio_schema(): } }} - plot_bigraph(b, filename='bioschema', show_process_schema_keys=[]) + plot_bigraph(b, core=core, filename='bioschema', show_process_schema_keys=[]) def test_input_output(): flat_composite_spec = { @@ -606,9 +610,93 @@ def test_nested_processes(): # **plot_settings, filename='nested_composite') + +def test_multi_input_output(): + process_schema = { + '_type': 'process', + '_inputs': { + 'port1': 'Any', + }, + '_outputs': { + 'port2': 'Any' + }, + } + + processes_spec = { + 'process1': process_schema, + 'process2': process_schema, + 'process3': process_schema, + } + plot_bigraph(processes_spec, show_process_schema_keys=None, rankdir='BT', filename='multiple_processes') + + +def test_cell_hierarchy(): + core = generate_types() + + core.register('concentrations', 'float') + core.register('sequences', 'float') + core.register('membrane', { + 'transporters': 'concentrations', + 'lipids': 'concentrations', + 'transmembrane transport': { + '_type': 'process', + '_inputs': {}, + '_outputs': { + 'transporters': 'concentrations', + 'internal': 'concentrations', + 'external': 'concentrations' + } + } + }) + + core.register('cytoplasm', { + 'metabolites': 'concentrations', + 'ribosomal complexes': 'concentrations', + 'transcript regulation complex': { + 'transcripts': 'concentrations'}, + 'translation': { + '_type': 'process', + '_outputs': { + 'p1': 'concentrations', + 'p2': 'concentrations'}}}) + + core.register('nucleoid', { + 'chromosome': { + 'genes': 'sequences'}}) + + core.register('cell', { + 'membrane': 'membrane', + 'cytoplasm': 'cytoplasm', + 'nucleoid': 'nucleoid'}) + + # state + cell_struct_state = { + 'cell': { + 'membrane': { + 'transmembrane transport': { + 'outputs': { + 'transporters': ['transporters'], + 'internal': ['..', 'cytoplasm', 'metabolites']}}}, + 'cytoplasm': { + 'translation': { + 'outputs': { + 'p1': ['ribosomal complexes'], + 'p2': ['transcript regulation complex', 'transcripts']}}}}} + + plot_bigraph( + cell_struct_state, + schema={'cell': 'cell'}, + core=core, + remove_process_place_edges=True, + out_dir='out', + filename='cell') + + if __name__ == '__main__': test_diagram_plot() test_bio_schema() test_input_output() test_multi_processes() - test_nested_processes() \ No newline at end of file + test_nested_processes() + test_multi_input_output() + test_cell_hierarchy() diff --git a/notebooks/basics.ipynb b/notebooks/basics.ipynb index 9d4033b..9f62f4f 100644 --- a/notebooks/basics.ipynb +++ b/notebooks/basics.ipynb @@ -35,9 +35,9 @@ "name": "stdout", "output_type": "stream", "text": [ - "-e git+https://github.com/vivarium-collective/bigraph-schema.git@179fd0debf76555d4126c77da30a649fb4f19d1b#egg=bigraph_schema\n", - "-e git+https://github.com/vivarium-collective/bigraph-viz.git@846f9a2bfd4f601146f9143a7f5bf2c80e559393#egg=bigraph_viz\n", - "-e git+https://github.com/vivarium-collective/process-bigraph.git@06705156de3ad9a0f50da9025103d4a4c3710223#egg=process_bigraph\n" + "-e git+https://github.com/vivarium-collective/bigraph-schema.git@a7010c1e2f137586078abfdc815eb27f25a6f886#egg=bigraph_schema\n", + "-e git+https://github.com/vivarium-collective/bigraph-viz.git@5eba77f4f72f164f54700d1f1b4d3c60d7777b0c#egg=bigraph_viz\n", + "-e git+https://github.com/vivarium-collective/process-bigraph.git@975b59fbed8800956cc163ac39cfeca152fb8515#egg=process_bigraph\n" ] } ], @@ -65,7 +65,9 @@ "outputs": [], "source": [ "# from bigraph_viz import plot_bigraph, plot_flow, plot_multitimestep, pf\n", - "from bigraph_viz import plot_bigraph, replace_regex_recursive, TypeSystem\n", + "from bigraph_viz import plot_bigraph, replace_regex_recursive, generate_types\n", + "\n", + "core = generate_types()\n", "\n", "plot_settings = {\n", " 'remove_process_place_edges': True\n", @@ -133,7 +135,7 @@ "\n" ], "text/plain": [ - "" + "" ] }, "execution_count": 3, @@ -194,7 +196,7 @@ "\n" ], "text/plain": [ - "" + "" ] }, "execution_count": 4, @@ -324,7 +326,7 @@ "\n" ], "text/plain": [ - "" + "" ] }, "execution_count": 5, @@ -336,13 +338,13 @@ "hierarchy_spec = {\n", " 'store1': {\n", " 'store1.1': {\n", - " 'store1.1.1': 'Any',\n", - " 'store1.1.2': 'Any',\n", + " 'store1.1.1': 'any',\n", + " 'store1.1.2': 'any',\n", " 'store1.1.3': {\n", - " 'store1.1.3.1': 'Any',\n", + " 'store1.1.3.1': 'any',\n", " },\n", " },\n", - " 'store1.2': 'Any',\n", + " 'store1.2': 'any',\n", " },\n", "}\n", "plot_bigraph(hierarchy_spec, **plot_settings, filename='hierarchy')" @@ -418,7 +420,7 @@ "\n" ], "text/plain": [ - "" + "" ] }, "execution_count": 6, @@ -431,8 +433,8 @@ " 'process1': {\n", " '_type': 'edge',\n", " '_inputs': {\n", - " 'port1': 'Any',\n", - " 'port2': 'Any',\n", + " 'port1': 'any',\n", + " 'port2': 'any',\n", " },\n", " },\n", "}\n", @@ -469,115 +471,82 @@ "\n", "\n", - "\n", - "\n", + "\n", + "\n", "bigraph\n", - "\n", - "\n", - "\n", - "('process1', 'interval')\n", - "\n", - "interval\n", - "\n", - "\n", - "\n", - "('process2', 'interval')\n", - "\n", - "interval\n", - "\n", - "\n", - "\n", - "('process3', 'interval')\n", - "\n", - "interval\n", - "\n", + "\n", "\n", - "\n", + "\n", "('process1',)\n", - "\n", - "process1\n", - "\n", - "\n", - "\n", - "('process1',)->('process1', 'interval')\n", - "\n", + "\n", + "process1\n", "\n", "\n", - "\n", + "\n", "('process2',)\n", - "\n", - "process2\n", - "\n", - "\n", - "\n", - "('process2',)->('process2', 'interval')\n", - "\n", + "\n", + "process2\n", "\n", "\n", - "\n", + "\n", "('process3',)\n", - "\n", - "process3\n", - "\n", - "\n", - "\n", - "('process3',)->('process3', 'interval')\n", - "\n", + "\n", + "process3\n", "\n", "\n", "\n", - "\n", + "\n", "('process1', 'p', 'o', 'r', 't', '1')->('process1',)\n", - "\n", - "\n", - "port1\n", + "\n", + "\n", + "port1\n", "\n", "\n", "\n", - "\n", + "\n", "('process2', 'p', 'o', 'r', 't', '1')->('process2',)\n", - "\n", - "\n", - "port1\n", + "\n", + "\n", + "port1\n", "\n", "\n", "\n", - "\n", + "\n", "('process3', 'p', 'o', 'r', 't', '1')->('process3',)\n", - "\n", - "\n", - "port1\n", + "\n", + "\n", + "port1\n", "\n", "\n", "\n", - "\n", + "\n", "('process1', 'p', 'o', 'r', 't', '2')->('process1',)\n", - "\n", - "\n", - "port2\n", + "\n", + "\n", + "port2\n", "\n", "\n", "\n", - "\n", + "\n", "('process2', 'p', 'o', 'r', 't', '2')->('process2',)\n", - "\n", - "\n", - "port2\n", + "\n", + "\n", + "port2\n", "\n", "\n", "\n", - "\n", + "\n", "('process3', 'p', 'o', 'r', 't', '2')->('process3',)\n", - "\n", - "\n", - "port2\n", + "\n", + "\n", + "port2\n", "\n", "\n", "\n" ], "text/plain": [ - "" + "" ] }, "execution_count": 7, @@ -689,7 +658,7 @@ "\n" ], "text/plain": [ - "" + "" ] }, "execution_count": 8, @@ -767,90 +736,68 @@ "\n", "\n", - "\n", + "\n", "\n", "bigraph\n", - "\n", + "\n", "\n", "\n", "('store1.1',)\n", - "\n", - "store1.1\n", + "\n", + "store1.1\n", "\n", "\n", - "\n", + "\n", "('process1',)\n", - "\n", - "process1\n", + "\n", + "process1\n", "\n", "\n", - "\n", + "\n", "('store1.1',)->('process1',)\n", - "\n", - "\n", - "port1\n", + "\n", + "\n", + "port1\n", "\n", "\n", - "\n", + "\n", "('process2',)\n", - "\n", - "process2\n", + "\n", + "process2\n", "\n", "\n", - "\n", + "\n", "('store1.1',)->('process2',)\n", - "\n", - "\n", - "port1\n", + "\n", + "\n", + "port1\n", "\n", "\n", "\n", "('store1.2',)\n", - "\n", - "store1.2\n", + "\n", + "store1.2\n", "\n", "\n", - "\n", + "\n", "('store1.2',)->('process1',)\n", - "\n", - "\n", - "port2\n", + "\n", + "\n", + "port2\n", "\n", "\n", - "\n", - "('store1.2',)->('process2',)\n", - "\n", - "\n", - "port2\n", - "\n", - "\n", - "\n", - "('process1', 'interval')\n", - "\n", - "interval\n", - "\n", - "\n", - "\n", - "('process2', 'interval')\n", - "\n", - "interval\n", - "\n", - "\n", - "\n", - "('process1',)->('process1', 'interval')\n", - "\n", - "\n", - "\n", "\n", - "('process2',)->('process2', 'interval')\n", - "\n", + "('store1.2',)->('process2',)\n", + "\n", + "\n", + "port2\n", "\n", "\n", "\n" ], "text/plain": [ - "" + "" ] }, "execution_count": 9, @@ -864,6 +811,10 @@ " 'store1.2': 'int',\n", " 'process1': {\n", " '_type': 'process',\n", + " '_outputs': {\n", + " 'port1': 'float',\n", + " 'port2': 'int',\n", + " },\n", " 'outputs': {\n", " 'port1': ['store1.1'],\n", " 'port2': ['store1.2'],\n", @@ -871,6 +822,10 @@ " },\n", " 'process2': {\n", " '_type': 'process',\n", + " '_inputs': {\n", + " 'port1': 'float',\n", + " 'port2': 'int',\n", + " },\n", " 'inputs': {\n", " 'port1': ['store1.1'],\n", " 'port2': ['store1.2'],\n", @@ -911,118 +866,107 @@ "\n", "\n", - "\n", - "\n", + "\n", + "\n", "bigraph\n", - "\n", + "\n", "\n", "\n", "('store1',)\n", - "\n", - "store1\n", + "\n", + "store1\n", "\n", "\n", "\n", "('store1', 'store1.1')\n", - "\n", - "store1.1\n", + "\n", + "store1.1\n", "\n", "\n", "\n", "('store1',)->('store1', 'store1.1')\n", - "\n", + "\n", "\n", "\n", "\n", "('store1', 'store1.2')\n", - "\n", - "store1.2\n", + "\n", + "store1.2\n", "\n", "\n", "\n", "('store1',)->('store1', 'store1.2')\n", - "\n", + "\n", "\n", "\n", - "\n", + "\n", "('store1', 'process1')\n", - "\n", - "process1\n", + "\n", + "process1\n", "\n", "\n", "\n", "('store1',)->('store1', 'process1')\n", - "\n", + "\n", "\n", "\n", - "\n", + "\n", "('store1', 'process2')\n", - "\n", - "process2\n", + "\n", + "process2\n", "\n", "\n", "\n", "('store1',)->('store1', 'process2')\n", - "\n", + "\n", "\n", "\n", - "\n", + "\n", "('process3',)\n", - "\n", - "process3\n", + "\n", + "process3\n", "\n", "\n", - "\n", + "\n", "('store1',)->('process3',)\n", - "\n", - "\n", - "port1\n", + "\n", + "\n", + "port1\n", "\n", "\n", - "\n", + "\n", "('store1', 'store1.1')->('store1', 'process1')\n", - "\n", - "\n", - "port1\n", + "\n", + "\n", + "port1\n", "\n", "\n", - "\n", + "\n", "('store1', 'store1.1')->('store1', 'process2')\n", - "\n", - "\n", - "port1\n", + "\n", + "\n", + "port1\n", "\n", "\n", - "\n", + "\n", "('store1', 'store1.2')->('store1', 'process1')\n", - "\n", - "\n", - "port2\n", + "\n", + "\n", + "port2\n", "\n", "\n", - "\n", + "\n", "('store1', 'store1.2')->('store1', 'process2')\n", - "\n", - "\n", - "port2\n", - "\n", - "\n", - "\n", - "('process3', 'interval')\n", - "\n", - "interval\n", - "\n", - "\n", - "\n", - "('process3',)->('process3', 'interval')\n", - "\n", + "\n", + "\n", + "port2\n", "\n", "\n", "\n" ], "text/plain": [ - "" + "" ] }, "execution_count": 10, @@ -1037,6 +981,10 @@ " 'store1.2': 'int',\n", " 'process1': {\n", " '_type': 'process',\n", + " '_inputs': {\n", + " 'port1': 'float',\n", + " 'port2': 'int',\n", + " },\n", " 'inputs': {\n", " 'port1': ['store1.1'],\n", " 'port2': ['store1.2'],\n", @@ -1044,6 +992,10 @@ " },\n", " 'process2': {\n", " '_type': 'process',\n", + " '_outputs': {\n", + " 'port1': 'float',\n", + " 'port2': 'int',\n", + " },\n", " 'outputs': {\n", " 'port1': ['store1.1'],\n", " 'port2': ['store1.2'],\n", @@ -1052,6 +1004,9 @@ " },\n", " 'process3': {\n", " '_type': 'process',\n", + " '_inputs': {\n", + " 'port1': 'tree',\n", + " },\n", " 'inputs': {\n", " 'port1': ['store1'],\n", " }\n", @@ -1093,220 +1048,86 @@ "\n", "\n", - "\n", - "\n", + "\n", + "\n", "bigraph\n", - "\n", + "\n", "\n", "\n", "('composite_process',)\n", - "\n", - "composite_process\n", + "\n", + "composite_process\n", "\n", "\n", "\n", "('composite_process', 'store1.1')\n", - "\n", - "store1.1\n", + "\n", + "store1.1\n", "\n", "\n", - "\n", + "\n", "('composite_process',)->('composite_process', 'store1.1')\n", - "\n", + "\n", "\n", "\n", "\n", "('composite_process', 'store1.2')\n", - "\n", - "store1.2\n", + "\n", + "store1.2\n", "\n", "\n", - "\n", + "\n", "('composite_process',)->('composite_process', 'store1.2')\n", - "\n", + "\n", "\n", "\n", "\n", "('composite_process', 'process1')\n", - "\n", - "process1\n", + "\n", + "process1\n", "\n", "\n", - "\n", - "('composite_process',)->('composite_process', 'process1')\n", - "\n", - "\n", "\n", - "\n", + "\n", "('composite_process', 'process2')\n", - "\n", - "process2\n", + "\n", + "process2\n", "\n", "\n", - "\n", - "('composite_process',)->('composite_process', 'process2')\n", - "\n", - "\n", - "\n", - "\n", - "('composite_process', 'process1', 'outputs')\n", - "\n", - "outputs\n", - "\n", - "\n", - "\n", - "('composite_process', 'process1')->('composite_process', 'process1', 'outputs')\n", - "\n", - "\n", - "\n", - "\n", - "('composite_process', 'process1', 'inputs')\n", - "\n", - "inputs\n", - "\n", - "\n", - "\n", - "('composite_process', 'process1')->('composite_process', 'process1', 'inputs')\n", - "\n", - "\n", - "\n", - "\n", - "('composite_process', 'process1', 'address')\n", - "\n", - "address\n", - "\n", - "\n", + "\n", "\n", - "('composite_process', 'process1')->('composite_process', 'process1', 'address')\n", - "\n", + "('composite_process', 'store1.1')->('composite_process', 'process1')\n", + "\n", + "\n", + "port1\n", "\n", - "\n", - "\n", - "('composite_process', 'process1', 'config')\n", - "\n", - "config\n", - "\n", - "\n", - "\n", - "('composite_process', 'process1')->('composite_process', 'process1', 'config')\n", - "\n", - "\n", - "\n", - "\n", - "('composite_process', 'process1', 'interval')\n", - "\n", - "interval\n", - "\n", - "\n", + "\n", "\n", - "('composite_process', 'process1')->('composite_process', 'process1', 'interval')\n", - "\n", + "('composite_process', 'store1.1')->('composite_process', 'process2')\n", + "\n", + "\n", + "port1\n", "\n", - "\n", - "\n", - "('composite_process', 'process1', 'outputs', 'port1')\n", - "\n", - "port1\n", - "\n", - "\n", - "\n", - "('composite_process', 'process1', 'outputs')->('composite_process', 'process1', 'outputs', 'port1')\n", - "\n", - "\n", - "\n", - "\n", - "('composite_process', 'process1', 'outputs', 'port2')\n", - "\n", - "port2\n", - "\n", - "\n", - "\n", - "('composite_process', 'process1', 'outputs')->('composite_process', 'process1', 'outputs', 'port2')\n", - "\n", - "\n", - "\n", - "\n", - "('composite_process', 'process2', 'outputs')\n", - "\n", - "outputs\n", - "\n", - "\n", - "\n", - "('composite_process', 'process2')->('composite_process', 'process2', 'outputs')\n", - "\n", - "\n", - "\n", - "\n", - "('composite_process', 'process2', 'inputs')\n", - "\n", - "inputs\n", - "\n", - "\n", - "\n", - "('composite_process', 'process2')->('composite_process', 'process2', 'inputs')\n", - "\n", - "\n", - "\n", - "\n", - "('composite_process', 'process2', 'address')\n", - "\n", - "address\n", - "\n", - "\n", - "\n", - "('composite_process', 'process2')->('composite_process', 'process2', 'address')\n", - "\n", - "\n", - "\n", - "\n", - "('composite_process', 'process2', 'config')\n", - "\n", - "config\n", - "\n", - "\n", - "\n", - "('composite_process', 'process2')->('composite_process', 'process2', 'config')\n", - "\n", - "\n", - "\n", - "\n", - "('composite_process', 'process2', 'interval')\n", - "\n", - "interval\n", - "\n", - "\n", - "\n", - "('composite_process', 'process2')->('composite_process', 'process2', 'interval')\n", - "\n", - "\n", - "\n", - "\n", - "('composite_process', 'process2', 'outputs', 'port1')\n", - "\n", - "port1\n", + "\n", + "\n", + "('composite_process', 'store1.2')->('composite_process', 'process1')\n", + "\n", + "\n", + "port2\n", "\n", - "\n", + "\n", "\n", - "('composite_process', 'process2', 'outputs')->('composite_process', 'process2', 'outputs', 'port1')\n", - "\n", - "\n", - "\n", - "\n", - "('composite_process', 'process2', 'outputs', 'port2')\n", - "\n", - "port2\n", - "\n", - "\n", - "\n", - "('composite_process', 'process2', 'outputs')->('composite_process', 'process2', 'outputs', 'port2')\n", - "\n", + "('composite_process', 'store1.2')->('composite_process', 'process2')\n", + "\n", + "\n", + "port2\n", "\n", "\n", "\n" ], "text/plain": [ - "" + "" ] }, "execution_count": 11, @@ -1321,16 +1142,24 @@ " 'store1.2': 'any',\n", " 'process1': {\n", " '_type': 'process',\n", + " '_outputs': {\n", + " 'port1': 'float',\n", + " 'port2': 'int',\n", + " },\n", " 'outputs': {\n", - " 'port1': 'store1.1',\n", - " 'port2': 'store1.2',\n", + " 'port1': ['store1.1'],\n", + " 'port2': ['store1.2'],\n", " }\n", " },\n", " 'process2': {\n", " '_type': 'process',\n", + " '_outputs': {\n", + " 'port1': 'float',\n", + " 'port2': 'int',\n", + " },\n", " 'outputs': {\n", - " 'port1': 'store1.1',\n", - " 'port2': 'store1.2',\n", + " 'port1': ['store1.1'],\n", + " 'port2': ['store1.2'],\n", " }\n", " },\n", " # '_inputs': {\n", @@ -2067,7 +1896,7 @@ "\n" ], "text/plain": [ - "" + "" ] }, "execution_count": 15, @@ -2193,933 +2022,768 @@ "\n", "\n", - "\n", - "\n", + "\n", + "\n", "bigraph\n", - "\n", + "\n", "\n", "\n", "('cell',)\n", - "\n", - "cell\n", + "\n", + "cell\n", "\n", "\n", "\n", "('cell', 'cytoplasm')\n", - "\n", - "cytoplasm\n", + "\n", + "cytoplasm\n", "\n", "\n", - "\n", + "\n", "('cell',)->('cell', 'cytoplasm')\n", - "\n", + "\n", "\n", "\n", "\n", "('cell', 'nucleus')\n", - "\n", - "nucleus\n", + "\n", + "nucleus\n", "\n", "\n", - "\n", + "\n", "('cell',)->('cell', 'nucleus')\n", - "\n", + "\n", "\n", "\n", "\n", "('cell', 'transcription')\n", - "\n", - "transcription\n", + "\n", + "transcription\n", "\n", "\n", - "\n", - "('cell',)->('cell', 'transcription')\n", - "\n", - "\n", "\n", - "\n", + "\n", "('cell', 'translation')\n", - "\n", - "translation\n", + "\n", + "translation\n", "\n", "\n", - "\n", - "('cell',)->('cell', 'translation')\n", - "\n", - "\n", "\n", - "\n", + "\n", "('cell', 'metabolism')\n", - "\n", - "metabolism\n", + "\n", + "metabolism\n", "\n", "\n", - "\n", - "('cell',)->('cell', 'metabolism')\n", - "\n", - "\n", "\n", - "\n", + "\n", "('cell', 'cell<br/>cycle')\n", - "\n", - "cell\n", - "cycle\n", + "\n", + "cell\n", + "cycle\n", "\n", "\n", - "\n", - "('cell',)->('cell', 'cell<br/>cycle')\n", - "\n", - "\n", "\n", - "\n", + "\n", "('cell', 'signalling')\n", - "\n", - "signalling\n", + "\n", + "signalling\n", "\n", "\n", - "\n", - "('cell',)->('cell', 'signalling')\n", - "\n", - "\n", "\n", - "\n", + "\n", "('cell', 'protein<br/>transport')\n", - "\n", - "protein\n", - "transport\n", + "\n", + "protein\n", + "transport\n", "\n", "\n", - "\n", - "('cell',)->('cell', 'protein<br/>transport')\n", - "\n", - "\n", "\n", - "\n", + "\n", "('cell', 'RNA<br/>processing')\n", - "\n", - "RNA\n", - "processing\n", + "\n", + "RNA\n", + "processing\n", "\n", "\n", - "\n", - "('cell',)->('cell', 'RNA<br/>processing')\n", - "\n", - "\n", "\n", "\n", "('cell', 'cytoplasm', 'secretory<br/>organelles')\n", - "\n", - "secretory\n", - "organelles\n", + "\n", + "secretory\n", + "organelles\n", "\n", "\n", "\n", "('cell', 'cytoplasm')->('cell', 'cytoplasm', 'secretory<br/>organelles')\n", - "\n", + "\n", "\n", "\n", "\n", "('cell', 'cytoplasm', 'cytoplasmic<br/>organelles')\n", - "\n", - "cytoplasmic\n", - "organelles\n", + "\n", + "cytoplasmic\n", + "organelles\n", "\n", "\n", "\n", "('cell', 'cytoplasm')->('cell', 'cytoplasm', 'cytoplasmic<br/>organelles')\n", - "\n", + "\n", "\n", "\n", "\n", "('cell', 'cytoplasm', 'transcriptional<br/>regulation<br/>complex<br/>family')\n", - "\n", - "transcriptional\n", - "regulation\n", - "complex\n", - "family\n", + "\n", + "transcriptional\n", + "regulation\n", + "complex\n", + "family\n", "\n", "\n", "\n", "('cell', 'cytoplasm')->('cell', 'cytoplasm', 'transcriptional<br/>regulation<br/>complex<br/>family')\n", - "\n", + "\n", "\n", "\n", "\n", "('cell', 'cytoplasm', 'secretory<br/>organelles', 'transmembrane<br/>transport<br/>systems')\n", - "\n", - "transmembrane\n", - "transport\n", - "systems\n", + "\n", + "transmembrane\n", + "transport\n", + "systems\n", "\n", "\n", "\n", "('cell', 'cytoplasm', 'secretory<br/>organelles')->('cell', 'cytoplasm', 'secretory<br/>organelles', 'transmembrane<br/>transport<br/>systems')\n", - "\n", + "\n", + "\n", + "\n", + "\n", + "('cell', 'cytoplasm', 'secretory<br/>organelles')->('cell', 'protein<br/>transport')\n", + "\n", + "\n", + "secretory\n", "\n", "\n", "\n", "('cell', 'cytoplasm', 'secretory<br/>organelles', 'transmembrane<br/>transport<br/>systems', 'ion<br/>transmembrane<br/>transport<br/>systems')\n", - "\n", - "ion\n", - "transmembrane\n", - "transport\n", - "systems\n", + "\n", + "ion\n", + "transmembrane\n", + "transport\n", + "systems\n", "\n", "\n", "\n", "('cell', 'cytoplasm', 'secretory<br/>organelles', 'transmembrane<br/>transport<br/>systems')->('cell', 'cytoplasm', 'secretory<br/>organelles', 'transmembrane<br/>transport<br/>systems', 'ion<br/>transmembrane<br/>transport<br/>systems')\n", - "\n", + "\n", + "\n", + "\n", + "\n", + "('cell', 'cytoplasm', 'secretory<br/>organelles', 'transmembrane<br/>transport<br/>systems')->('cell', 'signalling')\n", + "\n", + "\n", + "transport\n", + "\n", + "\n", + "\n", + "('cell', 'cytoplasm', 'secretory<br/>organelles', 'transmembrane<br/>transport<br/>systems')->('cell', 'protein<br/>transport')\n", + "\n", + "\n", + "transmembrane\n", + "transport\n", + "\n", + "\n", + "\n", + "('cell', 'cytoplasm', 'secretory<br/>organelles', 'transmembrane<br/>transport<br/>systems', 'ion<br/>transmembrane<br/>transport<br/>systems')->('cell', 'metabolism')\n", + "\n", + "\n", + "ion\n", + "transport\n", "\n", "\n", "\n", "('cell', 'cytoplasm', 'cytoplasmic<br/>organelles', 'subgroup<br/>of<br/>cytoplasmic<br/>organelles')\n", - "\n", - "subgroup\n", - "of\n", - "cytoplasmic\n", - "organelles\n", + "\n", + "subgroup\n", + "of\n", + "cytoplasmic\n", + "organelles\n", "\n", "\n", "\n", "('cell', 'cytoplasm', 'cytoplasmic<br/>organelles')->('cell', 'cytoplasm', 'cytoplasmic<br/>organelles', 'subgroup<br/>of<br/>cytoplasmic<br/>organelles')\n", - "\n", + "\n", "\n", "\n", "\n", "('cell', 'cytoplasm', 'cytoplasmic<br/>organelles', 'subgroup<br/>of<br/>cytoplasmic<br/>organelles', 'metabolic<br/>organelles')\n", - "\n", - "metabolic\n", - "organelles\n", + "\n", + "metabolic\n", + "organelles\n", "\n", "\n", "\n", "('cell', 'cytoplasm', 'cytoplasmic<br/>organelles', 'subgroup<br/>of<br/>cytoplasmic<br/>organelles')->('cell', 'cytoplasm', 'cytoplasmic<br/>organelles', 'subgroup<br/>of<br/>cytoplasmic<br/>organelles', 'metabolic<br/>organelles')\n", - "\n", + "\n", "\n", "\n", "\n", "('cell', 'cytoplasm', 'cytoplasmic<br/>organelles', 'subgroup<br/>of<br/>cytoplasmic<br/>organelles', 'ribonucleoprotein<br/>complex<br/>family')\n", - "\n", - "ribonucleoprotein\n", - "complex\n", - "family\n", + "\n", + "ribonucleoprotein\n", + "complex\n", + "family\n", "\n", "\n", "\n", "('cell', 'cytoplasm', 'cytoplasmic<br/>organelles', 'subgroup<br/>of<br/>cytoplasmic<br/>organelles')->('cell', 'cytoplasm', 'cytoplasmic<br/>organelles', 'subgroup<br/>of<br/>cytoplasmic<br/>organelles', 'ribonucleoprotein<br/>complex<br/>family')\n", - "\n", + "\n", "\n", "\n", "\n", "('cell', 'cytoplasm', 'cytoplasmic<br/>organelles', 'subgroup<br/>of<br/>cytoplasmic<br/>organelles', 'metabolic<br/>organelles', 'subgroup<br/>of<br/>metabolic<br/>organelles')\n", - "\n", - "subgroup\n", - "of\n", - "metabolic\n", - "organelles\n", + "\n", + "subgroup\n", + "of\n", + "metabolic\n", + "organelles\n", "\n", "\n", "\n", "('cell', 'cytoplasm', 'cytoplasmic<br/>organelles', 'subgroup<br/>of<br/>cytoplasmic<br/>organelles', 'metabolic<br/>organelles')->('cell', 'cytoplasm', 'cytoplasmic<br/>organelles', 'subgroup<br/>of<br/>cytoplasmic<br/>organelles', 'metabolic<br/>organelles', 'subgroup<br/>of<br/>metabolic<br/>organelles')\n", - "\n", + "\n", "\n", "\n", "\n", "('cell', 'cytoplasm', 'cytoplasmic<br/>organelles', 'subgroup<br/>of<br/>cytoplasmic<br/>organelles', 'metabolic<br/>organelles', 'mitochondrion')\n", - "\n", - "mitochondrion\n", + "\n", + "mitochondrion\n", "\n", "\n", "\n", "('cell', 'cytoplasm', 'cytoplasmic<br/>organelles', 'subgroup<br/>of<br/>cytoplasmic<br/>organelles', 'metabolic<br/>organelles')->('cell', 'cytoplasm', 'cytoplasmic<br/>organelles', 'subgroup<br/>of<br/>cytoplasmic<br/>organelles', 'metabolic<br/>organelles', 'mitochondrion')\n", - "\n", + "\n", + "\n", + "\n", + "\n", + "('cell', 'cytoplasm', 'cytoplasmic<br/>organelles', 'subgroup<br/>of<br/>cytoplasmic<br/>organelles', 'metabolic<br/>organelles')->('cell', 'metabolism')\n", + "\n", + "\n", + "organelles\n", + "\n", + "\n", + "\n", + "('cell', 'cytoplasm', 'cytoplasmic<br/>organelles', 'subgroup<br/>of<br/>cytoplasmic<br/>organelles', 'metabolic<br/>organelles', 'mitochondrion')->('cell', 'metabolism')\n", + "\n", + "\n", + "mitochondrion\n", "\n", "\n", "\n", "('cell', 'cytoplasm', 'cytoplasmic<br/>organelles', 'subgroup<br/>of<br/>cytoplasmic<br/>organelles', 'ribonucleoprotein<br/>complex<br/>family', 'RNA<br/>processing<br/>complex<br/>1')\n", - "\n", - "RNA\n", - "processing\n", - "complex\n", - "1\n", + "\n", + "RNA\n", + "processing\n", + "complex\n", + "1\n", "\n", "\n", "\n", "('cell', 'cytoplasm', 'cytoplasmic<br/>organelles', 'subgroup<br/>of<br/>cytoplasmic<br/>organelles', 'ribonucleoprotein<br/>complex<br/>family')->('cell', 'cytoplasm', 'cytoplasmic<br/>organelles', 'subgroup<br/>of<br/>cytoplasmic<br/>organelles', 'ribonucleoprotein<br/>complex<br/>family', 'RNA<br/>processing<br/>complex<br/>1')\n", - "\n", + "\n", "\n", "\n", "\n", "('cell', 'cytoplasm', 'cytoplasmic<br/>organelles', 'subgroup<br/>of<br/>cytoplasmic<br/>organelles', 'ribonucleoprotein<br/>complex<br/>family', 'ribosome<br/>biogenesis<br/>community')\n", - "\n", - "ribosome\n", - "biogenesis\n", - "community\n", + "\n", + "ribosome\n", + "biogenesis\n", + "community\n", "\n", "\n", "\n", "('cell', 'cytoplasm', 'cytoplasmic<br/>organelles', 'subgroup<br/>of<br/>cytoplasmic<br/>organelles', 'ribonucleoprotein<br/>complex<br/>family')->('cell', 'cytoplasm', 'cytoplasmic<br/>organelles', 'subgroup<br/>of<br/>cytoplasmic<br/>organelles', 'ribonucleoprotein<br/>complex<br/>family', 'ribosome<br/>biogenesis<br/>community')\n", - "\n", + "\n", "\n", "\n", "\n", "('cell', 'cytoplasm', 'cytoplasmic<br/>organelles', 'subgroup<br/>of<br/>cytoplasmic<br/>organelles', 'ribonucleoprotein<br/>complex<br/>family', 'RNA<br/>processing<br/>complex<br/>1', 'RNA<br/>splicing<br/>complex<br/>1')\n", - "\n", - "RNA\n", - "splicing\n", - "complex\n", - "1\n", + "\n", + "RNA\n", + "splicing\n", + "complex\n", + "1\n", "\n", "\n", "\n", "('cell', 'cytoplasm', 'cytoplasmic<br/>organelles', 'subgroup<br/>of<br/>cytoplasmic<br/>organelles', 'ribonucleoprotein<br/>complex<br/>family', 'RNA<br/>processing<br/>complex<br/>1')->('cell', 'cytoplasm', 'cytoplasmic<br/>organelles', 'subgroup<br/>of<br/>cytoplasmic<br/>organelles', 'ribonucleoprotein<br/>complex<br/>family', 'RNA<br/>processing<br/>complex<br/>1', 'RNA<br/>splicing<br/>complex<br/>1')\n", - "\n", + "\n", "\n", "\n", "\n", "('cell', 'cytoplasm', 'cytoplasmic<br/>organelles', 'subgroup<br/>of<br/>cytoplasmic<br/>organelles', 'ribonucleoprotein<br/>complex<br/>family', 'ribosome<br/>biogenesis<br/>community', 'ribosome')\n", - "\n", - "ribosome\n", + "\n", + "ribosome\n", "\n", "\n", "\n", "('cell', 'cytoplasm', 'cytoplasmic<br/>organelles', 'subgroup<br/>of<br/>cytoplasmic<br/>organelles', 'ribonucleoprotein<br/>complex<br/>family', 'ribosome<br/>biogenesis<br/>community')->('cell', 'cytoplasm', 'cytoplasmic<br/>organelles', 'subgroup<br/>of<br/>cytoplasmic<br/>organelles', 'ribonucleoprotein<br/>complex<br/>family', 'ribosome<br/>biogenesis<br/>community', 'ribosome')\n", - "\n", + "\n", "\n", "\n", "\n", "('cell', 'cytoplasm', 'cytoplasmic<br/>organelles', 'subgroup<br/>of<br/>cytoplasmic<br/>organelles', 'ribonucleoprotein<br/>complex<br/>family', 'ribosome<br/>biogenesis<br/>community', 'nucleic<br/>acid<br/>binding<br/>complex')\n", - "\n", - "nucleic\n", - "acid\n", - "binding\n", - "complex\n", + "\n", + "nucleic\n", + "acid\n", + "binding\n", + "complex\n", "\n", "\n", "\n", "('cell', 'cytoplasm', 'cytoplasmic<br/>organelles', 'subgroup<br/>of<br/>cytoplasmic<br/>organelles', 'ribonucleoprotein<br/>complex<br/>family', 'ribosome<br/>biogenesis<br/>community')->('cell', 'cytoplasm', 'cytoplasmic<br/>organelles', 'subgroup<br/>of<br/>cytoplasmic<br/>organelles', 'ribonucleoprotein<br/>complex<br/>family', 'ribosome<br/>biogenesis<br/>community', 'nucleic<br/>acid<br/>binding<br/>complex')\n", - "\n", + "\n", "\n", "\n", "\n", "('cell', 'cytoplasm', 'cytoplasmic<br/>organelles', 'subgroup<br/>of<br/>cytoplasmic<br/>organelles', 'ribonucleoprotein<br/>complex<br/>family', 'ribosome<br/>biogenesis<br/>community', 'ribosome', 'ribosomal<br/>subunit')\n", - "\n", - "ribosomal\n", - "subunit\n", + "\n", + "ribosomal\n", + "subunit\n", "\n", "\n", "\n", "('cell', 'cytoplasm', 'cytoplasmic<br/>organelles', 'subgroup<br/>of<br/>cytoplasmic<br/>organelles', 'ribonucleoprotein<br/>complex<br/>family', 'ribosome<br/>biogenesis<br/>community', 'ribosome')->('cell', 'cytoplasm', 'cytoplasmic<br/>organelles', 'subgroup<br/>of<br/>cytoplasmic<br/>organelles', 'ribonucleoprotein<br/>complex<br/>family', 'ribosome<br/>biogenesis<br/>community', 'ribosome', 'ribosomal<br/>subunit')\n", - "\n", + "\n", + "\n", + "\n", + "\n", + "('cell', 'cytoplasm', 'cytoplasmic<br/>organelles', 'subgroup<br/>of<br/>cytoplasmic<br/>organelles', 'ribonucleoprotein<br/>complex<br/>family', 'ribosome<br/>biogenesis<br/>community', 'ribosome')->('cell', 'translation')\n", + "\n", + "\n", + "ribosomes\n", "\n", "\n", "\n", "('cell', 'cytoplasm', 'cytoplasmic<br/>organelles', 'subgroup<br/>of<br/>cytoplasmic<br/>organelles', 'ribonucleoprotein<br/>complex<br/>family', 'ribosome<br/>biogenesis<br/>community', 'ribosome', 'ribosomal<br/>subunit', 'mitochondirial<br/>large<br/>ribosomal<br/>subunit')\n", - "\n", - "mitochondirial\n", - "large\n", - "ribosomal\n", - "subunit\n", + "\n", + "mitochondirial\n", + "large\n", + "ribosomal\n", + "subunit\n", "\n", "\n", "\n", "('cell', 'cytoplasm', 'cytoplasmic<br/>organelles', 'subgroup<br/>of<br/>cytoplasmic<br/>organelles', 'ribonucleoprotein<br/>complex<br/>family', 'ribosome<br/>biogenesis<br/>community', 'ribosome', 'ribosomal<br/>subunit')->('cell', 'cytoplasm', 'cytoplasmic<br/>organelles', 'subgroup<br/>of<br/>cytoplasmic<br/>organelles', 'ribonucleoprotein<br/>complex<br/>family', 'ribosome<br/>biogenesis<br/>community', 'ribosome', 'ribosomal<br/>subunit', 'mitochondirial<br/>large<br/>ribosomal<br/>subunit')\n", - "\n", + "\n", "\n", "\n", "\n", "('cell', 'cytoplasm', 'cytoplasmic<br/>organelles', 'subgroup<br/>of<br/>cytoplasmic<br/>organelles', 'ribonucleoprotein<br/>complex<br/>family', 'ribosome<br/>biogenesis<br/>community', 'ribosome', 'ribosomal<br/>subunit', 'mito-cyto<br/>ribosomal<br/>cluster')\n", - "\n", - "mito-cyto\n", - "ribosomal\n", - "cluster\n", + "\n", + "mito-cyto\n", + "ribosomal\n", + "cluster\n", "\n", "\n", "\n", "('cell', 'cytoplasm', 'cytoplasmic<br/>organelles', 'subgroup<br/>of<br/>cytoplasmic<br/>organelles', 'ribonucleoprotein<br/>complex<br/>family', 'ribosome<br/>biogenesis<br/>community', 'ribosome', 'ribosomal<br/>subunit')->('cell', 'cytoplasm', 'cytoplasmic<br/>organelles', 'subgroup<br/>of<br/>cytoplasmic<br/>organelles', 'ribonucleoprotein<br/>complex<br/>family', 'ribosome<br/>biogenesis<br/>community', 'ribosome', 'ribosomal<br/>subunit', 'mito-cyto<br/>ribosomal<br/>cluster')\n", - "\n", + "\n", "\n", "\n", "\n", "('cell', 'cytoplasm', 'cytoplasmic<br/>organelles', 'subgroup<br/>of<br/>cytoplasmic<br/>organelles', 'ribonucleoprotein<br/>complex<br/>family', 'ribosome<br/>biogenesis<br/>community', 'ribosome', 'ribosomal<br/>subunit', 'cotranslational<br/>protein<br/>targeting<br/>to<br/>membrane<br/>system')\n", - "\n", - "cotranslational\n", - "protein\n", - "targeting\n", - "to\n", - "membrane\n", - "system\n", + "\n", + "cotranslational\n", + "protein\n", + "targeting\n", + "to\n", + "membrane\n", + "system\n", "\n", "\n", "\n", "('cell', 'cytoplasm', 'cytoplasmic<br/>organelles', 'subgroup<br/>of<br/>cytoplasmic<br/>organelles', 'ribonucleoprotein<br/>complex<br/>family', 'ribosome<br/>biogenesis<br/>community', 'ribosome', 'ribosomal<br/>subunit')->('cell', 'cytoplasm', 'cytoplasmic<br/>organelles', 'subgroup<br/>of<br/>cytoplasmic<br/>organelles', 'ribonucleoprotein<br/>complex<br/>family', 'ribosome<br/>biogenesis<br/>community', 'ribosome', 'ribosomal<br/>subunit', 'cotranslational<br/>protein<br/>targeting<br/>to<br/>membrane<br/>system')\n", - "\n", + "\n", "\n", "\n", "\n", "('cell', 'cytoplasm', 'cytoplasmic<br/>organelles', 'subgroup<br/>of<br/>cytoplasmic<br/>organelles', 'ribonucleoprotein<br/>complex<br/>family', 'ribosome<br/>biogenesis<br/>community', 'ribosome', 'ribosomal<br/>subunit', 'ribosomal<br/>complex<br/>5')\n", - "\n", - "ribosomal\n", - "complex\n", - "5\n", + "\n", + "ribosomal\n", + "complex\n", + "5\n", "\n", "\n", "\n", "('cell', 'cytoplasm', 'cytoplasmic<br/>organelles', 'subgroup<br/>of<br/>cytoplasmic<br/>organelles', 'ribonucleoprotein<br/>complex<br/>family', 'ribosome<br/>biogenesis<br/>community', 'ribosome', 'ribosomal<br/>subunit')->('cell', 'cytoplasm', 'cytoplasmic<br/>organelles', 'subgroup<br/>of<br/>cytoplasmic<br/>organelles', 'ribonucleoprotein<br/>complex<br/>family', 'ribosome<br/>biogenesis<br/>community', 'ribosome', 'ribosomal<br/>subunit', 'ribosomal<br/>complex<br/>5')\n", - "\n", + "\n", "\n", "\n", "\n", "('cell', 'cytoplasm', 'cytoplasmic<br/>organelles', 'subgroup<br/>of<br/>cytoplasmic<br/>organelles', 'ribonucleoprotein<br/>complex<br/>family', 'ribosome<br/>biogenesis<br/>community', 'ribosome', 'ribosomal<br/>subunit', 'ribosomal<br/>complex<br/>2')\n", - "\n", - "ribosomal\n", - "complex\n", - "2\n", + "\n", + "ribosomal\n", + "complex\n", + "2\n", "\n", "\n", "\n", "('cell', 'cytoplasm', 'cytoplasmic<br/>organelles', 'subgroup<br/>of<br/>cytoplasmic<br/>organelles', 'ribonucleoprotein<br/>complex<br/>family', 'ribosome<br/>biogenesis<br/>community', 'ribosome', 'ribosomal<br/>subunit')->('cell', 'cytoplasm', 'cytoplasmic<br/>organelles', 'subgroup<br/>of<br/>cytoplasmic<br/>organelles', 'ribonucleoprotein<br/>complex<br/>family', 'ribosome<br/>biogenesis<br/>community', 'ribosome', 'ribosomal<br/>subunit', 'ribosomal<br/>complex<br/>2')\n", - "\n", + "\n", + "\n", + "\n", + "\n", + "('cell', 'cytoplasm', 'cytoplasmic<br/>organelles', 'subgroup<br/>of<br/>cytoplasmic<br/>organelles', 'ribonucleoprotein<br/>complex<br/>family', 'ribosome<br/>biogenesis<br/>community', 'ribosome', 'ribosomal<br/>subunit', 'cotranslational<br/>protein<br/>targeting<br/>to<br/>membrane<br/>system')->('cell', 'protein<br/>transport')\n", + "\n", + "\n", + "cotranslation\n", + "\n", + "\n", + "\n", + "('cell', 'cytoplasm', 'cytoplasmic<br/>organelles', 'subgroup<br/>of<br/>cytoplasmic<br/>organelles', 'ribonucleoprotein<br/>complex<br/>family', 'ribosome<br/>biogenesis<br/>community', 'nucleic<br/>acid<br/>binding<br/>complex')->('cell', 'transcription')\n", + "\n", + "\n", + "nucleic\n", + "acids\n", "\n", "\n", "\n", "('cell', 'cytoplasm', 'transcriptional<br/>regulation<br/>complex<br/>family', 'transcriptional<br/>regulation<br/>complexes')\n", - "\n", - "transcriptional\n", - "regulation\n", - "complexes\n", + "\n", + "transcriptional\n", + "regulation\n", + "complexes\n", "\n", "\n", "\n", "('cell', 'cytoplasm', 'transcriptional<br/>regulation<br/>complex<br/>family')->('cell', 'cytoplasm', 'transcriptional<br/>regulation<br/>complex<br/>family', 'transcriptional<br/>regulation<br/>complexes')\n", - "\n", + "\n", + "\n", + "\n", + "\n", + "('cell', 'cytoplasm', 'transcriptional<br/>regulation<br/>complex<br/>family', 'transcriptional<br/>regulation<br/>complexes')->('cell', 'transcription')\n", + "\n", + "\n", + "regulation\n", + "\n", + "\n", + "\n", + "('cell', 'cytoplasm', 'transcriptional<br/>regulation<br/>complex<br/>family', 'transcriptional<br/>regulation<br/>complexes')->('cell', 'signalling')\n", + "\n", + "\n", + "trancript\n", + "regulation\n", "\n", "\n", "\n", "('cell', 'nucleus', 'DNA<br/>metabolic<br/>assembly')\n", - "\n", - "DNA\n", - "metabolic\n", - "assembly\n", + "\n", + "DNA\n", + "metabolic\n", + "assembly\n", "\n", "\n", "\n", "('cell', 'nucleus')->('cell', 'nucleus', 'DNA<br/>metabolic<br/>assembly')\n", - "\n", + "\n", "\n", "\n", "\n", "('cell', 'nucleus', 'nuclear<br/>lumen')\n", - "\n", - "nuclear\n", - "lumen\n", + "\n", + "nuclear\n", + "lumen\n", "\n", "\n", "\n", "('cell', 'nucleus')->('cell', 'nucleus', 'nuclear<br/>lumen')\n", - "\n", + "\n", "\n", "\n", "\n", "('cell', 'nucleus', 'nuclear<br/>body')\n", - "\n", - "nuclear\n", - "body\n", + "\n", + "nuclear\n", + "body\n", "\n", "\n", "\n", "('cell', 'nucleus')->('cell', 'nucleus', 'nuclear<br/>body')\n", - "\n", + "\n", "\n", "\n", "\n", "('cell', 'nucleus', 'nucleo-plasm<br/>1')\n", - "\n", - "nucleo-plasm\n", - "1\n", + "\n", + "nucleo-plasm\n", + "1\n", "\n", "\n", "\n", "('cell', 'nucleus')->('cell', 'nucleus', 'nucleo-plasm<br/>1')\n", - "\n", + "\n", "\n", "\n", "\n", "('cell', 'nucleus', 'nucleo-plasm<br/>2')\n", - "\n", - "nucleo-plasm\n", - "2\n", + "\n", + "nucleo-plasm\n", + "2\n", "\n", "\n", "\n", "('cell', 'nucleus')->('cell', 'nucleus', 'nucleo-plasm<br/>2')\n", - "\n", + "\n", "\n", "\n", "\n", "('cell', 'nucleus', 'nuclear<br/>transcriptional<br/>speckle')\n", - "\n", - "nuclear\n", - "transcriptional\n", - "speckle\n", + "\n", + "nuclear\n", + "transcriptional\n", + "speckle\n", "\n", "\n", "\n", "('cell', 'nucleus')->('cell', 'nucleus', 'nuclear<br/>transcriptional<br/>speckle')\n", - "\n", + "\n", + "\n", + "\n", + "\n", + "('cell', 'nucleus', 'DNA<br/>metabolic<br/>assembly')->('cell', 'cell<br/>cycle')\n", + "\n", + "\n", + "DNA\n", "\n", "\n", "\n", "('cell', 'nucleus', 'nuclear<br/>lumen', 'nucleolus')\n", - "\n", - "nucleolus\n", + "\n", + "nucleolus\n", "\n", "\n", "\n", "('cell', 'nucleus', 'nuclear<br/>lumen')->('cell', 'nucleus', 'nuclear<br/>lumen', 'nucleolus')\n", - "\n", + "\n", "\n", "\n", "\n", "('cell', 'nucleus', 'nuclear<br/>lumen', 'nuclear<br/>splicing<br/>speckle')\n", - "\n", - "nuclear\n", - "splicing\n", - "speckle\n", + "\n", + "nuclear\n", + "splicing\n", + "speckle\n", "\n", "\n", "\n", "('cell', 'nucleus', 'nuclear<br/>lumen')->('cell', 'nucleus', 'nuclear<br/>lumen', 'nuclear<br/>splicing<br/>speckle')\n", - "\n", + "\n", "\n", "\n", "\n", "('cell', 'nucleus', 'nuclear<br/>lumen', 'nucleolus', 'ribonucleprotein<br/>complex<br/>family')\n", - "\n", - "ribonucleprotein\n", - "complex\n", - "family\n", + "\n", + "ribonucleprotein\n", + "complex\n", + "family\n", "\n", "\n", "\n", "('cell', 'nucleus', 'nuclear<br/>lumen', 'nucleolus')->('cell', 'nucleus', 'nuclear<br/>lumen', 'nucleolus', 'ribonucleprotein<br/>complex<br/>family')\n", - "\n", + "\n", "\n", "\n", "\n", "('cell', 'nucleus', 'nuclear<br/>lumen', 'nucleolus', 'RNA<br/>processing<br/>complex<br/>family')\n", - "\n", - "RNA\n", - "processing\n", - "complex\n", - "family\n", + "\n", + "RNA\n", + "processing\n", + "complex\n", + "family\n", "\n", "\n", "\n", "('cell', 'nucleus', 'nuclear<br/>lumen', 'nucleolus')->('cell', 'nucleus', 'nuclear<br/>lumen', 'nucleolus', 'RNA<br/>processing<br/>complex<br/>family')\n", - "\n", + "\n", "\n", "\n", "\n", "('cell', 'nucleus', 'nuclear<br/>lumen', 'nucleolus', 'splicosomal<br/>complex<br/>family')\n", - "\n", - "splicosomal\n", - "complex\n", - "family\n", + "\n", + "splicosomal\n", + "complex\n", + "family\n", "\n", "\n", "\n", "('cell', 'nucleus', 'nuclear<br/>lumen', 'nucleolus')->('cell', 'nucleus', 'nuclear<br/>lumen', 'nucleolus', 'splicosomal<br/>complex<br/>family')\n", - "\n", + "\n", "\n", "\n", "\n", "('cell', 'nucleus', 'nuclear<br/>lumen', 'nucleolus', 'RNA<br/>processing<br/>complex<br/>family', 'RNA<br/>processing<br/>complex<br/>1')\n", - "\n", - "RNA\n", - "processing\n", - "complex\n", - "1\n", + "\n", + "RNA\n", + "processing\n", + "complex\n", + "1\n", "\n", "\n", "\n", "('cell', 'nucleus', 'nuclear<br/>lumen', 'nucleolus', 'RNA<br/>processing<br/>complex<br/>family')->('cell', 'nucleus', 'nuclear<br/>lumen', 'nucleolus', 'RNA<br/>processing<br/>complex<br/>family', 'RNA<br/>processing<br/>complex<br/>1')\n", - "\n", + "\n", "\n", "\n", "\n", "('cell', 'nucleus', 'nuclear<br/>lumen', 'nucleolus', 'RNA<br/>processing<br/>complex<br/>family', 'RNA<br/>splicing<br/>complex<br/>family')\n", - "\n", - "RNA\n", - "splicing\n", - "complex\n", - "family\n", + "\n", + "RNA\n", + "splicing\n", + "complex\n", + "family\n", "\n", "\n", "\n", "('cell', 'nucleus', 'nuclear<br/>lumen', 'nucleolus', 'RNA<br/>processing<br/>complex<br/>family')->('cell', 'nucleus', 'nuclear<br/>lumen', 'nucleolus', 'RNA<br/>processing<br/>complex<br/>family', 'RNA<br/>splicing<br/>complex<br/>family')\n", - "\n", + "\n", + "\n", + "\n", + "\n", + "('cell', 'nucleus', 'nuclear<br/>lumen', 'nucleolus', 'RNA<br/>processing<br/>complex<br/>family')->('cell', 'transcription')\n", + "\n", + "\n", + "RNA\n", + "processing\n", + "\n", + "\n", + "\n", + "('cell', 'nucleus', 'nuclear<br/>lumen', 'nucleolus', 'RNA<br/>processing<br/>complex<br/>family')->('cell', 'RNA<br/>processing')\n", + "\n", + "\n", + "processing\n", + "complex\n", "\n", "\n", "\n", "('cell', 'nucleus', 'nucleo-plasm<br/>1', 'chromosome<br/>organization<br/>complex<br/>family')\n", - "\n", - "chromosome\n", - "organization\n", - "complex\n", - "family\n", + "\n", + "chromosome\n", + "organization\n", + "complex\n", + "family\n", "\n", "\n", "\n", "('cell', 'nucleus', 'nucleo-plasm<br/>1')->('cell', 'nucleus', 'nucleo-plasm<br/>1', 'chromosome<br/>organization<br/>complex<br/>family')\n", - "\n", + "\n", "\n", "\n", "\n", "('cell', 'nucleus', 'nucleo-plasm<br/>1', 'chromosome<br/>organization<br/>complex<br/>family', 'chromatin<br/>organization<br/>complex<br/>family')\n", - "\n", - "chromatin\n", - "organization\n", - "complex\n", - "family\n", + "\n", + "chromatin\n", + "organization\n", + "complex\n", + "family\n", "\n", "\n", "\n", "('cell', 'nucleus', 'nucleo-plasm<br/>1', 'chromosome<br/>organization<br/>complex<br/>family')->('cell', 'nucleus', 'nucleo-plasm<br/>1', 'chromosome<br/>organization<br/>complex<br/>family', 'chromatin<br/>organization<br/>complex<br/>family')\n", - "\n", + "\n", + "\n", + "\n", + "\n", + "('cell', 'nucleus', 'nucleo-plasm<br/>1', 'chromosome<br/>organization<br/>complex<br/>family')->('cell', 'cell<br/>cycle')\n", + "\n", + "\n", + "chromosome\n", "\n", "\n", "\n", "('cell', 'nucleus', 'nucleo-plasm<br/>1', 'chromosome<br/>organization<br/>complex<br/>family', 'chromatin<br/>organization<br/>complex<br/>family', 'HAT<br/>complex<br/>family')\n", - "\n", - "HAT\n", - "complex\n", - "family\n", + "\n", + "HAT\n", + "complex\n", + "family\n", "\n", "\n", "\n", "('cell', 'nucleus', 'nucleo-plasm<br/>1', 'chromosome<br/>organization<br/>complex<br/>family', 'chromatin<br/>organization<br/>complex<br/>family')->('cell', 'nucleus', 'nucleo-plasm<br/>1', 'chromosome<br/>organization<br/>complex<br/>family', 'chromatin<br/>organization<br/>complex<br/>family', 'HAT<br/>complex<br/>family')\n", - "\n", + "\n", + "\n", + "\n", + "\n", + "('cell', 'nucleus', 'nucleo-plasm<br/>1', 'chromosome<br/>organization<br/>complex<br/>family', 'chromatin<br/>organization<br/>complex<br/>family')->('cell', 'cell<br/>cycle')\n", + "\n", + "\n", + "chromatin\n", "\n", "\n", "\n", "('cell', 'nucleus', 'nucleo-plasm<br/>1', 'chromosome<br/>organization<br/>complex<br/>family', 'chromatin<br/>organization<br/>complex<br/>family', 'HAT<br/>complex<br/>family', 'NuA4<br/>HAT<br/>complex')\n", - "\n", - "NuA4\n", - "HAT\n", - "complex\n", + "\n", + "NuA4\n", + "HAT\n", + "complex\n", "\n", "\n", "\n", "('cell', 'nucleus', 'nucleo-plasm<br/>1', 'chromosome<br/>organization<br/>complex<br/>family', 'chromatin<br/>organization<br/>complex<br/>family', 'HAT<br/>complex<br/>family')->('cell', 'nucleus', 'nucleo-plasm<br/>1', 'chromosome<br/>organization<br/>complex<br/>family', 'chromatin<br/>organization<br/>complex<br/>family', 'HAT<br/>complex<br/>family', 'NuA4<br/>HAT<br/>complex')\n", - "\n", + "\n", "\n", "\n", "\n", "('cell', 'nucleus', 'nucleo-plasm<br/>2', 'chromatin<br/>regulation<br/>complex')\n", - "\n", - "chromatin\n", - "regulation\n", - "complex\n", + "\n", + "chromatin\n", + "regulation\n", + "complex\n", "\n", "\n", "\n", "('cell', 'nucleus', 'nucleo-plasm<br/>2')->('cell', 'nucleus', 'nucleo-plasm<br/>2', 'chromatin<br/>regulation<br/>complex')\n", - "\n", + "\n", "\n", "\n", "\n", "('cell', 'nucleus', 'nuclear<br/>transcriptional<br/>speckle', 'negative<br/>regulation<br/>of<br/>RNA<br/>biosynthesis<br/>process')\n", - "\n", - "negative\n", - "regulation\n", - "of\n", - "RNA\n", - "biosynthesis\n", - "process\n", + "\n", + "negative\n", + "regulation\n", + "of\n", + "RNA\n", + "biosynthesis\n", + "process\n", "\n", "\n", "\n", "('cell', 'nucleus', 'nuclear<br/>transcriptional<br/>speckle')->('cell', 'nucleus', 'nuclear<br/>transcriptional<br/>speckle', 'negative<br/>regulation<br/>of<br/>RNA<br/>biosynthesis<br/>process')\n", - "\n", - "\n", - "\n", - "\n", - "('cell', 'transcription', 'outputs')\n", - "\n", - "outputs\n", - "\n", - "\n", - "\n", - "('cell', 'transcription')->('cell', 'transcription', 'outputs')\n", - "\n", - "\n", - "\n", - "\n", - "('cell', 'transcription', 'outputs', 'RNA<br/>processing')\n", - "\n", - "RNA\n", - "processing\n", - "\n", - "\n", - "\n", - "('cell', 'transcription', 'outputs')->('cell', 'transcription', 'outputs', 'RNA<br/>processing')\n", - "\n", - "\n", - "\n", - "\n", - "('cell', 'transcription', 'outputs', 'regulation')\n", - "\n", - "regulation\n", - "\n", - "\n", - "\n", - "('cell', 'transcription', 'outputs')->('cell', 'transcription', 'outputs', 'regulation')\n", - "\n", - "\n", - "\n", - "\n", - "('cell', 'transcription', 'outputs', 'nucleic<br/>acids')\n", - "\n", - "nucleic\n", - "acids\n", - "\n", - "\n", - "\n", - "('cell', 'transcription', 'outputs')->('cell', 'transcription', 'outputs', 'nucleic<br/>acids')\n", - "\n", - "\n", - "\n", - "\n", - "('cell', 'transcription', 'outputs', 'negative<br/>regulation')\n", - "\n", - "negative\n", - "regulation\n", - "\n", - "\n", - "\n", - "('cell', 'transcription', 'outputs')->('cell', 'transcription', 'outputs', 'negative<br/>regulation')\n", - "\n", - "\n", - "\n", - "\n", - "('cell', 'translation', 'outputs')\n", - "\n", - "outputs\n", - "\n", - "\n", - "\n", - "('cell', 'translation')->('cell', 'translation', 'outputs')\n", - "\n", - "\n", - "\n", - "\n", - "('cell', 'translation', 'outputs', 'ribosomes')\n", - "\n", - "ribosomes\n", - "\n", - "\n", - "\n", - "('cell', 'translation', 'outputs')->('cell', 'translation', 'outputs', 'ribosomes')\n", - "\n", - "\n", - "\n", - "\n", - "('cell', 'metabolism', 'outputs')\n", - "\n", - "outputs\n", - "\n", - "\n", - "\n", - "('cell', 'metabolism')->('cell', 'metabolism', 'outputs')\n", - "\n", - "\n", - "\n", - "\n", - "('cell', 'metabolism', 'outputs', 'organelles')\n", - "\n", - "organelles\n", - "\n", - "\n", - "\n", - "('cell', 'metabolism', 'outputs')->('cell', 'metabolism', 'outputs', 'organelles')\n", - "\n", - "\n", - "\n", - "\n", - "('cell', 'metabolism', 'outputs', 'mitochondrion')\n", - "\n", - "mitochondrion\n", - "\n", - "\n", - "\n", - "('cell', 'metabolism', 'outputs')->('cell', 'metabolism', 'outputs', 'mitochondrion')\n", - "\n", - "\n", - "\n", - "\n", - "('cell', 'metabolism', 'outputs', 'ion<br/>transport')\n", - "\n", - "ion\n", - "transport\n", - "\n", - "\n", - "\n", - "('cell', 'metabolism', 'outputs')->('cell', 'metabolism', 'outputs', 'ion<br/>transport')\n", - "\n", - "\n", - "\n", - "\n", - "('cell', 'cell<br/>cycle', 'outputs')\n", - "\n", - "outputs\n", + "\n", "\n", - "\n", - "\n", - "('cell', 'cell<br/>cycle')->('cell', 'cell<br/>cycle', 'outputs')\n", - "\n", - "\n", - "\n", - "\n", - "('cell', 'cell<br/>cycle', 'outputs', 'DNA')\n", - "\n", - "DNA\n", - "\n", - "\n", - "\n", - "('cell', 'cell<br/>cycle', 'outputs')->('cell', 'cell<br/>cycle', 'outputs', 'DNA')\n", - "\n", - "\n", - "\n", - "\n", - "('cell', 'cell<br/>cycle', 'outputs', 'chromosome')\n", - "\n", - "chromosome\n", - "\n", - "\n", + "\n", "\n", - "('cell', 'cell<br/>cycle', 'outputs')->('cell', 'cell<br/>cycle', 'outputs', 'chromosome')\n", - "\n", - "\n", - "\n", - "\n", - "('cell', 'cell<br/>cycle', 'outputs', 'chromatin')\n", - "\n", - "chromatin\n", - "\n", - "\n", - "\n", - "('cell', 'cell<br/>cycle', 'outputs')->('cell', 'cell<br/>cycle', 'outputs', 'chromatin')\n", - "\n", - "\n", - "\n", - "\n", - "('cell', 'signalling', 'outputs')\n", - "\n", - "outputs\n", - "\n", - "\n", - "\n", - "('cell', 'signalling')->('cell', 'signalling', 'outputs')\n", - "\n", - "\n", - "\n", - "\n", - "('cell', 'signalling', 'outputs', 'transport')\n", - "\n", - "transport\n", - "\n", - "\n", - "\n", - "('cell', 'signalling', 'outputs')->('cell', 'signalling', 'outputs', 'transport')\n", - "\n", - "\n", - "\n", - "\n", - "('cell', 'signalling', 'outputs', 'trancript<br/>regulation')\n", - "\n", - "trancript\n", - "regulation\n", - "\n", - "\n", - "\n", - "('cell', 'signalling', 'outputs')->('cell', 'signalling', 'outputs', 'trancript<br/>regulation')\n", - "\n", - "\n", - "\n", - "\n", - "('cell', 'protein<br/>transport', 'outputs')\n", - "\n", - "outputs\n", - "\n", - "\n", - "\n", - "('cell', 'protein<br/>transport')->('cell', 'protein<br/>transport', 'outputs')\n", - "\n", - "\n", - "\n", - "\n", - "('cell', 'protein<br/>transport', 'outputs', 'transmembrane<br/>transport')\n", - "\n", - "transmembrane\n", - "transport\n", - "\n", - "\n", - "\n", - "('cell', 'protein<br/>transport', 'outputs')->('cell', 'protein<br/>transport', 'outputs', 'transmembrane<br/>transport')\n", - "\n", - "\n", - "\n", - "\n", - "('cell', 'protein<br/>transport', 'outputs', 'secretory')\n", - "\n", - "secretory\n", - "\n", - "\n", - "\n", - "('cell', 'protein<br/>transport', 'outputs')->('cell', 'protein<br/>transport', 'outputs', 'secretory')\n", - "\n", - "\n", - "\n", - "\n", - "('cell', 'protein<br/>transport', 'outputs', 'cotranslation')\n", - "\n", - "cotranslation\n", - "\n", - "\n", - "\n", - "('cell', 'protein<br/>transport', 'outputs')->('cell', 'protein<br/>transport', 'outputs', 'cotranslation')\n", - "\n", - "\n", - "\n", - "\n", - "('cell', 'RNA<br/>processing', 'outputs')\n", - "\n", - "outputs\n", - "\n", - "\n", - "\n", - "('cell', 'RNA<br/>processing')->('cell', 'RNA<br/>processing', 'outputs')\n", - "\n", - "\n", - "\n", - "\n", - "('cell', 'RNA<br/>processing', 'outputs', 'processing<br/>complex')\n", - "\n", - "processing\n", - "complex\n", - "\n", - "\n", - "\n", - "('cell', 'RNA<br/>processing', 'outputs')->('cell', 'RNA<br/>processing', 'outputs', 'processing<br/>complex')\n", - "\n", + "('cell', 'nucleus', 'nuclear<br/>transcriptional<br/>speckle', 'negative<br/>regulation<br/>of<br/>RNA<br/>biosynthesis<br/>process')->('cell', 'transcription')\n", + "\n", + "\n", + "negative\n", + "regulation\n", + "\n", + "\n", + "\n", + "\n", + "('cell', 'translation', 'm', 'e', 'm', 'b', 'r', 'a', 'n', 'e')->('cell', 'translation')\n", + "\n", + "\n", + "membrane\n", "\n", "\n", "\n" ], "text/plain": [ - "" + "" ] }, "execution_count": 17, @@ -3131,11 +2795,12 @@ "import copy\n", "\n", "transcription_process = {\n", + " '_type': 'process',\n", " '_outputs': {\n", - " 'RNA processing': 'Any',\n", - " 'regulation': 'Any',\n", - " 'nucleic acids': 'Any',\n", - " 'negative regulation': 'Any'\n", + " 'RNA processing': 'any',\n", + " 'regulation': 'any',\n", + " 'nucleic acids': 'any',\n", + " 'negative regulation': 'any'\n", " },\n", " 'outputs': {\n", " 'RNA processing': [\n", @@ -3151,9 +2816,10 @@ "}\n", "\n", "translation_process = {\n", + " '_type': 'process',\n", " '_outputs': {\n", - " 'ribosomes': 'Any',\n", - " 'membrane': 'Any'\n", + " 'ribosomes': 'any',\n", + " 'membrane': 'any'\n", " },\n", " 'outputs': {\n", " 'ribosomes': [\n", @@ -3163,10 +2829,11 @@ "}\n", "\n", "metabolism_process = {\n", + " '_type': 'process',\n", " '_outputs': {\n", - " 'organelles': 'Any',\n", - " 'mitochondrion': 'Any',\n", - " 'ion transport': 'Any',\n", + " 'organelles': 'any',\n", + " 'mitochondrion': 'any',\n", + " 'ion transport': 'any',\n", " },\n", " 'outputs': {\n", " 'organelles': [\n", @@ -3179,10 +2846,11 @@ "}\n", "\n", "cell_cycle_process = {\n", + " '_type': 'process',\n", " '_outputs': {\n", - " 'DNA': 'Any',\n", - " 'chromosome': 'Any',\n", - " 'chromatin': 'Any',\n", + " 'DNA': 'any',\n", + " 'chromosome': 'any',\n", + " 'chromatin': 'any',\n", " },\n", " 'outputs': { \n", " 'DNA': ['nucleus', 'DNA metabolic assembly'],\n", @@ -3192,9 +2860,10 @@ "}\n", "\n", "signalling_process = {\n", + " '_type': 'process',\n", " '_outputs': {\n", - " 'transport': 'Any',\n", - " 'trancript regulation': 'Any',\n", + " 'transport': 'any',\n", + " 'trancript regulation': 'any',\n", " },\n", " 'outputs': { \n", " 'transport': [\n", @@ -3205,10 +2874,11 @@ "}\n", "\n", "protein_transport_process = {\n", + " '_type': 'process',\n", " '_outputs': {\n", - " 'transmembrane transport': 'Any',\n", - " 'secretory': 'Any',\n", - " 'cotranslation': 'Any',\n", + " 'transmembrane transport': 'any',\n", + " 'secretory': 'any',\n", + " 'cotranslation': 'any',\n", " },\n", " 'outputs': { \n", " 'transmembrane transport': [\n", @@ -3222,8 +2892,9 @@ "}\n", "\n", "rna_processing_process = {\n", + " '_type': 'process',\n", " '_outputs': {\n", - " 'processing complex': 'Any',\n", + " 'processing complex': 'any',\n", " },\n", " 'outputs': { \n", " 'processing complex': [\n", @@ -3260,7 +2931,7 @@ }, { "cell_type": "code", - "execution_count": 23, + "execution_count": 18, "id": "fe3008ad-498e-449f-8521-6ea29fd903f1", "metadata": { "tags": [] @@ -3312,10 +2983,10 @@ "\n" ], "text/plain": [ - "" + "" ] }, - "execution_count": 23, + "execution_count": 18, "metadata": {}, "output_type": "execute_result" } @@ -3354,100 +3025,291 @@ }, { "cell_type": "code", - "execution_count": 25, + "execution_count": 19, "id": "b39417ce-d9a1-4985-abce-ce22df816897", "metadata": { "tags": [] }, "outputs": [ { - "ename": "RecursionError", - "evalue": "maximum recursion depth exceeded while calling a Python object", - "output_type": "error", - "traceback": [ - "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", - "\u001b[0;31mRecursionError\u001b[0m Traceback (most recent call last)", - "Cell \u001b[0;32mIn[25], line 52\u001b[0m\n\u001b[1;32m 50\u001b[0m core\u001b[38;5;241m.\u001b[39mregister(\u001b[38;5;124m'\u001b[39m\u001b[38;5;124mconcentrations\u001b[39m\u001b[38;5;124m'\u001b[39m, \u001b[38;5;124m'\u001b[39m\u001b[38;5;124mfloat\u001b[39m\u001b[38;5;124m'\u001b[39m)\n\u001b[1;32m 51\u001b[0m cell_struct_func2 \u001b[38;5;241m=\u001b[39m replace_regex_recursive(cell_struct_func)\n\u001b[0;32m---> 52\u001b[0m \u001b[43mplot_bigraph\u001b[49m\u001b[43m(\u001b[49m\u001b[43mcell_struct_func2\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\u001b[43m \u001b[49m\u001b[43mremove_process_place_edges\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[38;5;28;43;01mTrue\u001b[39;49;00m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mout_dir\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[38;5;124;43m'\u001b[39;49m\u001b[38;5;124;43mout\u001b[39;49m\u001b[38;5;124;43m'\u001b[39;49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mfilename\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[38;5;124;43m'\u001b[39;49m\u001b[38;5;124;43mcell\u001b[39;49m\u001b[38;5;124;43m'\u001b[39;49m\u001b[43m)\u001b[49m\n", - "File \u001b[0;32m~/code/bigraph-viz/bigraph_viz/diagram.py:433\u001b[0m, in \u001b[0;36mplot_bigraph\u001b[0;34m(state, schema, core, out_dir, filename, file_format, size, node_label_size, show_values, show_types, port_labels, port_label_size, rankdir, print_source, dpi, label_margin, node_border_colors, node_fill_colors, node_groups, remove_nodes, invisible_edges, remove_process_place_edges, show_process_schema_keys)\u001b[0m\n\u001b[1;32m 430\u001b[0m schema, state \u001b[38;5;241m=\u001b[39m core\u001b[38;5;241m.\u001b[39mcomplete(schema, state)\n\u001b[1;32m 432\u001b[0m \u001b[38;5;66;03m# parse out the network\u001b[39;00m\n\u001b[0;32m--> 433\u001b[0m graph_dict \u001b[38;5;241m=\u001b[39m \u001b[43mget_graph_dict\u001b[49m\u001b[43m(\u001b[49m\n\u001b[1;32m 434\u001b[0m \u001b[43m \u001b[49m\u001b[43mschema\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mschema\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 435\u001b[0m \u001b[43m \u001b[49m\u001b[43mstate\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mstate\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 436\u001b[0m \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 437\u001b[0m \u001b[43m \u001b[49m\u001b[43mremove_nodes\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mremove_nodes\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 438\u001b[0m \u001b[43m \u001b[49m\u001b[43mshow_process_schema_keys\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mshow_process_schema_keys\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 439\u001b[0m \u001b[43m\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m 441\u001b[0m \u001b[38;5;66;03m# make a figure\u001b[39;00m\n\u001b[1;32m 442\u001b[0m graph \u001b[38;5;241m=\u001b[39m get_graphviz_fig(graph_dict, \u001b[38;5;241m*\u001b[39m\u001b[38;5;241m*\u001b[39mkwargs)\n", - "File \u001b[0;32m~/code/bigraph-viz/bigraph_viz/diagram.py:197\u001b[0m, in \u001b[0;36mget_graph_dict\u001b[0;34m(schema, state, core, graph_dict, path, top_state, retain_type_keys, retain_process_keys, remove_nodes, show_process_schema_keys)\u001b[0m\n\u001b[1;32m 194\u001b[0m removed_process_schema_keys \u001b[38;5;241m=\u001b[39m [subpath \u001b[38;5;241m+\u001b[39m (schema_key,) \u001b[38;5;28;01mfor\u001b[39;00m schema_key \u001b[38;5;129;01min\u001b[39;00m removed_process_keys]\n\u001b[1;32m 195\u001b[0m remove_nodes\u001b[38;5;241m.\u001b[39mextend(removed_process_schema_keys)\n\u001b[0;32m--> 197\u001b[0m graph_dict \u001b[38;5;241m=\u001b[39m \u001b[43mget_graph_dict\u001b[49m\u001b[43m(\u001b[49m\n\u001b[1;32m 198\u001b[0m \u001b[43m \u001b[49m\u001b[43mschema\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mschema\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mget\u001b[49m\u001b[43m(\u001b[49m\u001b[43mkey\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mschema\u001b[49m\u001b[43m)\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 199\u001b[0m \u001b[43m \u001b[49m\u001b[43mstate\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mvalue\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 200\u001b[0m \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 201\u001b[0m \u001b[43m \u001b[49m\u001b[43mgraph_dict\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mgraph_dict\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 202\u001b[0m \u001b[43m \u001b[49m\u001b[43mpath\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43msubpath\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 203\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 204\u001b[0m \u001b[43m \u001b[49m\u001b[43mremove_nodes\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mremove_nodes\u001b[49m\n\u001b[1;32m 205\u001b[0m \u001b[43m\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m 207\u001b[0m \u001b[38;5;66;03m# get the place edge\u001b[39;00m\n\u001b[1;32m 208\u001b[0m \u001b[38;5;28;01mfor\u001b[39;00m node \u001b[38;5;129;01min\u001b[39;00m value\u001b[38;5;241m.\u001b[39mkeys():\n", - "File \u001b[0;32m~/code/bigraph-viz/bigraph_viz/diagram.py:197\u001b[0m, in \u001b[0;36mget_graph_dict\u001b[0;34m(schema, state, core, graph_dict, path, top_state, retain_type_keys, retain_process_keys, remove_nodes, show_process_schema_keys)\u001b[0m\n\u001b[1;32m 194\u001b[0m removed_process_schema_keys \u001b[38;5;241m=\u001b[39m [subpath \u001b[38;5;241m+\u001b[39m (schema_key,) \u001b[38;5;28;01mfor\u001b[39;00m schema_key \u001b[38;5;129;01min\u001b[39;00m removed_process_keys]\n\u001b[1;32m 195\u001b[0m remove_nodes\u001b[38;5;241m.\u001b[39mextend(removed_process_schema_keys)\n\u001b[0;32m--> 197\u001b[0m graph_dict \u001b[38;5;241m=\u001b[39m \u001b[43mget_graph_dict\u001b[49m\u001b[43m(\u001b[49m\n\u001b[1;32m 198\u001b[0m \u001b[43m \u001b[49m\u001b[43mschema\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mschema\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mget\u001b[49m\u001b[43m(\u001b[49m\u001b[43mkey\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mschema\u001b[49m\u001b[43m)\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 199\u001b[0m \u001b[43m \u001b[49m\u001b[43mstate\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mvalue\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 200\u001b[0m \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 201\u001b[0m \u001b[43m \u001b[49m\u001b[43mgraph_dict\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mgraph_dict\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 202\u001b[0m \u001b[43m \u001b[49m\u001b[43mpath\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43msubpath\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 203\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 204\u001b[0m \u001b[43m \u001b[49m\u001b[43mremove_nodes\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mremove_nodes\u001b[49m\n\u001b[1;32m 205\u001b[0m \u001b[43m\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m 207\u001b[0m \u001b[38;5;66;03m# get the place edge\u001b[39;00m\n\u001b[1;32m 208\u001b[0m \u001b[38;5;28;01mfor\u001b[39;00m node \u001b[38;5;129;01min\u001b[39;00m value\u001b[38;5;241m.\u001b[39mkeys():\n", - " \u001b[0;31m[... skipping similar frames: get_graph_dict at line 197 (2951 times)]\u001b[0m\n", - "File \u001b[0;32m~/code/bigraph-viz/bigraph_viz/diagram.py:197\u001b[0m, in \u001b[0;36mget_graph_dict\u001b[0;34m(schema, state, core, graph_dict, path, top_state, retain_type_keys, retain_process_keys, remove_nodes, show_process_schema_keys)\u001b[0m\n\u001b[1;32m 194\u001b[0m removed_process_schema_keys \u001b[38;5;241m=\u001b[39m [subpath \u001b[38;5;241m+\u001b[39m (schema_key,) \u001b[38;5;28;01mfor\u001b[39;00m schema_key \u001b[38;5;129;01min\u001b[39;00m removed_process_keys]\n\u001b[1;32m 195\u001b[0m remove_nodes\u001b[38;5;241m.\u001b[39mextend(removed_process_schema_keys)\n\u001b[0;32m--> 197\u001b[0m graph_dict \u001b[38;5;241m=\u001b[39m \u001b[43mget_graph_dict\u001b[49m\u001b[43m(\u001b[49m\n\u001b[1;32m 198\u001b[0m \u001b[43m \u001b[49m\u001b[43mschema\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mschema\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mget\u001b[49m\u001b[43m(\u001b[49m\u001b[43mkey\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mschema\u001b[49m\u001b[43m)\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 199\u001b[0m \u001b[43m \u001b[49m\u001b[43mstate\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mvalue\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 200\u001b[0m \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 201\u001b[0m \u001b[43m \u001b[49m\u001b[43mgraph_dict\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mgraph_dict\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 202\u001b[0m \u001b[43m \u001b[49m\u001b[43mpath\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43msubpath\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 203\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 204\u001b[0m \u001b[43m \u001b[49m\u001b[43mremove_nodes\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mremove_nodes\u001b[49m\n\u001b[1;32m 205\u001b[0m \u001b[43m\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m 207\u001b[0m \u001b[38;5;66;03m# get the place edge\u001b[39;00m\n\u001b[1;32m 208\u001b[0m \u001b[38;5;28;01mfor\u001b[39;00m node \u001b[38;5;129;01min\u001b[39;00m value\u001b[38;5;241m.\u001b[39mkeys():\n", - "File \u001b[0;32m~/code/bigraph-viz/bigraph_viz/diagram.py:162\u001b[0m, in \u001b[0;36mget_graph_dict\u001b[0;34m(schema, state, core, graph_dict, path, top_state, retain_type_keys, retain_process_keys, remove_nodes, show_process_schema_keys)\u001b[0m\n\u001b[1;32m 153\u001b[0m \u001b[38;5;28;01mcontinue\u001b[39;00m\n\u001b[1;32m 155\u001b[0m node_spec \u001b[38;5;241m=\u001b[39m {\n\u001b[1;32m 156\u001b[0m \u001b[38;5;124m'\u001b[39m\u001b[38;5;124mname\u001b[39m\u001b[38;5;124m'\u001b[39m: key,\n\u001b[1;32m 157\u001b[0m \u001b[38;5;124m'\u001b[39m\u001b[38;5;124mpath\u001b[39m\u001b[38;5;124m'\u001b[39m: subpath,\n\u001b[1;32m 158\u001b[0m \u001b[38;5;124m'\u001b[39m\u001b[38;5;124mvalue\u001b[39m\u001b[38;5;124m'\u001b[39m: \u001b[38;5;28;01mNone\u001b[39;00m,\n\u001b[1;32m 159\u001b[0m \u001b[38;5;124m'\u001b[39m\u001b[38;5;124mtype\u001b[39m\u001b[38;5;124m'\u001b[39m: \u001b[38;5;28;01mNone\u001b[39;00m\n\u001b[1;32m 160\u001b[0m }\n\u001b[0;32m--> 162\u001b[0m is_edge \u001b[38;5;241m=\u001b[39m \u001b[43mcore\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mcheck\u001b[49m\u001b[43m(\u001b[49m\u001b[38;5;124;43m'\u001b[39;49m\u001b[38;5;124;43medge\u001b[39;49m\u001b[38;5;124;43m'\u001b[39;49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mvalue\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m 163\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m is_edge: \u001b[38;5;66;03m# this is a process/edge node\u001b[39;00m\n\u001b[1;32m 164\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m key \u001b[38;5;129;01min\u001b[39;00m removed_process_keys \u001b[38;5;129;01mand\u001b[39;00m \u001b[38;5;129;01mnot\u001b[39;00m retain_process_keys:\n", - "File \u001b[0;32m~/code/bigraph-schema/bigraph_schema/type_system.py:465\u001b[0m, in \u001b[0;36mTypeSystem.check\u001b[0;34m(self, initial_schema, state)\u001b[0m\n\u001b[1;32m 463\u001b[0m \u001b[38;5;28;01mdef\u001b[39;00m \u001b[38;5;21mcheck\u001b[39m(\u001b[38;5;28mself\u001b[39m, initial_schema, state):\n\u001b[1;32m 464\u001b[0m schema \u001b[38;5;241m=\u001b[39m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mretrieve(initial_schema)\n\u001b[0;32m--> 465\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m \u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mcheck_state\u001b[49m\u001b[43m(\u001b[49m\u001b[43mschema\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mstate\u001b[49m\u001b[43m)\u001b[49m\n", - "File \u001b[0;32m~/code/bigraph-schema/bigraph_schema/type_system.py:457\u001b[0m, in \u001b[0;36mTypeSystem.check_state\u001b[0;34m(self, schema, state)\u001b[0m\n\u001b[1;32m 452\u001b[0m check_key \u001b[38;5;241m=\u001b[39m any_type[\u001b[38;5;124m'\u001b[39m\u001b[38;5;124m_check\u001b[39m\u001b[38;5;124m'\u001b[39m]\n\u001b[1;32m 454\u001b[0m check_function \u001b[38;5;241m=\u001b[39m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mtype_registry\u001b[38;5;241m.\u001b[39mcheck_registry\u001b[38;5;241m.\u001b[39maccess(\n\u001b[1;32m 455\u001b[0m check_key)\n\u001b[0;32m--> 457\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m \u001b[43mcheck_function\u001b[49m\u001b[43m(\u001b[49m\n\u001b[1;32m 458\u001b[0m \u001b[43m \u001b[49m\u001b[43mschema\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 459\u001b[0m \u001b[43m \u001b[49m\u001b[43mstate\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 460\u001b[0m \u001b[43m \u001b[49m\u001b[38;5;28;43mself\u001b[39;49m\u001b[43m)\u001b[49m\n", - "File \u001b[0;32m~/code/bigraph-schema/bigraph_schema/type_system.py:1923\u001b[0m, in \u001b[0;36mcheck_edge\u001b[0;34m(schema, state, core)\u001b[0m\n\u001b[1;32m 1922\u001b[0m \u001b[38;5;28;01mdef\u001b[39;00m \u001b[38;5;21mcheck_edge\u001b[39m(schema, state, core):\n\u001b[0;32m-> 1923\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m \u001b[38;5;28misinstance\u001b[39m(state, \u001b[38;5;28mdict\u001b[39m) \u001b[38;5;129;01mand\u001b[39;00m check_ports(state, core, \u001b[38;5;124m'\u001b[39m\u001b[38;5;124minputs\u001b[39m\u001b[38;5;124m'\u001b[39m) \u001b[38;5;129;01mand\u001b[39;00m \u001b[43mcheck_ports\u001b[49m\u001b[43m(\u001b[49m\u001b[43mstate\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mcore\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[38;5;124;43m'\u001b[39;49m\u001b[38;5;124;43moutputs\u001b[39;49m\u001b[38;5;124;43m'\u001b[39;49m\u001b[43m)\u001b[49m\n", - "File \u001b[0;32m~/code/bigraph-schema/bigraph_schema/type_system.py:1917\u001b[0m, in \u001b[0;36mcheck_ports\u001b[0;34m(state, core, key)\u001b[0m\n\u001b[1;32m 1916\u001b[0m \u001b[38;5;28;01mdef\u001b[39;00m \u001b[38;5;21mcheck_ports\u001b[39m(state, core, key):\n\u001b[0;32m-> 1917\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m key \u001b[38;5;129;01min\u001b[39;00m state \u001b[38;5;129;01mand\u001b[39;00m \u001b[43mcore\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mcheck\u001b[49m\u001b[43m(\u001b[49m\n\u001b[1;32m 1918\u001b[0m \u001b[43m \u001b[49m\u001b[38;5;124;43m'\u001b[39;49m\u001b[38;5;124;43mwires\u001b[39;49m\u001b[38;5;124;43m'\u001b[39;49m\u001b[43m,\u001b[49m\n\u001b[1;32m 1919\u001b[0m \u001b[43m \u001b[49m\u001b[43mstate\u001b[49m\u001b[43m[\u001b[49m\u001b[43mkey\u001b[49m\u001b[43m]\u001b[49m\u001b[43m)\u001b[49m\n", - "File \u001b[0;32m~/code/bigraph-schema/bigraph_schema/type_system.py:465\u001b[0m, in \u001b[0;36mTypeSystem.check\u001b[0;34m(self, initial_schema, state)\u001b[0m\n\u001b[1;32m 463\u001b[0m \u001b[38;5;28;01mdef\u001b[39;00m \u001b[38;5;21mcheck\u001b[39m(\u001b[38;5;28mself\u001b[39m, initial_schema, state):\n\u001b[1;32m 464\u001b[0m schema \u001b[38;5;241m=\u001b[39m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mretrieve(initial_schema)\n\u001b[0;32m--> 465\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m \u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mcheck_state\u001b[49m\u001b[43m(\u001b[49m\u001b[43mschema\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mstate\u001b[49m\u001b[43m)\u001b[49m\n", - "File \u001b[0;32m~/code/bigraph-schema/bigraph_schema/type_system.py:457\u001b[0m, in \u001b[0;36mTypeSystem.check_state\u001b[0;34m(self, schema, state)\u001b[0m\n\u001b[1;32m 452\u001b[0m check_key \u001b[38;5;241m=\u001b[39m any_type[\u001b[38;5;124m'\u001b[39m\u001b[38;5;124m_check\u001b[39m\u001b[38;5;124m'\u001b[39m]\n\u001b[1;32m 454\u001b[0m check_function \u001b[38;5;241m=\u001b[39m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mtype_registry\u001b[38;5;241m.\u001b[39mcheck_registry\u001b[38;5;241m.\u001b[39maccess(\n\u001b[1;32m 455\u001b[0m check_key)\n\u001b[0;32m--> 457\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m \u001b[43mcheck_function\u001b[49m\u001b[43m(\u001b[49m\n\u001b[1;32m 458\u001b[0m \u001b[43m \u001b[49m\u001b[43mschema\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 459\u001b[0m \u001b[43m \u001b[49m\u001b[43mstate\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 460\u001b[0m \u001b[43m \u001b[49m\u001b[38;5;28;43mself\u001b[39;49m\u001b[43m)\u001b[49m\n", - "File \u001b[0;32m~/code/bigraph-schema/bigraph_schema/type_system.py:1648\u001b[0m, in \u001b[0;36mcheck_tree\u001b[0;34m(schema, state, core)\u001b[0m\n\u001b[1;32m 1646\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m \u001b[38;5;28misinstance\u001b[39m(state, \u001b[38;5;28mdict\u001b[39m):\n\u001b[1;32m 1647\u001b[0m \u001b[38;5;28;01mfor\u001b[39;00m key, value \u001b[38;5;129;01min\u001b[39;00m state\u001b[38;5;241m.\u001b[39mitems():\n\u001b[0;32m-> 1648\u001b[0m check \u001b[38;5;241m=\u001b[39m \u001b[43mcore\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mcheck\u001b[49m\u001b[43m(\u001b[49m\u001b[43m{\u001b[49m\n\u001b[1;32m 1649\u001b[0m \u001b[43m \u001b[49m\u001b[38;5;124;43m'\u001b[39;49m\u001b[38;5;124;43m_type\u001b[39;49m\u001b[38;5;124;43m'\u001b[39;49m\u001b[43m:\u001b[49m\u001b[43m \u001b[49m\u001b[38;5;124;43m'\u001b[39;49m\u001b[38;5;124;43mtree\u001b[39;49m\u001b[38;5;124;43m'\u001b[39;49m\u001b[43m,\u001b[49m\n\u001b[1;32m 1650\u001b[0m \u001b[43m \u001b[49m\u001b[38;5;124;43m'\u001b[39;49m\u001b[38;5;124;43m_leaf\u001b[39;49m\u001b[38;5;124;43m'\u001b[39;49m\u001b[43m:\u001b[49m\u001b[43m \u001b[49m\u001b[43mleaf_type\u001b[49m\u001b[43m}\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 1651\u001b[0m \u001b[43m \u001b[49m\u001b[43mvalue\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m 1653\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m \u001b[38;5;129;01mnot\u001b[39;00m check:\n\u001b[1;32m 1654\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m core\u001b[38;5;241m.\u001b[39mcheck(\n\u001b[1;32m 1655\u001b[0m leaf_type,\n\u001b[1;32m 1656\u001b[0m value)\n", - "File \u001b[0;32m~/code/bigraph-schema/bigraph_schema/type_system.py:465\u001b[0m, in \u001b[0;36mTypeSystem.check\u001b[0;34m(self, initial_schema, state)\u001b[0m\n\u001b[1;32m 463\u001b[0m \u001b[38;5;28;01mdef\u001b[39;00m \u001b[38;5;21mcheck\u001b[39m(\u001b[38;5;28mself\u001b[39m, initial_schema, state):\n\u001b[1;32m 464\u001b[0m schema \u001b[38;5;241m=\u001b[39m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mretrieve(initial_schema)\n\u001b[0;32m--> 465\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m \u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mcheck_state\u001b[49m\u001b[43m(\u001b[49m\u001b[43mschema\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mstate\u001b[49m\u001b[43m)\u001b[49m\n", - "File \u001b[0;32m~/code/bigraph-schema/bigraph_schema/type_system.py:457\u001b[0m, in \u001b[0;36mTypeSystem.check_state\u001b[0;34m(self, schema, state)\u001b[0m\n\u001b[1;32m 452\u001b[0m check_key \u001b[38;5;241m=\u001b[39m any_type[\u001b[38;5;124m'\u001b[39m\u001b[38;5;124m_check\u001b[39m\u001b[38;5;124m'\u001b[39m]\n\u001b[1;32m 454\u001b[0m check_function \u001b[38;5;241m=\u001b[39m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mtype_registry\u001b[38;5;241m.\u001b[39mcheck_registry\u001b[38;5;241m.\u001b[39maccess(\n\u001b[1;32m 455\u001b[0m check_key)\n\u001b[0;32m--> 457\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m \u001b[43mcheck_function\u001b[49m\u001b[43m(\u001b[49m\n\u001b[1;32m 458\u001b[0m \u001b[43m \u001b[49m\u001b[43mschema\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 459\u001b[0m \u001b[43m \u001b[49m\u001b[43mstate\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 460\u001b[0m \u001b[43m \u001b[49m\u001b[38;5;28;43mself\u001b[39;49m\u001b[43m)\u001b[49m\n", - "File \u001b[0;32m~/code/bigraph-schema/bigraph_schema/type_system.py:1660\u001b[0m, in \u001b[0;36mcheck_tree\u001b[0;34m(schema, state, core)\u001b[0m\n\u001b[1;32m 1658\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m \u001b[38;5;28;01mTrue\u001b[39;00m\n\u001b[1;32m 1659\u001b[0m \u001b[38;5;28;01melse\u001b[39;00m:\n\u001b[0;32m-> 1660\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m \u001b[43mcore\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mcheck\u001b[49m\u001b[43m(\u001b[49m\u001b[43mleaf_type\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mstate\u001b[49m\u001b[43m)\u001b[49m\n", - "File \u001b[0;32m~/code/bigraph-schema/bigraph_schema/type_system.py:465\u001b[0m, in \u001b[0;36mTypeSystem.check\u001b[0;34m(self, initial_schema, state)\u001b[0m\n\u001b[1;32m 463\u001b[0m \u001b[38;5;28;01mdef\u001b[39;00m \u001b[38;5;21mcheck\u001b[39m(\u001b[38;5;28mself\u001b[39m, initial_schema, state):\n\u001b[1;32m 464\u001b[0m schema \u001b[38;5;241m=\u001b[39m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mretrieve(initial_schema)\n\u001b[0;32m--> 465\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m \u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mcheck_state\u001b[49m\u001b[43m(\u001b[49m\u001b[43mschema\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mstate\u001b[49m\u001b[43m)\u001b[49m\n", - "File \u001b[0;32m~/code/bigraph-schema/bigraph_schema/type_system.py:457\u001b[0m, in \u001b[0;36mTypeSystem.check_state\u001b[0;34m(self, schema, state)\u001b[0m\n\u001b[1;32m 452\u001b[0m check_key \u001b[38;5;241m=\u001b[39m any_type[\u001b[38;5;124m'\u001b[39m\u001b[38;5;124m_check\u001b[39m\u001b[38;5;124m'\u001b[39m]\n\u001b[1;32m 454\u001b[0m check_function \u001b[38;5;241m=\u001b[39m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mtype_registry\u001b[38;5;241m.\u001b[39mcheck_registry\u001b[38;5;241m.\u001b[39maccess(\n\u001b[1;32m 455\u001b[0m check_key)\n\u001b[0;32m--> 457\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m \u001b[43mcheck_function\u001b[49m\u001b[43m(\u001b[49m\n\u001b[1;32m 458\u001b[0m \u001b[43m \u001b[49m\u001b[43mschema\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 459\u001b[0m \u001b[43m \u001b[49m\u001b[43mstate\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 460\u001b[0m \u001b[43m \u001b[49m\u001b[38;5;28;43mself\u001b[39;49m\u001b[43m)\u001b[49m\n", - "File \u001b[0;32m~/code/bigraph-schema/bigraph_schema/type_system.py:1586\u001b[0m, in \u001b[0;36mcheck_list\u001b[0;34m(schema, state, core)\u001b[0m\n\u001b[1;32m 1584\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m \u001b[38;5;28misinstance\u001b[39m(state, \u001b[38;5;28mlist\u001b[39m):\n\u001b[1;32m 1585\u001b[0m \u001b[38;5;28;01mfor\u001b[39;00m element \u001b[38;5;129;01min\u001b[39;00m state:\n\u001b[0;32m-> 1586\u001b[0m check \u001b[38;5;241m=\u001b[39m \u001b[43mcore\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mcheck\u001b[49m\u001b[43m(\u001b[49m\n\u001b[1;32m 1587\u001b[0m \u001b[43m \u001b[49m\u001b[43melement_type\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 1588\u001b[0m \u001b[43m \u001b[49m\u001b[43melement\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m 1590\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m \u001b[38;5;129;01mnot\u001b[39;00m check:\n\u001b[1;32m 1591\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m \u001b[38;5;28;01mFalse\u001b[39;00m\n", - "File \u001b[0;32m~/code/bigraph-schema/bigraph_schema/type_system.py:464\u001b[0m, in \u001b[0;36mTypeSystem.check\u001b[0;34m(self, initial_schema, state)\u001b[0m\n\u001b[1;32m 463\u001b[0m \u001b[38;5;28;01mdef\u001b[39;00m \u001b[38;5;21mcheck\u001b[39m(\u001b[38;5;28mself\u001b[39m, initial_schema, state):\n\u001b[0;32m--> 464\u001b[0m schema \u001b[38;5;241m=\u001b[39m \u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mretrieve\u001b[49m\u001b[43m(\u001b[49m\u001b[43minitial_schema\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m 465\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mcheck_state(schema, state)\n", - "File \u001b[0;32m~/code/bigraph-schema/bigraph_schema/type_system.py:95\u001b[0m, in \u001b[0;36mTypeSystem.retrieve\u001b[0;34m(self, schema)\u001b[0m\n\u001b[1;32m 90\u001b[0m \u001b[38;5;28;01mdef\u001b[39;00m \u001b[38;5;21mretrieve\u001b[39m(\u001b[38;5;28mself\u001b[39m, schema):\n\u001b[1;32m 91\u001b[0m \u001b[38;5;250m \u001b[39m\u001b[38;5;124;03m'''\u001b[39;00m\n\u001b[1;32m 92\u001b[0m \u001b[38;5;124;03m like access(schema) but raises an exception if nothing is found\u001b[39;00m\n\u001b[1;32m 93\u001b[0m \u001b[38;5;124;03m '''\u001b[39;00m\n\u001b[0;32m---> 95\u001b[0m found \u001b[38;5;241m=\u001b[39m \u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43maccess\u001b[49m\u001b[43m(\u001b[49m\u001b[43mschema\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m 96\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m found \u001b[38;5;129;01mis\u001b[39;00m \u001b[38;5;28;01mNone\u001b[39;00m:\n\u001b[1;32m 97\u001b[0m \u001b[38;5;28;01mraise\u001b[39;00m \u001b[38;5;167;01mException\u001b[39;00m(\u001b[38;5;124mf\u001b[39m\u001b[38;5;124m'\u001b[39m\u001b[38;5;124mschema not found for type: \u001b[39m\u001b[38;5;132;01m{\u001b[39;00mschema\u001b[38;5;132;01m}\u001b[39;00m\u001b[38;5;124m'\u001b[39m)\n", - "File \u001b[0;32m~/code/bigraph-schema/bigraph_schema/type_system.py:85\u001b[0m, in \u001b[0;36mTypeSystem.access\u001b[0;34m(self, schema)\u001b[0m\n\u001b[1;32m 84\u001b[0m \u001b[38;5;28;01mdef\u001b[39;00m \u001b[38;5;21maccess\u001b[39m(\u001b[38;5;28mself\u001b[39m, schema):\n\u001b[0;32m---> 85\u001b[0m found \u001b[38;5;241m=\u001b[39m \u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mtype_registry\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43maccess\u001b[49m\u001b[43m(\u001b[49m\n\u001b[1;32m 86\u001b[0m \u001b[43m \u001b[49m\u001b[43mschema\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m 87\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m found\n", - "File \u001b[0;32m~/code/bigraph-schema/bigraph_schema/registry.py:998\u001b[0m, in \u001b[0;36mTypeRegistry.access\u001b[0;34m(self, schema)\u001b[0m\n\u001b[1;32m 992\u001b[0m \u001b[38;5;250m\u001b[39m\u001b[38;5;124;03m'''\u001b[39;00m\n\u001b[1;32m 993\u001b[0m \u001b[38;5;124;03mexpand the schema to its full type information from the type registry\u001b[39;00m\n\u001b[1;32m 994\u001b[0m \u001b[38;5;124;03m'''\u001b[39;00m\n\u001b[1;32m 996\u001b[0m found \u001b[38;5;241m=\u001b[39m \u001b[38;5;28;01mNone\u001b[39;00m\n\u001b[0;32m--> 998\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m \u001b[38;5;28;43misinstance\u001b[39;49m\u001b[43m(\u001b[49m\u001b[43mschema\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[38;5;28;43mdict\u001b[39;49m\u001b[43m)\u001b[49m:\n\u001b[1;32m 999\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m \u001b[38;5;124m'\u001b[39m\u001b[38;5;124m_description\u001b[39m\u001b[38;5;124m'\u001b[39m \u001b[38;5;129;01min\u001b[39;00m schema:\n\u001b[1;32m 1000\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m schema\n", - "\u001b[0;31mRecursionError\u001b[0m: maximum recursion depth exceeded while calling a Python object" + "name": "stdout", + "output_type": "stream", + "text": [ + "Writing out/cell\n" ] + }, + { + "data": { + "image/svg+xml": [ + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "bigraph\n", + "\n", + "\n", + "\n", + "('cell',)\n", + "\n", + "cell\n", + "\n", + "\n", + "\n", + "('cell', 'membrane')\n", + "\n", + "membrane\n", + "\n", + "\n", + "\n", + "('cell',)->('cell', 'membrane')\n", + "\n", + "\n", + "\n", + "\n", + "('cell', 'cytoplasm')\n", + "\n", + "cytoplasm\n", + "\n", + "\n", + "\n", + "('cell',)->('cell', 'cytoplasm')\n", + "\n", + "\n", + "\n", + "\n", + "('cell', 'metabolites')\n", + "\n", + "metabolites\n", + "\n", + "\n", + "\n", + "('cell',)->('cell', 'metabolites')\n", + "\n", + "\n", + "\n", + "\n", + "('cell', 'nucleoid')\n", + "\n", + "nucleoid\n", + "\n", + "\n", + "\n", + "('cell',)->('cell', 'nucleoid')\n", + "\n", + "\n", + "\n", + "\n", + "('cell', 'membrane', 'transporters')\n", + "\n", + "transporters\n", + "\n", + "\n", + "\n", + "('cell', 'membrane')->('cell', 'membrane', 'transporters')\n", + "\n", + "\n", + "\n", + "\n", + "('cell', 'membrane', 'lipids')\n", + "\n", + "lipids\n", + "\n", + "\n", + "\n", + "('cell', 'membrane')->('cell', 'membrane', 'lipids')\n", + "\n", + "\n", + "\n", + "\n", + "('cell', 'membrane', 'transmembrane transport')\n", + "\n", + "transmembrane transport\n", + "\n", + "\n", + "\n", + "\n", + "('cell', 'membrane', 'transporters')->('cell', 'membrane', 'transmembrane transport')\n", + "\n", + "\n", + "transporters\n", + "\n", + "\n", + "\n", + "('cell', 'cytoplasm', 'metabolites')\n", + "\n", + "metabolites\n", + "\n", + "\n", + "\n", + "('cell', 'cytoplasm')->('cell', 'cytoplasm', 'metabolites')\n", + "\n", + "\n", + "\n", + "\n", + "('cell', 'cytoplasm', 'ribosomal complexes')\n", + "\n", + "ribosomal complexes\n", + "\n", + "\n", + "\n", + "('cell', 'cytoplasm')->('cell', 'cytoplasm', 'ribosomal complexes')\n", + "\n", + "\n", + "\n", + "\n", + "('cell', 'cytoplasm', 'transcript regulation complex')\n", + "\n", + "transcript regulation complex\n", + "\n", + "\n", + "\n", + "('cell', 'cytoplasm')->('cell', 'cytoplasm', 'transcript regulation complex')\n", + "\n", + "\n", + "\n", + "\n", + "('cell', 'cytoplasm', 'translation')\n", + "\n", + "translation\n", + "\n", + "\n", + "\n", + "\n", + "('cell', 'cytoplasm', 'metabolites')->('cell', 'membrane', 'transmembrane transport')\n", + "\n", + "\n", + "internal\n", + "\n", + "\n", + "\n", + "('cell', 'cytoplasm', 'ribosomal complexes')->('cell', 'cytoplasm', 'translation')\n", + "\n", + "\n", + "p1\n", + "\n", + "\n", + "\n", + "('cell', 'cytoplasm', 'transcript regulation complex', 'transcripts')\n", + "\n", + "transcripts\n", + "\n", + "\n", + "\n", + "('cell', 'cytoplasm', 'transcript regulation complex')->('cell', 'cytoplasm', 'transcript regulation complex', 'transcripts')\n", + "\n", + "\n", + "\n", + "\n", + "('cell', 'cytoplasm', 'transcript regulation complex', 'transcripts')->('cell', 'cytoplasm', 'translation')\n", + "\n", + "\n", + "p2\n", + "\n", + "\n", + "\n", + "('cell', 'nucleoid', 'chromosome')\n", + "\n", + "chromosome\n", + "\n", + "\n", + "\n", + "('cell', 'nucleoid')->('cell', 'nucleoid', 'chromosome')\n", + "\n", + "\n", + "\n", + "\n", + "('cell', 'nucleoid', 'chromosome', 'genes')\n", + "\n", + "genes\n", + "\n", + "\n", + "\n", + "('cell', 'nucleoid', 'chromosome')->('cell', 'nucleoid', 'chromosome', 'genes')\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "('cell', 'membrane', 'transmembrane transport', 'e', 'x', 't', 'e', 'r', 'n', 'a', 'l')->('cell', 'membrane', 'transmembrane transport')\n", + "\n", + "\n", + "external\n", + "\n", + "\n", + "\n" + ], + "text/plain": [ + "" + ] + }, + "execution_count": 19, + "metadata": {}, + "output_type": "execute_result" } ], "source": [ - "cell_struct_func = {\n", + "core.register('concentrations', 'float')\n", + "core.register('sequences', 'float')\n", + "core.register('membrane', {\n", + " 'transporters': 'concentrations',\n", + " 'lipids': 'concentrations',\n", + " 'transmembrane transport': {\n", + " '_type': 'process',\n", + " '_inputs': {},\n", + " '_outputs': {\n", + " 'transporters': 'concentrations',\n", + " 'internal': 'concentrations',\n", + " 'external': 'concentrations'\n", + " }\n", + " }\n", + "})\n", + "\n", + "core.register('cytoplasm', {\n", + " 'metabolites': 'concentrations',\n", + " 'ribosomal complexes': 'concentrations',\n", + " 'transcript regulation complex': {\n", + " 'transcripts': 'concentrations'},\n", + " 'translation': {\n", + " '_type': 'process',\n", + " '_outputs': {\n", + " 'p1': 'concentrations',\n", + " 'p2': 'concentrations'}}})\n", + "\n", + "core.register('nucleoid', {\n", + " 'chromosome': {\n", + " 'genes': 'sequences'}})\n", + "\n", + "core.register('cell', {\n", + " 'membrane': 'membrane',\n", + " 'cytoplasm': 'cytoplasm',\n", + " 'nucleoid': 'nucleoid'})\n", + "\n", + "# state\n", + "cell_struct_state = {\n", " 'cell': {\n", " 'membrane': {\n", - " 'transporters': 'concentrations',\n", - " 'lipids': 'concentrations',\n", " 'transmembrane transport': {\n", - " '_value': {\n", - " '_process': 'transport URI',\n", - " '_config': {'parameter': 1}\n", - " },\n", " 'outputs': {\n", - " 'transporters': 'transporters',\n", - " 'internal': ['..', 'cytoplasm', 'metabolites']},\n", - " '_outputs': {\n", - " 'transporters': 'concentrations',\n", - " 'internal': 'concentrations',\n", - " 'external': 'concentrations'\n", - " }\n", - " }\n", - " },\n", + " 'transporters': ['transporters'],\n", + " 'internal': ['..', 'cytoplasm', 'metabolites']}}},\n", " 'cytoplasm': {\n", - " 'metabolites': {\n", - " '_value': 1.1,\n", - " '_type': 'concentrations'\n", - " },\n", - " 'ribosomal complexes': {\n", - " '_value': 2.2,\n", - " '_type': 'concentrations'\n", - " },\n", - " 'transcript regulation complex': {\n", - " '_value': 0.01,\n", - " 'transcripts': {\n", - " '_value': 0.1,\n", - " '_type': 'concentrations'\n", - " }\n", - " },\n", " 'translation': {\n", - " '_type': 'process',\n", " 'outputs': {\n", " 'p1': ['ribosomal complexes'],\n", - " 'p2': ['transcript regulation complex', 'transcripts']}}},\n", - " 'nucleoid': {\n", - " 'chromosome': {\n", - " 'genes': 'sequences'\n", - " }\n", - " }\n", - " }\n", - "}\n", - "core = TypeSystem()\n", - "core.register('concentrations', 'float')\n", - "cell_struct_func2 = replace_regex_recursive(cell_struct_func)\n", - "plot_bigraph(cell_struct_func2, core=core, remove_process_place_edges=True, out_dir='out', filename='cell')" + " 'p2': ['transcript regulation complex', 'transcripts']}}}}}\n", + "\n", + "plot_bigraph(\n", + " cell_struct_state,\n", + " schema={'cell': 'cell'},\n", + " core=core,\n", + " remove_process_place_edges=True,\n", + " out_dir='out',\n", + " filename='cell')" ] }, { @@ -3462,12 +3324,20 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 20, "id": "16960d1b-6e35-421e-bb7d-3efe5052e4fc", "metadata": { "tags": [] }, - "outputs": [], + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Writing out/ecoli\n" + ] + } + ], "source": [ "ecoli = { \n", " 'chromosome-structure': { \n",