# HG changeset patch # User luca_milaz # Date 1721418869 0 # Node ID 5229ce78799d2a107a358d31043a1e97b8c5a0a2 # Parent 74b162f74f4a1da9a9ec34b1045bc650e2d59a83 Uploaded diff -r 74b162f74f4a -r 5229ce78799d marea_2/custom_data_generator.py --- a/marea_2/custom_data_generator.py Fri Jul 19 19:51:19 2024 +0000 +++ b/marea_2/custom_data_generator.py Fri Jul 19 19:54:29 2024 +0000 @@ -120,18 +120,18 @@ return reactionUtils.create_reaction_dict(unparsedReactions) def get_medium(model:cobra.Model) -> list: - trueMedium=[] - for r in model.reactions: - positiveCoeff=0 - for m in r.metabolites: - if r.get_coefficient(m.id)>0: - positiveCoeff=1; - if (positiveCoeff==0 and r.lower_bound<0): - trueMedium.append(r) + trueMedium=[] + for r in model.reactions: + positiveCoeff=0 + for m in r.metabolites: + if r.get_coefficient(m.id)>0: + positiveCoeff=1; + if (positiveCoeff==0 and r.lower_bound<0): + trueMedium.append(r) df_medium = pd.DataFrame(columns="Reaction") df_medium["Reaction"] = trueMedium - return df_medium + return df_medium def generate_bounds(model:cobra.Model) -> Dict[ReactionId, Tuple[float, float]]: