Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SBML format convertion into Json file #54

Open
math248 opened this issue Oct 14, 2019 · 5 comments
Open

SBML format convertion into Json file #54

math248 opened this issue Oct 14, 2019 · 5 comments

Comments

@math248
Copy link

math248 commented Oct 14, 2019

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
Copy link
Member

draeger commented Oct 14, 2019

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
Copy link
Author

math248 commented Oct 16, 2019

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
Copy link
Member

draeger commented Oct 16, 2019

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
Copy link

rehamathur commented Mar 8, 2024

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
Copy link
Member

draeger commented Apr 25, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants