Using R I want to generate a list of genes only (without the accompanying text) from a pathway.
For example. If the input pathway is KEGG prostate cancer, I want my output to be a .csv list of the genes in that pathway. I tried:
library("KEGGREST")
keggGet("hsa05215")[[1]]$GENE
but that gives me a list of the number and gene description along with the gene symbol and I want a list consisting of the gene symbol alone.
How do I get this?
Thank you.
Append all the hsa id's to the below URL and get the result. Later you can parse the webpage output.
Ex: http://rest.kegg.jp/get/hsa:04140+hsa:04510+hsa:04919
Hope this solves your problem.
I did that here, http://rest.kegg.jp/get/hsa05215 and the gene list is similar to the one i got through R. It has a number gene symbol and description on each line. I want the gene symbol alone. The output under gene looks like this: 1027 CDKN1B; cyclin dependent kinase inhibitor 1B [KO:K06624] 1017 CDK2; cyclin dependent kinase 2 [KO:K02206] [EC:2.7.11.22] 898 CCNE1; cyclin E1 [KO:K06626] I want something that looks like CDKN1B CDK2 CCNE1
Try this http://rest.kegg.jp/list/hsa:90011+hsa:4550+hsa:2576
Refer this https://www.kegg.jp/kegg/rest/keggapi.html
This doesn't help. This is only for genes and does not give us the gene list in pathways. Try your solution with hsa05215 pathway and you will see it does not return the list of 90+ genes.