From System Biology Format Converter framework (SBFC)
Jump to: navigation, search

Conversion from SBML to DOT


About SBML
SBML is a machine-readable format for representing models. It's oriented towards describing systems where biological entities are involved in, and modified by, processes that occur over time. An example of this is a network of biochemical reactions. SBML's framework is suitable for representing models commonly found in research on a number of topics, including cell signaling pathways, metabolic pathways, biochemical reactions, gene regulation, and many others. If you want to know more, you can read the Basic Introduction on SBML
About DOT
DOT is the language used to encode the graphics processed by GraphViz. DOT is a plain text graph description language. It is a simple way of describing graphs that both humans and computer programs can use. Various programs can process DOT files. Some, like OmniGraffle, dot, neato, twopi, circo, fdp, and sfdp, will read a DOT file and render it in graphical form. Others, like gvpr, gc, accyclic, ccomps, sccmap, and tred, will read a DOT file and perform calculations on the represented graph. Finally, others, like GVedit, KGraphEditor, lefty, dotty, and grappa, provide an interactive interface. Most programs are part of the Graphviz package or use it internally (definition from the DOT Article on wikipedia).


The converter will first generate a dot file from a SBML file and then will use the dot program from graphviz to generate an svg, png file or any output format supported by dot.

All the SBML species will be transformed into a dot node with a shape corresponding to their SBGN closest glyph (Process Description L1). The SBGN glyph is determined using either the sboTerm attribute of the species or using the MIRIAM annotations of the species, both should point to the same SBGN glyph but in case of uncertainty, the sboTerm is being used over the annotations.

To know more about these different points, you would have to read the SBML and SBGN specifications. In particular, the section 5 of the SBML level 3 specifications for explanations of how to use and interpret the sboTerm attribute on SBML elements and the section 6 to know more about annotations of SBML elements. The link between an sboTerm and a SBGN glyph is made directly in the SBGN Process Description L1 specifications. The link between the Miriam datatypes and a SBGN glyph is made through a series of constraint define in a XML file that will not be described here.

Then all the reactions will be transformed as well into a dot node with a shape corresponding to their SBGN closest glyph. To finish, we use the list of reactants, products and modifers of each reactions to create some edges from the reaction nodes to the species nodes. The shape of the arrow are again determined using the sboTerm attribute of the speciesReferences.

The resulting graph is not SBGN compliant, the dot language does not allow us to define easily all the SBGN glyph. The anchor of the edges are not at the proper place as well.

SBML elements not supported
  • most of them, only species and reaction are converted


You can download SBML2DOT here:

End users

To run SBML2DOT you need java 1.6 or higher and GraphViz (to generate other output than '.dot').

After unpacking the zipped file, move to the folder that have been created and run:

    # Convert SBML (any *.xml files if you put a folder) to dot directly
    # The output file(s) will be in the same folder as the SBML file(s) with an extension .dot
    ./ [file.xml | folder]


To compile SBML2DOT from source, you also need Apache Ant 1.6.5 or higher.

After editing the source code you can build the jar file by just typing in the SBML2DOT folder:

    # Generate the jar file
    ant jar

    # Generate the java documentation
    ant javadoc


If you are not running Linux or if the 'dot' program (from graphviz) is not available under the path '/usr/bin/dot' then you would have to provide the correct path to the converter. If you don't have Graphviz or don't want to install it, the converter will still work but the .dot file will not contain any layout

You have two solutions to provide the path to the 'dot' binary:

  • use the system property ""
    // Launching the SBFC GUI under windows
    java"c:\Program Files (x86)\Graphviz2.38\bin\dot.exe" −jar sbfc−x.y.z−standalone.jar

    // Launching the SBFC GUI under linux
    java −jar sbfc−x.y.z−standalone.jar

  • use the method Graphviz.setDotPath(String)

If you use SBFC from your own code, you can use the method org.util.graphviz.GraphViz.setDotPath(String) to change the path used to run 'dot'

Getting Help and Support

In case you discover a bug within SBFC or request new features, please let us know. There are two dedicated trackers:

For general discussions about SBFC, please use the forum:

sbfc-forum [at]

If you need further support or you wish to develop new modules in SBFC you can contact the team using the following e-mail address:

sbfc-devel [at]

Other known converters