A few rudimentary functions to generate metabolite graphs from SBML models. Uses ReFramed and one CarveMe function.
Includes a test jupyter-notebook with files to try it with.
This function takes a given SBML model and simulates its growth on a given medium. Then returns a list of metabolites that are the "spent media", that is, the original media with the model's secretions and without the nutrients that the model has fully consumed.
Specifically, the "consumed" metabolites are specified by the user with the "to_remove" argument. But the products are automatically identified by parsing the ReFramed simulation results and saving the products of exchange type reactions with positive flux (if the flux is positive, metabolites are being excreted).
In metabolic models, there are normally three different types of pre-defined boundary reactions, according to the COBRA documentation: exchange, demand, and sink reactions. An exchange reaction is "a reversible reaction that adds to or removes an extracellular metabolite from the extracellular compartment", so that's why we are interested in those.
my_draw()
helper function. Uses "bigg_models_metabolites.txt" to turn BIGG IDs into pretty names for the graph.
my_draw()
helper function. Applies weights (fluxes) and selects reactions by flux and by reversibility or irreversibility.
Draws graphs.