Skip to content
This repository has been archived by the owner on Mar 6, 2024. It is now read-only.

Commit

Permalink
updated changes schema string in process_types
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexPatrie committed Feb 28, 2024
1 parent e228bf5 commit 2dd6907
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 5 deletions.
2 changes: 1 addition & 1 deletion biosimulator_processes/process_types.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"""The following types have been derived from both SEDML L1v4 and basico itself.
CHANGES_SCHEMA = """The following types have been derived from both SEDML L1v4 and basico itself.
BASICO_MODEL_CHANGES_TYPE = {
'species_changes': { # <-- this is done like set_species('B', kwarg=) where the inner most keys are the kwargs
Expand Down
49 changes: 45 additions & 4 deletions notebooks/copasi_process_composer.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -24,17 +24,33 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 1,
"id": "c6c10dc5988e52d4",
"metadata": {
"collapsed": false
"collapsed": false,
"ExecuteTime": {
"end_time": "2024-02-28T20:57:05.779779Z",
"start_time": "2024-02-28T20:57:03.764811Z"
}
},
"outputs": [],
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"CobraProcess registered successfully.\n",
"CopasiProcess registered successfully.\n",
"SmoldynProcess registered successfully.\n",
"TelluriumProcess registered successfully.\n"
]
}
],
"source": [
"import os \n",
"from basico import *\n",
"from process_bigraph import Composite, pf \n",
"from biosimulator_processes.processes.copasi_process import CopasiProcess"
"from biosimulator_processes.processes.copasi_process import CopasiProcess\n",
"from biosimulator_processes.process_types import MODEL_TYPE, CHANGES_SCHEMA"
]
},
{
Expand Down Expand Up @@ -255,6 +271,31 @@
"#### Example 2: Define a single-process composition from a given BioModels model id and make model changes. The options available for configuration of a `'model'` that can be run by the composite process are based on SEDML L1V4 specifications. Please note that not all parameters are required in this configuration."
]
},
{
"cell_type": "code",
"outputs": [
{
"data": {
"text/plain": "'The following types have been derived from both SEDML L1v4 and basico itself.\\n\\n BASICO_MODEL_CHANGES_TYPE = {\\n \\'species_changes\\': { # <-- this is done like set_species(\\'B\\', kwarg=) where the inner most keys are the kwargs\\n \\'species_name\\': {\\n \\'unit\\': \\'maybe[string]\\',\\n \\'initial_concentration\\': \\'maybe[float]\\',\\n \\'initial_particle_number\\': \\'maybe[float]\\',\\n \\'initial_expression\\': \\'maybe[string]\\',\\n \\'expression\\': \\'maybe[string]\\'\\n }\\n },\\n \\'global_parameter_changes\\': { # <-- this is done with set_parameters(PARAM, kwarg=). where the inner most keys are the kwargs\\n \\'global_parameter_name\\': {\\n \\'initial_value\\': \\'maybe[float]\\',\\n \\'initial_expression\\': \\'maybe[string]\\',\\n \\'expression\\': \\'maybe[string]\\',\\n \\'status\\': \\'maybe[string]\\',\\n \\'type\\': \\'maybe[string]\\' # (ie: fixed, assignment, reactions)\\n }\\n },\\n \\'reaction_changes\\': {\\n \\'reaction_name\\': {\\n \\'parameters\\': {\\n \\'reaction_parameter_name\\': \\'maybe[int]\\' # (new reaction_parameter_name value) <-- this is done with set_reaction_parameters(name=\"(REACTION_NAME).REACTION_NAME_PARAM\", value=VALUE)\\n },\\n \\'reaction_scheme\\': \\'maybe[string]\\' # <-- this is done like set_reaction(name = \\'R1\\', scheme = \\'S + E + F = ES\\')\\n }\\n }\\n }\\n'"
},
"execution_count": 2,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"CHANGES_SCHEMA"
],
"metadata": {
"collapsed": false,
"ExecuteTime": {
"end_time": "2024-02-28T20:57:27.860061Z",
"start_time": "2024-02-28T20:57:27.857520Z"
}
},
"id": "433d58bbe38402af",
"execution_count": 2
},
{
"cell_type": "code",
"outputs": [],
Expand Down

0 comments on commit 2dd6907

Please sign in to comment.