How can I find the relation between pairs of pathways in pathway databases like KEGG?
Is there any R-package to do this?
How can I find the relation between pairs of pathways in pathway databases like KEGG?
Is there any R-package to do this?
I believe that the needed data is available through KGML files. For example the hsa05130 pathway has few arrows pointing on other pathways, for example hsa04210. If you'd get the 5130 as a KGML file through their REST API, you'll find that these arrows are encoded as:
<entry id="19" name="path:hsa04210" type="map" link="http://www.kegg.jp/dbget-bin/www_bget?hsa04210">
<graphics name="Apoptosis" fgcolor="#000000" bgcolor="#FFFFFF" type="roundrectangle" x="773" y="814" width="73" height="25"/>
</entry>
i.e. as external links. Should not be difficult to parse an XML using R. As a quick solution:
require(XML)
hsa05130_kgml <- xmlParse("http://rest.kegg.jp/get/hsa05130/kgml")
out_nodes = getNodeSet(data, "//entry[@type='map']", fun=xmlToList)
links_summary <- data.frame(do.call(rbind, out_nodes))
head(links_summary)
1 Regulation of actin cytoskeleton, #000000, #FFFFFF, roundrectangle, 805, 460, 119, 34
2 Flagellar assembly, #000000, #FFFFFF, roundrectangle, 126, 253, 113, 25
3 Adherens junction, #000000, #FFFFFF, roundrectangle, 761, 975, 120, 25
4 Tight junction, #000000, #FFFFFF, roundrectangle, 631, 975, 98, 25
5 Toll-like receptor signaling pathway, #000000, #FFFFFF, roundrectangle, 584, 264, 132, 34
6 Bacterial secretion system, #000000, #FFFFFF, roundrectangle, 271, 361, 185, 34
.attrs
1 1, path:hsa04810, map, http://www.kegg.jp/dbget-bin/www_bget?hsa04810
2 4, path:map02040, map, http://www.kegg.jp/dbget-bin/www_bget?map02040
3 5, path:hsa04520, map, http://www.kegg.jp/dbget-bin/www_bget?hsa04520
4 6, path:hsa04530, map, http://www.kegg.jp/dbget-bin/www_bget?hsa04530
5 7, path:hsa04620, map, http://www.kegg.jp/dbget-bin/www_bget?hsa04620
6 8, path:map03070, map, http://www.kegg.jp/dbget-bin/www_bget?map03070
I am not familiar with that format, sorry. However, it seems that they provide a full stack of Java libraries for its manipulation -- shouldn't be that difficult to hack a working solution. Try to figure out it yourself and once stuck ask a question in their mailing list. Good luck!
Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
What do you mean by the "relation" ? Which genes appear in both? You need to define that more precisely.
In kegg maps, there are some arrows from one pathway to another pathway; I'd like to find them for each pair of pathways.
Do you have an idea what those arrows stand for?
I think they show some effects, say regulation, between complexes in pathways.
I have not found any explicit definition for them, yet.
Ok so, I guess this will help: kegg-docs to get a first clue. If I get your problem right you are looking for RELATION(s). Haven't really looked into it by myself so I guess I will not be much more of a help, sry. But we can try, how is your data represented on your HDD, plain text?