7.1.1.4.1.3. cobramod.visualization.escher

Added in version 1.3.0.

This module contains an alternative Python integration for Escher .

7.1.1.4.1.3.1. Classes

ReactionScale

Added in version 1.3.0.

EscherIntegration

Added in version 1.3.0.

7.1.1.4.1.3.2. Module Contents

class cobramod.visualization.escher.ReactionScale

Bases: TypedDict

Added in version 1.3.0.

A Python class that represents the options available in Escher. It defines one point on the color scale.

Parameters:
  • type (Literal["min", "max", "mean", "median", "Q1", "Q3", "value"]) – The type of definition. A specific value can be used here (value), by means of quantiles (“Q1” or “Q3”) or by means of minimum maximum median or mean.

  • value (Optional[float]) – It is only used to set the value if type value was used.

  • color (str) – The color to be used for the specified area.

  • size (int) – The width of the reactions covered by this definition.

Notes

ReactionScale should only be an orientation for the possible options in Python. For further explanations and examples, please refer to Escher’s JavaScript documentation for ‘escher.Builder.options.reaction_scale’.

type: Literal['min', 'max', 'mean', 'median', 'Q1', 'Q3', 'value']
value: float | None
color: str
size: int
class cobramod.visualization.escher.EscherIntegration(map_name=None, map_json=None, reaction_data=None, reaction_scale=None, reaction_styles=None, never_ask_before_quit=False)

Bases: anywidget.AnyWidget

Added in version 1.3.0.

An alternative Python integration for Escher .

Parameters:
  • map_name (Optional[str])

  • map_json (Optional[str])

  • reaction_data (Optional[Dict[str, float]])

  • reaction_scale (Optional[List[ReactionScale]])

  • reaction_styles (Optional[List[Any]])

  • never_ask_before_quit (bool)

reaction_styles: List[Any] | None
map_name
map_json
reaction_scale
reaction_data: Dict[str, float] | None
never_ask_before_quit
property model_data
property embedded_css
property options
save_html(filepath)

This method creates a standalone HTML file that contains all the data of the Escher map and loads it automatically when it is opened.

Parameters:

filepath (Union[str, pathlib.Path]) – The file in which the HTML file is to be saved.