Mercurial > repos > bimib > cobraxy
comparison COBRAxy/custom_data_generator.py @ 25:80bfd8743ea6 draft
Uploaded
| author | luca_milaz |
|---|---|
| date | Thu, 19 Sep 2024 08:06:59 +0000 |
| parents | 20c30b1a032d |
| children | 4c9ade74c4d7 |
comparison
equal
deleted
inserted
replaced
| 24:c5dbdbb64cef | 25:80bfd8743ea6 |
|---|---|
| 186 rules = generate_rules(model, asParsed = False) | 186 rules = generate_rules(model, asParsed = False) |
| 187 reactions = generate_reactions(model, asParsed = False) | 187 reactions = generate_reactions(model, asParsed = False) |
| 188 bounds = generate_bounds(model) | 188 bounds = generate_bounds(model) |
| 189 medium = get_medium(model) | 189 medium = get_medium(model) |
| 190 | 190 |
| 191 rulesPath = utils.FilePath("rules", "csv") | 191 |
| 192 reactionsPath = utils.FilePath("reactions", "csv") | 192 save_as_csv(rules, ARGS.out_rules, ("ReactionID", "Rule")) |
| 193 boundsPath = utils.FilePath("bounds", "csv") | 193 save_as_csv(reactions, ARGS.out_reactions, ("ReactionID", "Reaction")) |
| 194 mediumPath = utils.FilePath("medium", "csv") | 194 bounds.to_csv(ARGS.out_bounds, sep = '\t') |
| 195 | 195 medium.to_csv(ARGS.out_medium, sep = '\t') |
| 196 save_as_csv(rules, rulesPath, ("ReactionID", "Rule")) | |
| 197 save_as_csv(reactions, reactionsPath, ("ReactionID", "Reaction")) | |
| 198 bounds.to_csv(boundsPath.show(), sep = '\t') | |
| 199 medium.to_csv(mediumPath.show(), sep = '\t') | |
| 200 | 196 |
| 201 | 197 |
| 202 # ^ Please if anyone works on this after updating python to 3.12 change the if/elif into a match statement!! | 198 # ^ Please if anyone works on this after updating python to 3.12 change the if/elif into a match statement!! |
| 203 | 199 |
| 204 if __name__ == '__main__': | 200 if __name__ == '__main__': |
