Mercurial > repos > bimib > cobraxy
changeset 107:58919e82d96e draft
Uploaded
author | luca_milaz |
---|---|
date | Sun, 13 Oct 2024 14:06:53 +0000 |
parents | 1629671d4ca6 |
children | 22cebbdb4b6d |
files | COBRAxy/ras_to_bounds.py |
diffstat | 1 files changed, 6 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/COBRAxy/ras_to_bounds.py Sun Oct 13 14:01:03 2024 +0000 +++ b/COBRAxy/ras_to_bounds.py Sun Oct 13 14:06:53 2024 +0000 @@ -185,7 +185,11 @@ ''' for reaction, value in medium.items(): if value is not None: - model.reactions.get_by_id(reaction).lower_bound = -float(value) + if(reaction != "EX_thbpt_e" and reaction != "EX_lac__L_e"): + model.reactions.get_by_id(reaction).lower_bound = -float(value) + if(reaction == "EX_lac__L_e"): + model.reactions.get_by_id(reaction).lower_bound = float(0.0) + # Perform Flux Variability Analysis (FVA) df_FVA = cobra.flux_analysis.flux_variability_analysis(model, fraction_of_optimum=0, processes=1).round(8) @@ -199,7 +203,7 @@ #Parallel(n_jobs=cpu_count())(delayed(process_ras_cell)(cellName, ras_row, model, rxns_ids, output_folder) for cellName, ras_row in ras.iterrows()) for cellName, ras_row in ras.iterrows(): process_ras_cell(cellName, ras_row, model, rxns_ids, output_folder) - break + break #just one cell for testing else: model_new = model.copy() apply_ras_bounds(model_new, pd.Series([1]*len(rxns_ids), index=rxns_ids), rxns_ids)