# Converting Ensembl Gene IDs to Entrez Gene IDs through biomart

Well, I'm trying to convert a list of Human Gene referenced by Ensembl Gene IDs to Entrez Gene IDs. I have been advised to use biomart.

I tried to get a kind of conversion table for all human genes. I don't know if my settings are wrong, but I didn't find any checkbox for Entrez Gene Id in the section Attributes > External References. I've just found the Entrez transcript name ID (see below), but it's not what I need.

How can I use biomart for such a conversion?

Edit:

According to this video tutorial EntrezGene ID should be an option in biomart (see screenshot below).

That video tutorial is outdated.

• That tutorial is 8 years old. Sep 6 '17 at 11:50
• Yes, @Emily_Ensembl. I'm sorry, I had gotten it from an old documentation page : ) Sep 6 '17 at 11:55

The ID you need is the NCBI gene ID, which is the same as the EntrezGene ID.

• Thank you Ian, it seems working. Anyway, there is no a one-to-one matching (i.e., some Ensembl IDs do not have an NCBI counterpart). Is it normal? Sep 6 '17 at 11:29
• Yes. See my answer to your other question. bioinformatics.stackexchange.com/a/2474/235 Sep 6 '17 at 11:59

Conversion using R:

library(biomaRt)
mart <- useDataset("hsapiens_gene_ensembl", useMart("ensembl"))
genes <- getBM(
filters="ensembl_gene_id",
attributes=c("ensembl_gene_id", "entrezgene"),
values=ensembl.genes,
mart=mart)


Where ensembl.genes is a vector of Ensembl gene IDs.

• As of 2021-08-05, the attributes argument should be set to attributes = c("ensembl_gene_id", "entrezgene_id"). I believe that the "_id" appendage has been added to the attribute since this answer was first posted. Aug 5 at 22:23