SBML.org — the global portal for all things SBML

User's Manual

At first, we assume that the required database files are located in the current directory as follows:

  1. KEGG Metabolic Pathway database *.coord or *.conf files

(Basically, the same pathway information is stored in each format file for the same pathway map.)

a) *.coord files
   ./PATHWAY/aae/aae00010_cpd.coord
            /aae/aae00010_gene.coord
            /aae/aae00010_orth.coord
            /aae/aae00010_rn.coord
            /aae/aae00020_cpd.coord
            ...
            ...
            /zmo/zmo00980_cpd.coord
            /zmo/zmo00980_gene.coord
            /zmo/zmo00980_orth.coord
            /zmo/zmo00980_rn.coord

     -------------------------------------------------------------
     4 files (_cpd.coord, _gene.coord, _orth.coord, and _rn.coord
     located in the same directory) are required to convert one map.
     -------------------------------------------------------------

 b) *.conf files
   ./PATHWAY/aae/aae00010.conf
            /aae/aae00020.conf
            ...
            ...
            /map/map00010.conf
            ...
            ...
            /orth/rn00010.conf
            ...
            ...
            /zmo/zmo00980.conf

     -------------------------------------------------------------
     3 files (***XXXXX.conf and corresponding /map/mapXXXXX.conf
     and /orth/rnXXXXX.conf located in different directories) are
     required to convert one map.
     -------------------------------------------------------------
  1. LIGAND database file
./LIGAND/compound
        /enzyme
        /reaction
        /reaction_mapformula.lst

(/LIGAND are default directory for LIGAND database files)

To convert a KEGG pathway file to an SBML Level 2 Version 1 file with CellDesigner annotation tags for CellDesigner 3.0 or later (default), type:

 % kegg2sbml ./PATHWAY/aae/aae00010_cpd.coord

or

 % kegg2sbml ./PATHWAY/aae/aae00010.conf

In this example, a converted SBML file will be generated as './SBML/aae/aae00010.xml'. (./SBML is the default directory in which generated SBML files are located.)

If you want to generate an SBML Level 2 Version 1 file without CellDesigner annotation tags, add "-c 0" option as follows:

 % kegg2sbml -l 2 -v 1 -c 0 ./PATHWAY/aae/aae00010.conf

Similarly, you can generate an SBML Level 2 Version 3 file without CellDesigner annotation tags as follows: (only a version number changed)

 % kegg2sbml -l 2 -v 3 -c 0 ./PATHWAY/aae/aae00010.conf

Currently, CellDesigner annotation tags for SBML Level 2 Version 2 or later is not supporeted. Thus, a warning message will be shown when you try to generate an SBML Level 2 Version 2 or later with CellDesigner annotation tags. (In this case, an SBML file without annotation tags will be generated.)

If you want to convert all KEGG *.coord files under some species directory and put generated SBML files into './SBML.l2v1/' directory, add "-d ./SBML.l2v1" option and species directory names as follows:

 % kegg2sbml -l 2 -v 1 -d SBML.l2v1 ./PATHWAY/aae ./PATHWAY/cel

In this example, all KEGG *.coord files under './PATHWAY/aae/' and './PATHWAY/cel/' directories will be converted to SBML Level 2 Version 1 files with CellDesigner annotation tags for CellDesigner version 3.0 or later, and the generated SBML files will be located at './SBML.l2v1/aae/aae*.xml' and './SBML.l2v1/cel/cel*.xml', respectively. If a directory name is given as an argument, all *.coord files in the directory will be converted by default.

If you want to convert all KEGG *.conf files under some species directory, add -o option as follows:

 % kegg2sbml -o ./PATHWAY/dme ./PATHWAY/eco

If you want to convert all KEGG *.coord files under './PATHWAY/???/' directory (??? match all directory names in the "PATHWAY" directory) and put generated SBML Level 2 Version 3 files without annotation tags into './SBML.l2v3/' directory, add "-a ./PATHWAY" option as follows:

 % kegg2sbml -l 2 -v 3 -d SBML.l2v3 -a ./PATHWAY

