3.1.1.4. rand_wc_model_gen.model_gen package

3.1.1.4.1. Submodules

3.1.1.4.2. rand_wc_model_gen.model_gen.core module

Classes to generate random wc models

Author

Mike Zheng <xzheng20@colby.edu>

Author

Jonathan Karr <karr@mssm.edu>

Date

2019-08-13

Copyright

2019, Karr Lab

License

MIT

class rand_wc_model_gen.model_gen.core.RandModelGen(options=None)[source]

Bases: object

Generator for random wc models

options[source]

dictionary of options

Type

dict, optional

clean_and_validate_options()[source]

Apply default options and validate options

gen_cell_options(model, options)[source]

Generate cell information of the random model

Parameters
  • model (wc_lang.Model) – model

  • options (dict) – dictionary of options

gen_compartments(model, options)[source]

Generate compartment information of the random model

Parameters
  • model (wc_lang.Model) – model

  • options (dict) – dictionary of options

gen_reactions(model, options)[source]

Generate reactions and rate laws of the random model

Parameters
  • model (wc_lang.Model) – model

  • options (dict) – dictionary of options

gen_species(model, options, misc_options)[source]

Generate species type, species, and init concentrations of the random model

Parameters
  • model (wc_lang.Model) – model

  • options (dict) – dictionary of options

gen_submodels(model, options)[source]

Generate submodels of the random model

Parameters
  • model (wc_lang.Model) – model

  • options (dict) – dictionary of options

classmethod get_rate_law_compartment_context(model)[source]
classmethod get_rate_law_context(model)[source]
classmethod get_rate_law_function_context(model)[source]
classmethod get_rate_law_parameter_context(model)[source]
classmethod get_rate_law_species_context(model)[source]
rand(mean, count=1, min=0, max=inf)[source]

Generated 1 or more random normally distributed integer(s) with standard deviation equal to the square root of the mean value. :param mean: mean value :type mean: float :param count: number of random numbers to generate :type count: int

Returns

random normally distributed integer(s)

Return type

int or numpy.ndarray of int

run()[source]

Generate a wc_lang model

Returns

model

Return type

wc_lang.Model

run_with_options(option_path)[source]

Generate a wc_lang model with factored options

:param str: path to model_options.yml

Returns

model

Return type

wc_lang.Model

rand_wc_model_gen.model_gen.core.plot(model, results, filename)[source]

plot simulation results of the hard-coded rna model

3.1.1.4.3. Module contents