Visualise KEGG pathway and highlight genes
5
0
Entering edit mode
Daniel Brewer ★ 1.9k
@daniel-brewer-1791
Last seen 10.3 years ago
Hello, >From a couple of interesting gene lists I have found KEGG pathways which contain genes from both lists. Does anyone know how to visualise this? I was thinking something along the lines of the KEGG pathway being plotted and the genes from the two lists highlighted in different colours. I can cope with this not being done in bioconductor but would prefer it if the final image was exported as PDF. I have searched around without much luck ... it seems possible that KEGGgraph maybe able to do it but it is not clear from vignette. Dan -- ************************************************************** Daniel Brewer, Ph.D. Institute of Cancer Research Molecular Carcinogenesis Email: daniel.brewer at icr.ac.uk ************************************************************** The Institute of Cancer Research: Royal Cancer Hospital, a charitable Company Limited by Guarantee, Registered in England under Company No. 534147 with its Registered Office at 123 Old Brompton Road, London SW7 3RP. This e-mail message is confidential and for use by the a...{{dropped:2}}
Cancer KEGGgraph Cancer KEGGgraph • 3.7k views
ADD COMMENT
0
Entering edit mode
Marc Carlson ★ 7.2k
@marc-carlson-2264
Last seen 8.4 years ago
United States
Daniel Brewer wrote: > Hello, > > >From a couple of interesting gene lists I have found KEGG pathways which > contain genes from both lists. Does anyone know how to visualise this? > I was thinking something along the lines of the KEGG pathway being > plotted and the genes from the two lists highlighted in different colours. > > I can cope with this not being done in bioconductor but would prefer it > if the final image was exported as PDF. I have searched around without > much luck ... it seems possible that KEGGgraph maybe able to do it but > it is not clear from vignette. > > Dan > > Hi Daniel, >From your post it is a little bit unclear to me exactly what you want to happen. KEGGgraph (which you mentioned), has a few vignettes that might help you. One of them is actually about plotting KEGG pathways. You can find those here: http://www.bioconductor.org/packages/devel/bioc/html/KEGGgraph.html It also seems that you may have some plot that you want to push into PDF format and are unsure how you might do that. Is that right? If so, then you should only need to do something like this: ##turn on the pdf device to start output flowing to "myfile.pdf" pdf("myfile.pdf") ##then call plot() with the appropriate arguments. plot(Appropriate arguments here) ##then turn off that pdf device (now that you have captured the output). dev.off() I hope this helps, Marc
ADD COMMENT
0
Entering edit mode
@saroj-mohapatra-1446
Last seen 10.3 years ago
Hi Daniel: This is also something in which I am interested, but have not found an easy way yet. If KEGG allows the network images to be downloaded in SVG format (currently I found only GIF), then I think there is a way of manually modifying the color of the nodes. Within the KEGGSOAP package, there is a function called "mark.pathway.by.objects" Client-side interface to obtain an url for a KEGG pathway diagram with a given set of genes marked Description Given a KEGG pathway id and a set of KEGG gene ids, the functions return the URL of a KEGG pathway diagram with the elements corresponding to the genes marked by red or speci?ed color I used the example code given there in: --------------------------------------------------- url <- mark.pathway.by.objects("path:eco00260", c("eco:b0002", "eco:c00263")) if(interactive()){ browseURL(url) } url <- color.pathway.by.objects("path:eco00260", c("eco:b0002", "eco:c00263"), c("#ff0000", "#00ff00"), c("#ffff00" --------------------------------------------------- And it creates an image at http://soap.genome.jp/tmp/mark_pathway_www2_api14063/eco00260.gif with the nodes marked. Best wishes, Saroj ----- Original Message ----- From: "Daniel Brewer" <daniel.brewer@icr.ac.uk> To: "Bioconductor mailing list" <bioconductor at="" stat.math.ethz.ch=""> Sent: Thursday, April 16, 2009 6:50:44 AM GMT -05:00 US/Canada Eastern Subject: [BioC] Visualise KEGG pathway and highlight genes Hello, >From a couple of interesting gene lists I have found KEGG pathways which contain genes from both lists. Does anyone know how to visualise this? I was thinking something along the lines of the KEGG pathway being plotted and the genes from the two lists highlighted in different colours. I can cope with this not being done in bioconductor but would prefer it if the final image was exported as PDF. I have searched around without much luck ... it seems possible that KEGGgraph maybe able to do it but it is not clear from vignette. Dan -- ************************************************************** Daniel Brewer, Ph.D. Institute of Cancer Research Molecular Carcinogenesis Email: daniel.brewer at icr.ac.uk ************************************************************** The Institute of Cancer Research: Royal Cancer Hospital, a charitable Company Limited by Guarantee, Registered in England under Company No. 534147 with its Registered Office at 123 Old Brompton Road, London SW7 3RP. This e-mail message is confidential and for use by the a...{{dropped:13}}
ADD COMMENT
0
Entering edit mode
Hi, I am sorry, the code from KEGGSOAP manual was incomplete in my last email. It actually reads: -------------- url <- mark.pathway.by.objects("path:eco00260", c("eco:b0002", "eco:c00263")) if(interactive()){ browseURL(url) } url <- color.pathway.by.objects("path:eco00260", c("eco:b0002", "eco:c00263"), c("#ff0000", "#00ff00"), c("#ffff00", "yellow")) -------------- Best, Saroj ----- Original Message ----- From: "Saroj K Mohapatra" <smohapat@vbi.vt.edu> To: "Daniel Brewer" <daniel.brewer at="" icr.ac.uk=""> Cc: "Bioconductor mailing list" <bioconductor at="" stat.math.ethz.ch=""> Sent: Thursday, April 16, 2009 11:13:08 AM GMT -05:00 US/Canada Eastern Subject: Re: [BioC] Visualise KEGG pathway and highlight genes Hi Daniel: This is also something in which I am interested, but have not found an easy way yet. If KEGG allows the network images to be downloaded in SVG format (currently I found only GIF), then I think there is a way of manually modifying the color of the nodes. Within the KEGGSOAP package, there is a function called "mark.pathway.by.objects" Client-side interface to obtain an url for a KEGG pathway diagram with a given set of genes marked Description Given a KEGG pathway id and a set of KEGG gene ids, the functions return the URL of a KEGG pathway diagram with the elements corresponding to the genes marked by red or speci?ed color I used the example code given there in: --------------------------------------------------- url <- mark.pathway.by.objects("path:eco00260", c("eco:b0002", "eco:c00263")) if(interactive()){ browseURL(url) } url <- color.pathway.by.objects("path:eco00260", c("eco:b0002", "eco:c00263"), c("#ff0000", "#00ff00"), c("#ffff00" --------------------------------------------------- And it creates an image at http://soap.genome.jp/tmp/mark_pathway_www2_api14063/eco00260.gif with the nodes marked. Best wishes, Saroj ----- Original Message ----- From: "Daniel Brewer" <daniel.brewer@icr.ac.uk> To: "Bioconductor mailing list" <bioconductor at="" stat.math.ethz.ch=""> Sent: Thursday, April 16, 2009 6:50:44 AM GMT -05:00 US/Canada Eastern Subject: [BioC] Visualise KEGG pathway and highlight genes Hello, >From a couple of interesting gene lists I have found KEGG pathways which contain genes from both lists. Does anyone know how to visualise this? I was thinking something along the lines of the KEGG pathway being plotted and the genes from the two lists highlighted in different colours. I can cope with this not being done in bioconductor but would prefer it if the final image was exported as PDF. I have searched around without much luck ... it seems possible that KEGGgraph maybe able to do it but it is not clear from vignette. Dan -- ************************************************************** Daniel Brewer, Ph.D. Institute of Cancer Research Molecular Carcinogenesis Email: daniel.brewer at icr.ac.uk ************************************************************** The Institute of Cancer Research: Royal Cancer Hospital, a charitable Company Limited by Guarantee, Registered in England under Company No. 534147 with its Registered Office at 123 Old Brompton Road, London SW7 3RP. This e-mail message is confidential and for use by the a...{{dropped:13}}
ADD REPLY
0
Entering edit mode
@jitao-david-zhang-3188
Last seen 7.9 years ago
(Thanks Marc for referring to KEGGgraph) Hi Daniel, In case of visualizing KEGG pathways, 'KEGGgraphApp' vignette in the KEGGgraph package gives two examples. In principle one could draw the graph object acquired from KEGG via KEGGgraph package with Rgrapvhiz package. A toy code snippet: library(KEGGgraph); library(Rgraphviz) > somegraph <- parseKKGML2Graph(xmlFile) pdf("filename.pdf") > plot(somegraph, "neato") > dev.off() > > In the KEGGgraph package there are several files attached as examples, you could try to use them as a starting point. Currently the KGML files on KEGG database webserver are not consistent and I believe the staffs are working on it (see the other email in the mailing list titled 'KEGGgraph, error'), I will post then when the KGML files are functional again. In case of questions please do not hestitate to ask me. Best wishes, David 2009/4/16 Daniel Brewer <daniel.brewer@icr.ac.uk> > Hello, > > >From a couple of interesting gene lists I have found KEGG pathways which > contain genes from both lists. Does anyone know how to visualise this? > I was thinking something along the lines of the KEGG pathway being > plotted and the genes from the two lists highlighted in different colours. > > I can cope with this not being done in bioconductor but would prefer it > if the final image was exported as PDF. I have searched around without > much luck ... it seems possible that KEGGgraph maybe able to do it but > it is not clear from vignette. > > Dan > > -- > ************************************************************** > Daniel Brewer, Ph.D. > > Institute of Cancer Research > Molecular Carcinogenesis > Email: daniel.brewer@icr.ac.uk > ************************************************************** > > The Institute of Cancer Research: Royal Cancer Hospital, a charitable > Company Limited by Guarantee, Registered in England under Company No. 534147 > with its Registered Office at 123 Old Brompton Road, London SW7 3RP. > > This e-mail message is confidential and for use by the...{{dropped:19}}
ADD COMMENT
0
Entering edit mode
Georg Otto ▴ 510
@georg-otto-956
Last seen 10.3 years ago
Hi Daniel, Daniel Brewer <daniel.brewer at="" icr.ac.uk=""> writes: > >>From a couple of interesting gene lists I have found KEGG pathways which > contain genes from both lists. Does anyone know how to visualise this? > I was thinking something along the lines of the KEGG pathway being > plotted and the genes from the two lists highlighted in different colours. > > I can cope with this not being done in bioconductor but would prefer it > if the final image was exported as PDF. if a non-bioconductor solution is ok for you, you should have a look at pathvisio or genmapp. These programs are able to visualize expression data in a pathway context. Some pathways KEGG pathways can directly be used from wikipathways, others you have to convert yourself. http://www.pathvisio.org/Main_Page http://www.genmapp.org/ Hope that helps, Georg
ADD COMMENT
0
Entering edit mode
Paolo Sonego ▴ 140
@paolo-sonego-3256
Last seen 10.3 years ago
Italy
Hi Daniel, If you wish to convert the gif generated at the specific url (taking advantage of the KEGGSOAP package) to a PDF then you can use the awesome EBImage package (which relies on the ImageMagick suit) in this way: ## Using the example from the KEGGSOAP manual library(KEGGSOAP) url <- color.pathway.by.objects("path:eco00260", c("eco:b0002", "eco:c00263"), c("#ff0000", "#00ff00"), c("#ffff00", "yellow")) library(EBImage) filename="KEGGMAP.pdf" # the extension is mandatory im.gif <- readImage(url, TrueColor) writeImage(im.gif, filename) Regards, Paolo
ADD COMMENT
0
Entering edit mode
This solution is exactly what I am looking for in my previous post. How to improve the resolution ? On Fri, Apr 17, 2009 at 6:29 PM, Paolo Sonego <paolo.sonego at="" gmail.com=""> wrote: > Hi Daniel, > If you wish to convert the gif generated at the specific url (taking > advantage of the KEGGSOAP package) to a PDF then you can use ?the awesome > EBImage package (which relies on the ImageMagick suit) in this way: > > ## Using the example from the KEGGSOAP manual > > library(KEGGSOAP) > url <- color.pathway.by.objects("path:eco00260", > ? ? ? ? ? ? ? c("eco:b0002", "eco:c00263"), > ? ? ? ? ? ? ? c("#ff0000", "#00ff00"), c("#ffff00", "yellow")) > > > library(EBImage) > filename="KEGGMAP.pdf" # the extension is mandatory im.gif <- readImage(url, > TrueColor) > writeImage(im.gif, filename) > > > > Regards, > Paolo > > _______________________________________________ > Bioconductor mailing list > Bioconductor at stat.math.ethz.ch > https://stat.ethz.ch/mailman/listinfo/bioconductor > Search the archives: > http://news.gmane.org/gmane.science.biology.informatics.conductor >
ADD REPLY

Login before adding your answer.

Traffic: 465 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6