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.
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
KeggGraph has a method for parsing
relation
tags normally (page 41), so I'm not sure this is the cause of the problem.