converting ensembl IDs to Entrez Ids with eutils
0
0
Entering edit mode
9.3 years ago
Assa Yeroslaviz ★ 1.8k

Hi,

Is there a way to take a list of Ensembl IDs and convert them to Entrez IDs using the eutilities from NCBI?

I know I can do it with biomaRt, but I would like to compare the results also to the NCBI site itself, as I have a lot of Ensembl IDs, for which I didn't get any hits in biomaRt.

I just want to make sure, that they are really not there. I guess some of the Ensembl IDs are retired, obsolete etc.

Thanks in advance

Assa

eutils entrez ensembl conversion biomaRt • 3.3k views
ADD COMMENT
0
Entering edit mode

Generally, it would be a good idea to post some examples..

ADD REPLY
0
Entering edit mode

an example of what? some ensembl IDs?

I don't have an example, as I didn't find out, whether or not this is possible. I don't want to post a biomart example, because this is done so many times.

sorry

ADD REPLY
1
Entering edit mode

Input and expected output..

For example, with Entrez Direct you could:

esearch -db protein -query "ENSG00000187048" | efetch -format uid
2493371

Here the output is protein GI. Is that the ID you're after?

Or maybe it is the Gene ID you're after?

esearch -db gene -query "ENSG00000187048" | efetch -format uid
1579

As far as I know, there is no such thing as "Entrez ID"..

ADD REPLY
0
Entering edit mode

Sorry for the misunderstanding about the examples.

Yes, this is what I am looking for, but for over 10K of ensembl IDs. Is it possible to run it in a loop or to let esearch read it from a file?

ADD REPLY
1
Entering edit mode

Well, you could

`for next in $(cat list) do GENEID=$(esearch -db gene -query "$next" | efetch -format uid) echo "$next<literal tab>$GENEID" done ```

But I don't think that they would appreciate at the NCBI you bombing their servers like that (they might ban your IP). You could add sleep 5or something like that after the echo if you can wait longer for the output. Overall, perhaps it would be a better idea to make use of the gene2ensembl mapping file

ADD REPLY
0
Entering edit mode

It is interesting to see, that this list of gene IDs does not correspond to the results of the biomaRt search I have run.

But still thanks for everything.

ADD REPLY

Login before adding your answer.

Traffic: 1842 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6