This is a test version of Biostars. For the public version, visit https://www.biostars.org.
How do we plot KEGG pathway for multiple genes??

I have a list of about 800 KEGG IDs for my genes of interest. I want to plot those genes and get a nice KEGG mapped plot for each of my 800 genes. How can I do this in R package? Thanks

kegg

1 answer

You may use the pathview package:

1) use kegg.gsets() to download the KEGG pathways of your species.

2) map your gene ids to the pathways - I use ids2indices() from limma.

3) use pathview() to download KEGG pathways figures and color your genes on them.

Example:

library(pathview)
test.uid <- c("5494737" , "5495078", "5495093", "5494418", "5495039")
pv.out <- pathview(gene.data = test.uid, pathway.id = "ssl00190", species = "ssl", 
                   out.suffix = "kegg.get.all", kegg.native = T)

Thank you for your answer. I am having trouble running this package though. I have test vector which i basically the sets of KEGG IDs. for NCBI UIDs (test.uid) Is this how I should be running this ? Should I use test.uid or test for gene.data? Please clarify. Thank you!

test.uid <- c("5494737" , "5495078", "5495093", "5494418", "5495039") . ##NCBI UID

test <- c("ssl:SS1G_00209", "ssl:SS1G_00574","ssl:SS1G_00589", "ssl:SS1G_00629", "ssl:SS1G_00885")
pv.out <- pathview(gene.data = test, pathway.id = "ssl01100", species = "ssl", out.suffix = "kegg.get.all",kegg.native = T)

I updated my post with an example. Keep in mind that coloring will not work well for some figures, like ssl01100 or ssl01110. You may also try KEGG site directly: http://www.genome.jp/kegg/tool/map_pathway2.html. Enter the identifiers one per line, with colours separated by a space:

5494737 red
5495078 blue
5495093 pink
5494418 yelllow
5495039 purple

Thank you so much. I got the the plot for the example you have posted, but is there a way to have the UIDs in test.uid incorporated in the plot itself? If I have >500 genes, how do I represent them in the plot? Because giving each of >500 gene individual colour is not possible.

Log in to answer this question.