Mercurial > repos > bimib > cobraxy
comparison COBRAxy/ras_to_bounds.py @ 116:734cc52537da draft
Uploaded
author | luca_milaz |
---|---|
date | Sun, 13 Oct 2024 16:17:42 +0000 |
parents | 867a965d6a57 |
children | 69190617d1ea |
comparison
equal
deleted
inserted
replaced
115:867a965d6a57 | 116:734cc52537da |
---|---|
122 mediumRxns_ids (list of str): List of reaction IDs in the medium. Their RAS is set to zero, but they are already set in the model. | 122 mediumRxns_ids (list of str): List of reaction IDs in the medium. Their RAS is set to zero, but they are already set in the model. |
123 Returns: | 123 Returns: |
124 None | 124 None |
125 """ | 125 """ |
126 warning(str(model.reactions.get_by_id("EX_Lcystin_e").lower_bound)) | 126 warning(str(model.reactions.get_by_id("EX_Lcystin_e").lower_bound)) |
127 warning(str(model.reactions.get_by_id("EX_Lcystin_e").upper_bound)) | |
127 for reaction in rxns_ids: | 128 for reaction in rxns_ids: |
128 if reaction in ras_row.index: #and reaction not in mediumRxns_ids | 129 if reaction in ras_row.index: #and reaction not in mediumRxns_ids |
129 scaling_factor = ras_row[reaction] | 130 scaling_factor = ras_row[reaction] |
130 lower_bound=model.reactions.get_by_id(reaction).lower_bound | 131 lower_bound=model.reactions.get_by_id(reaction).lower_bound |
131 upper_bound=model.reactions.get_by_id(reaction).upper_bound | 132 upper_bound=model.reactions.get_by_id(reaction).upper_bound |
137 model.reactions.get_by_id(reaction).lower_bound=valMin | 138 model.reactions.get_by_id(reaction).lower_bound=valMin |
138 if upper_bound!=0 and lower_bound!=0: | 139 if upper_bound!=0 and lower_bound!=0: |
139 model.reactions.get_by_id(reaction).lower_bound=valMin | 140 model.reactions.get_by_id(reaction).lower_bound=valMin |
140 model.reactions.get_by_id(reaction).upper_bound=valMax | 141 model.reactions.get_by_id(reaction).upper_bound=valMax |
141 warning(str(model.reactions.get_by_id("EX_Lcystin_e").lower_bound)) | 142 warning(str(model.reactions.get_by_id("EX_Lcystin_e").lower_bound)) |
143 warning(str(model.reactions.get_by_id("EX_Lcystin_e").upper_bound)) | |
142 pass | 144 pass |
143 | 145 |
144 def process_ras_cell(cellName, ras_row, model, rxns_ids, mediumRxns_ids, output_folder): | 146 def process_ras_cell(cellName, ras_row, model, rxns_ids, mediumRxns_ids, output_folder): |
145 """ | 147 """ |
146 Process a single RAS cell, apply bounds, and save the bounds to a CSV file. | 148 Process a single RAS cell, apply bounds, and save the bounds to a CSV file. |