BioSANS2020.BioSANS

This module is the BioSANS module

The purpose of this module is to provide a graphical user interface and to facilitate the transfer of information from BioSANS topology file to other modules.

The following are the list of functions in this module

  1. load_data

  2. show_file_dir

  3. create_file

  4. extract_ode

  5. sbml_to_topo2

  6. save_file

  7. runpy_file

  8. run_ssl

  9. load_data2

  10. tload_data2

  11. delete_this

  12. canvas_update_widgets

  13. load_image

  14. eval2

  15. dict_trans

  16. convert

  17. range_trans

  18. range_prep

  19. mrun_propagation

  20. tprocess

  21. analysis_case

  22. plot_traj_d2

  23. param_set

Module Contents

Functions

load_data(itups)

This fuction reads topology file and display the contents in a

show_file_dir(path)

This function opens the current working directory

create_file(itups, ftype)

This function creates a temporary file in a temporary directory

extract_ode(itups)

This function extracts topology from ODE file format

sbml_to_topo2(tocon, itups)

This function helps in the conversion of SBML files to BioSANS

save_file()

This function saves the content of the last opened text area into

runpy_file()

This module write the contents of the text area into a python

run_ssl()

This function initiates BioSSL or the BioSABS structured

load_data2(plot=False)

This function loads data for numerical processing or for plotting

tload_data2(plot=False)

This function starts a thread that handles loading data.

delete_this(frame, canvas)

This function delete an object in the canvas

canvas_update_widgets(_, canvas)

This function rearranged the elements in the canvas.

load_image(wdata=False)

This function load image into a canvas and display in BioSANS.

eval2(xvar)

This function evaluates expression

dict_trans(x_1)

This function creates a dictionary from a list assignment

convert(xvar, con)

This function converts a variable into con data type.

range_trans(x_1)

This function converts the x_1 comma concatenated string into a

range_prep(x_1)

This function process some string input and converts them to a

mrun_propagation(par, entry_list, defs2)

Ths function grabs the values from defs2 whcih serves as the set

tprocess(defs)

This function creates a thread and sed defs to the

analysis_case(ana_case, itups)

This function redirects input to the corresponding numerical or

plot_traj_d(current_data, itups)

This function plot the trajectory data stored as current data.

get_checked(el_1, slabels)

This function returns the components name with a check from el_1

plot_traj_d2(current_data, itups)

This function is another plotting function.

param_set(method)

This function opens the parameter setting dialof box and grab the

Attributes

TEMPORARY_FOLDER

TOP

HEADER

FRAME

FOOTER

FILE_NAME

CURRENT_DATA

SUPER_THREAD_RUN

MENUBUT1

BioSANS2020.BioSANS.TEMPORARY_FOLDER
BioSANS2020.BioSANS.TOP
BioSANS2020.BioSANS.HEADER
BioSANS2020.BioSANS.FRAME
BioSANS2020.BioSANS.FOOTER
BioSANS2020.BioSANS.FILE_NAME
BioSANS2020.BioSANS.load_data(itups)

This fuction reads topology file and display the contents in a text area.

Args:

itups (tuple): (canvas, scroll_x, scroll_y)

BioSANS2020.BioSANS.show_file_dir(path)

This function opens the current working directory

Args:

path (str): directory path

BioSANS2020.BioSANS.create_file(itups, ftype)

This function creates a temporary file in a temporary directory where new topology / files can be placed.

Args:

itups (tuple): (canvas, scroll_x, scroll_y) ftype (int): 1 for BioSANS topology file, 2 for ODE file

BioSANS2020.BioSANS.extract_ode(itups)

This function extracts topology from ODE file format

Args:

itups (tuple): (canvas, scroll_x, scroll_y)

BioSANS2020.BioSANS.sbml_to_topo2(tocon, itups)

This function helps in the conversion of SBML files to BioSANS topology files.

Args:

tocon (str): sbml file name to convert itups (tuple): (canvas, scroll_x, scroll_y)

BioSANS2020.BioSANS.save_file()

This function saves the content of the last opened text area into a file.

