[ensembl-dev] Ensemble api tutorial

Kieron Taylor ktaylor at ebi.ac.uk
Mon Oct 8 19:03:50 BST 2012


Dear Enrico,

This error is consistent with using the wrong version of the API for a given database.

Under these circumstances you can use the -verbose => 1 flag in load_registry_from_db() to highlight the problem.

If you have checked head code out of CVS, your code will be too new for our public servers. You can correct this with either a release 68 code download, or (less recommended) add the db_version => 68 argument to the load_registry command.

Regards,

On 8 Oct 2012, at 18:29, enrico1970 at yahoo.com wrote:

> Dear Support,
> I am executing the code to "get a list of all Ensemble databases installed on a given database host" from http://www.ensembl.org/info/docs/api/core/core_tutorial.html
> but when I run the code it does not return any database or any error.
> 
> Please find the code below.
> 
> Thanks,
> 
> Enrico
> 
> use Bio::EnsEMBL::Registry;
> 
> my $registry = 'Bio::EnsEMBL::Registry';
> 
> $registry->load_registry_from_db(
>     -host => 'ensembldb.ensembl.org', # alternatively 'useastdb.ensembl.org'
>     -user => 'anonymous'
> );
> 
> 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()
>     );
> }
> _______________________________________________
> 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/

Kieron Taylor PhD.
Ensembl Core software developer

EMBL - European Bioinformatics Institute







More information about the Dev mailing list