Mercurial > repos > bimib > cobraxy
comparison COBRAxy/rps_generator.py @ 326:3dccdf56cb24 draft
Uploaded
author | francesco_lapi |
---|---|
date | Mon, 30 Jun 2025 11:07:55 +0000 |
parents | 7b8d9de81a86 |
children |
comparison
equal
deleted
inserted
replaced
325:2aea7e27ae0f | 326:3dccdf56cb24 |
---|---|
169 dict: A dictionary containing Reaction Propensity Scores (RPS) where keys are reaction names and values are the corresponding RPS scores. | 169 dict: A dictionary containing Reaction Propensity Scores (RPS) where keys are reaction names and values are the corresponding RPS scores. |
170 """ | 170 """ |
171 rps_scores = {} | 171 rps_scores = {} |
172 | 172 |
173 for reaction_name, substrates in reactions.items(): | 173 for reaction_name, substrates in reactions.items(): |
174 total_contribution = 1 | 174 total_contribution = 0 |
175 metab_significant = False | 175 metab_significant = False |
176 for metabolite, stoichiometry in substrates.items(): | 176 for metabolite, stoichiometry in substrates.items(): |
177 abundance = 1 if math.isnan(abundances[metabolite]) else abundances[metabolite] | 177 abundance = 1 if math.isnan(abundances[metabolite]) else abundances[metabolite] |
178 if metabolite not in black_list and metabolite not in missing_list: | 178 if metabolite not in black_list and metabolite not in missing_list: |
179 metab_significant = True | 179 metab_significant = True |