BioSANS2020.BioSANS.runpy_file()

This module write the contents of the text area into a python file and run the file as a python script.

BioSANS2020.BioSANS.run_ssl()

This function initiates BioSSL or the BioSABS structured simulation language.

BioSANS2020.BioSANS.load_data2(plot=False)

This function loads data for numerical processing or for plotting

Args:

plot (bool, optional): if True, loaded trajectory is plotted. Defaults to False.

BioSANS2020.BioSANS.tload_data2(plot=False)

This function starts a thread that handles loading data.

Args:

plot (bool, optional): if True, loaded trajectory is plotted. Defaults to False.

BioSANS2020.BioSANS.delete_this(frame, canvas)

This function delete an object in the canvas

Args:

frame (tkinter.Frame): frame or other objects canvas (tkinter.Canvas): canvas object

BioSANS2020.BioSANS.canvas_update_widgets(_, canvas)

This function rearranged the elements in the canvas.

Args:

_ (None): Not needed canvas (tkinter.Canvas): canvas object]

Returns:

str: “break”

BioSANS2020.BioSANS.load_image(wdata=False)

This function load image into a canvas and display in BioSANS.

Args:
wdata (bool, optional): if True, data will also be loaded in the

memory. Defaults to False.

BioSANS2020.BioSANS.eval2(xvar)

This function evaluates expression

Args:

xvar (str): expression

Returns:

str: evaluated expression

BioSANS2020.BioSANS.CURRENT_DATA
BioSANS2020.BioSANS.dict_trans(x_1)

This function creates a dictionary from a list assignment Args:

x_1 (str): string of symbols and assinged values.

Returns:

dict: a dictionary from a list assignment

BioSANS2020.BioSANS.convert(xvar, con)

This function converts a variable into con data type.

Args:

xvar (str): string con (con): new data type con

Returns:

con: xvar equivalent in con

BioSANS2020.BioSANS.range_trans(x_1)

This function converts the x_1 comma concatenated string into a list and put the first element as the last element.

Args:

x_1 (str): comma concatenated string

Returns:

list: the first element goes last now

BioSANS2020.BioSANS.range_prep(x_1)

This function process some string input and converts them to a list which is used as a range on other fuctions.

Args:

x_1 (str): comma concatenated string

Returns:

list: list of float or list of list and floats

BioSANS2020.BioSANS.mrun_propagation(par, entry_list, defs2)

Ths function grabs the values from defs2 whcih serves as the set of input for the tprocess function.

Args:

par (tkinter.Toplevel): top level container entry_list (list): list of tkinter.Entry or tkinter.OptionMenu defs2 (list): values

BioSANS2020.BioSANS.SUPER_THREAD_RUN
BioSANS2020.BioSANS.tprocess(defs)

This function creates a thread and sed defs to the BioSANS2020.prepcodes.process function.

Args:

defs (list): inputs for process fucntion

BioSANS2020.BioSANS.analysis_case(ana_case, itups)

This function redirects input to the corresponding numerical or plotting processes.

Args:

ana_case (str): type of analysis itups (tuple): (canvas, scroll_x, scroll_y)

Returns:

np.ndarray : numerical values or None

BioSANS2020.BioSANS.plot_traj_d(current_data, itups)

This function plot the trajectory data stored as current data. The plot can be the phase portrait.

Args:

current_data (np.ndarray or list): loaded data itups (tuple): (canvas, scroll_x, scroll_y)

BioSANS2020.BioSANS.get_checked(el_1, slabels)

This function returns the components name with a check from el_1 check boxes list.

Args:

el_1 (list): list of values slabels (list):components or species labels

Returns:

[type]: [description]

BioSANS2020.BioSANS.plot_traj_d2(current_data, itups)

This function is another plotting function.

Args:

current_data (np.ndarray or list): loaded data itups (tuple): (canvas, scroll_x, scroll_y)

BioSANS2020.BioSANS.param_set(method)

This function opens the parameter setting dialof box and grab the user custom settings.

Args:
method (str): 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

BioSANS2020.BioSANS.MENUBUT1