Skip to content

Commit

Permalink
Release v0.11.1 (#244)
Browse files Browse the repository at this point in the history
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
  • Loading branch information
himoto and pre-commit-ci[bot] authored Feb 17, 2023
1 parent cfedc66 commit 2ad16db
Show file tree
Hide file tree
Showing 24 changed files with 6 additions and 51 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ repos:
additional_dependencies: [toml]

- repo: https://github.com/psf/black
rev: 22.12.0
rev: 23.1.0
hooks:
- id: black
additional_dependencies: [toml]
Expand Down
2 changes: 0 additions & 2 deletions biomass/construction/reaction_rules.py
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,6 @@ def _raise_exception(self, line_num: int, line: str) -> None:
)

def _process_pval_section(self, func_name: str, line_num: int, line: str, *args: str) -> None:

param_values = line.split("|")[1].strip().split(",")
if all("=" in pval for pval in param_values):
for pval in param_values:
Expand Down Expand Up @@ -461,7 +460,6 @@ def _process_pval_section(self, func_name: str, line_num: int, line: str, *args:
)

def _process_ival_section(self, line_num: int, line: str) -> None:

initial_values = line.split("|")[2].strip().split(",")
for ival in initial_values:
if ival.startswith("fixed "):
Expand Down
1 change: 0 additions & 1 deletion biomass/construction/template/observable.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ def simulate(self, x: list, y0: list, _perturbation: dict = {}):
# unperturbed steady state

for i, condition in enumerate(self.conditions):

sol = solve_ode(self.diffeq, y0, self.t, tuple(x))

if sol is None:
Expand Down
3 changes: 0 additions & 3 deletions biomass/construction/template/viz.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,12 @@ def __init__(self) -> None:
self.sensitivity_options = SensitivityOptions(self.cm)

def get_single_observable_options(self) -> List[SingleObservable]:

return self.single_observable_options

def get_multiple_observables_options(self) -> MultipleObservables:

return self.multiple_observables_options

def get_sensitivity_options(self) -> SensitivityOptions:

return self.sensitivity_options

