BioSANS2020.prepcodes.processes_hub

This module is the processes_hub module

The purpose of this module is to direct the information from the process module into other modules. This module expects some to get some response or data from thos emodule where its directs the information. The respon- ses will be saved or plotted depending on the options provided to this module.

The following are the list of function in this module.

  1. process_hub

Module Contents

Functions

process_hub(time_var, sp_comp, ksn_dict, concn, r_dict, p_dict, stoch_var, v_volms=1, miter=1, logx=False, logy=False, del_coef=10, normalize=False, method='CLE', mix_plot=True, save=True, out_fname='', plot_show=True, time_unit='time (sec)', vary='', mult_proc=False, items=None, vary2='', implicit=False, rfile='', exp_data_file=None)

This function redirect all information from the process to other

BioSANS2020.prepcodes.processes_hub.process_hub(time_var, sp_comp, ksn_dict, concn, r_dict, p_dict, stoch_var, v_volms=1, miter=1, logx=False, logy=False, del_coef=10, normalize=False, method='CLE', mix_plot=True, save=True, out_fname='', plot_show=True, time_unit='time (sec)', vary='', mult_proc=False, items=None, vary2='', implicit=False, rfile='', exp_data_file=None)

This function redirect all information from the process to other modules and expect the return from those module for plotting or for saving into a file.

Args:

time_var (list): list of time points in the simulation sp_comp (dict): dictionary of appearance or position of species

or component in the reaction tag of BioSANS topology file.

For example;

#REACTIONS A => B, -kf1 # negative means to be estimated B => C, kf2

The value of sp_comp is

sp_comp = {‘A’: {0}, ‘B’: {0, 1}, ‘C’: {1}}

A appears in first reaction with index 0 B appears in first and second reaction with index 0, 1 C appears in second reaction with index 1

ksn_dict (dict): dictionary of rate constant that appear in each

reactions.

For example;

#REACTIONS A => B , 0.3 # first reaction B <=> C, 0.1, 0.2 # second reaction

The value of ks_dict is

ks_dict = {

0 : [0.3], # first reaction 1 : [0.1, 0.2] # second reaction

}

conc (dict): dictionary of initial concentration.

For example;

{‘A’: 100.0, ‘B’: -1.0, ‘C’: 0.0} negative means unknown or for estimation

r_dict (dict): dictionary of reactant stoichiometry. For example

r_dict = {

0: {‘A’: 1}, # first reaction, coefficient of A is 1 1: {‘B’: 1} # second reaction, coefficient of B is 1

}

p_dict (dict): dictionary of product stoichiometry. For example

p_dict = {

0: {‘B’: 1}, # first reaction, coefficient of B is 1 1: {‘C’: 1} # second reaction, coefficient of C is 1

}

stoch_var (numpy.ndarray): stoichiometric matrix. For example

stoch_var = np.array([

[ -1, 0 ] # species A [ 1, -1 ] # species B [ 0, 1 ] # species C

#1st rxn 2nd rxn

])

v_volms (float, optional): volume of compartment. Defaults to 1. miter (int, optional): Number of iteration or trajectory samples

for stochastic integration

logx (bool, optional): If True, the x-axis will be in log scale.

Defaults to False.

logy (bool, optional): if True, the y-axis will be in log scale.

Defaults to False.

del_coef (float, optional): factor for modifying time steps used

in the integration/propagation of ODE. Defaults to 10.

normalize (bool, optional): True will be normalized the y axis

based on max value . Defaults to False.

method (str, optional): Defaults to “CLE”. Any of the option in

the list of available method keywords is listed below;

Stochastic (refer to section 10.2.4)

  1. “CLE” - Molecules(micro), tau-adaptive

  2. “CLE2” - Molecules(micro), cle-fixIntvl

  3. Gillespie_” - Molecules(micro), Direct method

  4. “Tau-leaping” - Molecules(micro),

    Not swapping with Gillespie

  5. “Tau-leaping2” - Molecules(micro),

    Swapping with Gillespie

  6. “Sim-TauLeap” - Molecules(micro), Simplified,

    Swapping with Gillespie

