2.1.4. 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
-
abstract
run
()[source]
Run the analysis
-
show_or_save_fig
(fig, filename=None)[source]
Show or save a figure
- Parameters
-
-
class
wc_analysis.core.
AnalysisRunner
(knowledge_base=None, model=None, sim_results_path=None, 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
of Analysis
-
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
(model, knowledge_base=None, out_path=None, options=None)[source]
Bases: wc_analysis.core.Analysis
Analysis of a model
-
model
[source]
model
- Type
wc_lang.core.Model
-
knowledge_base
[source]
knowledge base
- Type
wc_kb.core.KnowledgeBase
-
class
wc_analysis.core.
SimulationAnalysis
(sim_results_path, model=None, knowledge_base=None, out_path=None, options=None)[source]
Bases: wc_analysis.core.Analysis
Analysis of a simulation result
-
sim_results_path
[source]
path to simulation results
- Type
str
-
model
[source]
model
- Type
wc_lang.core.Model
-
knowledge_base
[source]
knowledge base
- Type
wc_kb.core.KnowledgeBase