[BioC] Visualize KEGG pathway
Saroj K Mohapatra
smohapat at vbi.vt.edu
Sat Apr 18 04:17:02 CEST 2009
Hi Tim:
It is possible to set the foreground and background colors for each node in the KEGG pathway through bg.color.list and fg.color.list arguments of the function color.pathway.by.objects. I color just one node below in white-on-blue, rest all in black-on-white.
> library("KEGGSOAP")
Loading required package: XML
Loading required package: SSOAP
Loading required package: RCurl
# Suppose you are looking at the pathway for glycolysis / gluconeogenesis
> pathstr = "path:hsa00010"
# get all genes
> glist = get.genes.by.pathway(pathstr)
# First fix what color you want for which node
# Suppose, you want to color first enzyme hsa:10327 (EC 1.1.1.2)
# white on blue background and rest all nodes in black on white
# fgcols = color of text and border
# bgcols = color of the rectangular area
> fgcols = rep("black", length(glist))
> fgcols[1] = "yellow"
> bgcols = rep("white", length(glist))
> bgcols[1] = "blue"
# color the pathway accordingly
> url = color.pathway.by.objects(pathstr, glist, fg=fgcols, bg=bgcols)
# Have a look at the url returned
> url
[1] "http://soap.genome.jp/tmp/mark_pathway_www3_api23663/hsa00010.gif"
> browseURL(url)
>
> sessionInfo()
R version 2.8.1 (2008-12-22)
x86_64-unknown-linux-gnu
locale:
LC_CTYPE=en_US.UTF-8;LC_NUMERIC=C;LC_TIME=en_US.UTF-8;LC_COLLATE=en_US.UTF-8;LC_MONETARY=C;LC_MESSAGES=en_US.UTF-8;LC_PAPER=en_US.UTF-8;LC_NAME=C;LC_ADDRESS=C;LC_TELEPHONE=C;LC_MEASUREMENT=en_US.UTF-8;LC_IDENTIFICATION=C
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] KEGGSOAP_1.14.0 SSOAP_0.4-6 RCurl_0.94-1 XML_2.3-0
>
>
Best wishes,
Saroj
----- Original Message -----
From: "Tim Smith" <tim_smith_666 at yahoo.com>
To: "bioc" <bioconductor at stat.math.ethz.ch>
Sent: Friday, April 17, 2009 6:19:59 PM GMT -05:00 US/Canada Eastern
Subject: [BioC] Visualize KEGG pathway
Hi,
I tried the code from a previous post:
------------
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"))---------------
Is there any way to make the all the initial nodes as 'white' (instead of light green), and then to color the nodes that we are interested in?
thanks!
[[alternative HTML version deleted]]
_______________________________________________
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
--
Computational Biology
VBI @ Virginia Tech
More information about the Bioconductor
mailing list