How To Map Ensembl Exon Ids To Gene Ids?
4
5
Entering edit mode
13.7 years ago
Yuan ▴ 50

Hi,

I have a list of Ensembl exon ids (ENSE***), and I would like to map them back to genes. I tried to do it with R/biomaRt without success. My gut feeling is that there is a relatively simple solution just around the corner, but I can't find it. I would appreciate it very much if you could provide some help/insight. Thanks a million in advance!

identifiers ensembl • 7.3k views
ADD COMMENT
7
Entering edit mode
13.7 years ago
Gareth Palidwor ★ 1.6k

Using Ensembl BioMart, select Ensembl Gene ID (under features) and Ensembl Exon ID (under Exon). Make sure these are the only two attributes selected and you'll get a list of ensembl gene id and exon ids associated with each other. Look up the ones you want on that list.

Probably most easily done in biomaRt in R; can look the associations up from the resultant data frame.

ADD COMMENT
6
Entering edit mode
13.7 years ago

You can use the following mysql query:

mysql -u anonymous -h ensembldb.ensembl.org -P 5306 -D homo_sapiens_core_61_37f -A

use homo_sapiens_core_61_37f;

    select distinct
      XREF.display_label,
      EXONSTABLE.stable_id
    from
       external_db as EXTDB,
       xref as XREF,
       gene as GENE,
       exon as EXON,
       exon_stable_id as EXONSTABLE,
       exon_transcript,
       transcript
    where
       EXTDB.db_name="HGNC" and
       XREF.external_db_id = EXTDB.external_db_id and
       XREF.xref_id = GENE.display_xref_id and
      transcript.gene_id=GENE.gene_id and
      transcript.transcript_id= exon_transcript.transcript_id and
      exon_transcript.exon_id=EXON.exon_id and
      EXON.exon_id=EXONSTABLE.exon_id and
      EXONSTABLE.stable_id in ("ENSE00001849227")
    ;

    +---------------+-----------------+
    | display_label | stable_id       |
    +---------------+-----------------+
    | EIF4G1        | ENSE00001849227 | 
    +---------------+-----------------+
ADD COMMENT
4
Entering edit mode
13.7 years ago
Bert Overduin ★ 3.7k

Hi,

Alternatively, you can use the Ensembl Perl API (http://www.ensembl.org/info/docs/api/index.html).

The following code:

#!/usr/bin/perl

use strict;
use Bio::EnsEMBL::Registry;

my $registry = "Bio::EnsEMBL::Registry";
$registry->load_registry_from_db(-host => 'ensembldb.ensembl.org', -user => 'anonymous');

my $gene_adaptor = $registry->get_adaptor("Human", "Core", "Gene");

my $exon_stable_id = "ENSE00001849227";

my $gene = $gene_adaptor->fetch_by_exon_stable_id($exon_stable_id);

print $gene->external_name, "\t", $gene->stable_id, "\t", $exon_stable_id, "\n";

will give you:

EIF4G1  ENSG00000114867 ENSE00001849227
ADD COMMENT
4
Entering edit mode
13.7 years ago

Just to add to this- at the moment, Ensembl Exon IDs cannot be entered into BioMart as 'Filters'. However, the BioMart team is going to implement the Exon ID filter, so in the future, you would not have to go through the API.

ADD COMMENT

Login before adding your answer.

Traffic: 1792 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