Question: Kegg'S Missing Compound Reactions
3
gravatar for stuy.bradley
6.0 years ago by
stuy.bradley50
stuy.bradley50 wrote:

So I've been tasked with expanding my current pathway finding tool from one organism's model to well... All of them. Since we have a KEGG licence, I've oped to start with that, only to have run into a bit of a problem.

So far I've been through multiple tools looking for various attributes: batch conversion of KEGG to cytoscape (.graphml or the like), offline utilization of KEGG's FTP files etc. Thus I have worked my way through:

  • Kegg-kgml-parser
  • KEGGTranslator
  • KCPAVS
  • KGMLReader
  • CytoKEGG
  • KeggGraph

Having finally settled on KeggGraph for R, and getting it to run on the entirety of the metabolic KO .kgml files (9k nodes, 32k edges); I've noticed something odd:

The compound nodes [cpds] have no edges (reactions) coming from them.

Note the CPD nodes have no reaction edges

I noted this in other programs and thought it was just an error, although now my question is where are the cpd reactions (in the FTP file set)?

Am I doing something wrong in my code:

library(graph)
library(KEGGgraph)
library(RCytoscape)

KEGGList <- list.files(path = "C:/Users/Castor Castle/Documents/kgml/metabolic/ko", full.names = TRUE)

AllGraphs <- lapply(KEGGList, function(x) {
  tmpGraph <- parseKGML2Graph(x, genesOnly=FALSE)    
})

FinalGraph <- mergeKEGGgraphs(AllGraphs, edgemode = "directed")

FinalGraph <- initNodeAttribute (FinalGraph, "KEGGNode", "char", "node")
FinalGraph <- initEdgeAttribute (FinalGraph, "KEGGEdge", "char", "edge")
cw <- new.CytoscapeWindow ('finalGraph', graph = FinalGraph)
displayGraph(cw)

Or do I need to grab extra files from somewhere/am I just completely off track??

At the end of the day all I need is KEGG's compound reactions in a cytoscape happy format! If anyone could give me some advice, it would be most appreciated!

Cheers, Stuart

pathway R kegg cytoscape • 2.6k views
ADD COMMENTlink modified 6.0 years ago • written 6.0 years ago by stuy.bradley50
2
gravatar for Sudeep
6.0 years ago by
Sudeep1.6k
.
Sudeep1.6k wrote:

Hi

I have also came across this issue while parsing KEGG "non model" kgml files to xgmml. But I was using Kegg-kgml-parser cytoscape plugin. What I saw was that the plugin avoids parsing reactions/interactions with the tag relation in the kgml file. For non model organisms there are no evidences for a number of reactions, so these reactions will just have relation tags in kgml file not reaction tags and hence the plugin avoids them. So you could check how KeggGraph parses these relation tags, and also manually check if these compounds have any interactions under relation or reaction tags.

ADD COMMENTlink modified 6 months ago by RamRS23k • written 6.0 years ago by Sudeep1.6k

KeggGraph has a method for parsing relation tags normally (page 41), so I'm not sure this is the cause of the problem.

ADD REPLYlink modified 6 months ago by RamRS23k • written 6.0 years ago by stuy.bradley50
2
gravatar for stuy.bradley
6.0 years ago by
stuy.bradley50
stuy.bradley50 wrote:

Ok I figured it out, rather silly really:

So there are two methods KeggGraph uses to parse .kgml to bioconductor graph format:

KEGGpathway2Graph

This is the standard protein KEGG map.

KEGGpathway2reactionGraph

Which is the chemical reaction map , it requires an addition step to function as it has no wrapper, this is because:

For now there is no wrapper to parse the KGML file directly into a reaction graph. In future there maybe one, but we don’t want to confuse users with two similar functions to parse the file into a graph (since we assume that most users will need the protein graph, which can be conveniently parsed by parseKGML2Graph).

Hence why it was somewhat harder to find!

If anyone else runs into this problem the code should look something like this:

KEGGList <- list.files(path = "C:/Users/Castor Castle/Documents/kgml/metabolic/ko/subset/", full.names = TRUE)
AllGraphs <- lapply(KEGGList, function(x) {
  pathway <- parseKGML(x)
  pathway <- KEGGpathway2reactionGraph(pathway, uniqueReaction = FALSE)    
})

Ah well, RTFM I suppose...

ADD COMMENTlink modified 6 months ago by RamRS23k • written 6.0 years ago by stuy.bradley50
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: 1638 users visited in the last hour