Hi Tim,

The issue is that in David's example, the XML file, hsa04010.xml, had been
downloaded and put into the KEGGgraph package to be used as an example. The
file you want, hsa00010.xml, has yet to be downloaded. The system.file
command is telling the R session to look in the extdata directory of the
KEGGgraph package for the hsa00010.xml file, but if it is not there, they
you will surely get an error.

I have not played around with KEGGgraph all that much, but from the example
David gave, I would suggest that you download the XML file you want from
KEGG onto your desktop or some other working directory. One you have the
file, the xfile object should be a character string to the relative location
of this file. Then call the parseKGML function on this string.

tony

On Thu, May 7, 2009 at 12:11 PM, Tim Smith <tim_smith_666@yahoo.com> wrote:

> Hi David,
>
> I was trying the package to get at the genes for each node, and tried the
> code you suggested. However, for some nodes/pathways, they seem to give an
> error. For example:
>
> ##----------
> library(KEGGgraph)
>
>    # Glycolysis pathway
>    xfile <- system.file("/extdata/hsa00010.xml", package="KEGGgraph")
>    p <- parseKGML(xfile)
>
> ## --------------
>
> But this gives 'Error:   does not seem to be XML, nor to identify a file
> name'.
>
> Is there a way around this?
>
> thanks again!
>
>
>
>
>
>
> ________________________________
> From: Jitao David Zhang <davidvonpku@gmail.com>
>
> Sent: Tuesday, May 5, 2009 1:21:04 PM
> Subject: Re: [BioC] KEGG: gene ids for nodes in a pathway
>
> Hi Tim,
>
>  Using KEGGgraph package may solve the problem. As an example:
>
>    library(KEGGgraph)
>
>    // use human MAPK pathway as an example
>    xfile <- system.file("/extdata/hsa04010.xml", package="KEGGgraph")
>    p <- parseKGML(xfile)
>    pNodes <- nodes(p)
>
>    displayNames <- sapply(pNodes, getDisplayName)
>    geneids <- sapply(pNodes, function(x) translateKEGG2GeneID(getName(x)))
>
>    The displayNames now contain the labels (the visible names of the
> nodes), while the geneids are the EntrezGeneID (in human case) of the genes
> contained in that node.
>
>    To install KEGGgraph, just type
>
>    source("http://www.bioconductor.org/biocLite.R")
>    biocLite(KEGGgraph)
>
>    Best wishes,
> David
>
>
>
>
> Hi,
>
> I wanted a list of genes for a particular pathway arranged nodewise. For
> example, if I select the Jak-stat pathway ("
> http://www.genome.jp/kegg/pathway/hsa/hsa04630.html"), how do I get the
> entrez ids of genes associated with the node 'STAT' ? Currently, I use the
> following code:
>
> x <- toTable(org.Hs.egPATH)
>
> and then select genes associated with a particular pathway (e.g. for
> Jak-stat: "04630") . But this gives the entire set of genes associated with
> the pathway. Is there a way to get the entrez ids of the genes associated
> with each of the nodes ('JAK', 'STAT', 'STAM','PIAS' etc.) in the pathway?
>
> thanks!
>
>
>
>
>       [[alternative HTML version deleted]]
>
> _______________________________________________
> Bioconductor mailing list
> Bioconductor@stat.math.ethz.ch
> https://stat.ethz.ch/mailman/listinfo/bioconductor
> Search the archives:
> http://news.gmane.org/gmane.science.biology.informatics.conductor
>
>
>
> --
> Jitao David Zhang
> Computational Biology Ph.D.
> Division of Molecular Genome Analysis
> DKFZ, Heidelberg D-69120, Germany
>
> http://sites.google.com/site/jazzydevzoo/
>
>
>
>
>        [[alternative HTML version deleted]]
>
> _______________________________________________
> Bioconductor mailing list
> Bioconductor@stat.math.ethz.ch
> https://stat.ethz.ch/mailman/listinfo/bioconductor
> Search the archives:
> http://news.gmane.org/gmane.science.biology.informatics.conductor
>

	[[alternative HTML version deleted]]

