Escher, a quick tour

Set up the conda environment

conda create -n escher python=3.8
conda activate escher
pip install escher

Cautions

To start, from a terminal

conda activate escher
jupyter notebook escher_tutorial_20201208.ipynb

The builder object

The builder object is the bread and butter of the Escher Jupyter API. It provides a unique interface to deal with maps, models and data.

To create a new one, simply:

Without more instructions, the widget is empty: we do not specified which map to use. Notice it's look very similar to what we can see using the web interface of Escher. We can actually use the embedded menu to set map, model and / or data. But, ..., let's use Python command line instructions instead :)

Creating a new map

Using the model_json argument, we tell Escher that we want to use the entities listed in the iJO1366 metabolic model. This is a the E. coli model published in 2011, by Palsson et al, publicly available on the BiGG database http://bigg.ucsd.edu/models/iJO1366.

Nothing new... apparently. Actually, while we did not specified how to show the entities listed in the model, yet these entities are available. For instance, one can create a new map for E. coli following these steps:

  1. click on the spanner (ndlr: la clé à molette !)
  2. click anywhere in the builder area
  3. start to write the name of the compound of interest (eg: glu)
  4. select the reaction of interest in the menu (clic twice to validate)
  5. repeat steps 3-4 as needed

Nodes and arrows can be reorganized. Tips: in fullscreen mode, Ctrl-Z to undo changes.

Notice: change will be lost if the notebook cell is executed again. To save the map, one can go to Map > Save map JSON from the builder menu.

Loading an existing map

There is a collection of maps available from the Escher website:

To load one of these maps we use the map_name argument. Here, it's the core metabolism associated to E. coli:

From there, one can:

We can also load the map we created (and saved) previously using the map_json argument:

Limitation: entites not listed in the map cannot be mapped

Let's point out a strong limitation. Here,

Reactions in red are those described in the B. subtilis model. Some of them are likely to exist in B. subtilis cells, but they are not mapped either because not described in the model, or not referenced with the same reaction ID.

What to do in such situation? There is no easy solution:

Viewing quantitative data

Escher provides methods to overlay user data on top of the metabolic maps.

These data can be provided by files, or be the results of simulation performed "on the fly" using the model.

Viewing data on reactions

Using the builder.reaction_data attribute

The view can be refined after the generation. The builder widget is automatically updated.

> Simplify the map by hiding metabolites considered as secondary

> Customize the scale

> There are available scale presets

> Make all the arrows three times as thick

Using the builder.metabolite_data attribute

Using the builder.gene_data.

Viewing data from model simulations

Escher enables cobra simulation directly from the Builder object. To perform this, the model should be loaded.

FBA simulation optimizing biomass production in E. coli cells:

Add some data for metabolites