[BioC] KEGGgraph

Paul Shannon pshannon at fhcrc.org
Tue Oct 30 20:25:37 CET 2012


Hi Ricardo,

We might not be able to give you just what you need right away, but your questions are very useful, helping us to understand what network analysis needs Bioc users are coming up with.  

I try to answer your questions below.  If I misunderstand them, please let me know!


On Oct 30, 2012, at 11:46 AM, Ricardo Silva wrote:

> Hi Paul,
> 
> thanks for answering.
> 
> I'm already a RCytoscape user, it's very great, but I still have to spend some time customizing the graphs.
> 
> I agree with your point about kegg, but is still the most comprehensive (reactome: http://www.reactome.org/stats.html and kegg:http://www.kegg.jp/kegg/docs/statistics.html)
> 
> I'm trying to associate compound information with biochemical (reactions, pathways...) information, to analyse mass spectrometry data, now I'm analyzing Trypanosoma brucei data. 

Am I right in thinking that what KEGG calls 'compound' is what others call metabolites, or 'small molecules'?

> 
> I've tried some alternatives to KEGG myself, I've translated every pathway of an organism to wikipathways format http://www.pathvisio.org/wiki/KeggConverter. But, the division of pathways is too artificial in many cases, I need to know how a node links with every all. 

I tend to agree about the artificiality of pathways.   Would this be remedied by treating reactions as the fundamental abstraction: metabolic reactions, phosphorylation, protein-DNA binding,  transcription, etc?  These could then be flexibly and selectively aggregated into pathways when that abstraction is useful, and according to the needs of the analysis.



> 
> Now, I would like to have a graph with all information I can get like http://www.kegg.jp/kegg-bin/show_pathway?map01100, but, only with reactions described for a given organism.  

You probably know this already, but to view:

  http://www.kegg.jp/kegg-bin/show_pathway?org_name=tbr&mapno=01100&mapscale=0.35&show_description=hide

To download and then convert the KGML to a graphNEL

  library(KEGGgraph)
  tmp <- tempfile ()
  retrieveKGML('01100', organism='tbr', destfile=tmp, method='auto')
  g.tbr <- parseKGML2Graph (tmp, expandGenes=TRUE)

We may be able to extract some (maybe a lot) of the useful public data from KEGG for easy use in Bioconductor.  I am experimenting with that this week, as chance would have it.  (With no assessment yet of how hard, and how useful, it will be.)

> 
> It will be perfect to have this graph on R, with all the information easy translated to Cytoscape. Cytoscape already has plugins to read KGML, is it possible to merge graphs and export them back to R?

Sure.  This RCy method does exactly that:

  cw <- existing.CytoscapeWindow ('my merged graph',  copy.graph.from.cytoscape.to.R=TRUE)

Then 

  g.merged <- getGraph (cw) 

I hope this helps.

 - Paul



> 
> Cheers
> 
> Ricardo    
> 
> On Tue, Oct 30, 2012 at 4:01 PM, Paul Shannon <pshannon at fhcrc.org> wrote:
> Hi Ricardo,
> 
> A few quick observations, and then an invitation to further discussion.
> 
> 1) KEGG has played a central role in bioinformatics for years but now, it seems, it no longer can.  None of the publicly available data has been updated since KEGG 'went private' in the summer of 2011.
> 
> 2) Here in Seattle, I -- and others elsewhere -- are exploring REACTOME, Nature/NCI and WikiPathways as ongoing sources of metabolic (and other) network graphs.
> 
> 3) The RCytoscape package http://bioconductor.org/packages/2.11/bioc/html/RCytoscape.html is designed to make R/Cytoscape network visualization easy.  It comes with lots of documentation and a website:  http://rcytoscape.systemsbiology.net/versions/current/index.html
> 
> Which metabolic pathway are you working on?  Perhaps I can use it as a case study in my exploration of KEGG alternatives.
> 
> Best,
> 
>  - Paul
> 
> 
> On Oct 30, 2012, at 10:47 AM, Ricardo Silva wrote:
> 
> > Hello all,
> >
> > I've been trying to create the most complete possible compound map for
> > an organism, and KEGGgraph was the best approach until now.
> >
> > Someone already worked with graphs metabolites in R?
> >
> > I have a doubt if the KEGGgraph merging process can miss nodes, that's
> > because,
> > looking at the compounds in each reaction:
> >
> >    read.delim(paste("http://rest.kegg.jp/link/reaction/", orgId,
> > sep=""),header=FALSE)
> >    read.delim(paste("http://rest.kegg.jp/link/compound/", orgId,
> > sep=""),header=FALSE)
> >
> > where orgId is the tree letter organism code, I have a set of compounds
> > different than the one retrivied bellow:
> >
> > When I use the mergeGraphs function:
> >
> >
> > for (i in 1:length(allPath)) {
> >        retrieveKGML(allPath[i], organism=orgId, destfile=tmp,
> > method="wget", quiet=TRUE)
> >        lg[[i]]  <- parseKGML(tmp)
> >        if(length(lg[[i]]@reactions))  lt[[i]] <-
> > KEGGpathway2reactionGraph(lg[[i]])
> >    }
> >    lt <- lt[!unlist(lapply(lt, is.null))]
> >    merged <- mergeGraphs(lt)
> >
> > where allPath represents all organism pathways in kegg.
> >
> > the nodes of obtained graph are different from those obtained asking
> > compounds by reaction, m'I missing something?
> >
> > Additionally, someone know's an automated way to export the graph to
> > cytoscape, or even to write a KGML?
> >
> > Thanks in advance
> >
> > Ricardo
> >
> >       [[alternative HTML version deleted]]
> >
> > _______________________________________________
> > Bioconductor mailing list
> > Bioconductor at r-project.org
> > https://stat.ethz.ch/mailman/listinfo/bioconductor
> > Search the archives: http://news.gmane.org/gmane.science.biology.informatics.conductor
> 
> 



More information about the Bioconductor mailing list