[ensembl-dev] testing Perl API access

Andy Yates ayates at ebi.ac.uk
Mon Apr 15 08:49:56 BST 2013


Dear Alex,

I believe you've hit a number of issues here.

1). Your output says you are using Ensembl API release 72; this is not the live version. I think you've hit an issue where you pasted the API download URL into a Unix/Linux shell and not quoted the URL. The last release of the website introduced a new URL for downloading the APIs which avoids this issue. For example this link will download the 67 Ensembl core API (switch the number to 71 to download the latest release):

http://www.ensembl.org/cvsdownloads/ensembl-67.tar.gz

2). You are connecting to USEast but this only hosts the current and previous release of the Ensembl databases. At the time of writing this is releases 71 & 70. Should you require 67 then you will have to use ensembldb.ensembl.org or host the required databases yourself.

I hope this helps.

Best regards,

Andy

Andrew Yates                   Ensembl Core Software Project Leader
EMBL-EBI                       Tel: +44-(0)1223-492538
Wellcome Trust Genome Campus   Fax: +44-(0)1223-494468
Cambridge CB10 1SD, UK         http://www.ensembl.org/

On 14 Apr 2013, at 03:07, Alex Reynolds <reynolda at uw.edu> wrote:

> I am attempting to learn the Ensembl Perl API for accessing some mouse data from Ensembl release 67.
> 
> I started with the installation document here:
> 
> http://may2012.archive.ensembl.org/info/docs/api/api_installation.html
> 
> I replaced "bioperl-live" with "bioperl-1.2.3"
> 
> I used the core API documentation examples to write a test script.
> 
> http://may2012.archive.ensembl.org/info/docs/api/core/core_tutorial.html#connecting
> 
> Here is the script I wrote:
> 
> ----
> $ more ensembl_test.pl
> #!/usr/bin/env perl
> 
> use strict;
> use warnings;
> use Data::Dumper;
> use Bio::EnsEMBL::Registry;
> 
> use Bio::EnsEMBL::ApiVersion;
> printf( "The API version used is %s\n", software_version() );
> 
> my $registry = 'Bio::EnsEMBL::Registry';
> $registry->load_registry_from_db(
>                                 -host => 'useastdb.ensembl.org',
>                                 -user => 'anonymous'
>                                 );
> 
> # should return Dumped contents of reference to list
> print Dumper $registry->get_all_DBAdaptors(); 
> 
> my @db_adaptors = @{ $registry->get_all_DBAdaptors() };
> 
> foreach my $db_adaptor (@db_adaptors) {
>    my $db_connection = $db_adaptor->dbc();
> 
>    printf(
>           "species/group\t%s/%s\ndatabase\t%s\nhost:port\t%s:%s\n\n",
>           $db_adaptor->species(),   
>           $db_adaptor->group(),
>           $db_connection->dbname(), 
>           $db_connection->host(),
>           $db_connection->port()
>           );
> }
> ----
> 
> The output from this script is:
> 
> ----
> The API version used is 72
> $VAR1 = [];
> ----
> 
> Should the value of @db_adaptors (or the list-reference equivalent) be empty? Or did I miss something with the module setup process?
> 
> Regards,
> Alex
> _______________________________________________
> Dev mailing list    Dev at ensembl.org
> Posting guidelines and subscribe/unsubscribe info: http://lists.ensembl.org/mailman/listinfo/dev
> Ensembl Blog: http://www.ensembl.info/





More information about the Dev mailing list