Escher._bezierMethod
_bezier(t, p0, p1, p2, p3) -> Any

Plot a Bezier curve with t in [0,1] and fixed points p0, p1, p2, p3.

Escher._curve_idxMethod
_curve_idx(segment, fraction) -> Any

Helper function to approximately measure the length of a curve contained in segment, and return the index of the first point that is fraction larger than the total length

Escher._edgesMethod
_edges(escher, node_pos_lookup, metabolite_id_lookup; reaction_identifier, reaction_show_name_instead_of_id, reaction_edge_colors, reaction_edge_color, reaction_edge_widths, reaction_edge_width) -> Tuple{NamedTuple{(:positions, :labels), Tuple{Vector{Tuple{Float64, Float64}}, Vector{String}}}, Vector{Any}}

A helper function to get edge information from escher. Kwargs set plot details.

Escher._euclidian_distMethod
_euclidian_dist(p1, p2) -> Any

A helper function to calculate the Euclidian distance between points p1 and p2.

Escher._nodesMethod
_nodes(escher; primary_node_size, secondary_node_size, metabolite_identifier, metabolite_node_sizes, metabolite_node_colors, metabolite_node_color) -> Tuple{NamedTuple{(:ids, :positions, :colors, :label_positions, :alignments, :justifications, :markersizes, :labels), Tuple{Vector{String}, Vector{Tuple{Float64, Float64}}, Vector{Any}, Vector{Tuple{Float64, Float64}}, Vector{Tuple{Symbol, Symbol}}, Vector{Symbol}, Vector{Float64}, Vector{String}}}, Dict{Any, Any}}

Helper function to extract node information from escher. The kwargs set plot details.

Escher._text_annotationsMethod
_text_annotations(escher) -> NamedTuple{(:positions, :labels), Tuple{Vector{Tuple{Float64, Float64}}, Vector{String}}}

Return an named tuple of text annotation mappings. The fields are positions, which maps x, y coordinates to the field labels.

Escher.escherplot!Method

Plot a metabolic map that is compatible with Escher. The only required argument is the location of the metabolic map in json format.

Example

escherplot("core-map.json"; kwargs...)

Here kwargs are supported attributes, see the readme for more information.

Attributes

metabolite_identifier = "bigg_id"
metabolite_show_text = false
metabolite_text_size = 4
metabolite_primary_node_size = 5 # fallback size
metabolite_secondary_node_size = 3 # fallback size
metabolite_node_sizes = Dict{String,Any}()
metabolite_node_colors = Dict{String,Any}()
metabolite_node_color = :black # fallback color
metabolite_text_color = :black
reaction_identifier = "bigg_id"
reaction_show_text = false
reaction_show_name_instead_of_id = false
reaction_text_size = 4
reaction_text_color = :black
reaction_edge_colors = Dict{String,Any}() # actual color
reaction_edge_color = :black # fallback color
reaction_edge_widths = Dict{String,Any}() # actual edge width
reaction_edge_width = 2.0 # fallback width
reaction_arrow_size = 6
reaction_arrow_head_offset_fraction = 0.1 # between 0 and 1
reaction_directions = Dict{String,Tuple{Dict{String,Number},Symbol}}() # rid => (reaction stoichiometry, :forward, :backward, :bidirectional)
annotation_show_text = false
annotation_text_color = :black
annotation_text_size = 12

Get or create maps here: https://escher.github.io/#/.

Escher.escherplotMethod

Plot a metabolic map that is compatible with Escher. The only required argument is the location of the metabolic map in json format.

Example

escherplot("core-map.json"; kwargs...)

Here kwargs are supported attributes, see the readme for more information.

Attributes

metabolite_identifier = "bigg_id"
metabolite_show_text = false
metabolite_text_size = 4
metabolite_primary_node_size = 5 # fallback size
metabolite_secondary_node_size = 3 # fallback size
metabolite_node_sizes = Dict{String,Any}()
metabolite_node_colors = Dict{String,Any}()
metabolite_node_color = :black # fallback color
metabolite_text_color = :black
reaction_identifier = "bigg_id"
reaction_show_text = false
reaction_show_name_instead_of_id = false
reaction_text_size = 4
reaction_text_color = :black
reaction_edge_colors = Dict{String,Any}() # actual color
reaction_edge_color = :black # fallback color
reaction_edge_widths = Dict{String,Any}() # actual edge width
reaction_edge_width = 2.0 # fallback width
reaction_arrow_size = 6
reaction_arrow_head_offset_fraction = 0.1 # between 0 and 1
reaction_directions = Dict{String,Tuple{Dict{String,Number},Symbol}}() # rid => (reaction stoichiometry, :forward, :backward, :bidirectional)
annotation_show_text = false
annotation_text_color = :black
annotation_text_size = 12

Get or create maps here: https://escher.github.io/#/.

Escher.get_resolutionMethod
get_resolution(escher_location::String) -> NamedTuple{(:height, :width, :x, :y), _A} where _A<:NTuple{4, Any}

Return a named tuple with the dimensions of the escher map. Fields are height, width, x, and y. If the fields are missing in the supplied map, return missing.

Example

h,w,x,y = get_resolution(map_location)

f = Figure(resolution = (x, y))