Question: Converting Ensembl Gene Ids To Hgnc Gene Name / Coordinates
2
gravatar for Ryan D
6.9 years ago by
Ryan D3.3k
USA
Ryan D3.3k wrote:

I have a long list of Ensembl IDs and am completely unfamiliar with the Ensembl browser. I want to convert these guys to Refseq IDs using the UCSC table browser, mySQL, or some other tool. So given a list like this:

ENSG00000197021
ENSG00000204379

How do I turn them into this?

CXorf40B
XAGE1A

I gather from what I've tried that there are not 1-to-1 mappings for Ensembl gene IDs to RefSeq names, but I'd like to be wrong. At a minimum, I'd like to get the hg18 or hg19 coordinates for a list of these genes, but Biomart only comes back with about 3/4 of them. Any help?

ADD COMMENTlink modified 8 months ago by ericrkofman0 • written 6.9 years ago by Ryan D3.3k
3

Do you only get coordinates for 3/4 of your Ensembl gene IDs or only RefSeq IDs for 3/4 of your Ensembl gene IDs? From which version of Ensembl are your Ensembl gene IDs? Lastly, CXorf40B and XAGE1A are HGNC symbols.

ADD REPLYlink written 6.9 years ago by Bert Overduin3.6k
1

Ensembl has more genes than RefSeq (at least for human), which might partly explain why you only get mappings for 3/4 of your genes.

ADD REPLYlink written 6.9 years ago by Andrew W290

Similar post: http://biostar.stackexchange.com/questions/22/gene-id-conversion-tool

ADD REPLYlink written 6.9 years ago by Rm7.7k

As Bert says, your examples are not Refseq IDs. Please refine the question title.

ADD REPLYlink written 6.9 years ago by Neilfws48k
6
gravatar for Jorge Amigo
6.9 years ago by
Jorge Amigo11k
Santiago de Compostela, Spain
Jorge Amigo11k wrote:

the easiest way I know is to use BioMart, selecting the database and dataset of interest, going to the Filters section and on the Gene subsection enter the ensembl geneids (ID list limits), and choosing on the Attributes section the Associated Gene Name. you may add any other wanted attribute, such as Chromosome Name, Gene Start (bp) or Gene End (bp).

ADD COMMENTlink written 6.9 years ago by Jorge Amigo11k
1

You can access archived versions of Ensembl via this link: http://asia.ensembl.org/info/website/archives/index.html. Click on any archive to access older BioMarts e.g. http://sep2009.archive.ensembl.org/biomart/martview.

ADD REPLYlink written 6.9 years ago by Neilfws48k
1

Thanks, Neil. This appears to work. I was able to pull 387 of these. I then used LiftOver to get to hg19 coordinates. Thanks everyone.

ADD REPLYlink written 6.9 years ago by Ryan D3.3k

Hi Jorge, it seems to get me all of the information I need, but as with Pierre's search, it comes back with 287 matches. A number of genes are not found: ENSG00000213499 ENSG00000203949 ENSG00000203981 ENSG00000203946 ENSG00000213503 ENSG00000068990

It seems that some of these genes might only be mapped to hg18. Is there a way to access that build through Biomart? It was not immediately evident.

ADD REPLYlink written 6.9 years ago by Ryan D3.3k
6
gravatar for Pierre Lindenbaum
6.9 years ago by
France/Nantes/Institut du Thorax - INSERM UMR1087
Pierre Lindenbaum112k wrote:

using the public mysql server of UCSC:

mysql  --user=genome --host=genome-mysql.cse.ucsc.edu -A -D hg19
mysql> select distinct G.gene,N.value from ensGtp as G, ensemblToGeneName as N where 
  G.transcript=N.name and
  G.gene in ("ENSG00000197021", "ENSG00000204379") ;
+-----------------+----------+
| gene            | value    |
+-----------------+----------+
| ENSG00000197021 | CXorf40B | 
| ENSG00000204379 | XAGE1A   | 
+-----------------+----------+
2 rows in set (0.21 sec)
ADD COMMENTlink written 6.9 years ago by Pierre Lindenbaum112k

Thanks, Pierre. I gather I could also pull chr/start/end this way? Or do I need to access another table? This got me a similar result: 287 results of 389 ENSEMBL IDs queried.

ADD REPLYlink written 6.9 years ago by Ryan D3.3k

I tried doing the same in hg18, but get the error: ERROR 1146 (42S02): Table 'hg18.ensemblToGeneName' doesn't exist

