Question: Convert Kegg Kgml To Graph
0
gravatar for Charly
4.9 years ago by
Charly50
Charly50 wrote:

Hello,

I ran Kegg/Kaas module and the pathways in xml format through KGML. is there a tool out there which can convert this to a graph?

I tried Visant but it always gives me some errors.

Thank you

xml kegg graph • 3.4k views
ADD COMMENTlink modified 4.7 years ago by Haluk170 • written 4.9 years ago by Charly50
3
gravatar for aheinzel
4.7 years ago by
aheinzel110
Austria
aheinzel110 wrote:

have a look at the bioconductor package KEGGgraph. In a recent How To Get The Topology Of A Kegg Pathway? I listed some of the KEGGgraph functions relevant to get a graph from KGML.

ADD COMMENTlink written 4.7 years ago by aheinzel110
1
gravatar for Pierre Lindenbaum
4.9 years ago by
France/Nantes/Institut du Thorax - INSERM UMR1087
Pierre Lindenbaum112k wrote:

I'm not an expert of KGML . I only played with http://code.google.com/p/kgmlreader/source/browse/trunk/KGMLReader/testData/kgml/non-metabolic/organisms/hsa/hsa04060.xml and I created a XSLT stylesheet ( https://github.com/lindenb/xslt-sandbox/blob/master/stylesheets/bio/kgml/kgml2gexf.xsl ) to convert this kgml to gexf (you can open it with http://www.gephi.org ).

$ xsltproc --novalid kgml2gexf.xsl \
  "http://kgmlreader.googlecode.com/svn/trunk/KGMLReader/testData/kgml/non-metabolic/organisms/hsa/hsa04060.xml" > result.gexf


<gexf xmlns="&lt;a href=" http:="" www.gexf.net="" 1.2draft"="" rel="nofollow">http://www.gexf.net/1.2draft" xmlns:g="http://www.gexf.net/1.2draft" xmlns:viz="http://www.
gexf.net/1.1draft/viz" version="1.2">
  <meta>
    <creator>Pierre Lindenbaum</creator>
    <description>KGML</description>
  </meta>
  <attributes class="node">
    <attribute id="0" title="gene" type="string"/>
    <attribute id="1" title="url" type="string"/>
  </attributes>
  <attributes class="edge">
    <attribute id="10" title="type" type="string"/>
  </attributes>
  <graph mode="static" defaultedgetype="directed">
    <nodes>
      <node id="1" label="hsa:53833">
        <attvalues>
          <attvalue for="0" value="gene"/>
          <attvalue for="1" value="&lt;a href=" http:="" www.kegg.jp="" dbget-bin="" www_bget?hsa:53833"="" rel="nofollow">http://www.kegg.jp/dbget-bin/www_bget?hsa:53833"/>
        </attvalues>
      </node>
      <node id="2" label="hsa:53833">
        <attvalues>
          <attvalue for="0" value="gene"/>
          <attvalue for="1" value="&lt;a href=" http:="" www.kegg.jp="" dbget-bin="" www_bget?hsa:53833"="" rel="nofollow">http://www.kegg.jp/dbget-bin/www_bget?hsa:53833"/>
        </attvalues>
      </node>
      <node id="3" label="hsa:3565">
        <attvalues>
          <attvalue for="0" value="gene"/>
          <attvalue for="1" value="&lt;a href=" http:="" www.kegg.jp="" dbget-bin="" www_bget?hsa:3565"="" rel="nofollow">http://www.kegg.jp/dbget-bin/www_bget?hsa:3565"/>
        </attvalues>
      </node>
     (...)
ADD COMMENTlink written 4.9 years ago by Pierre Lindenbaum112k
1
gravatar for Haluk
4.7 years ago by
Haluk170
Lincoln, Nebraska
Haluk170 wrote:

I wrote a python script to convert KGML to directed graphs. Also, it converts them to DAGs. If you don't need it, you may customize the kegg.py file. Nodes represent genes, and if there is a relation between gene A to gene B, I insert an edge from A to B.

https://github.com/haluk/kegg.git

ADD COMMENTlink written 4.7 years ago by Haluk170
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1807 users visited in the last hour