You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was wondering if it was possible to implement a way for Escher to wrap around a model object in cobrapy or cameo, such that if one makes changes to the model, they are reflected in the map too.
For example, let's say I'm reconstructing a model from scratch and I wanted to build an Escher map alongside. I would always have to work on the model first, then stop, load it into Escher, layout the reactions and then continue with working on the model. And later, once the draft is reconstructed, if I needed to change let's say IDs or reaction-directionality, I would have to do this in the model and the escher map separately. So my suggestion would be some form of wrapping that captures certain operations done in cobrapy and replicates them in Escher.
Here is a bit of mock-up code to illustrate how this could look like:
from cobrapy.io.json import read_json_model
model = read_json_model('SOMEMODEL.json')
wrapper = Wrapper(model)
builder = Builder(map_json='SOMEMAP.json', model=wrapper)
builder.display_in_browser()
wrapper.add_reaction('MDH')
wrapper.reaction.MDH.id = 'MNXR101439'
The text was updated successfully, but these errors were encountered:
This would be fantastic. I have been thinking about the kinds of features we would want if we re-wrote the Python package for Escher. Right now, we are using an old-school approach for embedding Escher in Jupyter, and the data only goes in one direction. But now, with Jupyter Widgets, we could implement two-way bindings like you describe.
It would take some work, but I'm excited to see it happen. I added it to our roadmap:
Hi @zakandrewking ,
I was wondering if it was possible to implement a way for Escher to wrap around a model object in cobrapy or cameo, such that if one makes changes to the model, they are reflected in the map too.
For example, let's say I'm reconstructing a model from scratch and I wanted to build an Escher map alongside. I would always have to work on the model first, then stop, load it into Escher, layout the reactions and then continue with working on the model. And later, once the draft is reconstructed, if I needed to change let's say IDs or reaction-directionality, I would have to do this in the model and the escher map separately. So my suggestion would be some form of wrapping that captures certain operations done in cobrapy and replicates them in Escher.
Here is a bit of mock-up code to illustrate how this could look like:
The text was updated successfully, but these errors were encountered: