[ensembl-dev] Undefined Adaptor Seems to Fail Silently

Chris Kelly cpjkelly at gmail.com
Thu May 31 20:18:32 BST 2012


Hi all,

I am trying to create a genome_db object in order to test whether or
not the Ensembl Perl API is working properly on our system so that we
can eventually use the API to retrieve protein families. I am running
Debian 4.0, with bioperl 1.2.3, Perl 5.8.8, and Ensembl API version 67
installed. I am running a script (based off of that in the
EnsemblTutorial.pdf included in my Compara release) to connect to the
public Ensembl database, create a GenomeDBAdaptor, and use the
GenomeDBAdaptor to fetch data. Here is the code:

use strict;
use warnings;
use lib qw( . /programs/bio/ensembl/src/ensembl/modules);
use Bio::EnsEMBL::Registry;

my $registry='Bio::EnsEMBL::Registry';

$registry->load_registry_from_db(
    -host => 'ensembldb.ensembl.org',
    -user => 'anonymous',
    -port => '5306');

my $genome_db_adaptor = $registry->get_adaptor(
    'Multi', 'compara', 'GenomeDB');

my $this_genome_db = $genome_db_adaptor->fetch_by_name_assembly("Homo
sapiens", "NCBI36");


This script throws:
 "Can't call method "fetch_by_name_assembly" on an undefined value at
checker4.pl line 18."

The arguments passed to fetch_by_name_assembly() appear to be defined,
so I checked to see if the adaptor itself was defined: "if(defined
$genome_db_adaptor)" returns false. I have therefore concluded that
the adaptor itself is undefined, but I can't figure out the reason.
Perl doesn't complain when creating the adaptor.

If anyone could suggest a reason why the adaptor or method arguments
appear to be undefined, I would appreciate it very much.

Thanks in advance,

Chris Kelly




More information about the Dev mailing list