Mercurial > repos > bimib > cobraxy
comparison COBRAxy/ras_to_bounds.py @ 111:22d2cf96d552 draft
Uploaded
author | luca_milaz |
---|---|
date | Sun, 13 Oct 2024 15:46:36 +0000 |
parents | 76e87d3b9e0e |
children | 4ea14da7043b |
comparison
equal
deleted
inserted
replaced
110:76e87d3b9e0e | 111:22d2cf96d552 |
---|---|
175 rxns_ids = [rxn.id for rxn in model.reactions] | 175 rxns_ids = [rxn.id for rxn in model.reactions] |
176 | 176 |
177 # Set medium conditions | 177 # Set medium conditions |
178 for reaction, value in medium.items(): | 178 for reaction, value in medium.items(): |
179 if value is not None: | 179 if value is not None: |
180 warning(str(reaction) + " " + str(value)) | |
181 if(reaction != "EX_thbpt_e" and reaction != "EX_lac__L_e"): | 180 if(reaction != "EX_thbpt_e" and reaction != "EX_lac__L_e"): |
182 model.reactions.get_by_id(reaction).lower_bound = -float(value) | 181 model.reactions.get_by_id(reaction).lower_bound = -float(value) |
183 if(reaction == "EX_lac__L_e"): | 182 if(reaction == "EX_lac__L_e"): |
184 model.reactions.get_by_id(reaction).lower_bound = float(0.0) | 183 model.reactions.get_by_id(reaction).lower_bound = float(0.0) |
185 | 184 |
185 warning(str(model.reactions.get_by_id("EX_Lcystin_e").lower_bound)) | |
186 | 186 |
187 # Perform Flux Variability Analysis (FVA) | 187 # Perform Flux Variability Analysis (FVA) |
188 df_FVA = cobra.flux_analysis.flux_variability_analysis(model, fraction_of_optimum=0, processes=1).round(8) | 188 df_FVA = cobra.flux_analysis.flux_variability_analysis(model, fraction_of_optimum=0, processes=1).round(8) |
189 | 189 |
190 # Set FVA bounds | 190 # Set FVA bounds |