[ensembl-dev] Getting import_vcf.pl working

Andy Yates ayates at ebi.ac.uk
Wed Feb 27 09:45:35 GMT 2013


Hi Alexander,

Whenever you see an error like "Cannot call dbc on an undefined variable" it normally means that a registry lookup was attempted and no database adaptor was found for your species & group combination. Looking at your example registry file I can see a possible issue with how you have defined your aliases. The value you give as the first parameter to add_alias *must* match the name of the species in the DBAdaptor. I would change your code to:

Bio::EnsEMBL::Utils::ConfigRegistry->add_alias(
  -species => 'Homo_sapiens',
  -alias   => ['Homo sapiens', 'H_Sapiens', 'human']
);

You can see the -species parameter now matches the values given to the DBAdaptor. 

Hope this helps,

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 27 Feb 2013, at 00:38, "Tchourbanov, Alexander Y - (atchourb)" <atchourb at email.arizona.edu> wrote:

> Dear ENSEMBL developers,
> 
> I have modified the registry in a way it was suggested as listed below:
> 
> use strict;
> 
> use Bio::EnsEMBL::Utils::ConfigRegistry;
> use Bio::EnsEMBL::DBSQL::DBAdaptor;
> use Bio::EnsEMBL::Variation::DBSQL::DBAdaptor;
> use Bio::EnsEMBL::Compara::DBSQL::DBAdaptor;
> 
> new Bio::EnsEMBL::DBSQL::DBAdaptor(
>   -species => 'Homo_sapiens',
>   -user    => 'atchourb',
>   -pass => 'abcd1234',
>   -host    => 'localhost',
>   -port    => '3306',
>   -dbname  => 'homo_sapiens_core_70_37'
> );
> 
> new Bio::EnsEMBL::Variation::DBSQL::DBAdaptor(
>   -species => 'Homo_sapiens',
>   -user    => 'atchourb',
>   -pass => 'abcd1234',
>   -host    => 'localhost',
>   -port    => '3306',
>   -dbname  => 'VCFdump'
> );
> 
> my @aliases = ( 'H_Sapiens', 'human' );
> 
> Bio::EnsEMBL::Utils::ConfigRegistry->add_alias(
>   -species => 'Homo sapiens',
>   -alias   => \@aliases
> );
> 
> 1;
> 
> Now I am getting the following error:
> 
> Can't call method "dbc" without a package or object reference at /data/Alex/EnsemblAPI/ensembl-variation/scripts/import/import_vcf.pl line 1268.
> and the application lists all the command line parameters. What do I need to change further for this simple case to work, I want to populate the database VCFdump with the variants that we have here, and all the database connectivity to the best of my knowledge should work without problems, I have been able to connect to the database with JDBC connection. Is there simple way to debug this situation to see what is missing in "dbc" object?
> 
> Thanks for all the suggestions,
> 
> Alexander
> _______________________________________________
> 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