ADD REPLYlink written 6.9 years ago by Ryan D3.3k

for the positions you can use a 3rd table named "ensGene" mapping the ensembl transcripts.

ADD REPLYlink written 6.9 years ago by Pierre Lindenbaum112k
4
gravatar for Pierre Lindenbaum
6.9 years ago by
France/Nantes/Institut du Thorax - INSERM UMR1087
Pierre Lindenbaum112k wrote:

Second solution using the mysql server of ensembl:

mysql -h ensembldb.ensembl.org --port 5306  -u anonymous -D homo_sapiens_core_64_37 -A

> select distinct
   G.stable_id,
   S.synonym
from
  gene_stable_id as G,
  object_xref as OX,
  external_synonym as S,
  xref as X ,
  external_db as D
where
  D.external_db_id=X.external_db_id and
  X.xref_id=S.xref_id and
  OX.xref_id=X.xref_id and
  OX.ensembl_object_type="Gene" and
  G.gene_id=OX.ensembl_id and
  G.stable_id in ("ENSG00000197021", "ENSG00000204379");

+-----------------+----------+
| stable_id       | synonym  |
+-----------------+----------+
| ENSG00000197021 | CXorf40  |
| ENSG00000197021 | CXorf40B |
| ENSG00000197021 | EOLA1    |
| ENSG00000204379 | CT12.1a  |
| ENSG00000204379 | GAGED2   |
| ENSG00000204379 | XAGE-1   |
| ENSG00000204379 | XAGE1    |
| ENSG00000204379 | CT12.1   |
| ENSG00000204379 | CT12.1B  |
| ENSG00000204379 | CTP9     |
| ENSG00000204379 | XAGE1A   |
| ENSG00000204379 | XAGE1C   |
| ENSG00000204379 | XAGE1D   |
| ENSG00000204379 | XAGE1E   |
| ENSG00000204379 | XAGE1E.  |
| ENSG00000204379 | XAGE1B   |
| ENSG00000204379 | CT12.1E  |
| ENSG00000204379 | CT12.1C  |
| ENSG00000204379 | CT12.1D  |
+-----------------+----------+
19 rows in set (0.05 sec)
ADD COMMENTlink written 6.9 years ago by Pierre Lindenbaum112k
Getting below error when tried with homo_sapiens_core_75_37

ERROR 1146 (42S02): Table 'homo_sapiens_core_75_37.gene_stable_id' doesn't exist

ADD REPLYlink written 4.0 years ago by Rm7.7k

Sorry, it is solved after changing to "gene as G," instead of "gene_stable_id as G,"

ADD REPLYlink written 4.0 years ago by Rm7.7k
0
gravatar for Andrew W
6.9 years ago by
Andrew W290
Andrew W290 wrote:

Looking just at the mapping of Ensembl gene IDs to NCBI Gene IDs (or locus names- I would work with Gene IDs first and convert them to locus names at the end of the processing), you can use CCDS flatfiles (in ftp://ftp.ncbi.nih.gov/pub/CCDS/current_human/) and Ensembl cDNA Fasta files (e.g. ftp://ftp.ensembl.org/pub/release-64/fasta/homo_sapiens/cdna/Homo_sapiens.GRCh37.64.cdna.all.fa.gz).

CCDS2Sequence.current.txt maps CCDS IDs to Ensembl transcript IDs (ENSTs).

CCDS.current.txt maps CCDS IDs to NCBI Gene IDs (and locus names).

The Ensembl Fasta header can be parsed to map Ensembl transcript IDs to Ensembl gene IDs (ENSGs).

ADD COMMENTlink written 6.9 years ago by Andrew W290
0
gravatar for Giulietta - Ensembl Helpdesk
5.0 years ago by
Cambridge, UK

You can do this with Ensembl with MySQL:

Consider the display_xref_id rather than going for external synonym. The external synonym is not always available.

The following query should work: select distinct stable_id, display_label from gene g, xref x where x.xref_id = g.display_xref_id

ADD COMMENTlink written 5.0 years ago by Giulietta - Ensembl Helpdesk1.2k
0
gravatar for ericrkofman
8 months ago by
ericrkofman0 wrote:

I ran into this issue too, and found no easy solutions online. So I made a quick script that could perform the conversion: https://github.com/vanallenlab/EnsemblToHGNC

Hope it's helpful! The Ensembl/HGNC mapping it uses is a download from January 2018.

ADD COMMENTlink written 8 months ago by ericrkofman0
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1447 users visited in the last hour