Hi.

Like other identifiers, entrez ids are also change as time goes by.

I used two library, 'org.Hs.eg.db' and 'annotate', to convert entrez ids into gene symbols.

Some of entrez ids were not changed because of updates.

Take  entrez id 164022 as an example,

    library(org.Hs.eg.db);library(annotate)
    getSYMBOL('164022',data = 'org.Hs.eg')

    164022 
    NA

If you search the entrez id at NCBI, it says that 164022 was replaced with 653505.

(See. http://www.ncbi.nlm.nih.gov/gene/?term=164022)

Therefore, you should use the newest entrez id to get its gene symbol.

    getSYMBOL('653505',data = 'org.Hs.eg')
       653505 
    "PPIAL4A"

There are about two hundreds entrez ids whose symbol-matching failed.

As manual searching requires huge time, I need a solution.

How to update old entrez ids into newest entrez id?

Is there a function or library for this?
This is a very good question.

You may try with the [mygene.info][1] service:

    $: curl mygene.info/v2/gene/164022?fields=entrezgene
    {
    _id: "653505",
    entrezgene: 653505
    }

Remove the "fields" parameter to get more information.

For more documentation on mygene.info, check http://mygene.info/v2/api#MyGene.info-gene-annotation-services-GET-Gene-annotation-service


  [1]: http://mygene.info/