[ensembl-dev] Undefined Adaptor Seems to Fail Silently

Christopher Kelly cpjkelly at gmail.com
Fri Jun 1 17:55:08 BST 2012


Hi, 

Thanks for the replies.

After adding the verbose argument to load_registry_from_db, the script threw the following messages:


Bio::EnsEMBL::Variation::DBSQL::DBAdaptor module not found so
variation database s will be ignored if found

Bio::EnsEMBL::Funcgen::DBSQL::DBAdaptor module not found so functional
genomics databases will be ignored if found

Bio::EnsEMBL::Compara::DBSQL::DBAdaptor not found so the following
compara datab ases will be ignored: ensembl_compara_67.


Furthermore, after running ensemble/misc-scripts/ping_ensembl.pl, I was advised to set up my PERL5LIB environment variable correctly. 

I have attempted to set my PERL5LIB as so:

PERL5LIB=/programs/bio/ensembl/src/ensembl/modules:\
/programs/bio/ensembl-compara/ensembl-compara/modules:\
/programs/bio/bioperl/bioperl-1.2.3:\
/programs/bio/bioperl/bioperl-1.2.3/Bio

and while "echo $PERL5LIB" produces the expected output, using "perl -V" prints no %ENV or PERL5LIB information, even after entering the PERL5LIB settings in my bashrc file. 

Any ideas? I hope this is not heading beyond the intended scope of the list.


Thanks again,

Chris


On 2012-06-01, at 12:29 AM, Andy Yates wrote:

Hi Chris

My best guess is that you do not have the ensembl compara cvs checkout on your PERL5LIB. The registry code does some runtime module checking to see if it should attempt to load the compara db to avoid forcing users to bring every ensembl Api checkout onto their lib path.

You can confirm this behaviour by using the verbose flag in your first registry call.

All the best

Andy

P.s. you could also try running ensembl/misc-scripts/ping_ensembl.pl which also tries to diagnose your setup

Sent from my mobile.


On 2012-06-01, at 1:47 AM, mp at ebi.ac.uk wrote:

> Hi Kelly,
> 
> Your script is working fine in my hands. You can try using the -verbose
> option in load_registry_from_db to see if you are having problems with the
> registry:
> 
> $registry->load_registry_from_db(
>    -verbose => 1,
>    -host => 'ensembldb.ensembl.org',
>    -user => 'anonymous',
>    -port => '5306');
> 
> or test that you have a valid registry by printing $registry.
> Let me know if this helps you to track down the problem.
> 
> Also, once you get the genomeDB adaptor, make sure that you use
> "Homo_sapiens" as species name.
> 
> Cheers,
> 
> M;
> 
>> 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
>> 
>> _______________________________________________
>> Dev mailing list    Dev at ensembl.org
>> List admin (including subscribe/unsubscribe):
>> http://lists.ensembl.org/mailman/listinfo/dev
>> Ensembl Blog: http://www.ensembl.info/
>> 
> 
> 
> 
> _______________________________________________
> Dev mailing list    Dev at ensembl.org
> List admin (including subscribe/unsubscribe): http://lists.ensembl.org/mailman/listinfo/dev
> Ensembl Blog: http://www.ensembl.info/





More information about the Dev mailing list