コード例 #1
0
import sys
sys.path.insert(0, '../..')

from marginal_likelihood.SBML import SBML
from marginal_likelihood.ODES import ODES
from marginal_likelihood.SBMLtoODES import sbml_to_odes

sbml = SBML()
sbml.load_file('final_model.sbml')
odes = sbml_to_odes(sbml)
time = [0, 30, 60, 180, 300, 900, 1800]
odes.overtime_plot(['MAPK_PP + MAPK_P'], time, filename='sum')
# odes.overtime_plot (['(MAPK_PP + MAPK_P) / (MAPK_PP + MAPK_P + MAPK)'], time, filename='ratio')
コード例 #2
0
from marginal_likelihood.SBML import SBML
from marginal_likelihood.ODES import ODES
from marginal_likelihood.SBMLtoODES import sbml_to_odes
from experiment.ExperimentSet import ExperimentSet
from experiment.Experiment import Experiment
import numpy as np


def add_noise (values):
    for i in range (len (values)):
        eps = np.random.normal (0, 3)
        if values[i] + eps > 0:
            values[i] += eps

sbml = SBML ()
sbml.load_file ('final_model.sbml')
odes = sbml_to_odes (sbml)
time = [30, 60, 180, 300, 900, 1800]


# Simple experiment: run final_model simulations adding a Gaussian noise
values = odes.evaluate_exp_on ('MAPK_PP + MAPK_P', time)
experiment_set = ExperimentSet ()
for i in range (3):
    noised_values = list (values)
    add_noise (noised_values)
    experiment = Experiment (time, noised_values, 
            'MAPK_PP + MAPK_P')
    experiment_set.add (experiment)
experiment_set.save_to_file ('gauss_noise.data')
コード例 #3
0
import sys
sys.path.insert(0, '../..')

from marginal_likelihood.SBML import SBML
from marginal_likelihood.ODES import ODES
from marginal_likelihood.SBMLtoODES import sbml_to_odes

sbml = SBML()
sbml.load_file('model2.xml')
odes = sbml_to_odes(sbml)
time = [0, 2, 5, 10, 20, 40]
time = [2, 5, 10]
# time = [0, 120, 300, 600] # in seconds

initial_state = {'ERKPP': 903, 'ERK': 9097}
odes.overtime_plot(['ERKPP/100'],
                   time,
                   filename='sum',
                   initial_state_map=initial_state)
コード例 #4
0
import sys
sys.path.insert (0, '../..')
import numpy as np

from marginal_likelihood.SBML import SBML
from marginal_likelihood.ODES import ODES
from marginal_likelihood.SBMLtoODES import sbml_to_odes

for i in range (1, 5):
    model = 'model' + str (i)
    sbml = SBML ()
    sbml.load_file (model + '.xml')
    odes = sbml_to_odes (sbml)
    time = np.linspace (0, 1000, 7)
    odes.overtime_plot (['B', 'A', 'AB', 'C'], time, filename=model)