Quick Start¶
To begin using CRNT4SBML, start by following the process outlined in Installation. Once you have correctly installed CRNT4SBML follow the steps below to obtain a general idea of how one can perform the mass conservation and semi-diffusive approach of [OMYS17] and a general approach for mass conserving systems.
- If you are interested in running the Deficiency Zero and One theorems please consult Low Deficiency Approach.
- If one is interested in the general steps to follow in order to detect bistability, one should consult Steps for Detecting Bistability.
Mass Conservation Approach Example¶
In order to run the mass conservation approach one needs to first create an SBML file of the reaction network. The
SBML file representing the reaction network for this example is given by Fig1Ci.xml
.
It is highly encouraged that the user consult CellDesigner Walkthrough when considering their own individual network
as the format of the SBML file must follow a certain construction to be easily used by CRNT4SBML.
To run the mass conservation approach create the following python script:
import crnt4sbml
network = crnt4sbml.CRNT("/path/to/Fig1Ci.xml")
approach = network.get_mass_conservation_approach()
bounds, concentration_bounds = approach.get_optimization_bounds()
params_for_global_min, obj_fun_val_for_params = approach.run_optimization(bounds=bounds,
concentration_bounds=concentration_bounds)
multistable_param_ind, plot_specifications = approach.run_greedy_continuity_analysis(species="s15", parameters=params_for_global_min,
auto_parameters={'PrincipalContinuationParameter': 'C3'})
approach.generate_report()
This will provide the following output along with creating the directory “num_cont_graphs” in your current directory that contains multistability plots. Please note that runtimes and the number of multistability plots produced may vary among different operating systems. Please see Mass Conservation Approach Walkthrough for a more detailed explanation of running the mass conservation approach and the provided output.
Creating Equilibrium Manifold ...
Elapsed time for creating Equilibrium Manifold: 2.0428380000000006
Running feasible point method for 10 iterations ...
Elapsed time for feasible point method: 1.5746338367462158
Running the multistart optimization method ...
Elapsed time for multistart method: 7.010828971862793
Running continuity analysis ...
Elapsed time for continuity analysis in seconds: 25.22320318222046
Smallest value achieved by objective function: 0.0
4 point(s) passed the optimization criteria.
Number of multistability plots found: 2
Elements in params_for_global_min that produce multistability:
[0, 1]
Semi-diffusive Approach Example¶
To run the semi-diffusive approach one needs to create the SBML file specific for semi-diffusive networks. The SBML file
representing the reaction network for this example is given by Fig1Cii.xml
. It
is highly encouraged that the user consult CellDesigner Walkthrough when considering their own individual network as
the format of the SBML file must follow a certain construction to be easily used by crnt4sbml.
To run the semi-diffusive approach create the following python script:
import crnt4sbml
network = crnt4sbml.CRNT("path/to/Fig1Cii.xml")
approach = network.get_semi_diffusive_approach()
bounds = approach.get_optimization_bounds()
params_for_global_min, obj_fun_val_for_params = approach.run_optimization(bounds=bounds)
multistable_param_ind, plot_specifications = approach.run_greedy_continuity_analysis(species="s7", parameters=params_for_global_min,
auto_parameters={'PrincipalContinuationParameter': 're17'})
approach.generate_report()
This will provide the following output along with creating the directory “num_cont_graphs” in your current directory that contains multistability plots. Please note that runtimes and the number of multistability plots produced may vary among different operating systems. Please see Semi-diffusive Approach Walkthrough for a more detailed explanation of running the semi-diffusive approach and the provided output.
Running feasible point method for 10 iterations ...
Elapsed time for feasible point method: 0.3393716812133789
Running the multistart optimization method ...
Elapsed time for multistart method: 22.361775875091553
Running continuity analysis ...
Elapsed time for continuity analysis in seconds: 73.85193490982056
Smallest value achieved by objective function: 0.0
9 point(s) passed the optimization criteria.
Number of multistability plots found: 9
Elements in params_for_global_min that produce multistability:
[0, 1, 2, 3, 4, 5, 6, 7, 8]
General Approach Example¶
In order to run the general approach one needs to first create an SBML file of the reaction network. The
SBML file representing the reaction network for this example is given by Fig1Ci.xml
.
It is highly encouraged that the user consult CellDesigner Walkthrough when considering their own individual network
as the format of the SBML file must follow a certain construction to be easily used by CRNT4SBML.
To run the general approach with fixed reactions create the following python script:
import crnt4sbml
network = crnt4sbml.CRNT("/path/to/Fig1Ci.xml")
approach = network.get_general_approach()
bnds = approach.get_optimization_bounds()
approach.initialize_general_approach(signal="C3", response="s15", fix_reactions=True)
params_for_global_min, obj_fun_vals = approach.run_optimization(bounds=bnds, dual_annealing_iters=100)
multistable_param_ind, plot_specifications = approach.run_greedy_continuity_analysis(species="s15", parameters=params_for_global_min,
auto_parameters={'PrincipalContinuationParameter': "C3"})
approach.generate_report()
This will provide the following output along with creating the directory “num_cont_graphs” in your current directory that contains multistability plots. Please note that runtimes and the number of multistability plots produced may vary among different operating systems. Please see General Approach Walkthrough for a more detailed explanation of running the general approach and the provided output.
Running the multistart optimization method ...
Elapsed time for multistart method: 21.040880918502808
Running continuity analysis ...
Elapsed time for continuity analysis in seconds: 41.21180701255798
Smallest value achieved by objective function: 0.0
9 point(s) passed the optimization criteria.
Number of multistability plots found: 6
Elements in params_for_global_min that produce multistability:
[1, 2, 4, 5, 7, 8]