[BioC] How to quikly know whether two genes are in the same pathway or not?

James F. Reid james.reid at ifom-ieo-campus.it
Sat May 21 15:16:06 CEST 2011


Hi Fabrice,

suppose you are using human genes and that you have gene symbols then 
you could do something like this:

library("org.Hs.eg.db")

twoGenes <- c("ATM", "TP53")
## convert them to Entrez Gene ids
twoGenesEG <- unlist(mget(twoGenes, org.Hs.egSYMBOL2EG))
twoGenesEGkegg <- mget(twoGenesEG, org.Hs.egPATH)
commonKegg <- intersect(twoGenesEGkegg[[1]], twoGenesEGkegg[[2]])
print(commonKegg)
##[1] "04110" "04115" "04210"
## what are these pathways
library("KEGG.db")
mget(commonKegg, KEGGPATHID2NAME)
##$`04110`
##[1] "Cell cycle"
##
##$`04115`
##[1] "p53 signaling pathway"
##
##$`04210`
##[1] "Apoptosis"

HTH,
J.



On 05/21/2011 01:39 PM, Fabrice Tourre wrote:
> If just using Gene symbol is OK or should convert Gene symbol to KEGG
> gene ids first?
>
>
>
> On Sat, May 21, 2011 at 12:58 PM, Fabrice Tourre<fabrice.ciup at gmail.com>  wrote:
>> Dear list,
>> Is there some packages can quikly know whether two genes are in the
>> same pathway or not? For example, kegg pathway.
>> Thanks.
>>
>
> _______________________________________________
> Bioconductor mailing list
> Bioconductor at r-project.org
> https://stat.ethz.ch/mailman/listinfo/bioconductor
> Search the archives: http://news.gmane.org/gmane.science.biology.informatics.conductor
>



More information about the Bioconductor mailing list