diff --git a/notebooks/basics.html b/notebooks/basics.html index eed236b..1c6b293 100644 --- a/notebooks/basics.html +++ b/notebooks/basics.html @@ -7504,7 +7504,7 @@
# !pip install bigraph-schema
@@ -7545,7 +7545,7 @@ Imports¶
-In [22]:
+In [2]:
from bigraph_viz import plot_bigraph, plot_flow, plot_multitimestep, pf
@@ -7587,7 +7587,7 @@ Simple stores
-In [23]:
+In [3]:
simple_store_state = {
@@ -7604,7 +7604,7 @@ Simple stores
-In [24]:
+In [4]:
typed_store_spec = {
@@ -7647,7 +7647,7 @@ Simple stores
-Out[24]:
+Out[4]:
@@ -7670,7 +7670,7 @@ Hierarchy¶
-In [25]:
+In [5]:
hierarchy_spec = {
@@ -7696,7 +7696,7 @@ Hierarchy¶
-In [26]:
+In [6]:
process_spec = {
@@ -7743,7 +7743,6 @@ Single process},
},
}
-# validate_schema(process_spec) # validate it follows the schema types TODO -- are disconnected ports allowed?
plot_bigraph(process_spec, **plot_settings, rankdir='RL', filename='process')
@@ -7755,7 +7754,7 @@ Single process
-In [27]:
+In [7]:
process_schema = {
@@ -7794,7 +7793,6 @@ Multiple processes'process2': process_schema,
'process3': process_schema,
}
-# validate_schema(processes_spec) # validate it follows the schema types TODO -- are disconnected ports allowed?
plot_bigraph(processes_spec, **plot_settings, rankdir='BT', filename='multiple_processes')
@@ -7806,7 +7804,7 @@ Multiple processes
-Out[27]:
+Out[7]:
@@ -7829,12 +7827,12 @@ Wires¶
To connec
-In [28]:
+In [8]:
connected_process_spec = {
'process1': {
- '_type': 'python_process',
+ '_type': 'process',
'_ports': {
'port1': 'float',
'port2': 'int',
@@ -7850,8 +7848,6 @@ Wires¶
To connec
'node2': 'int',
'node3': 'int',
}
-# report = validate_schema(connected_process_spec) # validate it follows the schema types
-# print(report)
plot_bigraph(connected_process_spec, **plot_settings, filename='wires')
@@ -7863,7 +7859,7 @@ Wires¶
To connec
-In [29]:
+In [9]:
flat_composite_spec = {
@@ -7929,7 +7925,6 @@ Flat composite}
},
}
-# validate_schema(flat_composite_spec) # validate it follows the schema types
plot_bigraph(flat_composite_spec, **plot_settings, rankdir='RL', filename='flat_composite')
@@ -7941,7 +7936,7 @@ Flat composite
-In [30]:
+In [10]:
nested_composite_spec = {
@@ -7993,7 +7988,6 @@ Nested composite}
}
}
-# validate_schema(nested_composite_spec) # validate it follows the schema types
plot_bigraph(nested_composite_spec, **plot_settings, filename='nested_composite')
@@ -8005,7 +7999,7 @@ Nested composite
-In [31]:
+In [11]:
composite_process_spec = {
@@ -8059,7 +8053,6 @@ Composite process}
}
}
-# validate_schema(composite_process_spec) # validate it follows the schema types
plot_bigraph(composite_process_spec, **plot_settings, filename='composite_process')
@@ -8071,7 +8064,7 @@ Composite process
-In [32]:
+In [12]:
-In [33]:
+In [13]:
multitimestep_spec = {
@@ -8151,7 +8144,7 @@ Multi-timestepping
-Out[33]:
+Out[13]:
@@ -8174,7 +8167,7 @@ Flows¶
A directe
-In [34]:
+In [14]:
flow = {
@@ -8211,7 +8204,7 @@ Flows¶
A directe
-In [35]:
+In [15]:
music_map = {
@@ -8306,7 +8299,7 @@ Multiscale map of a cell
-In [36]:
+In [16]:
music_map
@@ -8332,7 +8325,7 @@ Multiscale map of a cell
-Out[36]:
+Out[16]:
{'cell': {'cytoplasm': {'secretory organelles': {'transmembrane transport systems': {'ion transmembrane transport systems': {}}},
'cytoplasmic organelles': {'subgroup of cytoplasmic organelles': {'metabolic organelles': {'subgroup of metabolic organelles': {},
@@ -8364,7 +8357,7 @@ Multiscale map of a cell
-In [37]:
+In [17]:
import copy
@@ -8470,12 +8463,6 @@ Multiscale map of a cell}
}
-# another_process = {
-# '_ports': {
-# '?': 'Any',
-# },
-# }
-
# compose schema
music_map['cell']['transcription'] = transcription_process
music_map['cell']['translation'] = translation_process
@@ -8484,8 +8471,6 @@ Multiscale map of a cellmusic_map['cell']['signalling'] = signalling_process
music_map['cell']['protein transport'] = protein_transport_process
music_map['cell']['RNA processing'] = rna_processing_process
-# music_map['new hypothesized mechanism'] = another_process
-
music_map2 = replace_regex_recursive(music_map)
@@ -8513,7 +8498,7 @@ Multiscale map of a cell
-In [38]:
+In [18]:
new_process = {
@@ -8546,7 +8531,6 @@ Multiscale map of a cell('hypothesized<br/>mechanism',): 'blue',
}
plot_settingsx['port_labels'] = False
-# plot_settingsx.update({'out_dir': 'out','dpi': '250'})
plot_bigraph(new_process, **plot_settingsx, filename='hypothesized_mechanism')
@@ -8558,7 +8542,7 @@ Multiscale map of a cell
-In [39]:
+In [19]:
cell_struct_func = {
@@ -8649,7 +8633,7 @@ Cell structure and function
-Out[39]:
+Out[19]:
@@ -8672,7 +8656,7 @@ Whole-cell E. coli model
-In [40]:
+In [20]:
ecoli = {
@@ -8863,20 +8847,6 @@ Whole-cell E. coli model
-
-
-
-
-In [ ]:
-
-
-
-
-
-
-
-