biosimulators_utils.viz.vega.escher package#
Submodules#
biosimulators_utils.viz.vega.escher.core module#
Utility for converting metabolic maps from Escher to Vega format
- Author:
Jonathan Karr <karr@mssm.edu>
- Date:
2021-02-06
- Copyright:
2021, Center for Reproducible Biomedical Modeling
- License:
MIT
- biosimulators_utils.viz.vega.escher.core.escher_to_vega(reaction_fluxes_data_set, escher_filename, vega_filename, max_width_height=800, legend_padding=20, legend_width=40, signal_height=20, arrow_head_gap=16.0, indent=2, metabolic_map_data_file=None)[source]#
Convert a metabolic pathway map from Escher format to Vega format.
- Parameters:
reaction_fluxes_data_set (
dict
) –Vega data set with each predicted reaction flux. The dictionary should have one of the following schemas
Contain a key
values
whose value is a list of the predicted flux values. Each predicted flux value should be a dictionary with two keyslabel
: value should be the BiGG identifier of the corresponding reactionvalues
: array with a single value equal to the predicted flux
Contain a key
url
whose value is a URL where the predicted flux values can be retrieved in JSON format. The data should be in the same format outlined above.Contain a key
sedmlUri
whose value is an array which contains two elements that indicateThe location of the SED-ML file (within its parent COMBINE/OMEX archive) which will produce the flux predictions for the visualization
The id of the SED-ML report which will contain the flux predictions for the visualization
escher_filename (
str
) – path to the visualization in Escher formatvega_filename (
str
) – path to save the visualization in Vega formatmax_width_height (
int
, optional) – maximum height/width of the metabolic map in pixelslegend_padding (
int
, optional) – horizontal spacing between the metabolic map and legend in pixelslegend_width (
int
, optional) – legend width in pixels, including the width of the titlesignal_height (
int
, optional) – height of signals in pixelsarrow_head_gap (
float
, optional) – spacing between arrow heads and nodesindent (
int
orNone
, optional) – indentationmetabolic_map_data_file (
dict
orNone
, optional) – IfNone
, store the data for the metabolic map (e.g., coordinates of metabolites, reactions) inline within the generated Vega file. If notNone
, store the data for the metabolic map in a separate file to be loaded via a URL. In this case, the argument must be a dictionary which two keys,filename
andurl
which indicate where the data should be saved and where this file will be hosted.