opencobra / schema

xml/rdf schemas for annotating cobra models
Apache License 2.0
2 stars 1 forks source link

Coordinate data in SBML #12

Open Midnighter opened 6 years ago

Midnighter commented 6 years ago

From @jjkoehorst on December 21, 2017 6:56

In a different project we are looking into using Escher in combination with SBML to generate pathway layouts using standardised or home made models. In Escher a coordinate system in combination with json is used. Going from SBML to json should not be a big issue but it would be great if we could store the coordinates from the map into the JSON and then back to SBML.

Without re-inventing the wheel, what kind of SBML package could be wise to use to store map coordinates and does not interfere with memote? We havent implemented anything yet as we first would like to have an opinion of the more advanced users. And perhaps in the future this could be a good addition into memote?

Copied from original issue: opencobra/memote#288

Midnighter commented 6 years ago

From @ChristianLieven on December 21, 2017 8:50

As far as I know Escher comes with a converter that helps generating an SBML-formatted map from the Escher-native JSON format.

http://escher.readthedocs.io/en/stable/escherconverter.html?highlight=Export

Without re-inventing the wheel, what kind of SBML package could be wise to use to store map coordinates and does not interfere with memote?

Do I understand you correctly that you'd then also like to store the Escher map coordinates in the same SBML file that the underlying model lives in too? I don't know of a good way of doing that, but I am also not sure why you'd want do do that. In principle it should be possible to write any additional machine-readable information into the annotation fields of each component. So for each reaction you store the information there.

But then I don't think I am a reliable source of information here. Perhaps @bgoli, @draeger or @zakandrewking have some ideas.

Midnighter commented 6 years ago

In addition to what Christian said, memote relies on cobrapy to read in models. Cobrapy in turn uses libsbml. So anything that does not cause errors for either of those two components will not interfere with memote since we look for specific annotations and do not care for whatever else is there.

Midnighter commented 6 years ago

From @ChristianLieven on December 21, 2017 8:59

Actually I feel like this issue is better suited in https://github.com/opencobra/schema/issues or on the FBC mailing list (https://sourceforge.net/projects/sbml/lists/sbml-flux).

In case you wanted to kick off a discussion for a more permanent extension of the format.

Midnighter commented 6 years ago

From @jjkoehorst on December 21, 2017 9:43

@ChristianLieven @Midnighter thanks for the feedback. This indeed might be a more opencobra related topic. Can we move this ticket or should I open a new one?

Additionally, yes I want to store the coordinates back into SBML as this is the format often used within projects for collaboration. Then you can easily exchange and visualize the models and make updates and share again.

luciansmith commented 6 years ago

According to the Escher docs mentioned above (http://escher.readthedocs.io/en/stable/escherconverter.html?highlight=Export), it already supports export to SBML using the Layout extension (http://sbml.org/Documents/Specifications/SBML_Level_3/Packages/layout), which as far as I can tell is exactly what you want for storing coordinate and map information. So the information should already be stored; it's just a matter of coordinating that information with any other tools that need to read or write to it.

jjkoehorst commented 6 years ago

Yes indeed, must have missed it somehow, ill dive into it! (topic can be closed now)

draeger commented 6 years ago

And by the way, that converter is bi-directional, so that you can also take third-party models with layout information and convert them to Escher's JSON format.