Skip to content

Commit f00dd4c

Browse files
authored
Merge pull request #62 from BrainAnnex/dev
Dev Beta31
2 parents c0fc807 + d4d34dc commit f00dd4c

File tree

129 files changed

+2138
-1236
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

129 files changed

+2138
-1236
lines changed

LICENSE.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2022 Julian West
3+
Copyright (c) 2022-2024 Julian West
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

README.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
1-
### BETA 30.1 (v0.30.1)
2-
3-
4-
51
# Life123
62
Dynamical Modeling of Biological Systems in 1, 2 and 3D (as well as single-compartment reactions)
73

VERSION_NUMBER.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
version 1.0.0-beta.31

experiments/1D/diffusion/diffusion_1.ipynb

Lines changed: 39 additions & 39 deletions
Large diffs are not rendered by default.

experiments/1D/reaction/down_regulation_1.ipynb

Lines changed: 13 additions & 14 deletions
Large diffs are not rendered by default.

experiments/1D/reaction/down_regulation_1.log.htm

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<meta charset="UTF-8">
66
<title>Log</title>
77

8-
<link type="text/css" rel="stylesheet" href="https://life123.science/libraries/vue_components/vue_cytoscape_1.css">
8+
<link type="text/css" rel="stylesheet" href="https://life123.science/libraries/vue_components/vue_cytoscape_2.css">
99

1010
<script src="https://life123.science/libraries/vue_2.6.12.js"></script>
1111
<script src="https://d3js.org/d3.v7.min.js"></script>
@@ -14,34 +14,29 @@
1414
</head>
1515

1616
<body>
17+
<h3>List of reactions:</h3><span style='padding-left:4ch'>&nbsp;</span>0: A + 2 B <-> Y<br>
1718

1819

1920
<div id="vue-root-1"> <!-- DIV container for the VUE COMPONENTS below : Vue ROOT element -->
2021

21-
<vue_cytoscape_1
22-
v-bind:graph="graph_json"
23-
v-bind:color_mapping="color_mapping_json"
24-
v-bind:component_id="component_id_json"
25-
>
26-
</vue_cytoscape_1>
22+
<vue_cytoscape_2 v-bind:graph_data="graph_data_json">
23+
</vue_cytoscape_2>
2724

2825
</div> <!-- ~~~~~~~~~~~~~~~~~~~~~ END of Vue root element ~~~~~~~~~~~~~~~~~ -->
2926

3027

3128
<!--
3229
Vue components (and other JS). This must appear AFTER the Vue-containing elements
3330
-->
34-
<script src="https://life123.science/libraries/vue_components/vue_cytoscape_1.js"></script>
31+
<script src="https://life123.science/libraries/vue_components/vue_cytoscape_2.js"></script>
3532

3633
<script>
3734
// Instantiation of the Vue ROOT component
3835
new Vue({
3936
el: '#vue-root-1',
4037

4138
data: {
42-
graph_json: [{"id": 3, "label": "Reaction", "name": "RXN", "kF": "8", "kR": "2", "delta_G": "-3,436.56", "K": "4"}, {"id": 2, "label": "Chemical", "name": "Y", "diff_rate": null, "stoich": 1, "rxn_order": 1}, {"id": 4, "source": 3, "target": 2, "name": "produces"}, {"id": 0, "label": "Chemical", "name": "A", "diff_rate": null, "stoich": 1, "rxn_order": 1}, {"id": 5, "source": 0, "target": 3, "name": "reacts"}, {"id": 1, "label": "Chemical", "name": "B", "diff_rate": null, "stoich": 2, "rxn_order": 1}, {"id": 6, "source": 1, "target": 3, "name": "reacts"}],
43-
color_mapping_json: {"Chemical": "neo4j_green", "Reaction": "neo4j_lightbrown"},
44-
component_id_json: 1
39+
graph_data_json: {"structure": [{"name": "RXN", "kF": "8", "kR": "2", "delta_G": "-3,436.56", "K": "4", "id": "R-0", "labels": ["Reaction"]}, {"name": "Y", "diff_rate": null, "id": "C-2", "labels": ["Chemical"]}, {"name": "produces", "source": "R-0", "target": "C-2", "id": "edge-1", "stoich": 1, "rxn_order": 1}, {"name": "A", "diff_rate": null, "id": "C-0", "labels": ["Chemical"]}, {"name": "reacts", "source": "C-0", "target": "R-0", "id": "edge-2", "stoich": 1, "rxn_order": 1}, {"name": "B", "diff_rate": null, "id": "C-1", "labels": ["Chemical"]}, {"name": "reacts", "source": "C-1", "target": "R-0", "id": "edge-3", "stoich": 2, "rxn_order": 1}], "color_mapping": {"Chemical": "#8DCC92", "Reaction": "#D9C8AD"}, "caption_mapping": {"Chemical": "name", "Reaction": "name"}, "component_id": 1}
4540
}
4641

4742
});

experiments/1D/reaction/down_regulation_1.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
#
2323
# Based on experiment `reactions_single_compartment/down_regulate_2`
2424
#
25-
# LAST REVISED: Dec. 6, 2023
25+
# LAST REVISED: May 6, 2024
2626

2727
# %%
2828
import set_path # Importing this module will add the project's home directory to sys.path
@@ -42,7 +42,7 @@
4242

4343
# Set up the use of some specified graphic (Vue) components
4444
GraphicLog.config(filename=log_file,
45-
components=["vue_cytoscape_1"],
45+
components=["vue_cytoscape_2"],
4646
extra_js="https://cdnjs.cloudflare.com/ajax/libs/cytoscape/3.21.2/cytoscape.umd.js")
4747

