How to download all human canonical transcript IDs from Ensembl version 75, via BioMart?

1,606 views
Skip to first unread message

Jinghua Frank Feng

unread,
May 7, 2015, 4:37:30 AM5/7/15
to biomar...@googlegroups.com
Hello,

I think I know how to download all human transcript IDs from Ensembl version 75, via BioMart. But How can I download only the IDs of canonical transcript? Thanks.

Regards,

Frank

Thomas Maurel

unread,
May 7, 2015, 6:20:19 AM5/7/15
to Jinghua Frank Feng, biomar...@googlegroups.com
Dear Frank,

I am afraid that the canonical transcripts are not available in the Ensembl Gene mart at the moment.

Alternatively, you can retrieve this information using the Ensembl perl API:
1) Get our ensembl perl API on branch 75 from github: “git clone -b release/75 https://github.com/Ensembl/ensembl
2) Follow the installation documentation: http://www.ensembl.org/info/docs/api/api_installation.html
3) Run the following script:
use strict;
use warnings;
 
use Bio::EnsEMBL::Registry;
my $reg = "Bio::EnsEMBL::Registry";
 
$reg->load_registry_from_db(
   -host => 'ensembldb.ensembl.org',
   -user => ‘anonymous',
   -dbname  => 'homo_sapiens_core_75_37'
);
 
open(OUTFILE, ">human_canonical_transcripts_v75.fa");
 
my $gene_adaptor = $reg->get_adaptor('human', 'core', 'gene');
my @genes = @{$gene_adaptor->fetch_all};
 
while(my $gene = shift @genes) {
  print
    (OUTFILE
        $gene->canonical_transcript->stable_id, ".", $gene->canonical_transcript->version, "\n");
}

If you have any questions regarding the ensembl perl API, please email: help...@ensembl.org

Hope this helps,
Thomas
-- 
You received this message because you are subscribed to the Google Groups "biomart-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to biomart-user...@googlegroups.com.
Visit this group at http://groups.google.com/group/biomart-users.
For more options, visit https://groups.google.com/d/optout.

--
Thomas Maurel
Bioinformatician - Ensembl Production Team
European Bioinformatics Institute (EMBL-EBI)
European Molecular Biology Laboratory
Wellcome Trust Genome Campus
Hinxton
Cambridge CB10 1SD
United Kingdom

Jinghua Frank Feng

unread,
May 11, 2015, 10:57:52 PM5/11/15
to biomar...@googlegroups.com, mau...@ebi.ac.uk
Thank you very much, Thomas. It worked perfectly!

Regards,
Frank
Reply all
Reply to author
Forward
0 new messages