Visualizing KEGG pathways
2
0
Entering edit mode
Tim Smith ★ 1.1k
@tim-smith-1532
Last seen 9.6 years ago
Hi, I was trying to explore KEGG pathways. I have two questions: Question 1: ------------- I used some code given by Saroj: #--------------------------- library("KEGGSOAP") # 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] = "black" bgcols = rep("#e6e6fa", length(glist)) bgcols[1] = "blue" # color the pathway accordingly url = color.pathway.by.objects(pathstr, glist, fg=fgcols, bg=bgcols) browseURL(url) #--------------------------- I get the following graph (with one of the nodes shown as blue) at "http://soap.genome.jp/tmp/mark_pathway_www3_api14519/hsa00010.gif" The original Glycolysis pathway in KEGG is given at "http://www.genome.jp/kegg/pathway/map/map00010.html" My question is whether I can get the actual gene name (in this case 'AKR1A1') instead of '1.1.1.2' on the node that is given in the graph - i.e., how can I get the gene names (for 'hsa') on the graph ? Question 2: ------------ This is not exactly an R question, so please excuse me - I'm just trying to understand things in KEGG. I used the following code to get the genes for Jak-stat pathway: #------------ pathstr = "path:hsa04630" # get all genes glist = get.genes.by.pathway(pathstr) #------------------ > length(glist) [1] 155 This lists 155 genes as being associated with the pathway. But if I go to the KEGG graph ("http://www.genome.jp/kegg/pathway/hsa/hsa04630.html") I just see perhaps 20 nodes/genes. Where is my disconnect? Thanks for the replies! [[alternative HTML version deleted]]
Pathways graph Pathways graph • 2.4k views
ADD COMMENT
0
Entering edit mode
Marc Carlson ★ 7.2k
@marc-carlson-2264
Last seen 7.7 years ago
United States
Hi Tim, For humans, KEGG uses entrez gene IDs for gene identifiers (they just preceed them with "hsa:"). So we can extract those by just doing this: egList = gsub("hsa:", "", glist) ##And then do this to see the gene symbols: library(org.Hs.eg.db) res = mget(as.character(egList), org.Hs.egSYMBOL, ifnotfound=NA) The org.Hs.eg.db library can also help you find out a lot of other things about your genes. And, when you look at those gene symbols I think you will see the answer to your second question. As an example, the picture lists a single box with "stat" in it, but you can see from your list of gene symbols that you have about 7 different kinds of stat genes. Also, from the kegg image you will see the many genes listed if you just click on those green boxes (but you have to scroll down a bit to see them). Marc Tim Smith wrote: > Hi, > > I was trying to explore KEGG pathways. I have two questions: > > Question 1: > ------------- > > I used some code given by Saroj: > > #--------------------------- > > library("KEGGSOAP") > > # 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] = "black" > bgcols = rep("#e6e6fa", length(glist)) > bgcols[1] = "blue" > > # color the pathway accordingly > url = color.pathway.by.objects(pathstr, glist, fg=fgcols, bg=bgcols) > browseURL(url) > > #--------------------------- > > I get the following graph (with one of the nodes shown as blue) at "http://soap.genome.jp/tmp/mark_pathway_www3_api14519/hsa00010.gif" > > The original Glycolysis pathway in KEGG is given at "http://www.genome.jp/kegg/pathway/map/map00010.html" > > My question is whether I can get the actual gene name (in this case 'AKR1A1') instead of '1.1.1.2' on the node that is given in the graph - i.e., how can I get the gene names (for 'hsa') on the graph ? > > > Question 2: > ------------ > > This is not exactly an R question, so please excuse me - I'm just trying to understand things in KEGG. I used the following code to get the genes for Jak-stat pathway: > > #------------ > pathstr = "path:hsa04630" > > # get all genes > glist = get.genes.by.pathway(pathstr) > > #------------------ > >> length(glist) >> > [1] 155 > > This lists 155 genes as being associated with the pathway. But if I go to the KEGG graph ("http://www.genome.jp/kegg/pathway/hsa/hsa04630.html") I just see perhaps 20 nodes/genes. Where is my disconnect? > > Thanks for the replies! > > > > [[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 > >
ADD COMMENT
0
Entering edit mode
Aaaah....I get it now! Thanks Marc! ________________________________ From: Marc Carlson <mcarlson@fhcrc.org> Cc: bioc <bioconductor@stat.math.ethz.ch> Sent: Friday, April 24, 2009 2:32:25 PM Subject: Re: [BioC] Visualizing KEGG pathways Hi Tim, For humans, KEGG uses entrez gene IDs for gene identifiers (they just preceed them with "hsa:"). So we can extract those by just doing this: egList = gsub("hsa:", "", glist) ##And then do this to see the gene symbols: library(org.Hs.eg.db) res = mget(as.character(egList), org.Hs.egSYMBOL, ifnotfound=NA) The org.Hs.eg.db library can also help you find out a lot of other things about your genes. And, when you look at those gene symbols I think you will see the answer to your second question. As an example, the picture lists a single box with "stat" in it, but you can see from your list of gene symbols that you have about 7 different kinds of stat genes. Also, from the kegg image you will see the many genes listed if you just click on those green boxes (but you have to scroll down a bit to see them). Marc Tim Smith wrote: > Hi, > > I was trying to explore KEGG pathways. I have two questions: > > Question 1: > ------------- > > I used some code given by Saroj: > > #--------------------------- > > library("KEGGSOAP") > > # 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] = "black" > bgcols = rep("#e6e6fa", length(glist)) > bgcols[1] = "blue" > > # color the pathway accordingly > url = color.pathway.by.objects(pathstr, glist, fg=fgcols, bg=bgcols) > browseURL(url) > > #--------------------------- > > I get the following graph (with one of the nodes shown as blue) at "http://soap.genome.jp/tmp/mark_pathway_www3_api14519/hsa00010.gif" > > The original Glycolysis pathway in KEGG is given at "http://www.genome.jp/kegg/pathway/map/map00010.html" > > My question is whether I can get the actual gene name (in this case 'AKR1A1') instead of '1.1.1.2' on the node that is given in the graph - i.e., how can I get the gene names (for 'hsa') on the graph ? > > > Question 2: > ------------ > > This is not exactly an R question, so please excuse me - I'm just trying to understand things in KEGG. I used the following code to get the genes for Jak-stat pathway: > > #------------ > pathstr = "path:hsa04630" > > # get all genes > glist = get.genes.by.pathway(pathstr) > > #------------------ > >> length(glist) >> > [1] 155 > > This lists 155 genes as being associated with the pathway. But if I go to the KEGG graph ("http://www.genome.jp/kegg/pathway/hsa/hsa04630.html") I just see perhaps 20 nodes/genes. Where is my disconnect? > [[elided Yahoo spam]] > > > > [[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]]
ADD REPLY
0
Entering edit mode
@saroj-k-mohapatra-3419
Last seen 9.6 years ago
Hi Tim: > # color the pathway accordingly > url = color.pathway.by.objects(pathstr, glist, fg=fgcols, bg=bgcols) > My question is whether I can get the actual gene name (in this case 'AKR1A1') instead of '1.1.1.2' on the node that is given in the graph - i.e., how can I get the gene names (for 'hsa') on the graph ? > It would be nice to have that capability. I do not see any way of doing that, at least not through these functions: color.pathway.by.objects and mark.pathway.by.objects. Perhaps some one else might have an idea. > > [1] 155 > > This lists 155 genes as being associated with the pathway. But if I go to the KEGG graph ("http://www.genome.jp/kegg/pathway/hsa/hsa04630.html") I just see perhaps 20 nodes/genes. Where is my disconnect? > >From the link that you provided ("http://www.genome.jp/kegg/pathway/hsa/hsa04630.html") , I click on Pathway entry and reach (http://www.genome.jp/dbget-bin/www_bget?pathway+hsa04630). On that page, under the category "Gene", these are listed, all 155 (copied below). You would notice that there are multiple gene ids for the same EC id, e.g., 10000 (AKT3), 207(AKT1) and 208(AKT2) all stand for the same EC:2.7.11.1 and are represented by the node AKT on the map. Best, Saroj Tim Smith wrote: > Hi, > > I was trying to explore KEGG pathways. I have two questions: > > Question 1: > ------------- > > I used some code given by Saroj: > > #--------------------------- > > library("KEGGSOAP") > > # 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] = "black" > bgcols = rep("#e6e6fa", length(glist)) > bgcols[1] = "blue" > > # color the pathway accordingly > url = color.pathway.by.objects(pathstr, glist, fg=fgcols, bg=bgcols) > browseURL(url) > > #--------------------------- > > I get the following graph (with one of the nodes shown as blue) at "http://soap.genome.jp/tmp/mark_pathway_www3_api14519/hsa00010.gif" > > The original Glycolysis pathway in KEGG is given at "http://www.genome.jp/kegg/pathway/map/map00010.html" > > My question is whether I can get the actual gene name (in this case 'AKR1A1') instead of '1.1.1.2' on the node that is given in the graph - i.e., how can I get the gene names (for 'hsa') on the graph ? > > > Question 2: > ------------ > > This is not exactly an R question, so please excuse me - I'm just trying to understand things in KEGG. I used the following code to get the genes for Jak-stat pathway: > > #------------ > pathstr = "path:hsa04630" > > # get all genes > glist = get.genes.by.pathway(pathstr) > > #------------------ > >> length(glist) >> > [1] 155 > > This lists 155 genes as being associated with the pathway. But if I go to the KEGG graph ("http://www.genome.jp/kegg/pathway/hsa/hsa04630.html") I just see perhaps 20 nodes/genes. Where is my disconnect? > > Thanks for the replies! > > > > [[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 > >
ADD COMMENT

Login before adding your answer.

Traffic: 599 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