Deterministic (refer to section 10.2.1)

  1. “Euler-1” - Molecules(micro), tau-adaptive-1

  2. “Euler-2” - Molar (macro), tau-adaptive-1

  3. “Euler-3” - Mole (macro), tau-adaptive-1

  4. “Euler2-1” - Molecules(micro), tau-adaptive-2

  5. “Euler2-2” - Molar (macro), tau-adaptive-2

  6. “Euler2-3” - Mole (macro), tau-adaptive-2

  7. “ODE-1” - Molecules(micro),

    using ode_int from scipy

  8. “ODE-2” - Molar(macro),

    using ode_int from scipy

  9. “ODE-3” - Mole(macro), using ode_int from scipy

  10. “rk4-1” - Molecules(micro), fix-interval

  11. “rk4-2” - Molar(macro), fix-interval

  12. “rk4-3” - Mole(macro), fix-interval

  13. “rk4-1a” - Molecules(micro), tau-adaptive

  14. “rk4-2a” - Molar(macro), tau-adaptive

  15. “rk4-3a” - Mole(macro), tau-adaptive

Linear Noise Approximation (refer to 10.1.2 & 10.2.2)

  1. “LNA” - Numeric, values

  2. “LNA-vs” - Symbolic, values, Macroscopic

  3. “LNA-ks” - Symbolic, f(ks), Macroscopic

  4. “LNA-xo” - Symbolic, f(xo), Macroscopic

  5. “LNA2” - Symbolic, f(xo,ks), Microscopic

  6. “LNA3” - Symbolic, f(xo,ks), Macroscopic

  7. “LNA(t)” - COV-time-dependent, Macroscopic

  8. “LNA2(t)” - FF-time-dependent, Macroscopic

Network Localization (refer to 10.1.3)

  1. “NetLoc1” - Symbolic, Macroscopic

  2. “NetLoc2” - Numeric, Macroscopic

Parameter estimation (refer to 10.2.3)

  1. “k_est1” - MCEM, Macroscopic

  2. “k_est2” - MCEM, Microscopic

  3. “k_est3” - NM-Diff. Evol., Macroscopic

  4. “k_est4” - NM-Diff. Evol., Microscopic

  5. “k_est5” - Parameter slider/scanner

  6. “k_est6” - Nelder-Mead (NM), Macroscopic

  7. “k_est7” - Nelder-Mead (NM), Microscopic

  8. “k_est8” - Powell, Macroscopic

  9. “k_est9” - Powell, Microscopic

  10. “k_est10” - L-BFGS-B, Macroscopic

  11. “k_est11” - L-BFGS-B, Microscopic

Symbolic/Analytical expression of species (refer to 10.1.1)

  1. “Analyt” - Pure Symbolic :f(t,xo,k)

  2. “Analyt-ftx” - Semi-Symbolic :f(t,xo)

  3. “SAnalyt” - Semi-Symbolic :f(t)

  4. “SAnalyt-ftk” - Semi-Symbolic :f(t,k)

  5. “Analyt2” - Creates commands for wxmaxima

mix_plot (bool, optional): If True, all species are plotted in

one plot/figure. Defaults to True.

save (bool, optional): If True, the resulting trajectory in the

simulation will be saved as a file. Defaults to True.

out_fname (str, optional): output filename. Defaults to “”. plot_show (bool, optional): If True, an image of the plots will

be created in the directory of the topology file.

time_unit (str, optional): Defaults to “time (sec)”. vary (str, optional): Varying initial concentration.

Defaults to “”.

mult_proc (bool, optional): If True, trajectories will be propa-

gated on parallel. Defaults to False.

items (tuple, optional): (canvas, scroll_x, scroll_y).

Defaults to None.

vary2 (str, optional): [description]. Defaults to “”. implicit (bool, optional): True means report in time intervals

similar to the input time intervals even if actual step is more or less. Defaults to False.

rfile (str): file name of BioSANS topology file. exp_data_file ([type], optional): Experimental data file contai-

ning True or accepted trajectories. Defaults to None.