Layout Services

To make it easy to visualize SBGN or SBML Models with the Layout / Render Packages, the following uris accept the posting of an SBML model.

GenerateImage

This action generates a PNG for a posted SBML / SBGN file. Should the file contain no SBML Layout, one will be generated. So how does this work. The URL to use is:

http://sysbioapps.spdns.org/Layout/GenerateImage

You simply post to this URL the following HTTP Form elements:

file         - the SBML file
scale        - an optional floating point scale for the image (defaults to 2)
height       - scale image to fit the height
width        - scale image to fit width 

If height is given, width needs to be given as well.

GetLayoutSBML

This action simply loads the given SBML file, and writes it out using the SBML Layout library. Should no layout, exist, one will be generated. The URL is:

http://sysbioapps.spdns.org/Layout/GetLayoutSBML

You simply post to this URL the following HTTP Form elements:

file         - the SBML file

Example

So for example, if you wanted to post a local file to the service with curl, you'd run:

curl -X POST -F file=@".\BorisEJB.xml" http://sysbioapps.spdns.org/Layout/GenerateImage -o out.png

lets take the arguments apart:

  • -X POST post FORM data
  • -F file=@filename post filename to the URL
  • http://sysbioapps.spdns.org/Layout/GenerateImage the URL
  • -o out.png write the resulting PNG to the current directory as out.png.