How to Cross-Reference Ensembl Gene IDs in Other Databases
By Dr. Zubair Khalid, DVM, MS, PhD ·

Cross-referencing an Ensembl gene ID means finding the record for the same gene in a second database, such as NCBI Gene, UniProt, or HGNC, using the identifiers and cross-reference tables those resources publish. In practice, it is the act of starting from a stable identifier like ENSG00000141510 and ending with its linked entries in RefSeq, UniProt, Entrez Gene, and symbol-based resources.
This matters because almost no bioinformatics project lives inside one database. A differential expression table produced with Ensembl identifiers has to be joined to pathway annotations from Reactome or KEGG, protein sequences from UniProt, clinical variant annotations from Ensembl VEP-based pipelines, and gene symbols for a reviewer to read. Every one of those joins depends on identifier cross-references, and every one of them can fail silently if the mapping is done casually. Reproducible annotation workflows exist precisely because this integration step is fragile. MuSA, for example, is a Nextflow pipeline built to automate germline variant annotation from resource setup through clinical interpretation, combining Ensembl VEP with curated plugins, ANNOVAR, and automated ACMG/AMP classification, because manual configuration of heterogeneous annotation resources had become a major bottleneck in genomic medicine [1]. The same principle applies one level down: if you cannot map an Ensembl gene ID to its neighbors in other databases reliably, everything downstream inherits that instability.
This article explains what Ensembl gene ID cross-reference databases are, how the identifiers themselves are built, and how to perform the mapping using the Ensembl genome browser, BioMart, the Ensembl REST API, and bulk annotation files. Every method shown uses real commands and real identifier formats.
What Ensembl Gene ID Cross-Reference Databases Mean
An Ensembl gene ID is a stable identifier, a permanent string such as ENSG00000141510, assigned by the Ensembl project to one gene. Ensembl is a genome annotation database and browser operated by EMBL-EBI in collaboration with the Wellcome Sanger Institute. A cross-reference (often shortened to xref) is a curated link from an Ensembl feature, such as a gene, transcript, or protein, to a record describing the same biological entity in an external database.
So when someone says "Ensembl gene ID cross-reference databases," they mean two things at once, depending on direction of travel:
- The external databases that Ensembl links to, such as NCBI Gene, UniProt, HGNC, MGI, RefSeq, GO, Reactome, and KEGG, as seen from an Ensembl identifier.
- The process of resolving an Ensembl ID in those external resources, either through Ensembl's own cross-reference tables or through the external resource's own mapping tools.
The two directions are not symmetric. Ensembl's xref table is the authoritative statement of what Ensembl believes maps to what. A third-party mapper, such as UniProt's ID mapping service, may use different evidence rules and can produce a different answer for the same pair of identifiers. Understanding which database is making the claim is the first half of correct interpretation. The second half is understanding identifier scope, because a gene ID, a transcript ID, and a protein ID are three different objects even though they look similar.
Anatomy of an Ensembl Gene ID
Every stable identifier Ensembl assigns follows a fixed grammar:
- A species prefix. Human identifiers have no species prefix, mouse starts with ENSMUS, rat with ENSRNO, and zebrafish with ENSDAR.
- A type letter. G marks a gene, T marks a transcript, P marks a protein, E marks an exon.
- An eleven-digit number. For example, the human TP53 gene is ENSG00000141510.
A version number can be appended after a dot, for example ENSG00000141510.14, where the integer increments whenever the underlying model of that gene changes in a new Ensembl release. Ensembl releases annotation updates several times a year, so version numbers change even when the identifier itself does not.
Three consequences of this grammar trip up nearly every beginner:
- ENSG00000141510 and ENST00000614592 are not interchangeable. The first is the TP53 gene, the second is one transcript of that gene. A gene can have many transcripts, and a transcript on the protein-coding set has one corresponding protein ID beginning with ENSP.
- Matching by gene symbol (TP53, BRCA1) instead of stable ID invites collisions, because symbols are reused across species and change over time. HGNC, the HUGO Gene Nomenclature Committee, curates official human symbols precisely to keep them stable, but symbols remain less stable than accession-based identifiers.
- The version suffix matters for reproducibility. Two analyses run against ENSG00000139618.12 versus ENSG00000139618.20 may be looking at different transcript models of BRCA2.
A useful habit is to record, in every results table, the identifier type (gene, transcript, protein), the Ensembl release number, and whether version suffixes were retained. These three facts determine whether your cross-references can be rechecked years later.
The Cross-Reference Databases You Will Actually Use
Before learning the mechanics, it helps to know what sits at the other end of the links. Ensembl maintains cross-references to a large set of resources. The ones that appear in almost every project are:
- NCBI Gene and RefSeq. NCBI Gene is the National Center for Biotechnology Information's gene record, and RefSeq is its curated reference sequence collection. RefSeq transcripts carry accession numbers such as NM_000546 for a TP53 transcript. Ensembl and RefSeq use different annotation pipelines, so their transcript models for the same gene can differ, sometimes substantially.
- UniProt. The universal protein resource, which assigns stable accessions such as P04637 for human TP53. UniProt is where protein-level annotation, sequence, and function live.
- HGNC. The naming authority for human genes, which assigns both the official symbol (TP53) and a stable HGNC ID (a numeric identifier, 11998 for TP53).
- MGI. The Mouse Genome Informatics database, the mouse counterpart to HGNC, with its own MGI accession numbers.
- GO, Reactome, and KEGG. Functional annotation resources. Gene Ontology terms describe molecular function, biological process, and cellular component. Reactome and KEGG describe pathways. These resources are reached through gene-to-term mapping tables rather than one-to-one links.
- Expression and model organism resources. Ensembl also links to resources such as ArrayExpress and species-specific genome databases.
Each of these has its own identifier vocabulary, which is exactly why the cross-reference tables exist. The table below summarizes the comparison students most often need.
| Identifier or database | Example | Level | Who assigns it | Typical use |
|---|---|---|---|---|
| Ensembl gene ID | ENSG00000141510 | Gene | Ensembl (EMBL-EBI) | Genomics pipelines, GTF files, VEP |
| Ensembl transcript ID | ENST00000614592 | Transcript | Ensembl | Isoform-level analysis, VEP output |
| Ensembl protein ID | ENSP00000503051 | Protein | Ensembl | Protein mapping, translation |
| HGNC symbol | TP53 | Gene | HGNC | Human-readable labels, publications |
| HGNC ID | HGNC:11998 | Gene | HGNC | Stable symbol-independent key |
| NCBI Entrez Gene ID | 7157 | Gene | NCBI | NCBI tools, many R packages |
| RefSeq mRNA accession | NM_000546.x | Transcript | NCBI | Reference sequences, clinical reports |
| UniProt accession | P04637 | Protein | UniProt | Protein annotation, domains, PTMs |
| MGI ID | MGI:104556 | Gene | MGI | Mouse genetics literature |
The most common confusion is between Ensembl and RefSeq because both are "reference" resources with similar-looking identifiers. They are independent annotation efforts. An Ensembl transcript and a RefSeq transcript for the same gene may have different exon structures, and that difference is biologically meaningful, not an error.
Ensembl Genome Browser Tutorial: Reading Cross-References on the Gene Page
The fastest way to inspect cross-references for a handful of genes is the Ensembl genome browser at www.ensembl.org. This section is a compact Ensembl genome browser tutorial focused on cross-references rather than on visualization.
Step by step, for human TP53:
- Type the gene symbol TP53, or the Ensembl ID ENSG00000141510, into the search box on the Ensembl homepage and submit. The search resolves symbols, IDs, aliases, and many external accessions.
- On the gene overview page, find the left-hand menu. The entry labeled Xrefs (or External references on some layouts) lists every external database Ensembl links for this gene, grouped by database name. You will see entries under NCBI Gene, UniProt, HGNC, RefSeq, and others.
- Click any individual xref entry to jump directly to that record. A UniProt xref opens the UniProt entry for P04637, an NCBI Gene xref opens Entrez Gene record 7157.
- To see the identifiers in tabular form, open the Export data option on the gene page or navigate to the gene's GeneID / External region view, which renders cross-references as a list you can copy.
- Note the release number displayed at the top of the page. Any cross-reference set you record is a statement about that specific release.
Two practical warnings apply at this step. First, the browser view shows the current release only, so a gene whose annotation changed recently may look different from the version in your analysis data. Second, the xref panel is a point-and-click tool suited to tens of identifiers, not thousands. For bulk work, use BioMart or the REST API described next.
Method 1: BioMart for Bulk Cross-Referencing
BioMart is Ensembl's query interface for extracting tabular data, available both as a web tool at www.ensembl.org/biomart and programmatically. It is the standard answer to the question "how do I convert a column of 5,000 Ensembl gene IDs into symbols, Entrez IDs, and UniProt accessions."
BioMart web interface
- Open www.ensembl.org/biomart and choose Ensembl Genes as the database.
- Choose the dataset, for example Human genes (GRCh38). The genome assembly choice matters, because coordinates and some mappings are assembly specific.
- Under Filters, expand Gene and paste your Ensembl gene IDs into the ID list limit box.
- Under Attributes, expand Gene and select Ensembl gene ID and Ensembl version. Then open the External section and select the cross-reference attributes you want, such as HGNC symbol, NCBI gene (Entrez) ID, and UniProt accessions.
- Click Results, review the count, and export as TSV or CSV.
BioMart from R with biomaRt
The biomaRt package reproduces the web tool in R and is the version most analysts should learn, because it makes the mapping a documented, rerunnable step. A minimal worked example:
library(biomaRt)
ensembl <- useEnsembl(
biomart = "genes",
dataset = "hsapiens_gene_ensembl"
)
xrefs <- getBM(
attributes = c("ensembl_gene_id",
"external_gene_name",
"hgnc_id",
"entrezgene_id",
"uniprot_gn",
"refseq_mrna"),
filters = "ensembl_gene_id",
values = c("ENSG00000141510", "ENSG00000139618"),
mart = ensembl
)
Three properties of this output deserve attention. Attribute names change between releases and between archive mirrors, so a script that worked last year may need its attribute list refreshed. Several attributes are many-to-one, meaning a gene with multiple UniProt entries appears on multiple rows, which will silently inflate row counts if you assume one row per gene. And missing values return as empty strings rather than NA, which breaks naive joins in R and is a frequent source of lost genes during merge operations.
The same caution applies in reverse: if your query identifiers came from an older Ensembl release, some will have been merged or retired, and BioMart will simply return nothing for them. Handling those failures is the job of the ID history service, covered below.
Method 2: The Ensembl REST API for Scripted Cross-Referencing
The Ensembl REST API serves the same cross-reference data as HTTP endpoints, which makes it the right choice inside scripts, notebooks, and pipeline stages. The base URL is https://rest.ensembl.org and responses default to JSON when you request it explicitly.
The endpoint that answers the cross-reference question directly is xrefs. For the human TP53 gene:
curl -H "Content-Type: application/json" \
-H "Accept: application/json" \
"https://rest.ensembl.org/xrefs/id/ENSG00000141510?content-type=application/json"
The response is a JSON array in which each element describes one cross-reference, with fields including the primary identifier in the external database, the database name, and display information. Filtering by database is built in:
curl -H "Accept: application/json" \
"https://rest.ensembl.org/xrefs/id/ENSG00000141510?content-type=application/json;database=UniProt"
Three companion endpoints cover the rest of the workflow:
- lookup converts an ID into Ensembl's own record for it, including symbol, biotype, assembly coordinates, and, with the expand parameter, linked transcripts and translations. Use it to confirm an ID is live before spending effort mapping it.
- id_history returns the history of a stable ID, including when it was created, merged, or retired, and what superseded it.
- sequence/id retrieves the sequence for an ID, useful when you want to verify a mapping by sequence similarity rather than by table.
Respect the service limits. The public REST service enforces rate limits of roughly a few tens of requests per second, and hammering it from a loop will get your client throttled. For anything beyond a few thousand identifiers, batch your queries, add delays, or switch to BioMart or bulk files. The API is for targeted lookups, not for re-mapping an entire transcriptome.
Method 3: Bulk Files and Pipeline Caches
For whole-organism or repeated mappings, downloading the mapping once and working locally is both faster and more reproducible. Three sources cover nearly every need:
- GTF and GFF3 annotation files from the Ensembl FTP site. Every feature line carries gene_id, transcript_id, and protein_id attributes, and the header records the release. These files establish the gene-to-transcript-to-protein hierarchy inside Ensembl itself, which is a prerequisite for correctly joining protein-level data.
- BioMart bulk exports, as described above, for cross-database tables covering all genes in a dataset at once.
- VEP cache files. The Variant Effect Predictor ships with cache distributions per assembly and release, and tools built on VEP resolve genes and transcripts against that cache. This is the mechanism behind annotation pipelines, and it is why pipeline authors pin a specific cache version.
Cross-References Inside Annotation Pipelines
Bulk mapping is not just a convenience, it is the backbone of variant interpretation. Ensembl VEP (Variant Effect Predictor) annotates variants against Ensembl transcripts, producing outputs keyed by Ensembl gene and transcript identifiers. Those identifiers then act as join keys to external annotation resources such as CADD, SpliceAI, and dbNSFP. MuSA illustrates how a modern pipeline handles this. It wraps Ensembl VEP with 22 curated plugins, adds ANNOVAR and a pre-configured dbNSFP distribution, runs the branches in parallel, and consolidates results into a single annotated output, all inside a fully containerized Nextflow workflow with a basic mode for diagnostic use and a deep-annotation mode for comprehensive analysis [1]. The design lesson generalizes: instead of ad hoc scripts performing one-off ID conversions at every step, a reproducible pipeline fixes the identifier versions, pins the database builds, and consolidates the joins in one auditable place [1].
When you build or evaluate such a pipeline, the cross-reference questions to ask are concrete. Which Ensembl release and assembly does the cache correspond to? Are version-suffixed or version-less gene IDs used as join keys? Which external resource versions are pinned, and how would you reproduce last year's annotation? A pipeline that cannot answer these is not reproducible, regardless of how well it is written [1].
Versioning, Retired IDs, and the ID History Service
Ensembl stable IDs are designed to persist, but they do change in defined circumstances. An ID is retired when a gene model is merged into another gene, when a gene is removed from the annotation, or when the assembly changes in ways that invalidate the model. When annotation improves, a gene's version suffix increments. When two gene models are merged, one ID survives and the other is retired, with a mapping to its successor.
The consequences for cross-referencing are practical and immediate:
- A mapping table built against Ensembl release 90 will contain IDs that no longer resolve in release 112. Before joining, check the release provenance of both sides.
- The REST endpoint id_history, and the equivalent Archive service on the Ensembl website, resolve retired IDs to their current equivalents. On the browser, the URL pattern uses the archive subdomain for old releases, such as grch37.archive.ensembl.org for the GRCh37-era annotation many clinical projects still use.
- Retained version suffixes act as a time stamp. A table of version-suffixed IDs is self-describing in a way that bare IDs are not.
If you inherit a dataset with unversioned IDs and no recorded release, you can still map it, but you should treat the result as approximate and document that uncertainty in your methods.
Interpreting the Results: One-to-Many and Many-to-One
Cross-reference interpretation is where most errors happen, and the errors have a consistent structure.
One Ensembl gene to many transcripts. A single gene ID maps to multiple transcript IDs, and only a subset of those transcripts are protein coding. When you map to UniProt at the protein level, you must first decide which transcript's protein you mean. Defaulting to the Ensembl canonical transcript is common and defensible, but the choice should be stated.
One Ensembl gene to many UniProt entries. Alternative splicing, isoform-specific entries, and partial entries mean a gene frequently links to several UniProt accessions. A naive one-row-per-gene assumption will duplicate your expression values across isoform rows.
One UniProt entry to many genes. The reverse direction also occurs, for example with genes sharing protein-coding sequence due to annotation or duplication history.
Symbol collisions. Mapping through symbols as an intermediate step multiplies these problems, because the same symbol can denote different genes in different species or at different times, and some symbols have been retired and reassigned. Route mappings through stable identifiers whenever possible and treat symbol-based joins as a display step, not an analysis step.
A defensible mapping report states, for each join, the source and target database, the release or version of each, the mapping tool, the date, and the count of identifiers that failed to map. That last number is the one reviewers ask about first.
Quick Review

