Esempio n. 1
0
popsize=8
test_size=25
seed= 567840

os.chdir(dirname)
exp=loadconc.CSV_conc_set(exp_name)

P = aju.xml.XMLParam
#list of parameters to change/optimize
params = aju.optimize.ParamSet(P('phos_fwd_rate', 1e-6, min=0, max=.001, xpath='//Reaction[@id="RasGRF+RasGDP -- RasGRFRasGDP"]/forwardRate'),
                               P('phos_rev_rate', 1e-6, min=0, max=.001, xpath='//Reaction[@id="RasGRF+RasGDP -- RasGRFRasGDP"]/reverseRate'),
                               P('phos_kcat_rate',1e-6, min=0, max=.001, xpath='//Reaction[@id="RasGRFRasGDP -- RasGRF+RasGTP"]/forwardRate'))

###################### END CUSTOMIZATION #######################################

fitness = nrd_fitness.specie_concentration_fitness(species_list=mol)

############ Test fitness function
#sim = aju.xml.NeurordSimulation('/tmp', model=model, params=params)
#cp /tmp/???/model.h5 modelname.split('.')[0]+'.h5'
#sim2=aju.xml.NeurordResult('Model_syngap_ras.h5')
#print(fitness(sim2, exp))
################

fit = aju.optimize.Fit(tmpdir, exp, model_set, None, fitness, params,
                       _make_simulation=aju.xml.NeurordSimulation.make,
                       _result_constructor=aju.xml.NeurordResult)
fit.load()
fit.do_fit(iterations, popsize=popsize,sigma=1.0,seed=seed)
mean_dict,std_dict,CV=converge.iterate_fit(fit,test_size,popsize)
Esempio n. 2
0
      max=1e-12,
      xpath='//Reaction[@id="CKCam_pow4"]/forwardRate'),
    P('CK3_fwd_rate',
      1e-12,
      min=0,
      max=1e-9,
      xpath='//Reaction[@id="CKCam_pow3"]/forwardRate'),
    P('CK2_CKp2_fwd_rate',
      1e-12,
      min=0,
      max=1e-9,
      xpath='//Reaction[@id="CK2_CKpCam_pow2"]/forwardRate'))

###################### END CUSTOMIZATION #######################################

fitness = nrd_fitness.specie_concentration_fitness(species_list=mol)

############ Test fitness function
#model=dirname+'Model-CKnew-Cahz1.xml'
#sim = aju.xml.NeurordSimulation('/tmp', model=model, params=params)
#sim2=aju.xml.NeurordResult('Model_syngap_ras.h5')
#print(fitness(sim2, exp))
################

fit = aju.optimize.Fit(tmpdir,
                       exp,
                       model_set,
                       None,
                       fitness,
                       params,
                       _make_simulation=aju.xml.NeurordSimulation.make,
Esempio n. 3
0
      max=1e-3,
      xpath='//Reaction[@id="bindpNMDARPP1"]/forwardRate'),
    P('pNMDARPP1_back_rate',
      0.34e-3,
      min=0,
      max=1e-3,
      xpath='//Reaction[@id="bindpNMDARPP1"]/reverseRate'),
    P('pNMDARPP1_kcat_rate',
      0.086e-3,
      min=0,
      max=1e-3,
      xpath='//Reaction[@id="reacpNMDARPP1"]/forwardRate'))

###################### END CUSTOMIZATION #######################################

fitness = nrd_fitness.specie_concentration_fitness(species_list=mol,
                                                   norm=norm_method)
fit = aju.optimize.Fit(tmpdir,
                       exp,
                       model_set,
                       None,
                       fitness,
                       params,
                       _make_simulation=aju.xml.NeurordSimulation.make,
                       _result_constructor=aju.xml.NeurordResult)
fit.load()
print(fit.model)
fit.do_fit(iterations, popsize=popsize, sigma=0.3)
#fit.do_fit(iterations, popsize=popsize, seed=62839)
#mean_dict,std_dict,CV=converge.iterate_fit(fit,test_size,popsize)

########################################### Done with fitting, look at results