Hi Tim,

It's because your code is assuming that the IDs you want to pass in are 
ACCNUMs.  but this is a "eg" package, and therefore you need to give the 
symbol mapping entrez gene IDs.

So for example:
org.Hs.egALIAS2EG[['CDKN2A']]

mget('1029', org.Hs.egSYMBOL, ifnotfound=NA)

Will show you that the SYMBOL attached to EG 1029 is in fact CDKN2A, 
which is also what was aliased to it.

Or if you wanted "official symbols" for things that are aliased to "P15",
p15 =  org.Hs.egALIAS2EG[['P15']]
mget(p15, org.Hs.egSYMBOL, ifnotfound=NA)


In contrast the ACCNUM stuff is only meaningful in the sense that it can 
maybe connect you to an entrez gene ID.  The Entrez gene IDs are central 
to this database and to this package.  You can see what data is in a 
given mapping by looking at toTable()

So:

toTable(org.Hs.egSYMBOL)

Will show you a table that has entrez genes on the left and gene symbols 
on the right.  This is why you will never find anything in that mapping 
by using ACCNUMs.  Because there are not any ACCNUMs in that mapping.  
If you look at all the mappings you will notice that they all have a 
certain central "gene_id" key in common.  That key is an entrez gene ID.


   Marc




On 05/12/2011 11:20 AM, Tim Triche, Jr. wrote:
> This is strange (and worrisome).  Why can't I get sensible mappings 
> for p15/CDKN2A from org.Hs.eg.db?
>
> > mget(grep('NM_',unlist(mget(org.Hs.egALIAS2EG[['P15']], 
> org.Hs.egACCNUM)), val=T), org.Hs.egSYMBOL, ifnotfound=NA)
> $NM_004936
> [1] NA
>
> $NM_078487
> [1] NA
>
> $NM_006713
> [1] NA
>
> $NM_013248
> [1] NA
>
> > sessionInfo()
> R version 2.14.0 Under development (unstable) (2011-04-21 r55577)
> Platform: x86_64-unknown-linux-gnu (64-bit)
>
> locale:
>  [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C
>  [3] LC_TIME=en_US.UTF-8        LC_COLLATE=en_US.UTF-8
>  [5] LC_MONETARY=C              LC_MESSAGES=C
>  [7] LC_PAPER=en_US.UTF-8       LC_NAME=C
>  [9] LC_ADDRESS=C               LC_TELEPHONE=C
> [11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C
>
> attached base packages:
> [1] stats     graphics  grDevices datasets  utils     methods   base
>
> other attached packages:
> [1] org.Hs.eg.db_2.5.0   RSQLite_0.9-4        DBI_0.2-5
> [4] AnnotationDbi_1.15.3 Biobase_2.13.1       gtools_2.6.2
> [7] reshape_0.8.4        plyr_1.4
>
> loaded via a namespace (and not attached):
> [1] tools_2.14.0
>
>
> -- 
>
>
>         If people do not believe that mathematics is simple, it is
>         only because they do not realize how complicated life is.
>
> John von Neumann 
> <http://www-groups.dcs.st-and.ac.uk/%7Ehistory/Biographies/Von_Neumann.html>
>


	[[alternative HTML version deleted]]

