2.1. wc_analysis package

2.1.1. Submodules

2.1.2. wc_analysis.core module

Analyze knowledge base, model, and simulation results.

Author:Jonathan Karr <karr@mssm.edu>
Date:2018-02-13
Copyright:2018, Karr Lab
License:MIT
class wc_analysis.core.Analysis(out_path=None, options=None)[source]

Bases: object

An analysis of a knowledge base, model, or simulation results

out_path[source]

optional path to save analysis

Type:str
options[source]

options

Type:dict
clean_and_validate_options()[source]

Apply default options and validate options

create_fig(rows=1, cols=1)[source]

Create a figure composed of a grid of subfigures

Parameters:
  • rows (int, optional) – number of rows of subfigures
  • cols (int, optional) – number of columns of subfigures
Returns:

figure matplotlib.axes.Axes: axes

Return type:

matplotlib.figure.Figure

run()[source]

Run the analysis

show_or_save_fig(fig, filename=None)[source]

Show or save a figure

Parameters:
  • fig (matplotlib.figure.Figure) – figure
  • filename (str, optional) – filename to save figure
class wc_analysis.core.AnalysisRunner(knowledge_base, model, sim_results_path, analyses=None, out_path=None, options=None)[source]

Bases: object

Run one or more analyses of a whole-cell knowledge base, model, and/or simulation results

knowledge_base[source]

knowledge base

Type:wc_kb.core.KnowledgeBase
model[source]

model

Type:wc_lang.core.Model
sim_results_path[source]

path to simulation results

Type:str
analyses[source]

analyses to run

Type:list
out_path[source]

path to save analyses

Type:str
options[source]

options

Type:dict
DEFAULT_ANALYSES = ()[source]
clean_and_validate_options()[source]

Apply default options and validate options

run()[source]

Run multiple analyses

Raises:ValueError – if the analysis is not supported
class wc_analysis.core.KnowledgeBaseAnalysis(knowledge_base, out_path=None, options=None)[source]

Bases: wc_analysis.core.Analysis

Analysis of a knowledge base

knowledge_base[source]

knowledge base

Type:wc_kb.core.KnowledgeBase
class wc_analysis.core.ModelAnalysis(knowledge_base, model, out_path=None, options=None)[source]

Bases: wc_analysis.core.Analysis

Analysis of a model

knowledge_base[source]

knowledge base

Type:wc_kb.core.KnowledgeBase
model[source]

model

Type:wc_lang.core.Model
class wc_analysis.core.SimulationAnalysis(knowledge_base, model, sim_results_path, out_path=None, options=None)[source]

Bases: wc_analysis.core.Analysis

Analysis of a simulation result

knowledge_base[source]

knowledge base

Type:wc_kb.core.KnowledgeBase
model[source]

model

Type:wc_lang.core.Model
sim_results_path[source]

path to simulation results

Type:str

2.1.3. Module contents