Recent Releases of biomass
biomass - v0.14.0
What's Changed
- Delete badge and add reference by @himoto in https://github.com/biomass-dev/biomass/pull/268
- Add Issue and Volume info by @himoto in https://github.com/biomass-dev/biomass/pull/269
- Update citing.rst by @himoto in https://github.com/biomass-dev/biomass/pull/270
- Update index.rst by @himoto in https://github.com/biomass-dev/biomass/pull/271
- Allow different time points between conditions for experimental data by @k-arakane in https://github.com/biomass-dev/biomass/pull/273
- Fix user_defined and allow multiple reactants/products by @k-arakane in https://github.com/biomass-dev/biomass/pull/277
- [pre-commit.ci] pre-commit autoupdate by @pre-commit-ci in https://github.com/biomass-dev/biomass/pull/276
- Release v0.14.0 by @k-arakane in https://github.com/biomass-dev/biomass/pull/278
New Contributors
- @k-arakane made their first contribution in https://github.com/biomass-dev/biomass/pull/273
Full Changelog: https://github.com/biomass-dev/biomass/compare/v0.13.0...v0.14.0
- Python
Published by himoto about 1 year ago
biomass - v0.13.0
What's Changed
- Update .readthedocs.yaml to resolve build error by @himoto in https://github.com/biomass-dev/biomass/pull/255
- Use default ddof(=0) by @himoto in https://github.com/biomass-dev/biomass/pull/256
- Remove unused variable:
__version__by @himoto in https://github.com/biomass-dev/biomass/pull/257 - Don't use Sphinx version 7 or more by @himoto in https://github.com/biomass-dev/biomass/pull/259
- Fix pepy badge by @himoto in https://github.com/biomass-dev/biomass/pull/263
- Remove Sphinx version constraints by @himoto in https://github.com/biomass-dev/biomass/pull/262
- Specify minimal
sphinx-rtd-themeversion by @himoto in https://github.com/biomass-dev/biomass/pull/264 - Update MANIFEST.in by @himoto in https://github.com/biomass-dev/biomass/pull/266
- Update citation infomation by @himoto in https://github.com/biomass-dev/biomass/pull/267
- [pre-commit.ci] pre-commit autoupdate by @pre-commit-ci in https://github.com/biomass-dev/biomass/pull/260
Full Changelog: https://github.com/biomass-dev/biomass/compare/v0.12.0...v0.13.0
- Python
Published by himoto over 1 year ago
biomass - v0.12.0 (May 2023)
What's Changed
- Update email address by @himoto in https://github.com/biomass-dev/biomass/pull/249
- Remove Sphinx version constraint by @himoto in https://github.com/biomass-dev/biomass/pull/251
- Add support for Python 3.11 and numpy 1.24 by @himoto in https://github.com/biomass-dev/biomass/pull/252
- [pre-commit.ci] pre-commit autoupdate by @pre-commit-ci in https://github.com/biomass-dev/biomass/pull/246
- Release v0.12.0 by @himoto in https://github.com/biomass-dev/biomass/pull/253
Full Changelog: https://github.com/biomass-dev/biomass/compare/v0.11.1...v0.12.0
- Python
Published by himoto over 2 years ago
biomass - v0.11.1
What's Changed
- Add file name by @himoto in https://github.com/biomass-dev/biomass/pull/238
- Update arguments of
run_analysisfunction by @himoto in https://github.com/biomass-dev/biomass/pull/240 - Move package setup to toml file by @himoto in https://github.com/biomass-dev/biomass/pull/243
- Release v0.11.1 by @himoto in https://github.com/biomass-dev/biomass/pull/244
Full Changelog: https://github.com/biomass-dev/biomass/compare/v0.11.0...v0.11.1
- Python
Published by himoto almost 3 years ago
biomass - v0.11.0 (January 2023)
What's Changed
- Set pyvis version <0.3 by @himoto in https://github.com/biomass-dev/biomass/pull/201
- Update citation info by @himoto in https://github.com/biomass-dev/biomass/pull/197
- Fix maxdepth to 2 by @himoto in https://github.com/biomass-dev/biomass/pull/202
- Add CodeQL workflow for GitHub code scanning by @lgtm-com in https://github.com/biomass-dev/biomass/pull/204
- Fix #205 by @himoto in https://github.com/biomass-dev/biomass/pull/206
- Update template by @himoto in https://github.com/biomass-dev/biomass/pull/207
- Update util in analysis/ by @himoto in https://github.com/biomass-dev/biomass/pull/208
- Explicit return by @himoto in https://github.com/biomass-dev/biomass/pull/210
- Explicitly return None by @himoto in https://github.com/biomass-dev/biomass/pull/211
- Use Tee class instead of _Logger by @himoto in https://github.com/biomass-dev/biomass/pull/213
- Update action/checkout@v2 -> v3 by @himoto in https://github.com/biomass-dev/biomass/pull/215
- Fix docstring in
Optimizerby @himoto in https://github.com/biomass-dev/biomass/pull/217 - Remove LGTM.com code quality badges by @himoto in https://github.com/biomass-dev/biomass/pull/219
- Update
julia_template.pyby @himoto in https://github.com/biomass-dev/biomass/pull/222 - Update docs by @himoto in https://github.com/biomass-dev/biomass/pull/224
- Fix a typo in
state_transitionrule by @himoto in https://github.com/biomass-dev/biomass/pull/225 - Improve instructions for executing example models by @himoto in https://github.com/biomass-dev/biomass/pull/227
- Suppress numba warning by @himoto in https://github.com/biomass-dev/biomass/pull/229
- Update solver.py by @himoto in https://github.com/biomass-dev/biomass/pull/230
- Update
state_transitionrule in Text2Model by @himoto in https://github.com/biomass-dev/biomass/pull/232 - [pre-commit.ci] pre-commit autoupdate by @pre-commit-ci in https://github.com/biomass-dev/biomass/pull/164
- Release v0.11.0 by @himoto in https://github.com/biomass-dev/biomass/pull/237
New Contributors
- @lgtm-com made their first contribution in https://github.com/biomass-dev/biomass/pull/204
Full Changelog: https://github.com/biomass-dev/biomass/compare/v0.10.0...v0.11.0
- Python
Published by himoto almost 3 years ago
biomass - v0.10.0 (September 2022)
What's Changed
- State transition by @himoto in https://github.com/biomass-dev/biomass/pull/169
- Generalisation of mass action kinetics by @formersbach in https://github.com/biomass-dev/biomass/pull/172
- Drop support for old template by @himoto in https://github.com/biomass-dev/biomass/pull/176
- Fix typo in tutorial by @himoto in https://github.com/biomass-dev/biomass/pull/178
- Fix module name: model_object by @himoto in https://github.com/biomass-dev/biomass/pull/181
- Transfer graphing from BioMass to Text2Model by @formersbach in https://github.com/biomass-dev/biomass/pull/177
- Update docs to be compatible with the newest features by @himoto in https://github.com/biomass-dev/biomass/pull/182
- Fix f-string in
is_phosphorylatedrule by @himoto in https://github.com/biomass-dev/biomass/pull/184 - Refactor code for sensitivity analysis by @himoto in https://github.com/biomass-dev/biomass/pull/186
- Redirect rules by @himoto in https://github.com/biomass-dev/biomass/pull/188
- Fix issue #189 by @formersbach in https://github.com/biomass-dev/biomass/pull/190
- Fix docstring by @himoto in https://github.com/biomass-dev/biomass/pull/191
- Fixes #192 by @formersbach in https://github.com/biomass-dev/biomass/pull/193
- Update graphing tutorial to new graph function. by @formersbach in https://github.com/biomass-dev/biomass/pull/195
Full Changelog: https://github.com/biomass-dev/biomass/compare/v0.9.1...v0.10.0
- Python
Published by himoto over 3 years ago
biomass - v0.9.0 (July 2022)
What's Changed
- Adding interactive plotting option. by @formersbach in https://github.com/biomass-dev/biomass/pull/144
- Changed how graph is passed to pygraphvis, fixing issue #147 by @formersbach in https://github.com/biomass-dev/biomass/pull/148
- Add graph visualization tutorial, resolves #145 by @formersbach in https://github.com/biomass-dev/biomass/pull/149
- [pre-commit.ci] pre-commit autoupdate by @pre-commit-ci in https://github.com/biomass-dev/biomass/pull/146
- Fixes documentation and changes default save directory of graph.py by @formersbach in https://github.com/biomass-dev/biomass/pull/154
- Remove
execby @himoto in https://github.com/biomass-dev/biomass/pull/157
Full Changelog: https://github.com/biomass-dev/biomass/compare/v0.8.0...v0.9.0
- Python
Published by himoto over 3 years ago
biomass - v0.8.0 (June 2022)
What's Changed
- Graph representation of biological model by @formersbach in https://github.com/biomass-dev/biomass/pull/131
- Drop support of Python <= 3.7 by @himoto in https://github.com/biomass-dev/biomass/pull/132
- Update graph.py by @himoto in https://github.com/biomass-dev/biomass/pull/133
- From text to model by @himoto in https://github.com/biomass-dev/biomass/pull/136
- Release v0.8.0 by @himoto in https://github.com/biomass-dev/biomass/pull/138
- Fix error in multiobservablesoptions by @himoto in https://github.com/biomass-dev/biomass/pull/140
- Fix dead link by @himoto in https://github.com/biomass-dev/biomass/pull/142
New Contributors
- @formersbach made their first contribution in https://github.com/biomass-dev/biomass/pull/131
Full Changelog: https://github.com/biomass-dev/biomass/compare/v0.7.2...v0.8.0
- Python
Published by himoto over 3 years ago
biomass - v0.7.2
What's Changed
- Make error messages more user friendly by @himoto in https://github.com/biomass-dev/biomass/pull/123
- Fix #124 by @himoto in https://github.com/biomass-dev/biomass/pull/125
- Release v0.7.2 by @himoto in https://github.com/biomass-dev/biomass/pull/128
Full Changelog: https://github.com/biomass-dev/biomass/compare/v0.7.1...v0.7.2
- Python
Published by himoto over 3 years ago
biomass - v0.7.1
What's Changed
- Create tutorial by @himoto in https://github.com/biomass-dev/biomass/pull/118
- Update logo by @himoto in https://github.com/biomass-dev/biomass/pull/119
- Release v0.7.1 by @himoto in https://github.com/biomass-dev/biomass/pull/121
Full Changelog: https://github.com/biomass-dev/biomass/compare/v0.7.0...v0.7.1
- Python
Published by himoto over 3 years ago
biomass - v0.7.0 (June 2022)
What's Changed
- Add support for Python 3.10 by @himoto in https://github.com/biomass-dev/biomass/pull/110
- Add
CITATION.cffby @himoto in https://github.com/biomass-dev/biomass/pull/111 - Add
InitialPopulationby @himoto in https://github.com/biomass-dev/biomass/pull/113 - Release v0.7.0 by @himoto in https://github.com/biomass-dev/biomass/pull/116
Renamed BioMASS modules:
| Old | New |
| --- | ----- |
| set_model.py | ode.py |
| set_search_param.py | search_param.py |
| fitness.py | problem.py |
Full Changelog: https://github.com/biomass-dev/biomass/compare/v0.6.2...v0.7.0
- Python
Published by himoto over 3 years ago
biomass - v0.6.1
What's Changed
- [pre-commit.ci] pre-commit autoupdate by @pre-commit-ci in https://github.com/biomass-dev/biomass/pull/97
- docs: git clone biomass by @himoto in https://github.com/biomass-dev/biomass/pull/98
- Add model of the G1/S cell cycle transition by @himoto in https://github.com/biomass-dev/biomass/pull/99
- Set 'LSODA' as default ODE solver by @himoto in https://github.com/biomass-dev/biomass/pull/100
- Add model for the proliferation–quiescence decision by @himoto in https://github.com/biomass-dev/biomass/pull/101
- Update example code for ExternalOptimizer by @himoto in https://github.com/biomass-dev/biomass/pull/103
- Release v0.6.1 by @himoto in https://github.com/biomass-dev/biomass/pull/104
Full Changelog: https://github.com/biomass-dev/biomass/compare/v0.6.0...v0.6.1
- Python
Published by himoto over 3 years ago
biomass - v0.6.0 (April 2022)
What's Changed
- Release v0.6.0 by @himoto in https://github.com/biomass-dev/biomass/pull/95
- [pre-commit.ci] pre-commit autoupdate by @pre-commit-ci in https://github.com/biomass-dev/biomass/pull/87
Full Changelog: https://github.com/biomass-dev/biomass/compare/v0.5.5...v0.6.0
- Python
Published by himoto over 3 years ago
biomass - v0.5.5
What's Changed
- Fix error message for incorrect visualization options by @himoto in https://github.com/biomass-dev/biomass/pull/72
- Fix sensitivity analysis visualization problem by @himoto in https://github.com/biomass-dev/biomass/pull/81
- Add more tests by @himoto in https://github.com/biomass-dev/biomass/pull/83
- Release v0.5.5 by @himoto in https://github.com/biomass-dev/biomass/pull/84
- [pre-commit.ci] pre-commit autoupdate by @pre-commit-ci in https://github.com/biomass-dev/biomass/pull/70
Full Changelog: https://github.com/biomass-dev/biomass/compare/v0.5.4...v0.5.5
- Python
Published by himoto almost 4 years ago
biomass - v0.5.2
Template
- Update
viz.py
Use this template for creating models with
biomass>=0.5.2```python from matplotlib import pyplot as plt
from biomass.plotting import *
from .observable import Observable
class Visualization(Observable): """ Plotting parameters for customizing figure properties.
Attributes ---------- cm : matplotlib.colors.ListedColormap (default: `plt.cm.get_cmap('tab10')`) Choosing colormaps for `cmap`. single_observable_options : list of SingleObservable Visualization options for time-course simulation (single-observable). multiple_observables_options : MultipleObservables Visualization options for time-course simulation (multi-observables). sensitivity_options : SensitivityOptions Visualization options for sensitivity analysis results. """ def __init__(self): super().__init__() self.cm = plt.cm.get_cmap("tab10") self.single_observable_options = [ SingleObservable(self.cm, obs_name) for obs_name in self.obs_names ] self.multiple_observables_options = MultipleObservables(self.cm) self.sensitivity_options = SensitivityOptions(self.cm) def get_single_observable_options(self): return self.single_observable_options def get_multiple_observables_options(self): return self.multiple_observables_options def get_sensitivity_options(self): return self.sensitivity_options @staticmethod def set_timecourse_rcParams(): """figure/simulation""" plt.rcParams["font.size"] = 12 plt.rcParams["axes.linewidth"] = 1.5 plt.rcParams["xtick.major.width"] = 1.5 plt.rcParams["ytick.major.width"] = 1.5 plt.rcParams["lines.linewidth"] = 1.8 plt.rcParams["lines.markersize"] = 12 plt.rcParams["savefig.bbox"] = "tight" # plt.rcParams["savefig.format"] = "pdf" # plt.rcParams['font.family'] = 'Arial' # plt.rcParams['mathtext.fontset'] = 'custom' # plt.rcParams['mathtext.it'] = 'Arial:italic' @staticmethod def set_sensitivity_rcParams(): """figure/sensitivity""" plt.rcParams["font.size"] = 12 plt.rcParams["axes.linewidth"] = 1.2 plt.rcParams["xtick.major.width"] = 1.2 plt.rcParams["ytick.major.width"] = 1.2 plt.rcParams["savefig.bbox"] = "tight" # plt.rcParams["savefig.format"] = "pdf" # plt.rcParams['font.family'] = 'Arial' @staticmethod def convert_species_name(name): """figure/sensitivity/initial_condition - Sensitivity for species with nonzero initial conditions """ return name```
- Update
Core functions
- Fix default workers in
optimizefunction (#58)
- Fix default workers in
Parameter estimation
- Fix a bug (#59)
Other
- Bump minimal sicpy version to 1.6
integrate.simpswas renamed tointegrate.simpson
- Python
Published by himoto over 4 years ago
biomass - v0.5.1
Template
- Add new key:
legend_kws legend_locbecomes invalid- Several updates to default rcParams
- Add new key:
Core functions
- Remove
save_formatfrom arguments inrun_simulationandrun_analysis - To modify save_format, edit
viz.pyin the model. - Use
x_idto specify the index (indices) of parameter sets when runningoptimize startandendbecome invalid- Add
create_metrics : Dict[str, Callable[[np.ndarray], Union[int, float]]], optionaltorun_analysis - Allowing users to crete signaling metrics for sensitivity analysis
- Remove
- Python
Published by himoto over 4 years ago
biomass - v0.5.0 (June 2021)
Dependencies
- Add pandas (See
requirements.txt)
- Add pandas (See
Template
- Update
fitness.py - Create
OptimizationProblem - Add
boundsfor external optimizer - Update
viz.py - Add
figsize(default: (4, 3)) to timecourseoptions and multiplotoptions
- Update
biomass.result- Move visualization of estimated parameter sets to biomass.OptimizationResults.savefig()
```python
from biomass import Model, OptimizationResults from biomass.models import NakakukiCell2010 model = Model(NakakukiCell2010.package).create() res = OptimizationResults(model) res.savefig(figsize=(16,5), boxplot_kws={"orient": "v"}) ```

biomass.estimation- Create new class:
ExternalOptimizerpython >>> from scipy.optimize import differential_evolution >>> from biomass import Model >>> from biomass.models import Nakakuki_Cell_2010 >>> model = Model(Nakakuki_Cell_2010.__package__).create() >>> optimizer = ExternalOptimizer(model, differential_evolution) >>> res = optimizer.run( ... model.problem.objective, ... model.problem.bounds, ... strategy="best2bin", ... maxiter=100, ... tol=1e-4, ... mutation=0.1, ... recombination=0.5, ... disp=True, ... polish=False, ... workers=-1, ... )> differentialevolution step 1: f(x)= 7.05589 > differentialevolution step 2: f(x)= 5.59166 > differentialevolution step 3: f(x)= 2.80301 > ... > differentialevolution step 100: f(x)= 0.538524
```python
from biomass import runsimulation optimizer.importsolution(res.x, xid=0) runsimulation(model, viz_type="0") ```
- Create new class:
- Python
Published by himoto over 4 years ago
biomass - v0.4.1
Create docs: https://biomass-core.readthedocs.io/en/latest/
- Core functions
- Update default values: https://biomass-core.readthedocs.io/en/latest/modules/core.html
- Optimization results
- Set estimated params and initials to be plotted in one figure
- Python
Published by himoto over 4 years ago
biomass - v0.4.0 (May 2021)
License
- BioMASS >= 0.4 is released under the Apache License 2.0.
Template
- Don't use exec in name2idx
Use
make_dataclassinstead.```python NAMES: List[str] = [...]
NUM: int = len(NAMES)
Parameters = makedataclass( clsname="Parameters", fields=[(name, int) for name in NAMES], namespace={"NAMES": NAMES, "NUM": NUM}, frozen=True, )
name2idx: Dict[str, int] = {k: v for v, k in enumerate(NAMES)}
C = Parameters(**name2idx)
del name2idx ```
Model construction
- Use
Modelclass
```python
from biomass import Model import yourmodel model = Model(yourmodel.package).create() ```
- Use
Sensitivity analysis
- Fix path to save sensitivity coefficients
{your_model}/sensitivity_coefficients/{target}/{metric}.npyOther
- Fix condition when exp.data to be plotted
- Update
signaling_systems.py
- Python
Published by himoto over 4 years ago
biomass - v0.3.5
Models
- Add the insulin-dependent AKT pathway model
- Reference:
- Kubota, H. et al. Temporal Coding of Insulin Action through Multiplexing of the AKT Pathway. Mol. Cell 46, 820–832 (2012). https://doi.org/10.1016/j.molcel.2012.04.018
- BioModels:
- Kubota2012InsulinActionAKTpathway
Template for BioMASS model construction
- Update reaction_network.py
```python from typing import Dict, List
from biomass.analysis.reaction import is_duplicate
class ReactionNetwork(object): """ Reaction indices grouped according to biological processes. This is used for sensitivity analysis (target='reaction'). """
def __init__(self) -> None: self.reactions: Dict[str, List[int]] = {} def group(self): """ Group reactions according to biological processes """ biological_processes = [] for process, indices in self.reactions.items(): if not isinstance(indices, list): raise TypeError("Use list for reaction indices in {}".format(process)) biological_processes.append(indices) if not is_duplicate(self.reactions, biological_processes): return biological_processes```
Output
- Update _writebestfit_param.py
- Example:
```
parameter set: 9
def paramvalues(): x = [0] * C.NUM x[C.V1] = 9.152e-02 x[C.Km1] = 3.761e+02 x[C.V2] = 2.200e-01 x[C.Km2] = 3.500e+02 x[C.V3] = 7.200e-01 x[C.Km3] = 1.600e+02 x[C.V4] = 6.480e-01 x[C.Km4] = 6.000e+01 x[C.V5] = 6.913e+01 x[C.Km5] = 2.727e+01 x[C.V6] = 6.913e+01 x[C.Km6] = 2.727e+01 x[C.KimERK] = 1.200e-02 x[C.KexERK] = 1.800e-02 x[C.KimpERK] = 1.200e-02 x[C.KexpERK] = 1.800e-02 x[C.KimppERK] = 1.100e-02 x[C.KexppERK] = 1.300e-02 x[C.V10] = 4.275e+02 x[C.Km10] = 1.469e+01 x[C.n10] = 2.593e+00 x[C.p11] = 2.191e-04 x[C.p12] = 1.156e-03 x[C.p13] = 6.951e-04 x[C.V14] = 3.090e-01 x[C.Km14] = 8.111e+02 x[C.V15] = 2.049e+02 x[C.Km15] = 7.803e-03 x[C.p16] = 2.570e-04 x[C.p17] = 9.630e-05 x[C.KimDUSP] = 1.832e-03 x[C.KexDUSP] = 4.328e-02 x[C.KimpDUSP] = 1.832e-03 x[C.KexpDUSP] = 4.328e-02 x[C.V20] = 3.512e-01 x[C.Km20] = 1.321e+05 x[C.V21] = 5.249e-02 x[C.Km21] = 1.184e-03 x[C.p22] = 2.570e-04 x[C.p23] = 9.630e-05 x[C.V24] = 3.440e+00 x[C.Km24] = 1.912e+05 x[C.V25] = 1.109e+02 x[C.Km25] = 4.527e+00 x[C.KimRSK] = 2.519e-03 x[C.KexRSK] = 1.024e-02 x[C.V27] = 1.390e+01 x[C.Km27] = 4.619e+03 x[C.V28] = 4.295e-01 x[C.Km28] = 1.165e+00 x[C.V29] = 9.103e-02 x[C.Km29] = 6.333e+03 x[C.V30] = 5.958e+01 x[C.Km30] = 7.801e+00 x[C.V31] = 5.691e+01 x[C.Km31] = 1.543e-02 x[C.n31] = 1.713e+00 x[C.p32] = 1.100e-03 x[C.p33] = 1.959e-03 x[C.p34] = 7.572e-04 x[C.V35] = 5.050e+00 x[C.Km35] = 1.795e+03 x[C.V36] = 1.218e-01 x[C.Km36] = 2.394e+03 x[C.V37] = 1.178e+03 x[C.Km37] = 1.062e+02 x[C.p38] = 2.570e-04 x[C.p39] = 9.630e-05 x[C.KimFOS] = 1.205e-01 x[C.KexFOS] = 1.590e-01 x[C.KimpcFOS] = 1.205e-01 x[C.KexpcFOS] = 1.590e-01 x[C.V42] = 9.649e-02 x[C.Km42] = 5.639e+02 x[C.V43] = 3.568e-03 x[C.Km43] = 1.382e+02 x[C.V44] = 1.290e-03 x[C.Km44] = 2.725e-02 x[C.p45] = 2.570e-04 x[C.p46] = 9.630e-05 x[C.p47] = 2.140e-01 x[C.m47] = 1.288e+01 x[C.p48] = 3.351e-02 x[C.p49] = 4.279e-02 x[C.m49] = 2.331e+00 x[C.p50] = 3.491e-02 x[C.p51] = 1.053e-03 x[C.m51] = 4.536e+00 x[C.p52] = 2.140e-01 x[C.m52] = 1.288e+01 x[C.p53] = 3.351e-02 x[C.p54] = 4.279e-02 x[C.m54] = 2.331e+00 x[C.p55] = 3.491e-02 x[C.p56] = 1.053e-03 x[C.m56] = 4.536e+00 x[C.V57] = 2.366e+02 x[C.Km57] = 7.976e-04 x[C.n57] = 1.649e+00 x[C.p58] = 2.471e-09 x[C.p59] = 2.889e-06 x[C.p60] = 6.575e-02 x[C.p61] = 2.517e+00 x[C.KimF] = 2.058e-02 x[C.KexF] = 7.998e-02 x[C.p63] = 1.731e+00 x[C.KF31] = 3.337e-03 x[C.nF31] = 1.001e+00 x[C.a] = 3.380e+02 x[C.Vn] = 2.200e-01 x[C.Vc] = 9.400e-01 x[C.Ligand] = 0.000e+00 x[C.EGF] = 0.000e+00 x[C.HRG] = 1.000e+00 x[C.noligand] = 2.000e+00
def initial_values(): y0 = [0] * V.NUM y0[V.CREBn] = 1.000e+03 y0[V.ERKc] = 9.600e+02 y0[V.Elk1n] = 1.510e+03 y0[V.RSKc] = 3.530e+02 ```
Visualization
- Close #45
Other
- Update function to get the steady state for the untreated condition
- Use
scipy.integrate.ode - Use
math.isnanfor single floats - code refactoring
- analysis/
- estimation/
- Python
Published by himoto over 4 years ago
biomass - v0.3.4
Updates:
Parameter estimation
- Fix search bounds, mutation and popsize in the differential evolution method.
Models
- Move ODE solvers to dynamics/
- Move search_param checkers to estimation/
Test
- Update test paramter sets
- Python
Published by himoto almost 5 years ago
biomass - v0.3.3
Update optimize
Add new option: initial_threshold
- initial_threshold : float (default: 1e12) > Threshold on objective function value used to generate initial population. > Default value is 1e12 (numerically solvable).
```python def optimize( model: ModelObject, start: int, end: Optional[int] = None, options: Optional[dict] = None, ) -> None: """ Run GA for parameter estimation.
Paremters
---------
model : ModelObject
Model for parameter estimation.
start : int
Index of parameter set to estimate.
end : int, optional
When `end` is specified, parameter sets from `start` to `end` will be estimated.
options : dict, optional
popsize : int (default: 5)
A multiplier for setting the total population size.
The population has popsize * len(search_param) individuals.
max_generation : int (default: 10000)
Stop optimization if Generation > max_generation.
initial_threshold : float (default: 1e12)
Threshold on objective function value used to generate initial population.
Default value is 1e12 (numerically solvable).
allowable_error : float (default: 0.0)
Stop optimization if Best Fitness <= allowable_error.
local_search_method : str (default: 'mutation')
Method used in local search. Should be one of
* 'mutation' : NDM/MGG
* 'Powell' : Modified Powell method
* 'DE' : Differential Evolution (strategy: best2bin)
n_children : int (default: 200)
(method='mutation') The number of children generated in NDM/MGG.
maxiter : int (default: 10)
(method='Powell' or 'DE') The maximum number of iterations
over which the entire population is evolved.
workers : int (default: -1 if `end` is None else 1)
(method='DE') The population is subdivided into workers sections and
evaluated in parallel (uses multiprocessing.Pool). Supply -1 to use
all available CPU cores. Set workers to 1 when searching multiple
parameter sets simultaneously.
overwrite : bool (default: False)
If True, the out/n folder will be overwritten.
Example
-------
>>> from biomass.models import Nakakuki_Cell_2010
>>> from biomass import optimize
>>> model = Nakakuki_Cell_2010.create()
>>> optimize(
model=model, start=1, end=10,
options={
'max_generation': 10000,
'allowable_error': 0.5
}
)
"""
...
```
Update run_analysis
```python def runanalysis( model: ModelObject, target: str, metric: str = "integral", style: str = "barplot", saveformat: str = "pdf", options: Optional[dict] = None, ) -> None: """ Perform sensitivity analysis to identify critical parameters, species or reactions in the complex biological network.
The sensitivity S(y,x) was calculated according to the following equation:
S(y,x) = d ln(yi) / d ln (xj), where yi is the signaling metric and xj is
each nonzero species, parameter value or reaction rate.
Paremters
---------
model : ModelObject
Model for sensitivity analysis.
target : str
* 'reaction'
* 'initial_condition'
* 'parameter'
metric : str (default: 'integral')
* 'maximum' : The maximum value.
* 'minimum' : The minimum value.
* 'argmax' : The time to reach the maximum value.
* 'argmin' : The time to reach the minimum value.
* 'timepoint' : The simulated value at the time point set via options['timepoint'].
* 'duration' : The time it takes to decline below the threshold set via options['duration'].
* 'integral' : The integral of concentration over the observation time.
style : str (default: 'barplot')
* 'barplot'
* 'heatmap'
save_format : str (default: "pdf")
Either "png" or "pdf", indicating whether to save figures
as png or pdf format.
options : dict, optional
show_indices : bool (default: True)
(target == 'reaction') Set to True to put reaction index on each bar.
excluded_params : list of strings
(target == 'parameter') List of parameters which are not used for analysis.
excluded_initials : list of strings
(target == 'initial_condition') List of species which are not used for analysis.
timepoint : int (default: model.sim.t[-1])
(metric == 'timepoint') Which timepoint to use.
duration : float (default: 0.5)
(metric == 'duration') 0.1 for 10% of its maximum.
Example
-------
>>> from biomass.models import Nakakuki_Cell_2010
>>> from biomass import run_analysis
>>> model = Nakakuki_Cell_2010.create()
1. Parameter
>>> run_analysis(
model,
target='parameter',
options = {
'excluded_params': [
'a', 'Vn', 'Vc', 'Ligand', 'EGF', 'HRG', 'no_ligand'
]
}
)
2. Initial condition
>>> run_analysis(
model,
target='initial_condition',
)
3. Reaction
>>> run_analysis(
model,
target='reaction',
)
"""
...
```
- Python
Published by himoto almost 5 years ago
biomass - v0.3.2
Coding style
Code is formatted with black. Coding style is checked with flake8 and isort.
``` $ pip install pre-commit
$ pre-commit install ```
Display model information
Rename function: ~~show_properties~~ → show_info
```python from biomass.models import NakakukiCell2010
NakakukiCell2010.show_info() ```
↓
```
NakakukiCell2010 information
36 species 115 parameters, of which 75 to be estimated ```
Add new method to OptimizationResults: trace_obj
Visualize objective function traces for different optimization runs.
```python from biomass.models import NakakukiCell2010 from biomass.result import OptimizationResults
model = NakakukiCell2010.create() res = OptimizationResults(model)
res.trace_obj() ```
- Python
Published by himoto almost 5 years ago
biomass - v0.3.1
Updates:
New model
Dynamic pathway model of TNFα-induced NFκB signal transduction
Oppelt, A. et al. Model-based identification of TNFα-induced IKKβ-mediated and IκBα-mediated regulation of NFκB signal transduction as a tool to quantify the impact of drug-induced liver injury compounds. npj Syst. Biol. Appl. 4, 23 (2018). https://doi.org/10.1038/s41540-018-0058-z
Sensitivity analysis
New signaling metrics
'argmax': The time to reach the maximum value.'argmin': The time to reach the minimum value.'timepoint': The simulated value at the time point set via options['timepoint'].'duration': The time it takes to decline below the threshold set via options['duration'].
Parameter estimation
Set mutation constant (differential weight: F) to 0.1
Set recombination constant (crossover probability: CR) to 0.9
- Python
Published by himoto almost 5 years ago
biomass - v0.3.0 (January 2021)
Updates:
- Use
BioMassModelfor the first argument of core functions
Example usage
- Create an executable model
```python from biomass.models import NakakukiCell2010
model = NakakukiCell2010.create() ```
- Estimate model parameters from experimental data
```python from biomass import optimize
optimize( model=model, start=1, options={ "popsize": 3, "maxgeneration": 1000, "allowableerror": 0.5, "localsearchmethod": "DE", } ) ```
- Export optimized parameters in CSV format
```python from biomass.result import OptimizationResults
res = OptimizationResults(model) res.to_csv() ```
- Visualize simulation results
```python from biomass import run_simulation
runsimulation(model, viztype='average', show_all=False, stdev=True) ```
- Perform sensitivity analysis
```python from biomass import run_analysis
run_analysis(model, target='reaction', metric='integral', style='barplot') ```
- Python
Published by himoto almost 5 years ago
biomass - v0.2.2
Updates:
Added new local search method: "Powell" and "DE"
```python def optimize(model, *args, options: Optional[dict] = None) -> None: """ Run GA for parameter estimation.
Paremters
---------
model : module
Model for parameter estimation.
options: dict, optional
popsize : int (default: 5)
A multiplier for setting the total population size.
The population has popsize * len(search_param) individuals.
max_generation : int (default: 10000)
Stop if Generation > max_generation.
allowable_error : float (default: 0.0)
Stop if Best Fitness <= allowable_error.
local_search_method : str (default: 'mutation')
Method used in local search. Should be one of
- 'mutation' : NDM/MGG
- 'Powell' : Modified Powell method
- 'DE' : Differential Evolution (strategy: best2bin)
n_children : int (default: 200)
(method='mutation') The number of children generated in NDM/MGG.
workers : int (default: -1 if len(args) == 1 else 1)
(method='DE') The population is subdivided into workers sections and
evaluated in parallel (uses multiprocessing.Pool). Supply -1 to use
all available CPU cores. Set workers to 1 when searching multiple
parameter sets simultaneously.
overwrite : bool (default: False)
If True, the out/n folder will be overwritten.
"""
```
Example usage
```python from biomass.models import NakakukiCell2010 from biomass import optimize
optimize( NakakukiCell2010, 1, options={ 'popsize': 3, 'allowableerror': 0.5, 'localsearch_method': 'DE' } ) ```
- Python
Published by himoto about 5 years ago
biomass - v0.2.0 (November 2020)
Updates:
- Change sim.normalization type from bool to dict (nested):
python
def __init__(self):
super().__init__(perturbation={})
self.normalization = {}
for obs_name in observables:
self.normalization[obs_name] = {
'timepoint' : None,
'condition' : []
}
- 'timepoint' : Optional[int]
- The time point at which simulated values are normalized. If None, the maximum value will be used for normalization.
- ```'condition'``` : list of strings
- The experimental conditions to use for normalization. If empty, all conditions defined in sim.conditions will be used.
- Move documentation to https://github.com/okadalabipr/biomass_docs.jl
- Python
Published by himoto about 5 years ago