In this example, all KEGG *.coord files under './PATHWAY/???/' directories will be converted to SBML Level 2 Version 3 files without annotation tags and generated files will be located at './SBML.l2v3/???/???*.xml', respectively.

By default, each LIGAND database file is parsed and stored as a binary cache file (each file name ends with ".bin". For example, "reaction.bin" will be generated from "reaction" in the same directory) by kegg2sbml if the corresponding binary file doesn't exist in the LIGAND's directory. Also, by default, the cache files (if any) are read instead of original LIGAND database files when the corresponding LIGAND files are required by kegg2sbml. (The time for parsing LIGAND database files could be 10 times faster by using the cache files.)

You can explicitly make kegg2sbml to parse original LIGAND dababase files instead of the binary cache files by adding "-r" option as follows:

% kegg2sbml -r ./PATHWAY/aae/aae00010_cpd.coord

The binary cache files will not be used and will be updated if one of the required LIGAND database files was changed or updated.

For more detailed information, please refer to the following section.

Command line options

usage:

kegg2sbml [options] kegg_conf [kegg_conf2  kegg_conf3 ...]
kegg2sbml [options] -a kegg_pathway_directory

Options: [default value]

   -h
      Show this message.
   -d sbml_directory [SBML]
      Set the directory where SBML file is generated.
   -e
      Convert EnzymeID (ex. E1.2.3.4) to its name (ex. oxalate oxidase).
   -g ligand_database_directory [LIGAND]
      Set the directory in which four ligand database files
      (compound, reaction, enzyme, reaction_mapformula.lst) exist
   -n
      Use a gene name (ex. ACO1) instead of an EnzymeID (ex. E4.2.1.3)
      for an id attribute (SId data type) of an enzyme species tag
   -l sbml_level [1]
      Set the level of SBML file
   -v sbml_version [2]
      Set the version of SBML file
   -c flag [3.0]
      Set the version of CellDesigner for which kegg2sbml appends
      annotation elements.
      By default (3.0), annotation for CellDesigner version 3.0 or
      later will be appended to a generated SBML file.
      CellDesigner annotation will not be appened if zero is given
      or the given SBML level and version is Level 2 Version 2 or later.
      (Currently, CellDesigner annotation is not supported for SBML Level 2
       Version 2 or later).
   -a pathway_directory
      Convert all KEGG Pathway database files under the given pathway
      directory.
   -V
      Verbose output.
   -r
      Parse ligand database files instead of binary cache files
      located in the same directory.
      (default : read cache files (*.bin) )
   -o
      Parse *.conf files instead of *.coord files when a directory
      name is given as an argument or -a option is set.
      (default : parse *.coord files)

Performance Tip

KEGG2SBML parses LIGAND database files ('compound', 'enzyme', 'reaction', reaction_mapformula.lst') before converting given KEGG pathway files (*.coord or *.conf files). Although the parse is much time-consuming compared with converting a KEGG pathway file, the parse is executed only once at runtime. Thus, if you want to convert multiple KEGG pathway files, you should give all pathway files as command line arguments as follows:

 % kegg2sbml ./PATHWAY/aae ./PATHWAY/cel  ./PATHWAY/ypk

You should not execute kegg2sbml as follows:

 % for i in ./PATHWAY/aae ./PATHWAY/cel ./PATHWAY/ypk
    do
        kegg2sbml $i
    done

Since kegg2sbml version 1.5.0, parsed LIGAND database files are stored as binary cache files and used next time instead of parsing the database files to speed up the process. Thus, the above problem is alleviated to some extent. However, the overhead of system call is not still negligible in the latter example and thus the above for loop should not be used.

Retrieved from "http://sbml.org/Software/KEGG2SBML/User%27s_Manual"

This page was last modified 12:50, 28 July 2008.



Please use our issue tracking system for any questions or suggestions about this website. This page was last modified 12:50, 28 July 2008.