4848
# %%
@@ -56,8 +56,7 @@
5656
chem_data.describe_reactions()
5757

5858
# Send the plot of the reaction network to the HTML log file
59-
graph_data = chem_data.prepare_graph_network()
60-
GraphicLog.export_plot(graph_data, "vue_cytoscape_1")
59+
chem_data.plot_reaction_network("vue_cytoscape_2")
6160

6261
# %%
6362
bio = BioSim1D(n_bins=1, chem_data=chem_data)

experiments/1D/reaction/reaction_1.ipynb

Lines changed: 12 additions & 12 deletions
Large diffs are not rendered by default.

experiments/1D/reaction/reaction_1.log.htm

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<meta charset="UTF-8">
66
<title>Log</title>
77

8-
<link type="text/css" rel="stylesheet" href="https://life123.science/libraries/vue_components/vue_cytoscape_1.css">
8+
<link type="text/css" rel="stylesheet" href="https://life123.science/libraries/vue_components/vue_cytoscape_2.css">
99

1010
<script src="https://life123.science/libraries/vue_2.6.12.js"></script>
1111
<script src="https://d3js.org/d3.v7.min.js"></script>
@@ -14,34 +14,29 @@
1414
</head>
1515

1616
<body>
17+
<h3>List of reactions:</h3><span style='padding-left:4ch'>&nbsp;</span>0: A <-> B<br>
1718

1819

1920
<div id="vue-root-1"> <!-- DIV container for the VUE COMPONENTS below : Vue ROOT element -->
2021

21-
<vue_cytoscape_1
22-
v-bind:graph="graph_json"
23-
v-bind:color_mapping="color_mapping_json"
24-
v-bind:component_id="component_id_json"
25-
>
26-
</vue_cytoscape_1>
22+
<vue_cytoscape_2 v-bind:graph_data="graph_data_json">
23+
</vue_cytoscape_2>
2724

2825
</div> <!-- ~~~~~~~~~~~~~~~~~~~~~ END of Vue root element ~~~~~~~~~~~~~~~~~ -->
2926

3027

3128
<!--
3229
Vue components (and other JS). This must appear AFTER the Vue-containing elements
3330
-->
34-
<script src="https://life123.science/libraries/vue_components/vue_cytoscape_1.js"></script>
31+
<script src="https://life123.science/libraries/vue_components/vue_cytoscape_2.js"></script>
3532

3633
<script>
3734
// Instantiation of the Vue ROOT component
3835
new Vue({
3936
el: '#vue-root-1',
4037

4138
data: {
42-
graph_json: [{"id": 2, "label": "Reaction", "name": "RXN", "kF": "3", "kR": "2", "Delta_G": "-1,005.13", "K": "1.5"}, {"id": 1, "label": "Chemical", "name": "B", "diff_rate": null, "stoich": 1, "rxn_order": 1}, {"id": 3, "source": 2, "target": 1, "name": "produces"}, {"id": 0, "label": "Chemical", "name": "A", "diff_rate": null, "stoich": 1, "rxn_order": 1}, {"id": 4, "source": 0, "target": 2, "name": "reacts"}],
43-
color_mapping_json: {"Chemical": "neo4j_green", "Reaction": "neo4j_lightbrown"},
44-
component_id_json: 1
39+
graph_data_json: {"structure": [{"name": "RXN", "kF": "3", "kR": "2", "delta_G": "-1,005.13", "K": "1.5", "id": "R-0", "labels": ["Reaction"]}, {"name": "B", "diff_rate": null, "id": "C-1", "labels": ["Chemical"]}, {"name": "produces", "source": "R-0", "target": "C-1", "id": "edge-1", "stoich": 1, "rxn_order": 1}, {"name": "A", "diff_rate": null, "id": "C-0", "labels": ["Chemical"]}, {"name": "reacts", "source": "C-0", "target": "R-0", "id": "edge-2", "stoich": 1, "rxn_order": 1}], "color_mapping": {"Chemical": "#8DCC92", "Reaction": "#D9C8AD"}, "caption_mapping": {"Chemical": "name", "Reaction": "name"}, "component_id": 1}
4540
}
4641

4742
});

experiments/1D/reaction/reaction_1.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
#
2222
# See also the experiment _"reactions_single_compartment/react_1"_
2323
#
24-
# LAST REVISED: July 14, 2023
24+
# LAST REVISED: May 6, 2024
2525

2626
# %%
2727
import set_path # Importing this module will add the project's home directory to sys.path
@@ -41,7 +41,7 @@
4141

4242
# Set up the use of some specified graphic (Vue) components
4343
GraphicLog.config(filename=log_file,
44-
components=["vue_cytoscape_1"],
44+
components=["vue_cytoscape_2"],
4545
extra_js="https://cdnjs.cloudflare.com/ajax/libs/cytoscape/3.21.2/cytoscape.umd.js")
4646

4747
# %% [markdown]
@@ -77,8 +77,7 @@
7777

7878
# %%
7979
# Send a plot of the network of reactions to the HTML log file
80-
graph_data = chem_data.prepare_graph_network()
81-
GraphicLog.export_plot(graph_data, "vue_cytoscape_1")
80+
chem_data.plot_reaction_network("vue_cytoscape_2")
8281

8382
# %% [markdown] tags=[]
8483
# ### <a name="sec_1"></a>First step

0 commit comments

Comments
 (0)