@staticmethod
Expand Down
8 changes: 4 additions & 4 deletions biomass/construction/text2model.py
Original file line number Diff line number Diff line change
Expand Up @@ -505,7 +505,7 @@ def _update_observable(self) -> None:
for i, condition in enumerate(self.sim_conditions):
# Use ';' for adding description of each condition
if i == 0:
lines[line_num + 1] = (
lines[line_num] += (
3 * self.indentation
+ f'if condition == \'{condition[0].strip(" ")}\':\n'
+ 4 * self.indentation
Expand All @@ -515,7 +515,7 @@ def _update_observable(self) -> None:
+ ("\n\n" if len(self.sim_conditions) == 1 else "")
)
else:
lines[line_num + 1] += (
lines[line_num] += (
3 * self.indentation
+ f'elif condition == \'{condition[0].strip(" ")}\':\n'
+ 4 * self.indentation
Expand All @@ -526,8 +526,8 @@ def _update_observable(self) -> None:
)
# pa: parameters
# init: initial conditions
lines[line_num + 1] = self._convert_names(
line=lines[line_num + 1],
lines[line_num] = self._convert_names(
line=lines[line_num],
p=re.findall(r"p\[(.*?)\]", condition[1]),
init=re.findall(r"init\[(.*?)\]", condition[1]),
)
Expand Down
3 changes: 0 additions & 3 deletions biomass/models/Nakakuki_Cell_2010/ode.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ def _get_ppMEK_slope(t, ligand) -> float:

# Refined Model
def diffeq(self, t, y, *x):

v = self.flux(t, y, x)

if self.perturbation:
Expand Down Expand Up @@ -104,7 +103,6 @@ def diffeq(self, t, y, *x):


def param_values():

x = [0] * C.NUM

x[C.V1] = 0.34284837
Expand Down Expand Up @@ -228,7 +226,6 @@ def param_values():


def initial_values():

y0 = [0] * V.NUM

y0[V.ERKc] = 9.60e02
Expand Down
2 changes: 0 additions & 2 deletions biomass/models/Nakakuki_Cell_2010/viz.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ def __init__(self):
self.sensitivity_options = SensitivityOptions(self.cm)

def get_single_observable_options(self):

for i, _ in enumerate(self.obs_names):
self.single_observable_options[i].divided_by = 60 # sec. -> min.
self.single_observable_options[i].xlim = (-5, 95)
Expand Down Expand Up @@ -98,7 +97,6 @@ def get_multiple_observables_options(self):
return self.multiple_observables_options

def get_sensitivity_options(self):

return self.sensitivity_options

@staticmethod
Expand Down
1 change: 0 additions & 1 deletion biomass/models/circadian_clock/viz.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ def get_multiple_observables_options(self):
return self.multiple_observables_options

def get_sensitivity_options(self):

return self.sensitivity_options

@staticmethod
Expand Down
3 changes: 0 additions & 3 deletions biomass/models/g1s_transition/ode.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ def __init__(self, perturbation):

# Refined Model
def diffeq(self, t, y, *x):

v = self.flux(t, y, x)

if self.perturbation:
Expand Down Expand Up @@ -69,7 +68,6 @@ def diffeq(self, t, y, *x):


def param_values():

x = [0] * C.NUM

## CYCE SYNTHESISx[C.DEGRADATION AND P27 BINDING/DISSOCIATION:
Expand Down Expand Up @@ -111,7 +109,6 @@ def param_values():


def initial_values():

y0 = [0] * V.NUM

y0[V.Cdh1dp] = 1.0
Expand Down
3 changes: 0 additions & 3 deletions biomass/models/g1s_transition/viz.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,12 @@ def __init__(self):
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
Expand Down
1 change: 0 additions & 1 deletion biomass/models/insulin_signaling/ode.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ def __init__(self, perturbation):
self.perturbation = perturbation

def diffeq(self, t, y, *x):

v = self.flux(t, y, x)

if self.perturbation:
Expand Down
1 change: 0 additions & 1 deletion biomass/models/insulin_signaling/reaction_network.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ def __init__(self) -> None:

@staticmethod
def flux(t, y, x):

v = {}

v[1] = x[C.k1_synthesis] * (y[V.pro_IRcom] - y[V.IRcom])
Expand Down
3 changes: 0 additions & 3 deletions biomass/models/insulin_signaling/viz.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ def __init__(self):
self.sensitivity_options = SensitivityOptions(self.cm)

def get_single_observable_options(self):

for i, _ in enumerate(self.obs_names):
self.single_observable_options[i].xticks = [120 * i for i in range(5)]
self.single_observable_options[i].xlabel = "time (min)"
Expand All @@ -42,11 +41,9 @@ 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
Expand Down
1 change: 0 additions & 1 deletion biomass/models/mapk_cascade/reaction_network.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ def __init__(self) -> None:

@staticmethod
def flux(t, y, x) -> dict:

v = {}
v[1] = (
x[C.V1]
Expand Down
1 change: 0 additions & 1 deletion biomass/models/mapk_cascade/viz.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@ def get_multiple_observables_options(self):
return self.multiple_observables_options

def get_sensitivity_options(self):

return self.sensitivity_options

@staticmethod
Expand Down
2 changes: 0 additions & 2 deletions biomass/models/nfkb_pathway/viz.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,9 @@ 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
Expand Down
3 changes: 0 additions & 3 deletions biomass/models/pan_rtk/ode.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ def __init__(self, perturbation):

# Refined Model
def diffeq(self, t, y, *x):

v = self.flux(t, y, x)

if self.perturbation:
Expand Down Expand Up @@ -113,7 +112,6 @@ def diffeq(self, t, y, *x):


def param_values():

x = [0] * C.NUM

x[C.AKT_activation_pEGFR] = 1.00000000000008e-5
Expand Down Expand Up @@ -586,7 +584,6 @@ def param_values():


def initial_values():

y0 = [0] * V.NUM

y0[V.dose_EGF] = 0.0
Expand Down
3 changes: 0 additions & 3 deletions biomass/models/pan_rtk/viz.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,12 @@ def __init__(self):
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
Expand Down
4 changes: 0 additions & 4 deletions biomass/models/prolif_quies/ode.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,10 @@ def __init__(self, perturbation):

@staticmethod
def _heaviside(x):

return 1 * (x > 0)

# Refined Model
def diffeq(self, t, y, *x):

v = self.flux(t, y, x)

if self.perturbation:
Expand Down Expand Up @@ -134,7 +132,6 @@ def diffeq(self, t, y, *x):


def param_values():

x = [0] * C.NUM

x[C.Bg] = 0.05
Expand Down Expand Up @@ -196,7 +193,6 @@ def param_values():


def initial_values():

y0 = [0] * V.NUM

y0[V.tP21] = 0.6
Expand Down
3 changes: 0 additions & 3 deletions biomass/models/prolif_quies/viz.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,12 @@ def __init__(self):
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
Expand Down
1 change: 0 additions & 1 deletion biomass/models/tgfb_smad/ode.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ def __init__(self, perturbation):
self.perturbation = perturbation

def diffeq(self, t, y, *x):

v = self.flux(t, y, x)

if self.perturbation:
Expand Down
1 change: 0 additions & 1 deletion biomass/models/tgfb_smad/reaction_network.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ def __init__(self) -> None:

@staticmethod
def flux(t, y, x) -> dict:

v = {}

v[1] = y[V.Rec] * x[C.Rec_act] * y[V.TGFb]
Expand Down
3 changes: 0 additions & 3 deletions biomass/models/tgfb_smad/viz.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,19 +33,16 @@ def __init__(self):
self.sensitivity_options = SensitivityOptions(self.cm)

def get_single_observable_options(self):

for i, _ in enumerate(self.obs_names):
self.single_observable_options[i].xticks = [200 * i for i in range(4)]
self.single_observable_options[i].xlabel = "time (min)"

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
Expand Down
2 changes: 1 addition & 1 deletion biomass/version.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
"""BioMASS library version"""
__version__ = "0.11.0"
__version__ = "0.11.1"

0 comments on commit 2ad16db

Please sign in to comment.