Esempio n. 1
0
def load_model():
    tk.withdraw()
    try:
      global label_model
      label_model=load_iso2flux_model(gui=True)
      tk.destroy()
    except:
       pass
Esempio n. 2
0
print "file_name",file_name


if ".iso2flux" not in file_name:
    file_name+=".iso2flux"


if output_prefix==None:
   output_prefix=file_name.split("/")[-1].replace(".iso2flux","") 
     




label_model=load_iso2flux_model(file_name)
#lb_list,ub_list=get_variable_bounds(label_model,max_flux=1e6)

print flux_penalty_file
"""
default_name_flux_dict=file_name.replace(".iso2flux","_flux_penalty.csv")
if flux_penalty_file==None:
   flux_penalty={} 
   #Try to see if the flux_penalty dict saved with the default name exists
else:
   print "loading "+flux_penalty_file
   flux_penalty_dict=read_flux_penalty_dict_from_file(flux_penalty_file)
"""

"""
Esempio n. 3
0
print "file_name",file_name


if ".iso2flux" not in file_name:
    file_name+=".iso2flux"


if output_prefix==None:
   output_prefix=file_name.split("/")[-1].replace(".iso2flux","") 
     




label_model=load_iso2flux_model(file_name)


default_name_flux_dict=file_name.replace(".iso2flux","_flux_penalty.csv")
if flux_penalty_file==None:
   #Try to see if the flux_penalty dict saved with the default name exists
   try:
     flux_penalty_dict=read_flux_penalty_dict_from_file(default_name_flux_dict)
   except:
     raise Exception("Flux penalty for "+file_name+" "+default_name_flux_dict+" not found" )
     
else:
   print "loading "+flux_penalty_file
   flux_penalty_dict=read_flux_penalty_dict_from_file(flux_penalty_file)