draeger-lab / EscherConverter

A standalone program that reads files created with the graphical network editor Escher and converts them to files in community standard formats.
https://draeger-lab.github.io/EscherConverter/
MIT License
15 stars 10 forks source link

SBML format convertion into Json file #54

Open math248 opened 5 years ago

math248 commented 5 years ago

Hello everyone, I am new to Escher converter and I was wondering if : First, convert directly ,using a python code, a SBML file (containing a model at a genome scale) into a Json file in order to export a map of all the reactions and metabolites present in the model. Secondly, do we have to build the map manually ? or is there a quicker way maybe using a python code library ? Finally, I saw an automatic pipeline using escher allowing the user to graphically change the fluxes and predict an objective function using the FBA nor the FVA. Is there any documentation on this pipeline ? Thanks in advance guys :-)

draeger commented 5 years ago

Dear @math248,

Let me answer your first two questions: If your input SBML file contains a layout, i.e., the position and size of objects such as metabolites and reaction arcs, EscherConverter will write this information into a JSON file that Escher can read and display. If your SBML file does not contain any layout information, EscherConverter does not infer any coordinates for you. You will, therefore, need to draw a network first and then you can convert between different file formats using EscherConverter.

About your third question: The example you saw is Escher-specific. @zakandrewking can certainly answer questions about this.

math248 commented 5 years ago

So, If I understand correctly if I am using a model already built at a genome scale ( I am using the chlorella vulagaris UTEX395 from this article, http://www.plantphysiol.org/content/172/1/589/tab-figures-data ), I don't have any layout enabling me to visualize my network. And by layout you mean infered coordinates of the model itself right ? And I will need to build this layout from the Escher website as soon as I converted the xml file into a Json one.

thank you again :-)

draeger commented 5 years ago

I just took a look at the models in the supplement of the article you cited.

First of all, these are encoded in a relatively old version of SBML (from 28 June 2003). It is strongly recommended to upgrade that format to at least SBML Level 3 Version 1 before continuing working with it. You can find an online converter at the website of the European Bioinformatics Institute (the Systems Biology Format Converter) that should do the job for you. If it doesn't work, I can recommend using the JSBML to convert the files yourself.

Since Level 3, SBML allows you to include extension packages that provide additional features to the model. One such extension is the SBML Layout package. It contains positions and sizes of graphical objects that correspond to model components. There are multiple ways how you can create a layout to a model. Escher has helpful functions for that, but it does not directly understand the SBML format. You can convert between Escher's JSON files and SBML Level 3 with Layout information using EscherConverter. You can also draw your network using other software that directly supports SBML with layout or SBGN-ML, which in turn can be converted to Escher's JSON format. One alternative tool would be Krayons4SBGN.

The SBML files from the publication you cited do not contain any extension packages and thus no layout information. You can also post questions about how to proceed with this to the SBML discussion mailing list.

rehamathur commented 9 months ago

Hi! We are trying to convert this Recon2D map into an Escher file using EscherConverter but we cannot find the command to save the SBML file into a json file. How would you do this on either the gui or in the command line. We can read the file into EscherConverter, but we cannot save it as a json using the gui. We further tried to use the command line tool to write it into a json output, but firstly it seems that the EscherConvert only takes in a json file as an input in command line mode and second, it appears that the output options are only extended sbml and sbgn. Thanks!

draeger commented 7 months ago

Dear @rehamathur, isn't the Recon2D map already available in JSON format?