def main(): # create an instance of Network class: network = nm.Network(CUR_DIR) config_dict = network.get_config_dict() SEED = int(config_dict['SEED']) USER_SEED = int(config_dict['USER_SEED']) #load network topology and parameter ranges: mode = network.process_network(USER_SEED, SEED) #fname_params_prefix = CUR_DIR + '/cellcycle.' fname_params_prefix = CUR_DIR + '/repressilator.' fname_models = CUR_DIR + '/models.txt' #fname_models = CUR_DIR + '/model_list.5.txt' #fname_models = CUR_DIR + '/models.bistable.txt' #import model ids from the input file: with open(fname_models, 'r') as fh_models: content = fh_models.read() models = content.strip().split("\n") MODELS_TO_INSPECT = list(map(int, models)) #import perturbed params from the params file as an ordered dictionary: #(parameters are perturbed in an R function) model_params_dict = ma.import_model_params(fname_params_prefix, \ network, MODELS_TO_INSPECT) # generate models using perturbed parameters and random ICs: # (number of random ICs can be set in racipe.cfg) mg.generate_models_random_ICs(network, model_params_dict) return None
def main(): # create an instance of Network class: network = nm.Network(CUR_DIR) config_dict = network.get_config_dict() SEED = int(config_dict['SEED']) USER_SEED = int(config_dict['USER_SEED']) #load network topology and parameter ranges: mode = network.process_network(USER_SEED, SEED) #fname_params_prefix = CUR_DIR + '/cellcycle.' fname_params_prefix = CUR_DIR + '/emt.' fname_models = CUR_DIR + '/models.txt' # name of the file containing steady states and cluster number: #fname_sstate = fname_params_prefix + 'states.unnormed.txt' fname_sstate = fname_params_prefix + 'states.clustered.txt' #import model ids from the input file: with open(fname_models, 'r') as fh_models: content = fh_models.read() models = content.strip().split("\n") #print(models) MODELS_TO_INSPECT = list(map(int, models)) #import perturbed params from the params file as an ordered dictionary: #(parameters are perturbed in an R function) model_params_dict = ma.import_model_params(fname_params_prefix, \ network, MODELS_TO_INSPECT) # Import starting state # --------------------- CLUSTER_NO = 1 sstate_dict = ma.import_states_byCluster(fname_sstate, \ network, \ MODELS_TO_INSPECT, CLUSTER_NO) # Import starting state # --------------------- CLUSTER_NO = 2 estate_dict = ma.import_states_byCluster(fname_sstate, \ network, \ MODELS_TO_INSPECT, CLUSTER_NO) # Generate trajectory of the models from E to M # -------------------------------------------- #mg.generate_e2m_traj_mpr_signal(network, model_params_dict, sstate_dict) SIGNALING_NODE_ID = 8 FCHANGE = 2**-8 #2**-9 #2**(-10) #2**(-64) #2**(-32) #2**(-16)- phase.32 mg.generate_traj_decr_sig_gradually(network, model_params_dict, estate_dict, \ SIGNALING_NODE_ID, FCHANGE) return None
def main(): # create an instance of Network class: network = nm.Network(CUR_DIR) config_dict = network.get_config_dict() SEED = int(config_dict['SEED']) USER_SEED = int(config_dict['USER_SEED']) #load network topology and parameter ranges: mode = network.process_network(USER_SEED, SEED) #fname_params_prefix = CUR_DIR + '/cellcycle.' fname_params_prefix = CUR_DIR + '/emt.' fname_models = CUR_DIR + '/models.txt' # name of the file containing steady states and cluster number: #fname_sstate = fname_params_prefix + 'states.unnormed.txt' fname_sstate = fname_params_prefix + 'states.clustered.txt' #import model ids from the input file: with open(fname_models, 'r') as fh_models: content = fh_models.read() models = content.strip().split("\n") #print(models) MODELS_TO_INSPECT = list(map(int, models)) #import perturbed params from the params file as an ordered dictionary: #(parameters are perturbed in an R function) model_params_dict = ma.import_model_params(fname_params_prefix, \ network, MODELS_TO_INSPECT) #print(MODELS_TO_INSPECT) #print(len(model_params_dict.keys())) #print(model_params_dict.keys()) #sys.exit(0) #for k in model_params_dict.keys(): # print(k) # print(model_params_dict[k]) # break # Import starting state # --------------------- CLUSTER_NO = 1 sstate_dict = ma.import_states_byCluster(fname_sstate, \ network, \ MODELS_TO_INSPECT, CLUSTER_NO) #print(len(start_state_dict.keys())) #print(start_state_dict.keys()) #for k in start_state_dict.keys(): # print(k) # print(np.log2(start_state_dict[k])) # break # Import starting state # --------------------- CLUSTER_NO = 2 estate_dict = ma.import_states_byCluster(fname_sstate, \ network, \ MODELS_TO_INSPECT, CLUSTER_NO) #print(len(end_state_dict.keys())) #print(end_state_dict.keys()) #for k in end_state_dict.keys(): # print(k) # print(np.log2(end_state_dict[k])) # break # generate models using perturbed parameters and steady state as IC: #mg.generate_models_sstate(network, model_params_dict, sstate_dict) mg.generate_models_signaled_sstate(network, model_params_dict, sstate_dict) return None
def main(): # create an instance of Network class: network=nm.Network(CUR_DIR) config_dict=network.get_config_dict() SEED=int(config_dict['SEED']) USER_SEED=int(config_dict['USER_SEED']) #load network topology and parameter ranges: mode=network.process_network(USER_SEED, SEED) #fname_params_prefix = CUR_DIR + '/cellcycle.' fname_params_prefix = CUR_DIR + '/tswitch.' fname_models = CUR_DIR + '/models.txt' # name of the file containing steady states and cluster number: #fname_sstate = fname_params_prefix + 'states.unnormed.txt' fname_sstate = fname_params_prefix + 'states.clustered.txt' #import model ids from the input file: with open(fname_models, 'r') as fh_models: content = fh_models.read() models = content.strip().split("\n") #print(models) MODELS_TO_INSPECT = list(map(int, models)) #import perturbed params from the params file as an ordered dictionary: #(parameters are perturbed in an R function) model_params_dict = ma.import_model_params(fname_params_prefix, \ network, MODELS_TO_INSPECT) # Import starting state # --------------------- CLUSTER_NO=1 sstate_dict = ma.import_states_byCluster(fname_sstate, \ network, \ MODELS_TO_INSPECT, CLUSTER_NO) # Import starting state # --------------------- CLUSTER_NO=2 estate_dict = ma.import_states_byCluster(fname_sstate, \ network, \ MODELS_TO_INSPECT, CLUSTER_NO) # Comment about expressions: already antilog transformed #print(sstate_dict.keys()) #print(sstate_dict.values()) #for k,v in sstate_dict.items(): # print(k) # print(v) # break #sys.exit(0) # generate trajectory of the models from E to M # -------------------------------------------- FCHANGE = 2**1.5 # phase 01 SIGNALING_NODE_ID = 2 mg.generate_traj_incr_sig_gradually(network, model_params_dict, sstate_dict, \ SIGNALING_NODE_ID, FCHANGE) return None