comparison COBRAxy/ras_to_bounds.py @ 63:5302258f8262 draft

Uploaded
author luca_milaz
date Sun, 13 Oct 2024 08:11:43 +0000
parents 14076662f687
children b10da5046afd
comparison
equal deleted inserted replaced
62:14076662f687 63:5302258f8262
121 for reaction in rxns_ids: 121 for reaction in rxns_ids:
122 if reaction in ras_row.index: 122 if reaction in ras_row.index:
123 scaling_factor = ras_row[reaction] 123 scaling_factor = ras_row[reaction]
124 lower_bound=model.reactions.get_by_id(reaction).lower_bound 124 lower_bound=model.reactions.get_by_id(reaction).lower_bound
125 upper_bound=model.reactions.get_by_id(reaction).upper_bound 125 upper_bound=model.reactions.get_by_id(reaction).upper_bound
126 warning("Reaction: "+reaction+" Lower Bound: "+str(lower_bound)+" Upper Bound: "+str(upper_bound)+" Scaling Factor: "+str(scaling_factor))
126 valMax=float((upper_bound)*scaling_factor) 127 valMax=float((upper_bound)*scaling_factor)
127 valMin=float((lower_bound)*scaling_factor) 128 valMin=float((lower_bound)*scaling_factor)
128 if upper_bound!=0 and lower_bound==0: 129 if upper_bound!=0 and lower_bound==0:
129 model.reactions.get_by_id(reaction).upper_bound=valMax 130 model.reactions.get_by_id(reaction).upper_bound=valMax
130 if upper_bound==0 and lower_bound!=0: 131 if upper_bound==0 and lower_bound!=0: