3.1. wc_test package

3.1.1. Submodules

3.1.2. wc_test.core module

Methods for verifying models and simulations

Author:Balazs Szigeti <balazs.szigeti@mssm.edu>
Author:Jonathan Karr <jonrkarr@gmail.com>
Date:2018-05-10
Copyright:2018, Karr Lab
License:MIT

TODO: - all reaction methods: currently len(rate_laws)=1 assumed, generalize - mod_parameters values are INTs in change_methods, but LISTs for sim_scan methods, synchornize

class wc_test.core.KnowledgeBaseTestCase(methodName='runTest')[source]

Bases: unittest.case.TestCase

Methods for testing knowledge bases for WC models

kb[source]

knowledge base

Type:wc_kb.KnowledgeBase
Class attributes:
KB (wc_kb.KnowledgeBase or str): knowledge base or path to a
knowledge base file
KB = None[source]
setUp()[source]

Hook method for setting up the test fixture before exercising it.

class wc_test.core.ModelTestCase(methodName='runTest')[source]

Bases: unittest.case.TestCase

Methods for testing WC models

model[source]

model

Type:wc_lang.Model
kb[source]

knowledge base

Type:wc_kb.KnowledgeBase
results_dir[source]

path to directory where results will be stored

Type:str
Class attributes:

MODEL (wc_lang.Model or str): model or path to a model file KB (wc_kb.KnowledgeBase or str): knowledge base or path to a

knowledge base file
KB = None[source]
MODEL = None[source]
change_parameter_values(mod_parameters)[source]
change_reaction_k_cat_parameter_values(mod_reactions)[source]
change_species_mean_init_concentrations(mod_species)[source]
get_reaction(id)[source]
get_species(id)[source]
select_submodels(mod_submodels)[source]

Turn off all submodels, except the ones listed in submodel_ids

setUp()[source]

Hook method for setting up the test fixture before exercising it.

tearDown()[source]

Hook method for deconstructing the test fixture after testing it.

class wc_test.core.SimulationTestCase(methodName='runTest')[source]

Bases: wc_test.core.ModelTestCase

Class to test simulations of models

avg_conc_runs(n, target_specie_ids, end_time)[source]
avg_conc_time(target_specie_ids, end_time, checkpoint_period)[source]
delta_conc(species, run_results)[source]
get_growth_rate(end_time)[source]
sim_scan_parameters(mod_parameters, end_time, checkpoint_period)[source]
sim_scan_reactions(mod_reactions, end_time, checkpoint_period)[source]
sim_scan_species(mod_species, end_time, checkpoint_period)[source]
simulate(end_time, checkpoint_period=None, n_sims=1)[source]

3.1.3. Module contents