- An Ensembl gene ID is a stable identifier, ENSG plus a species prefix, a type letter, and an eleven-digit number, optionally followed by a dot and version number.
- Gene, transcript, and protein IDs are distinct objects. Mapping between them requires explicit decisions about which transcript or protein you mean.
- Ensembl's xref tables link to NCBI Gene, RefSeq, UniProt, HGNC, MGI, GO, Reactome, and KEGG, among others, and Ensembl's mapping may differ from a third-party mapper's result.
- The genome browser xref panel suits tens of genes, BioMart suits thousands, the REST API suits scripts, and bulk files suit whole-genome work.
- The xrefs REST endpoint resolves one ID to its external links, lookup confirms an ID is live, and id_history recovers retired IDs.
- Release numbers and version suffixes are part of the data. Record them with every mapping.
- One-to-many relationships are normal. Assume duplicated rows and unmapped identifiers in every bulk conversion.
Common Mistakes and Limitations

These are the errors that appear repeatedly in real projects, along with how to avoid each one.
- Mixing identifier types in one column. A results table with ENSG, ENST, and ENSP values interleaved will join unpredictably. Split by type before mapping.
- Ignoring the version suffix. Stripping versions makes joins easier but discards the release information, and a bare ID can resolve differently across releases. Keep the versioned ID in a separate column and join on the bare ID only when you have confirmed release equivalence.
- Assuming Ensembl and RefSeq annotations agree. They are independent annotation efforts and their transcript models differ for many genes. Never treat an Ensembl transcript and a RefSeq accession as interchangeable without checking the model.
- Mapping through gene symbols. Symbols are not unique across species and have been reassigned historically. Use them for presentation, not for joins.
- Silently losing genes. Empty-string results in biomaRt, one-to-many expansions, and retired IDs all change row counts. Print the input count, mapped count, unmapped count, and expanded count after every conversion, and compare them.
- Using the wrong assembly mirror. GRCh37-era data should be queried against the archive site or the GRCh37-specific resources, not the current GRCh38 release. Coordinate-based cross-references are meaningless across assemblies.
- Overrunning the REST API. The public service is rate limited. Scripts that issue thousands of rapid requests will be throttled and may receive partial or failed responses that look like successful empty results.
- Treating a missing xref as a missing gene. A gene can genuinely lack a UniProt link, for example if it is a predicted or pseudogene annotation, or the link may simply not have been curated yet. Check the gene biotype before declaring an ID broken.
The honest limitation is that no cross-reference table is perfect. Curation lags annotation, resources disagree, and the correct mapping can depend on which transcript, which assembly, and which release you mean. A rigorous workflow pins all of those choices and states them, which is the same discipline that drives containerized annotation pipelines in clinical genomics [1].
Frequently Asked Questions
What does Ensembl gene ID cross-reference databases mean?
It means finding the records for the same gene in databases other than Ensembl, such as NCBI Gene, UniProt, or HGNC, starting from a stable Ensembl identifier like ENSG00000141510. The term covers both the curated links Ensembl publishes (xrefs) and the practical act of resolving your Ensembl IDs in those external resources.
How do I find the NCBI or UniProt entry for an Ensembl gene ID?
For a few genes, search the ID or symbol at www.ensembl.org and read the Xrefs panel on the gene page. For bulk work, use BioMart (web or the biomaRt package in R) with attributes such as entrezgene_id and uniprot_gn, or call the REST endpoint https://rest.ensembl.org/xrefs/id/{your_id} with curl.
Why do some Ensembl IDs return nothing when I map them?
The most likely reasons are that the ID was retired after a merge or annotation change, that your query is against a different release than the one the IDs came from, or that the ID belongs to a different identifier type than the endpoint expects. Use the id_history REST endpoint or the Archive service to resolve retired IDs to their current successors.
Should I report Ensembl IDs or gene symbols in a paper or results table?
Report both, with Ensembl IDs as the primary key and symbols as readable labels. Symbols are convenient but not stable or unique, while Ensembl IDs plus version suffixes are unambiguous and reproducible. Most journals expect accession numbers for any database entry you reference.
Can I convert thousands of Ensembl IDs to other database IDs at once?
Yes, and you should, rather than querying one at a time. BioMart handles thousands in a single query, biomaRt does the same from R, and downloading Ensembl's GTF plus a BioMart xref table covers whole-genome scale. Reserve the REST API for targeted lookups because it is rate limited.
Is an Ensembl transcript ID the same as a gene ID?
No. A gene ID (ENSG) identifies the gene, a transcript ID (ENST) identifies one of its transcripts, and a protein ID (ENSP) identifies the protein product of a coding transcript. Variant annotation output, sequence data, and protein resources are each keyed to different levels, so always record which type you are working with.