Thanks Jim!

On Tuesday, May 13, 2014 10:18 AM, James W. MacDonald <jmacdon@uw.edu> wrote:
 
Hi Tim,

>symbols <- c('JAK1','AATK','A2BP1','A2LD1')
>select(org.Hs.eg.db, symbols, c("ENTREZID","GENENAME"), "ALIAS")
   ALIAS ENTREZID                                          GENENAME
1  JAK1     3716                                    Janus kinase 1
2  AATK     9625              apoptosis-associated tyrosine kinase
3 A2BP1    54715 RNA binding protein, fox-1 homolog (C. elegans) 1
4 A2LD1    87769              gamma-glutamylamine cyclotransferase

Best,

Jim




On 5/13/2014 6:38 AM, Tim Smith wrote:
> Hi,
>
> I was trying to map gene symbols to gene names using the org.Hs.eg.db package. I first convert the gene symbol to an entrez id, and then convert that to a gene name (example code below). However, during this process I can't get the gene names for some of the genes:
>
> --------------------------
>
> library(org.Hs.eg.db)
>
> ### First two genes are ok...
> symbols <- c('JAK1','AATK','A2BP1','A2LD1')
>
> for(sym in symbols){
>      print('***')
>      entrezid <- as.character(mget(sym,org.Hs.egSYMBOL2EG,ifnotfound=NA))
>      print(sym)
>      print(entrezid)
>      
>      genename <- as.character(mget(entrezid,org.Hs.egGENENAME,ifnotfound=NA))
>      print(genename)
>      
> }
>
>
> -------------------------
>
> I don't get any gene names for the last two genes in this example. Is there a better way of doing this? Perhaps with some other function/package?
>
>
> thanks.
>
>     [[alternative HTML version deleted]]
>
>
>
> _______________________________________________
> Bioconductor mailing list
> Bioconductor@r-project.org
> https://stat.ethz.ch/mailman/listinfo/bioconductor
> Search the archives: http://news.gmane.org/gmane.science.biology.informatics.conductor

-- 
James W. MacDonald, M.S.
Biostatistician
University of Washington
Environmental and Occupational Health Sciences
4225 Roosevelt Way NE, # 100
Seattle WA 98105-6099
	[[alternative HTML version deleted]]

